diff --git a/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.create_backup.js b/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.create_backup.js index 522528ea9a2..a1f61a75bd8 100644 --- a/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.create_backup.js +++ b/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.create_backup.js @@ -23,6 +23,9 @@ function main(parent, backup, backupId) { // [START file_v1_generated_CloudFilestoreManager_CreateBackup_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.create_instance.js b/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.create_instance.js index f1ee31af676..2e7737982f8 100644 --- a/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.create_instance.js +++ b/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.create_instance.js @@ -23,6 +23,9 @@ function main(parent, instanceId, instance) { // [START file_v1_generated_CloudFilestoreManager_CreateInstance_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.delete_backup.js b/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.delete_backup.js index e7a3f857a5d..0ab3b8c2b9b 100644 --- a/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.delete_backup.js +++ b/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.delete_backup.js @@ -23,6 +23,9 @@ function main(name) { // [START file_v1_generated_CloudFilestoreManager_DeleteBackup_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.delete_instance.js b/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.delete_instance.js index 160d13046bd..deb4a52129b 100644 --- a/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.delete_instance.js +++ b/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.delete_instance.js @@ -23,6 +23,9 @@ function main(name) { // [START file_v1_generated_CloudFilestoreManager_DeleteInstance_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.get_backup.js b/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.get_backup.js index dbf655241ca..8cbde7304d7 100644 --- a/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.get_backup.js +++ b/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.get_backup.js @@ -23,6 +23,9 @@ function main(name) { // [START file_v1_generated_CloudFilestoreManager_GetBackup_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.get_instance.js b/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.get_instance.js index 64c7a269f81..a494686408e 100644 --- a/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.get_instance.js +++ b/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.get_instance.js @@ -23,6 +23,9 @@ function main(name) { // [START file_v1_generated_CloudFilestoreManager_GetInstance_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.list_backups.js b/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.list_backups.js index 37fe21306b2..fa20cb0b802 100644 --- a/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.list_backups.js +++ b/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.list_backups.js @@ -23,6 +23,9 @@ function main(parent) { // [START file_v1_generated_CloudFilestoreManager_ListBackups_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.list_instances.js b/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.list_instances.js index 800afa0218c..67d55401c2e 100644 --- a/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.list_instances.js +++ b/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.list_instances.js @@ -23,6 +23,9 @@ function main(parent) { // [START file_v1_generated_CloudFilestoreManager_ListInstances_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.restore_instance.js b/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.restore_instance.js index 2be0689e19d..2c691937fc6 100644 --- a/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.restore_instance.js +++ b/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.restore_instance.js @@ -23,6 +23,9 @@ function main(name, fileShare) { // [START file_v1_generated_CloudFilestoreManager_RestoreInstance_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.update_backup.js b/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.update_backup.js index 153cf08ed8b..8457ab63a4c 100644 --- a/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.update_backup.js +++ b/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.update_backup.js @@ -23,6 +23,9 @@ function main(backup, updateMask) { // [START file_v1_generated_CloudFilestoreManager_UpdateBackup_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.update_instance.js b/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.update_instance.js index 80af3634128..a58df33a8d9 100644 --- a/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.update_instance.js +++ b/packages/google-cloud-filestore/samples/generated/v1/cloud_filestore_manager.update_instance.js @@ -23,6 +23,9 @@ function main() { // [START file_v1_generated_CloudFilestoreManager_UpdateInstance_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-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 cab0260d63d..9959a93643a 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 @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 73, + "end": 76, "type": "FULL" } ], @@ -78,7 +78,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -118,7 +118,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -166,7 +166,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 62, "type": "FULL" } ], @@ -210,7 +210,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -258,7 +258,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -298,7 +298,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 77, "type": "FULL" } ], @@ -354,7 +354,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -394,7 +394,7 @@ "segments": [ { "start": 25, - "end": 68, + "end": 71, "type": "FULL" } ], @@ -442,7 +442,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -482,7 +482,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], diff --git a/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.create_backup.js b/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.create_backup.js index 8a1d810399f..aa4b06a679b 100644 --- a/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.create_backup.js +++ b/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.create_backup.js @@ -23,6 +23,9 @@ function main(parent, backup, backupId) { // [START file_v1beta1_generated_CloudFilestoreManager_CreateBackup_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.create_instance.js b/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.create_instance.js index efd8d806f5b..62c0b12052c 100644 --- a/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.create_instance.js +++ b/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.create_instance.js @@ -23,6 +23,9 @@ function main(parent, instanceId, instance) { // [START file_v1beta1_generated_CloudFilestoreManager_CreateInstance_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.delete_backup.js b/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.delete_backup.js index 29babc4b0d9..c02be6c5b5d 100644 --- a/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.delete_backup.js +++ b/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.delete_backup.js @@ -23,6 +23,9 @@ function main(name) { // [START file_v1beta1_generated_CloudFilestoreManager_DeleteBackup_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.delete_instance.js b/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.delete_instance.js index 115388bfcbf..e6ce14ab7d1 100644 --- a/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.delete_instance.js +++ b/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.delete_instance.js @@ -23,6 +23,9 @@ function main(name) { // [START file_v1beta1_generated_CloudFilestoreManager_DeleteInstance_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.get_backup.js b/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.get_backup.js index 6a1ba8dcb04..c785a3781d7 100644 --- a/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.get_backup.js +++ b/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.get_backup.js @@ -23,6 +23,9 @@ function main(name) { // [START file_v1beta1_generated_CloudFilestoreManager_GetBackup_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.get_instance.js b/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.get_instance.js index 5b1b616b021..cfd5079fb75 100644 --- a/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.get_instance.js +++ b/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.get_instance.js @@ -23,6 +23,9 @@ function main(name) { // [START file_v1beta1_generated_CloudFilestoreManager_GetInstance_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.list_backups.js b/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.list_backups.js index 20b4215eab0..7869cd6805f 100644 --- a/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.list_backups.js +++ b/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.list_backups.js @@ -23,6 +23,9 @@ function main(parent) { // [START file_v1beta1_generated_CloudFilestoreManager_ListBackups_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.list_instances.js b/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.list_instances.js index 550c331c3ce..80063ca8554 100644 --- a/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.list_instances.js +++ b/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.list_instances.js @@ -23,6 +23,9 @@ function main(parent) { // [START file_v1beta1_generated_CloudFilestoreManager_ListInstances_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.restore_instance.js b/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.restore_instance.js index feac01861bb..033044f5c2b 100644 --- a/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.restore_instance.js +++ b/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.restore_instance.js @@ -23,6 +23,9 @@ function main(name, fileShare) { // [START file_v1beta1_generated_CloudFilestoreManager_RestoreInstance_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.update_backup.js b/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.update_backup.js index d1c471ad7fc..119c22dd2f4 100644 --- a/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.update_backup.js +++ b/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.update_backup.js @@ -23,6 +23,9 @@ function main(backup, updateMask) { // [START file_v1beta1_generated_CloudFilestoreManager_UpdateBackup_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.update_instance.js b/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.update_instance.js index 176ad3d1cd0..d100b618398 100644 --- a/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.update_instance.js +++ b/packages/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.update_instance.js @@ -23,6 +23,9 @@ function main(updateMask, instance) { // [START file_v1beta1_generated_CloudFilestoreManager_UpdateInstance_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-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 263d8d394c1..5d7947cde17 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 @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 73, + "end": 76, "type": "FULL" } ], @@ -78,7 +78,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -118,7 +118,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -166,7 +166,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], @@ -210,7 +210,7 @@ "segments": [ { "start": 25, - "end": 68, + "end": 71, "type": "FULL" } ], @@ -262,7 +262,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -302,7 +302,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 77, "type": "FULL" } ], @@ -358,7 +358,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -398,7 +398,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -446,7 +446,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -486,7 +486,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], 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 47d7bf1b6d5..a225be52adb 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 @@ -30,7 +30,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -418,7 +417,8 @@ export class CloudFilestoreManagerClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -791,7 +791,7 @@ export class CloudFilestoreManagerClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createInstance, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.filestore.v1.Instance, @@ -936,7 +936,7 @@ export class CloudFilestoreManagerClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateInstance, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.filestore.v1.Instance, @@ -1084,7 +1084,7 @@ export class CloudFilestoreManagerClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.restoreInstance, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.filestore.v1.Instance, @@ -1222,7 +1222,7 @@ export class CloudFilestoreManagerClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.deleteInstance, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -1371,7 +1371,7 @@ export class CloudFilestoreManagerClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createBackup, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.filestore.v1.Backup, @@ -1509,7 +1509,7 @@ export class CloudFilestoreManagerClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.deleteBackup, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -1649,7 +1649,7 @@ export class CloudFilestoreManagerClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateBackup, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.filestore.v1.Backup, @@ -1812,7 +1812,7 @@ export class CloudFilestoreManagerClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listInstances.createStream( - this.innerApiCalls.listInstances as gax.GaxCall, + this.innerApiCalls.listInstances as GaxCall, request, callSettings ); @@ -1869,7 +1869,7 @@ export class CloudFilestoreManagerClient { this.initialize(); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2025,7 +2025,7 @@ export class CloudFilestoreManagerClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listBackups.createStream( - this.innerApiCalls.listBackups as gax.GaxCall, + this.innerApiCalls.listBackups as GaxCall, request, callSettings ); @@ -2083,7 +2083,7 @@ export class CloudFilestoreManagerClient { this.initialize(); return this.descriptors.page.listBackups.asyncIterate( this.innerApiCalls['listBackups'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } 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 8f7850717a6..a76fcc0df21 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 @@ -30,7 +30,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -425,7 +424,8 @@ export class CloudFilestoreManagerClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -815,7 +815,7 @@ export class CloudFilestoreManagerClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createInstance, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.filestore.v1beta1.Instance, @@ -960,7 +960,7 @@ export class CloudFilestoreManagerClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateInstance, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.filestore.v1beta1.Instance, @@ -1111,7 +1111,7 @@ export class CloudFilestoreManagerClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.restoreInstance, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.filestore.v1beta1.Instance, @@ -1249,7 +1249,7 @@ export class CloudFilestoreManagerClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.deleteInstance, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -1396,7 +1396,7 @@ export class CloudFilestoreManagerClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createBackup, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.filestore.v1beta1.Backup, @@ -1534,7 +1534,7 @@ export class CloudFilestoreManagerClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.deleteBackup, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -1674,7 +1674,7 @@ export class CloudFilestoreManagerClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateBackup, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.filestore.v1beta1.Backup, @@ -1837,7 +1837,7 @@ export class CloudFilestoreManagerClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listInstances.createStream( - this.innerApiCalls.listInstances as gax.GaxCall, + this.innerApiCalls.listInstances as GaxCall, request, callSettings ); @@ -1894,7 +1894,7 @@ export class CloudFilestoreManagerClient { this.initialize(); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2056,7 +2056,7 @@ export class CloudFilestoreManagerClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listBackups.createStream( - this.innerApiCalls.listBackups as gax.GaxCall, + this.innerApiCalls.listBackups as GaxCall, request, callSettings ); @@ -2114,7 +2114,7 @@ export class CloudFilestoreManagerClient { this.initialize(); return this.descriptors.page.listBackups.asyncIterate( this.innerApiCalls['listBackups'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } 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 914d07c4894..825d6e3b8f7 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 @@ -145,109 +145,111 @@ function stubAsyncIterationCall( } describe('v1.CloudFilestoreManagerClient', () => { - it('has servicePath', () => { - const servicePath = - cloudfilestoremanagerModule.v1.CloudFilestoreManagerClient.servicePath; - assert(servicePath); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + cloudfilestoremanagerModule.v1.CloudFilestoreManagerClient.servicePath; + assert(servicePath); + }); - it('has apiEndpoint', () => { - const apiEndpoint = - cloudfilestoremanagerModule.v1.CloudFilestoreManagerClient.apiEndpoint; - assert(apiEndpoint); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + cloudfilestoremanagerModule.v1.CloudFilestoreManagerClient.apiEndpoint; + assert(apiEndpoint); + }); - it('has port', () => { - const port = - cloudfilestoremanagerModule.v1.CloudFilestoreManagerClient.port; - assert(port); - assert(typeof port === 'number'); - }); + it('has port', () => { + const port = + cloudfilestoremanagerModule.v1.CloudFilestoreManagerClient.port; + assert(port); + assert(typeof port === 'number'); + }); - it('should create a client with no option', () => { - const client = - new cloudfilestoremanagerModule.v1.CloudFilestoreManagerClient(); - assert(client); - }); + it('should create a client with no option', () => { + const client = + new cloudfilestoremanagerModule.v1.CloudFilestoreManagerClient(); + assert(client); + }); - it('should create a client with gRPC fallback', () => { - const client = - new cloudfilestoremanagerModule.v1.CloudFilestoreManagerClient({ - fallback: true, - }); - assert(client); - }); + it('should create a client with gRPC fallback', () => { + const client = + new cloudfilestoremanagerModule.v1.CloudFilestoreManagerClient({ + fallback: true, + }); + assert(client); + }); - it('has initialize method and supports deferred initialization', async () => { - const client = - new cloudfilestoremanagerModule.v1.CloudFilestoreManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.cloudFilestoreManagerStub, undefined); - await client.initialize(); - assert(client.cloudFilestoreManagerStub); - }); + it('has initialize method and supports deferred initialization', async () => { + const client = + new cloudfilestoremanagerModule.v1.CloudFilestoreManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.cloudFilestoreManagerStub, undefined); + await client.initialize(); + assert(client.cloudFilestoreManagerStub); + }); - it('has close method for the initialized client', done => { - const client = - new cloudfilestoremanagerModule.v1.CloudFilestoreManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = + new cloudfilestoremanagerModule.v1.CloudFilestoreManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.cloudFilestoreManagerStub); + client.close().then(() => { + done(); }); - client.initialize(); - assert(client.cloudFilestoreManagerStub); - client.close().then(() => { - done(); }); - }); - it('has close method for the non-initialized client', done => { - const client = - new cloudfilestoremanagerModule.v1.CloudFilestoreManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = + new cloudfilestoremanagerModule.v1.CloudFilestoreManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.cloudFilestoreManagerStub, undefined); + client.close().then(() => { + done(); }); - assert.strictEqual(client.cloudFilestoreManagerStub, undefined); - client.close().then(() => { - done(); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = - new cloudfilestoremanagerModule.v1.CloudFilestoreManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new cloudfilestoremanagerModule.v1.CloudFilestoreManagerClient({ + 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 cloudfilestoremanagerModule.v1.CloudFilestoreManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new cloudfilestoremanagerModule.v1.CloudFilestoreManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getInstance', () => { diff --git a/packages/google-cloud-filestore/test/gapic_cloud_filestore_manager_v1beta1.ts b/packages/google-cloud-filestore/test/gapic_cloud_filestore_manager_v1beta1.ts index 06c84e5da31..b7eced66804 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 @@ -145,111 +145,113 @@ function stubAsyncIterationCall( } describe('v1beta1.CloudFilestoreManagerClient', () => { - it('has servicePath', () => { - const servicePath = - cloudfilestoremanagerModule.v1beta1.CloudFilestoreManagerClient - .servicePath; - assert(servicePath); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + cloudfilestoremanagerModule.v1beta1.CloudFilestoreManagerClient + .servicePath; + assert(servicePath); + }); - it('has apiEndpoint', () => { - const apiEndpoint = - cloudfilestoremanagerModule.v1beta1.CloudFilestoreManagerClient - .apiEndpoint; - assert(apiEndpoint); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + cloudfilestoremanagerModule.v1beta1.CloudFilestoreManagerClient + .apiEndpoint; + assert(apiEndpoint); + }); - it('has port', () => { - const port = - cloudfilestoremanagerModule.v1beta1.CloudFilestoreManagerClient.port; - assert(port); - assert(typeof port === 'number'); - }); + it('has port', () => { + const port = + cloudfilestoremanagerModule.v1beta1.CloudFilestoreManagerClient.port; + assert(port); + assert(typeof port === 'number'); + }); - it('should create a client with no option', () => { - const client = - new cloudfilestoremanagerModule.v1beta1.CloudFilestoreManagerClient(); - assert(client); - }); + it('should create a client with no option', () => { + const client = + new cloudfilestoremanagerModule.v1beta1.CloudFilestoreManagerClient(); + assert(client); + }); - it('should create a client with gRPC fallback', () => { - const client = - new cloudfilestoremanagerModule.v1beta1.CloudFilestoreManagerClient({ - fallback: true, - }); - assert(client); - }); + it('should create a client with gRPC fallback', () => { + const client = + new cloudfilestoremanagerModule.v1beta1.CloudFilestoreManagerClient({ + fallback: true, + }); + assert(client); + }); - it('has initialize method and supports deferred initialization', async () => { - const client = - new cloudfilestoremanagerModule.v1beta1.CloudFilestoreManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.cloudFilestoreManagerStub, undefined); - await client.initialize(); - assert(client.cloudFilestoreManagerStub); - }); + it('has initialize method and supports deferred initialization', async () => { + const client = + new cloudfilestoremanagerModule.v1beta1.CloudFilestoreManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.cloudFilestoreManagerStub, undefined); + await client.initialize(); + assert(client.cloudFilestoreManagerStub); + }); - it('has close method for the initialized client', done => { - const client = - new cloudfilestoremanagerModule.v1beta1.CloudFilestoreManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = + new cloudfilestoremanagerModule.v1beta1.CloudFilestoreManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.cloudFilestoreManagerStub); + client.close().then(() => { + done(); }); - client.initialize(); - assert(client.cloudFilestoreManagerStub); - client.close().then(() => { - done(); }); - }); - it('has close method for the non-initialized client', done => { - const client = - new cloudfilestoremanagerModule.v1beta1.CloudFilestoreManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = + new cloudfilestoremanagerModule.v1beta1.CloudFilestoreManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.cloudFilestoreManagerStub, undefined); + client.close().then(() => { + done(); }); - assert.strictEqual(client.cloudFilestoreManagerStub, undefined); - client.close().then(() => { - done(); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = - new cloudfilestoremanagerModule.v1beta1.CloudFilestoreManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new cloudfilestoremanagerModule.v1beta1.CloudFilestoreManagerClient({ + 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 cloudfilestoremanagerModule.v1beta1.CloudFilestoreManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new cloudfilestoremanagerModule.v1beta1.CloudFilestoreManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getInstance', () => {