diff --git a/packages/google-cloud-networksecurity/samples/quickstart.js b/packages/google-cloud-networksecurity/samples/quickstart.js index 878d4efdc6f..183929c5840 100644 --- a/packages/google-cloud-networksecurity/samples/quickstart.js +++ b/packages/google-cloud-networksecurity/samples/quickstart.js @@ -50,8 +50,9 @@ function main(parent) { }; // Run request - const iterable = - await networksecurityClient.listClientTlsPoliciesAsync(request); + const iterable = await networksecurityClient.listClientTlsPoliciesAsync( + request + ); for await (const response of iterable) { console.log(response); } 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 76a20f84839..ae976508867 100644 --- a/packages/google-cloud-networksecurity/src/v1/network_security_client.ts +++ b/packages/google-cloud-networksecurity/src/v1/network_security_client.ts @@ -101,8 +101,7 @@ export class NetworkSecurityClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -110,7 +109,7 @@ export class NetworkSecurityClient { * 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 NetworkSecurityClient({fallback: 'rest'}, gax); + * const client = new NetworkSecurityClient({fallback: true}, gax); * ``` */ constructor( @@ -182,7 +181,7 @@ export class NetworkSecurityClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -235,7 +234,7 @@ export class NetworkSecurityClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 99acea71eae..b263e53d42f 100644 --- a/packages/google-cloud-networksecurity/src/v1beta1/network_security_client.ts +++ b/packages/google-cloud-networksecurity/src/v1beta1/network_security_client.ts @@ -101,8 +101,7 @@ export class NetworkSecurityClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -110,7 +109,7 @@ export class NetworkSecurityClient { * 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 NetworkSecurityClient({fallback: 'rest'}, gax); + * const client = new NetworkSecurityClient({fallback: true}, gax); * ``` */ constructor( @@ -182,7 +181,7 @@ export class NetworkSecurityClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -235,7 +234,7 @@ export class NetworkSecurityClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 b3d1f2b613e..60d3a3a2c56 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 @@ -99,8 +99,7 @@ export class ManagedNotebookServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -108,7 +107,7 @@ export class ManagedNotebookServiceClient { * 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 ManagedNotebookServiceClient({fallback: 'rest'}, gax); + * const client = new ManagedNotebookServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -181,7 +180,7 @@ export class ManagedNotebookServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -236,7 +235,7 @@ export class ManagedNotebookServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 dc5c30946ed..233fdd7ddbd 100644 --- a/packages/google-cloud-notebooks/src/v1/notebook_service_client.ts +++ b/packages/google-cloud-notebooks/src/v1/notebook_service_client.ts @@ -99,8 +99,7 @@ export class NotebookServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -108,7 +107,7 @@ export class NotebookServiceClient { * 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 NotebookServiceClient({fallback: 'rest'}, gax); + * const client = new NotebookServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -180,7 +179,7 @@ export class NotebookServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -244,7 +243,7 @@ export class NotebookServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 ff877d97c9e..b01a4a50b00 100644 --- a/packages/google-cloud-notebooks/src/v1beta1/notebook_service_client.ts +++ b/packages/google-cloud-notebooks/src/v1beta1/notebook_service_client.ts @@ -99,8 +99,7 @@ export class NotebookServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -108,7 +107,7 @@ export class NotebookServiceClient { * 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 NotebookServiceClient({fallback: 'rest'}, gax); + * const client = new NotebookServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -180,7 +179,7 @@ export class NotebookServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -225,7 +224,7 @@ export class NotebookServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 36c8d1b5616..72caae6ab56 100644 --- a/packages/google-cloud-notebooks/src/v2/notebook_service_client.ts +++ b/packages/google-cloud-notebooks/src/v2/notebook_service_client.ts @@ -99,8 +99,7 @@ export class NotebookServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -108,7 +107,7 @@ export class NotebookServiceClient { * 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 NotebookServiceClient({fallback: 'rest'}, gax); + * const client = new NotebookServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -180,7 +179,7 @@ export class NotebookServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -223,7 +222,7 @@ export class NotebookServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { diff --git a/packages/google-cloud-optimization/src/v1/fleet_routing_client.ts b/packages/google-cloud-optimization/src/v1/fleet_routing_client.ts index 0f144dd07ac..3e783af1a08 100644 --- a/packages/google-cloud-optimization/src/v1/fleet_routing_client.ts +++ b/packages/google-cloud-optimization/src/v1/fleet_routing_client.ts @@ -106,8 +106,7 @@ export class FleetRoutingClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -115,7 +114,7 @@ export class FleetRoutingClient { * 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 FleetRoutingClient({fallback: 'rest'}, gax); + * const client = new FleetRoutingClient({fallback: true}, gax); * ``` */ constructor( @@ -181,7 +180,7 @@ export class FleetRoutingClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -198,7 +197,7 @@ export class FleetRoutingClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 aaac321e76c..2a8d210271a 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 @@ -93,8 +93,7 @@ export class EnvironmentsClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -102,7 +101,7 @@ export class EnvironmentsClient { * 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 EnvironmentsClient({fallback: 'rest'}, gax); + * const client = new EnvironmentsClient({fallback: true}, gax); * ``` */ constructor( @@ -168,7 +167,7 @@ export class EnvironmentsClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -205,7 +204,7 @@ export class EnvironmentsClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 a7c071825d1..f9b67725b6e 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 @@ -90,8 +90,7 @@ export class ImageVersionsClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -99,7 +98,7 @@ export class ImageVersionsClient { * 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 ImageVersionsClient({fallback: 'rest'}, gax); + * const client = new ImageVersionsClient({fallback: true}, gax); * ``` */ constructor( @@ -165,7 +164,7 @@ export class ImageVersionsClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { 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 d8b56b8d2b4..f54e6bf1d10 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 @@ -93,8 +93,7 @@ export class EnvironmentsClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -102,7 +101,7 @@ export class EnvironmentsClient { * 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 EnvironmentsClient({fallback: 'rest'}, gax); + * const client = new EnvironmentsClient({fallback: true}, gax); * ``` */ constructor( @@ -168,7 +167,7 @@ export class EnvironmentsClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -205,7 +204,7 @@ export class EnvironmentsClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 bd515298179..470d956ef15 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 @@ -90,8 +90,7 @@ export class ImageVersionsClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -99,7 +98,7 @@ export class ImageVersionsClient { * 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 ImageVersionsClient({fallback: 'rest'}, gax); + * const client = new ImageVersionsClient({fallback: true}, gax); * ``` */ constructor( @@ -165,7 +164,7 @@ export class ImageVersionsClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { 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 f09920a22d5..816385b84d2 100644 --- a/packages/google-cloud-orgpolicy/src/v2/org_policy_client.ts +++ b/packages/google-cloud-orgpolicy/src/v2/org_policy_client.ts @@ -109,8 +109,7 @@ export class OrgPolicyClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -118,7 +117,7 @@ export class OrgPolicyClient { * 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 OrgPolicyClient({fallback: 'rest'}, gax); + * const client = new OrgPolicyClient({fallback: true}, gax); * ``` */ constructor( @@ -184,7 +183,7 @@ export class OrgPolicyClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { 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 8d7244562b4..749679b89d3 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 @@ -93,8 +93,7 @@ export class OsConfigServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -102,7 +101,7 @@ export class OsConfigServiceClient { * 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 OsConfigServiceClient({fallback: 'rest'}, gax); + * const client = new OsConfigServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -168,7 +167,7 @@ export class OsConfigServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { 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 9cc9479d153..56fba8181fb 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 @@ -96,8 +96,7 @@ export class OsConfigZonalServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -105,7 +104,7 @@ export class OsConfigZonalServiceClient { * 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 OsConfigZonalServiceClient({fallback: 'rest'}, gax); + * const client = new OsConfigZonalServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -171,7 +170,7 @@ export class OsConfigZonalServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -243,7 +242,7 @@ export class OsConfigZonalServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 0064d16b354..2e332a336de 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 @@ -96,8 +96,7 @@ export class OsConfigZonalServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -105,7 +104,7 @@ export class OsConfigZonalServiceClient { * 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 OsConfigZonalServiceClient({fallback: 'rest'}, gax); + * const client = new OsConfigZonalServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -171,7 +170,7 @@ export class OsConfigZonalServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -246,7 +245,7 @@ export class OsConfigZonalServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 1f8e9841b6e..faffb20265b 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 @@ -93,8 +93,7 @@ export class OsConfigServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -102,7 +101,7 @@ export class OsConfigServiceClient { * 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 OsConfigServiceClient({fallback: 'rest'}, gax); + * const client = new OsConfigServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -168,7 +167,7 @@ export class OsConfigServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { 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 81edb933426..35cb3304303 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 @@ -2360,8 +2360,9 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ]; client.innerApiCalls.listInstanceOsPoliciesCompliances = stubSimpleCall(expectedResponse); - const [response] = - await client.listInstanceOSPoliciesCompliances(request); + const [response] = await client.listInstanceOSPoliciesCompliances( + request + ); assert(stub.calledOnce); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( 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 e88d1762fce..f6ee17bdbf2 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 @@ -91,8 +91,7 @@ export class OsLoginServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -100,7 +99,7 @@ export class OsLoginServiceClient { * 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 OsLoginServiceClient({fallback: 'rest'}, gax); + * const client = new OsLoginServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -166,7 +165,7 @@ export class OsLoginServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { 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 684bc8e540f..fb4ea735d23 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 @@ -91,8 +91,7 @@ export class OsLoginServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -100,7 +99,7 @@ export class OsLoginServiceClient { * 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 OsLoginServiceClient({fallback: 'rest'}, gax); + * const client = new OsLoginServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -166,7 +165,7 @@ export class OsLoginServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { 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 3488aac0d16..f4466b6c014 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 @@ -88,8 +88,7 @@ export class PhishingProtectionServiceV1Beta1Client { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -97,7 +96,7 @@ export class PhishingProtectionServiceV1Beta1Client { * 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 PhishingProtectionServiceV1Beta1Client({fallback: 'rest'}, gax); + * const client = new PhishingProtectionServiceV1Beta1Client({fallback: true}, gax); * ``` */ constructor( @@ -164,7 +163,7 @@ export class PhishingProtectionServiceV1Beta1Client { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { 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 bb6f5e62357..8c9534731f3 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 @@ -89,8 +89,7 @@ export class PolicyTroubleshooterClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -98,7 +97,7 @@ export class PolicyTroubleshooterClient { * 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 PolicyTroubleshooterClient({fallback: 'rest'}, gax); + * const client = new PolicyTroubleshooterClient({fallback: true}, gax); * ``` */ constructor( @@ -164,7 +163,7 @@ export class PolicyTroubleshooterClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { 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 7e6085598a2..06718c7b3cb 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 @@ -89,8 +89,7 @@ export class PolicyTroubleshooterClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -98,7 +97,7 @@ export class PolicyTroubleshooterClient { * 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 PolicyTroubleshooterClient({fallback: 'rest'}, gax); + * const client = new PolicyTroubleshooterClient({fallback: true}, gax); * ``` */ constructor( @@ -164,7 +163,7 @@ export class PolicyTroubleshooterClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { 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 927145ad462..09015006ef8 100644 --- a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts +++ b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts @@ -89,8 +89,7 @@ export class IamCheckerClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -98,7 +97,7 @@ export class IamCheckerClient { * 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 IamCheckerClient({fallback: 'rest'}, gax); + * const client = new IamCheckerClient({fallback: true}, gax); * ``` */ constructor( @@ -164,7 +163,7 @@ export class IamCheckerClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { 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 13515cc5a38..8643eaf9d69 100644 --- a/packages/google-cloud-privatecatalog/src/v1beta1/private_catalog_client.ts +++ b/packages/google-cloud-privatecatalog/src/v1beta1/private_catalog_client.ts @@ -110,8 +110,7 @@ export class PrivateCatalogClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -119,7 +118,7 @@ export class PrivateCatalogClient { * 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 PrivateCatalogClient({fallback: 'rest'}, gax); + * const client = new PrivateCatalogClient({fallback: true}, gax); * ``` */ constructor( @@ -185,7 +184,7 @@ export class PrivateCatalogClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { diff --git a/packages/google-cloud-rapidmigrationassessment/samples/quickstart.js b/packages/google-cloud-rapidmigrationassessment/samples/quickstart.js index da9365b0314..6abe5d90d11 100644 --- a/packages/google-cloud-rapidmigrationassessment/samples/quickstart.js +++ b/packages/google-cloud-rapidmigrationassessment/samples/quickstart.js @@ -50,8 +50,9 @@ function main() { }; // Run request - const iterable = - await rapidMigrationAssessmentClient.listCollectorsAsync(request); + const iterable = await rapidMigrationAssessmentClient.listCollectorsAsync( + request + ); console.log(`Listing collectors for location ${location}:`); let count = 0; for await (const response of iterable) { 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 a0cc7d743b0..2a62e3a25df 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 @@ -96,8 +96,7 @@ export class RapidMigrationAssessmentClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -105,7 +104,7 @@ export class RapidMigrationAssessmentClient { * 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 RapidMigrationAssessmentClient({fallback: 'rest'}, gax); + * const client = new RapidMigrationAssessmentClient({fallback: true}, gax); * ``` */ constructor( @@ -176,7 +175,7 @@ export class RapidMigrationAssessmentClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -219,7 +218,7 @@ export class RapidMigrationAssessmentClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 eb537a509f2..85465a3336c 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 @@ -90,8 +90,7 @@ export class RecaptchaEnterpriseServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -99,7 +98,7 @@ export class RecaptchaEnterpriseServiceClient { * 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 RecaptchaEnterpriseServiceClient({fallback: 'rest'}, gax); + * const client = new RecaptchaEnterpriseServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -166,7 +165,7 @@ export class RecaptchaEnterpriseServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { 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 4500aed63fe..ea3041c9f4f 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 @@ -88,8 +88,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -97,7 +96,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { * 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 RecaptchaEnterpriseServiceV1Beta1Client({fallback: 'rest'}, gax); + * const client = new RecaptchaEnterpriseServiceV1Beta1Client({fallback: true}, gax); * ``` */ constructor( @@ -164,7 +163,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { 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 85675c380fc..fcd953cd2cc 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 @@ -2285,8 +2285,9 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { ]; client.innerApiCalls.listRelatedAccountGroupMemberships = stubSimpleCall(expectedResponse); - const [response] = - await client.listRelatedAccountGroupMemberships(request); + const [response] = await client.listRelatedAccountGroupMemberships( + request + ); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( client.innerApiCalls.listRelatedAccountGroupMemberships as SinonStub @@ -2672,8 +2673,9 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { ]; client.innerApiCalls.searchRelatedAccountGroupMemberships = stubSimpleCall(expectedResponse); - const [response] = - await client.searchRelatedAccountGroupMemberships(request); + const [response] = await client.searchRelatedAccountGroupMemberships( + request + ); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( client.innerApiCalls.searchRelatedAccountGroupMemberships as SinonStub diff --git a/packages/google-cloud-recommender/src/v1/recommender_client.ts b/packages/google-cloud-recommender/src/v1/recommender_client.ts index 07032bf1a43..4af5921abfe 100644 --- a/packages/google-cloud-recommender/src/v1/recommender_client.ts +++ b/packages/google-cloud-recommender/src/v1/recommender_client.ts @@ -93,8 +93,7 @@ export class RecommenderClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -102,7 +101,7 @@ export class RecommenderClient { * 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 RecommenderClient({fallback: 'rest'}, gax); + * const client = new RecommenderClient({fallback: true}, gax); * ``` */ constructor( @@ -168,7 +167,7 @@ export class RecommenderClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { diff --git a/packages/google-cloud-recommender/src/v1beta1/recommender_client.ts b/packages/google-cloud-recommender/src/v1beta1/recommender_client.ts index ba957e0f695..ebfedbfdddd 100644 --- a/packages/google-cloud-recommender/src/v1beta1/recommender_client.ts +++ b/packages/google-cloud-recommender/src/v1beta1/recommender_client.ts @@ -93,8 +93,7 @@ export class RecommenderClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -102,7 +101,7 @@ export class RecommenderClient { * 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 RecommenderClient({fallback: 'rest'}, gax); + * const client = new RecommenderClient({fallback: true}, gax); * ``` */ constructor( @@ -168,7 +167,7 @@ export class RecommenderClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { 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 48361366c32..efb244d208b 100644 --- a/packages/google-cloud-redis/src/v1/cloud_redis_client.ts +++ b/packages/google-cloud-redis/src/v1/cloud_redis_client.ts @@ -110,8 +110,7 @@ export class CloudRedisClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -119,7 +118,7 @@ export class CloudRedisClient { * 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 CloudRedisClient({fallback: 'rest'}, gax); + * const client = new CloudRedisClient({fallback: true}, gax); * ``` */ constructor( @@ -189,7 +188,7 @@ export class CloudRedisClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -229,7 +228,7 @@ export class CloudRedisClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 ba4546c13a5..0b4f9050e52 100644 --- a/packages/google-cloud-redis/src/v1beta1/cloud_redis_client.ts +++ b/packages/google-cloud-redis/src/v1beta1/cloud_redis_client.ts @@ -107,8 +107,7 @@ export class CloudRedisClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -116,7 +115,7 @@ export class CloudRedisClient { * 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 CloudRedisClient({fallback: 'rest'}, gax); + * const client = new CloudRedisClient({fallback: true}, gax); * ``` */ constructor( @@ -182,7 +181,7 @@ export class CloudRedisClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -222,7 +221,7 @@ export class CloudRedisClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { diff --git a/packages/google-cloud-resourcemanager/src/v3/folders_client.ts b/packages/google-cloud-resourcemanager/src/v3/folders_client.ts index ed01ef15bdd..99d616268f7 100644 --- a/packages/google-cloud-resourcemanager/src/v3/folders_client.ts +++ b/packages/google-cloud-resourcemanager/src/v3/folders_client.ts @@ -95,8 +95,7 @@ export class FoldersClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -104,7 +103,7 @@ export class FoldersClient { * 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 FoldersClient({fallback: 'rest'}, gax); + * const client = new FoldersClient({fallback: true}, gax); * ``` */ constructor( @@ -170,7 +169,7 @@ export class FoldersClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -226,7 +225,7 @@ export class FoldersClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { diff --git a/packages/google-cloud-resourcemanager/src/v3/organizations_client.ts b/packages/google-cloud-resourcemanager/src/v3/organizations_client.ts index 1d2c3d8286f..8f384bf18ee 100644 --- a/packages/google-cloud-resourcemanager/src/v3/organizations_client.ts +++ b/packages/google-cloud-resourcemanager/src/v3/organizations_client.ts @@ -90,8 +90,7 @@ export class OrganizationsClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -99,7 +98,7 @@ export class OrganizationsClient { * 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 OrganizationsClient({fallback: 'rest'}, gax); + * const client = new OrganizationsClient({fallback: true}, gax); * ``` */ constructor( @@ -165,7 +164,7 @@ export class OrganizationsClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { diff --git a/packages/google-cloud-resourcemanager/src/v3/projects_client.ts b/packages/google-cloud-resourcemanager/src/v3/projects_client.ts index 1aa37d49376..a6fe69dd066 100644 --- a/packages/google-cloud-resourcemanager/src/v3/projects_client.ts +++ b/packages/google-cloud-resourcemanager/src/v3/projects_client.ts @@ -93,8 +93,7 @@ export class ProjectsClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -102,7 +101,7 @@ export class ProjectsClient { * 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 ProjectsClient({fallback: 'rest'}, gax); + * const client = new ProjectsClient({fallback: true}, gax); * ``` */ constructor( @@ -168,7 +167,7 @@ export class ProjectsClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -224,7 +223,7 @@ export class ProjectsClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 65105fd63ef..7ceaf0fc8e4 100644 --- a/packages/google-cloud-resourcemanager/src/v3/tag_bindings_client.ts +++ b/packages/google-cloud-resourcemanager/src/v3/tag_bindings_client.ts @@ -94,8 +94,7 @@ export class TagBindingsClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -103,7 +102,7 @@ export class TagBindingsClient { * 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 TagBindingsClient({fallback: 'rest'}, gax); + * const client = new TagBindingsClient({fallback: true}, gax); * ``` */ constructor( @@ -169,7 +168,7 @@ export class TagBindingsClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -225,7 +224,7 @@ export class TagBindingsClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 4d3b87f556e..6464e53760e 100644 --- a/packages/google-cloud-resourcemanager/src/v3/tag_holds_client.ts +++ b/packages/google-cloud-resourcemanager/src/v3/tag_holds_client.ts @@ -97,8 +97,7 @@ export class TagHoldsClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -106,7 +105,7 @@ export class TagHoldsClient { * 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 TagHoldsClient({fallback: 'rest'}, gax); + * const client = new TagHoldsClient({fallback: true}, gax); * ``` */ constructor( @@ -172,7 +171,7 @@ export class TagHoldsClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -223,7 +222,7 @@ export class TagHoldsClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 630ceef32b3..adf3dc46560 100644 --- a/packages/google-cloud-resourcemanager/src/v3/tag_keys_client.ts +++ b/packages/google-cloud-resourcemanager/src/v3/tag_keys_client.ts @@ -93,8 +93,7 @@ export class TagKeysClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -102,7 +101,7 @@ export class TagKeysClient { * 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 TagKeysClient({fallback: 'rest'}, gax); + * const client = new TagKeysClient({fallback: true}, gax); * ``` */ constructor( @@ -168,7 +167,7 @@ export class TagKeysClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -219,7 +218,7 @@ export class TagKeysClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 8a7774a1701..79cbe33108f 100644 --- a/packages/google-cloud-resourcemanager/src/v3/tag_values_client.ts +++ b/packages/google-cloud-resourcemanager/src/v3/tag_values_client.ts @@ -93,8 +93,7 @@ export class TagValuesClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -102,7 +101,7 @@ export class TagValuesClient { * 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 TagValuesClient({fallback: 'rest'}, gax); + * const client = new TagValuesClient({fallback: true}, gax); * ``` */ constructor( @@ -168,7 +167,7 @@ export class TagValuesClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -219,7 +218,7 @@ export class TagValuesClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { diff --git a/packages/google-cloud-resourcesettings/src/v1/resource_settings_service_client.ts b/packages/google-cloud-resourcesettings/src/v1/resource_settings_service_client.ts index 9e297c40423..eb0d9272249 100644 --- a/packages/google-cloud-resourcesettings/src/v1/resource_settings_service_client.ts +++ b/packages/google-cloud-resourcesettings/src/v1/resource_settings_service_client.ts @@ -101,8 +101,7 @@ export class ResourceSettingsServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -110,7 +109,7 @@ export class ResourceSettingsServiceClient { * 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 ResourceSettingsServiceClient({fallback: 'rest'}, gax); + * const client = new ResourceSettingsServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -177,7 +176,7 @@ export class ResourceSettingsServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { 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 af689c2cfef..4295d10a92a 100644 --- a/packages/google-cloud-retail/src/v2/catalog_service_client.ts +++ b/packages/google-cloud-retail/src/v2/catalog_service_client.ts @@ -95,8 +95,7 @@ export class CatalogServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -104,7 +103,7 @@ export class CatalogServiceClient { * 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 CatalogServiceClient({fallback: 'rest'}, gax); + * const client = new CatalogServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -174,7 +173,7 @@ export class CatalogServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -235,7 +234,7 @@ export class CatalogServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 7a84fd9af5a..7fd17b3dc98 100644 --- a/packages/google-cloud-retail/src/v2/completion_service_client.ts +++ b/packages/google-cloud-retail/src/v2/completion_service_client.ts @@ -97,8 +97,7 @@ export class CompletionServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -106,7 +105,7 @@ export class CompletionServiceClient { * 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 CompletionServiceClient({fallback: 'rest'}, gax); + * const client = new CompletionServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -176,7 +175,7 @@ export class CompletionServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -220,7 +219,7 @@ export class CompletionServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 75b65e900e9..d1c35afc9c2 100644 --- a/packages/google-cloud-retail/src/v2/control_service_client.ts +++ b/packages/google-cloud-retail/src/v2/control_service_client.ts @@ -95,8 +95,7 @@ export class ControlServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -104,7 +103,7 @@ export class ControlServiceClient { * 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 ControlServiceClient({fallback: 'rest'}, gax); + * const client = new ControlServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -174,7 +173,7 @@ export class ControlServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -229,7 +228,7 @@ export class ControlServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 176f53a1c2a..ebe3f79e326 100644 --- a/packages/google-cloud-retail/src/v2/model_service_client.ts +++ b/packages/google-cloud-retail/src/v2/model_service_client.ts @@ -107,8 +107,7 @@ export class ModelServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -116,7 +115,7 @@ export class ModelServiceClient { * 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 ModelServiceClient({fallback: 'rest'}, gax); + * const client = new ModelServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -186,7 +185,7 @@ export class ModelServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -241,7 +240,7 @@ export class ModelServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 cfa9de0d5fb..758ab693a08 100644 --- a/packages/google-cloud-retail/src/v2/prediction_service_client.ts +++ b/packages/google-cloud-retail/src/v2/prediction_service_client.ts @@ -93,8 +93,7 @@ export class PredictionServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -102,7 +101,7 @@ export class PredictionServiceClient { * 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 PredictionServiceClient({fallback: 'rest'}, gax); + * const client = new PredictionServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -172,7 +171,7 @@ export class PredictionServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -216,7 +215,7 @@ export class PredictionServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 be0933b3772..55db9b357e4 100644 --- a/packages/google-cloud-retail/src/v2/product_service_client.ts +++ b/packages/google-cloud-retail/src/v2/product_service_client.ts @@ -97,8 +97,7 @@ export class ProductServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -106,7 +105,7 @@ export class ProductServiceClient { * 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 ProductServiceClient({fallback: 'rest'}, gax); + * const client = new ProductServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -176,7 +175,7 @@ export class ProductServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -234,7 +233,7 @@ export class ProductServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 c8e543df531..eb4e9b1ee24 100644 --- a/packages/google-cloud-retail/src/v2/search_service_client.ts +++ b/packages/google-cloud-retail/src/v2/search_service_client.ts @@ -98,8 +98,7 @@ export class SearchServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -107,7 +106,7 @@ export class SearchServiceClient { * 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 SearchServiceClient({fallback: 'rest'}, gax); + * const client = new SearchServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -177,7 +176,7 @@ export class SearchServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -238,7 +237,7 @@ export class SearchServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 b93f51fe54b..07e2b9b4de5 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 @@ -95,8 +95,7 @@ export class ServingConfigServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -104,7 +103,7 @@ export class ServingConfigServiceClient { * 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 ServingConfigServiceClient({fallback: 'rest'}, gax); + * const client = new ServingConfigServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -174,7 +173,7 @@ export class ServingConfigServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -229,7 +228,7 @@ export class ServingConfigServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 39070ef62bd..fea39714637 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 @@ -94,8 +94,7 @@ export class UserEventServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -103,7 +102,7 @@ export class UserEventServiceClient { * 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 UserEventServiceClient({fallback: 'rest'}, gax); + * const client = new UserEventServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -173,7 +172,7 @@ export class UserEventServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -217,7 +216,7 @@ export class UserEventServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 36ca640159d..50bef1d244e 100644 --- a/packages/google-cloud-retail/src/v2alpha/catalog_service_client.ts +++ b/packages/google-cloud-retail/src/v2alpha/catalog_service_client.ts @@ -95,8 +95,7 @@ export class CatalogServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -104,7 +103,7 @@ export class CatalogServiceClient { * 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 CatalogServiceClient({fallback: 'rest'}, gax); + * const client = new CatalogServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -174,7 +173,7 @@ export class CatalogServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -238,7 +237,7 @@ export class CatalogServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 9c0658571f3..856594fa292 100644 --- a/packages/google-cloud-retail/src/v2alpha/completion_service_client.ts +++ b/packages/google-cloud-retail/src/v2alpha/completion_service_client.ts @@ -97,8 +97,7 @@ export class CompletionServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -106,7 +105,7 @@ export class CompletionServiceClient { * 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 CompletionServiceClient({fallback: 'rest'}, gax); + * const client = new CompletionServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -176,7 +175,7 @@ export class CompletionServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -223,7 +222,7 @@ export class CompletionServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 a9e5f611f1c..4b3d0593fa1 100644 --- a/packages/google-cloud-retail/src/v2alpha/control_service_client.ts +++ b/packages/google-cloud-retail/src/v2alpha/control_service_client.ts @@ -95,8 +95,7 @@ export class ControlServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -104,7 +103,7 @@ export class ControlServiceClient { * 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 ControlServiceClient({fallback: 'rest'}, gax); + * const client = new ControlServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -174,7 +173,7 @@ export class ControlServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -232,7 +231,7 @@ export class ControlServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 936b834342d..1916719d1e8 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 @@ -94,8 +94,7 @@ export class MerchantCenterAccountLinkServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -103,7 +102,7 @@ export class MerchantCenterAccountLinkServiceClient { * 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 MerchantCenterAccountLinkServiceClient({fallback: 'rest'}, gax); + * const client = new MerchantCenterAccountLinkServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -174,7 +173,7 @@ export class MerchantCenterAccountLinkServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -221,7 +220,7 @@ export class MerchantCenterAccountLinkServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 27dea1669b2..8c70c9f85cf 100644 --- a/packages/google-cloud-retail/src/v2alpha/model_service_client.ts +++ b/packages/google-cloud-retail/src/v2alpha/model_service_client.ts @@ -107,8 +107,7 @@ export class ModelServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -116,7 +115,7 @@ export class ModelServiceClient { * 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 ModelServiceClient({fallback: 'rest'}, gax); + * const client = new ModelServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -186,7 +185,7 @@ export class ModelServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -244,7 +243,7 @@ export class ModelServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 3abab007376..162bfb5522e 100644 --- a/packages/google-cloud-retail/src/v2alpha/prediction_service_client.ts +++ b/packages/google-cloud-retail/src/v2alpha/prediction_service_client.ts @@ -93,8 +93,7 @@ export class PredictionServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -102,7 +101,7 @@ export class PredictionServiceClient { * 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 PredictionServiceClient({fallback: 'rest'}, gax); + * const client = new PredictionServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -172,7 +171,7 @@ export class PredictionServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -219,7 +218,7 @@ export class PredictionServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 18d5479e136..36663491d6f 100644 --- a/packages/google-cloud-retail/src/v2alpha/product_service_client.ts +++ b/packages/google-cloud-retail/src/v2alpha/product_service_client.ts @@ -97,8 +97,7 @@ export class ProductServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -106,7 +105,7 @@ export class ProductServiceClient { * 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 ProductServiceClient({fallback: 'rest'}, gax); + * const client = new ProductServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -176,7 +175,7 @@ export class ProductServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -237,7 +236,7 @@ export class ProductServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 7c3b893d7e5..f544c45c10b 100644 --- a/packages/google-cloud-retail/src/v2alpha/search_service_client.ts +++ b/packages/google-cloud-retail/src/v2alpha/search_service_client.ts @@ -98,8 +98,7 @@ export class SearchServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -107,7 +106,7 @@ export class SearchServiceClient { * 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 SearchServiceClient({fallback: 'rest'}, gax); + * const client = new SearchServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -177,7 +176,7 @@ export class SearchServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -241,7 +240,7 @@ export class SearchServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 9d55ecd95f5..3b68fcc528c 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 @@ -95,8 +95,7 @@ export class ServingConfigServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -104,7 +103,7 @@ export class ServingConfigServiceClient { * 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 ServingConfigServiceClient({fallback: 'rest'}, gax); + * const client = new ServingConfigServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -174,7 +173,7 @@ export class ServingConfigServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -232,7 +231,7 @@ export class ServingConfigServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 2d9d4db496b..bd9267dcec8 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 @@ -94,8 +94,7 @@ export class UserEventServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -103,7 +102,7 @@ export class UserEventServiceClient { * 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 UserEventServiceClient({fallback: 'rest'}, gax); + * const client = new UserEventServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -173,7 +172,7 @@ export class UserEventServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -220,7 +219,7 @@ export class UserEventServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 ab932a8caf3..ec9f784eb41 100644 --- a/packages/google-cloud-retail/src/v2beta/catalog_service_client.ts +++ b/packages/google-cloud-retail/src/v2beta/catalog_service_client.ts @@ -95,8 +95,7 @@ export class CatalogServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -104,7 +103,7 @@ export class CatalogServiceClient { * 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 CatalogServiceClient({fallback: 'rest'}, gax); + * const client = new CatalogServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -174,7 +173,7 @@ export class CatalogServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -235,7 +234,7 @@ export class CatalogServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 6ea6fbc398a..1e5f9463b5b 100644 --- a/packages/google-cloud-retail/src/v2beta/completion_service_client.ts +++ b/packages/google-cloud-retail/src/v2beta/completion_service_client.ts @@ -97,8 +97,7 @@ export class CompletionServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -106,7 +105,7 @@ export class CompletionServiceClient { * 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 CompletionServiceClient({fallback: 'rest'}, gax); + * const client = new CompletionServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -176,7 +175,7 @@ export class CompletionServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -220,7 +219,7 @@ export class CompletionServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 d436ae5516b..8d48005069a 100644 --- a/packages/google-cloud-retail/src/v2beta/control_service_client.ts +++ b/packages/google-cloud-retail/src/v2beta/control_service_client.ts @@ -95,8 +95,7 @@ export class ControlServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -104,7 +103,7 @@ export class ControlServiceClient { * 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 ControlServiceClient({fallback: 'rest'}, gax); + * const client = new ControlServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -174,7 +173,7 @@ export class ControlServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -229,7 +228,7 @@ export class ControlServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 e005e3e0fcb..806eabb91b4 100644 --- a/packages/google-cloud-retail/src/v2beta/model_service_client.ts +++ b/packages/google-cloud-retail/src/v2beta/model_service_client.ts @@ -107,8 +107,7 @@ export class ModelServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -116,7 +115,7 @@ export class ModelServiceClient { * 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 ModelServiceClient({fallback: 'rest'}, gax); + * const client = new ModelServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -186,7 +185,7 @@ export class ModelServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -241,7 +240,7 @@ export class ModelServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 029e967a948..07a7ff9dd9b 100644 --- a/packages/google-cloud-retail/src/v2beta/prediction_service_client.ts +++ b/packages/google-cloud-retail/src/v2beta/prediction_service_client.ts @@ -93,8 +93,7 @@ export class PredictionServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -102,7 +101,7 @@ export class PredictionServiceClient { * 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 PredictionServiceClient({fallback: 'rest'}, gax); + * const client = new PredictionServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -172,7 +171,7 @@ export class PredictionServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -216,7 +215,7 @@ export class PredictionServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 6bce5b9d28f..7b11908e655 100644 --- a/packages/google-cloud-retail/src/v2beta/product_service_client.ts +++ b/packages/google-cloud-retail/src/v2beta/product_service_client.ts @@ -97,8 +97,7 @@ export class ProductServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -106,7 +105,7 @@ export class ProductServiceClient { * 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 ProductServiceClient({fallback: 'rest'}, gax); + * const client = new ProductServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -176,7 +175,7 @@ export class ProductServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -234,7 +233,7 @@ export class ProductServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 83dad1ab9a0..a4f3d61afb4 100644 --- a/packages/google-cloud-retail/src/v2beta/search_service_client.ts +++ b/packages/google-cloud-retail/src/v2beta/search_service_client.ts @@ -98,8 +98,7 @@ export class SearchServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -107,7 +106,7 @@ export class SearchServiceClient { * 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 SearchServiceClient({fallback: 'rest'}, gax); + * const client = new SearchServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -177,7 +176,7 @@ export class SearchServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -238,7 +237,7 @@ export class SearchServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 79b0d0be013..54d39627233 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 @@ -95,8 +95,7 @@ export class ServingConfigServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -104,7 +103,7 @@ export class ServingConfigServiceClient { * 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 ServingConfigServiceClient({fallback: 'rest'}, gax); + * const client = new ServingConfigServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -174,7 +173,7 @@ export class ServingConfigServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -229,7 +228,7 @@ export class ServingConfigServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { 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 601919fc73e..00351ba45c7 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 @@ -94,8 +94,7 @@ export class UserEventServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -103,7 +102,7 @@ export class UserEventServiceClient { * 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 UserEventServiceClient({fallback: 'rest'}, gax); + * const client = new UserEventServiceClient({fallback: true}, gax); * ``` */ constructor( @@ -173,7 +172,7 @@ export class UserEventServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -217,7 +216,7 @@ export class UserEventServiceClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { diff --git a/packages/google-cloud-run/src/v2/executions_client.ts b/packages/google-cloud-run/src/v2/executions_client.ts index a1bb5444769..d28a99d42e7 100644 --- a/packages/google-cloud-run/src/v2/executions_client.ts +++ b/packages/google-cloud-run/src/v2/executions_client.ts @@ -96,8 +96,7 @@ export class ExecutionsClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -105,7 +104,7 @@ export class ExecutionsClient { * 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 ExecutionsClient({fallback: 'rest'}, gax); + * const client = new ExecutionsClient({fallback: true}, gax); * ``` */ constructor( @@ -175,7 +174,7 @@ export class ExecutionsClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -230,7 +229,7 @@ export class ExecutionsClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { diff --git a/packages/google-cloud-run/src/v2/jobs_client.ts b/packages/google-cloud-run/src/v2/jobs_client.ts index f79108184e5..9b665b00499 100644 --- a/packages/google-cloud-run/src/v2/jobs_client.ts +++ b/packages/google-cloud-run/src/v2/jobs_client.ts @@ -96,8 +96,7 @@ export class JobsClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -105,7 +104,7 @@ export class JobsClient { * 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 JobsClient({fallback: 'rest'}, gax); + * const client = new JobsClient({fallback: true}, gax); * ``` */ constructor( @@ -175,7 +174,7 @@ export class JobsClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -230,7 +229,7 @@ export class JobsClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { diff --git a/packages/google-cloud-run/src/v2/revisions_client.ts b/packages/google-cloud-run/src/v2/revisions_client.ts index e740427b7e7..a90243f340d 100644 --- a/packages/google-cloud-run/src/v2/revisions_client.ts +++ b/packages/google-cloud-run/src/v2/revisions_client.ts @@ -96,8 +96,7 @@ export class RevisionsClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -105,7 +104,7 @@ export class RevisionsClient { * 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 RevisionsClient({fallback: 'rest'}, gax); + * const client = new RevisionsClient({fallback: true}, gax); * ``` */ constructor( @@ -175,7 +174,7 @@ export class RevisionsClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -233,7 +232,7 @@ export class RevisionsClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { diff --git a/packages/google-cloud-run/src/v2/services_client.ts b/packages/google-cloud-run/src/v2/services_client.ts index 11862ebd810..ac8a888a312 100644 --- a/packages/google-cloud-run/src/v2/services_client.ts +++ b/packages/google-cloud-run/src/v2/services_client.ts @@ -96,8 +96,7 @@ export class ServicesClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -105,7 +104,7 @@ export class ServicesClient { * 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 ServicesClient({fallback: 'rest'}, gax); + * const client = new ServicesClient({fallback: true}, gax); * ``` */ constructor( @@ -175,7 +174,7 @@ export class ServicesClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -230,7 +229,7 @@ export class ServicesClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { diff --git a/packages/google-cloud-run/src/v2/tasks_client.ts b/packages/google-cloud-run/src/v2/tasks_client.ts index 8381ca6acef..db81f350017 100644 --- a/packages/google-cloud-run/src/v2/tasks_client.ts +++ b/packages/google-cloud-run/src/v2/tasks_client.ts @@ -93,8 +93,7 @@ export class TasksClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -102,7 +101,7 @@ export class TasksClient { * 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 TasksClient({fallback: 'rest'}, gax); + * const client = new TasksClient({fallback: true}, gax); * ``` */ constructor( @@ -172,7 +171,7 @@ export class TasksClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { 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 ddbab13fc2d..8be38fbca1a 100644 --- a/packages/google-cloud-scheduler/src/v1/cloud_scheduler_client.ts +++ b/packages/google-cloud-scheduler/src/v1/cloud_scheduler_client.ts @@ -94,8 +94,7 @@ export class CloudSchedulerClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -103,7 +102,7 @@ export class CloudSchedulerClient { * 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 CloudSchedulerClient({fallback: 'rest'}, gax); + * const client = new CloudSchedulerClient({fallback: true}, gax); * ``` */ constructor( @@ -173,7 +172,7 @@ export class CloudSchedulerClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { 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 2bff0efb040..5e34d871e08 100644 --- a/packages/google-cloud-scheduler/src/v1beta1/cloud_scheduler_client.ts +++ b/packages/google-cloud-scheduler/src/v1beta1/cloud_scheduler_client.ts @@ -94,8 +94,7 @@ export class CloudSchedulerClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @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 @@ -103,7 +102,7 @@ export class CloudSchedulerClient { * 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 CloudSchedulerClient({fallback: 'rest'}, gax); + * const client = new CloudSchedulerClient({fallback: true}, gax); * ``` */ constructor( @@ -173,7 +172,7 @@ export class CloudSchedulerClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) {