Skip to content

Commit

Permalink
Merge branch 'main' into owl-bot-update-lock-abc68a9bbf4fa808b25fa16d…
Browse files Browse the repository at this point in the history
…3b11141059dc757dbc34f024744bba36c200b40f
  • Loading branch information
meredithslota authored Nov 9, 2023
2 parents bdd1ba0 + 64d004d commit 13c2351
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 16 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@
"mocha": "^9.2.2",
"nock": "^13.0.0",
"null-loader": "^4.0.0",
"pack-n-play": "^1.0.0-2",
"pack-n-play": "^2.0.0",
"proxyquire": "^2.1.3",
"sinon": "^15.0.0",
"sinon": "^16.0.0",
"ts-loader": "^9.0.0",
"typescript": "^5.1.6",
"uglify-js": "^3.13.5",
Expand Down
9 changes: 4 additions & 5 deletions src/v2/config_service_v2_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,15 @@ export class ConfigServiceV2Client {
* 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
* need to avoid loading the default gRPC version and want to use the fallback
* HTTP implementation. Load only fallback version and pass it to the constructor:
* ```
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
* const client = new ConfigServiceV2Client({fallback: 'rest'}, gax);
* const client = new ConfigServiceV2Client({fallback: true}, gax);
* ```
*/
constructor(
Expand Down Expand Up @@ -168,7 +167,7 @@ export class ConfigServiceV2Client {
}
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) {
Expand Down Expand Up @@ -332,7 +331,7 @@ export class ConfigServiceV2Client {
auth: this.auth,
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
};
if (opts.fallback === 'rest') {
if (opts.fallback) {
lroOptions.protoJson = protoFilesRoot;
lroOptions.httpRules = [
{
Expand Down
9 changes: 4 additions & 5 deletions src/v2/logging_service_v2_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,15 @@ export class LoggingServiceV2Client {
* 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
* need to avoid loading the default gRPC version and want to use the fallback
* HTTP implementation. Load only fallback version and pass it to the constructor:
* ```
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
* const client = new LoggingServiceV2Client({fallback: 'rest'}, gax);
* const client = new LoggingServiceV2Client({fallback: true}, gax);
* ```
*/
constructor(
Expand Down Expand Up @@ -165,7 +164,7 @@ export class LoggingServiceV2Client {
}
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) {
Expand Down Expand Up @@ -313,7 +312,7 @@ export class LoggingServiceV2Client {
this.descriptors.stream = {
tailLogEntries: new this._gaxModule.StreamDescriptor(
this._gaxModule.StreamType.BIDI_STREAMING,
opts.fallback === 'rest'
!!opts.fallback
),
};

Expand Down
7 changes: 3 additions & 4 deletions src/v2/metrics_service_v2_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,15 @@ export class MetricsServiceV2Client {
* 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
* need to avoid loading the default gRPC version and want to use the fallback
* HTTP implementation. Load only fallback version and pass it to the constructor:
* ```
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
* const client = new MetricsServiceV2Client({fallback: 'rest'}, gax);
* const client = new MetricsServiceV2Client({fallback: true}, gax);
* ```
*/
constructor(
Expand Down Expand Up @@ -165,7 +164,7 @@ export class MetricsServiceV2Client {
}
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) {
Expand Down

0 comments on commit 13c2351

Please sign in to comment.