From 0f20512f0731771784d679e36c8209cf4fa4730f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 25 May 2021 20:48:39 +0000 Subject: [PATCH] fix: GoogleAdsError missing using generator version after 1.3.0 (#672) [PR](https://github.com/googleapis/gapic-generator-typescript/pull/878) within updated gapic-generator-typescript version 1.4.0 Committer: @summer-ji-eng PiperOrigin-RevId: 375759421 Source-Link: https://github.com/googleapis/googleapis/commit/95fa72fdd0d69b02d72c33b37d1e4cc66d4b1446 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f40a34377ad488a7c2bc3992b3c8d5faf5a15c46 --- .../google-cloud-translate/src/v3/translation_service_client.ts | 2 ++ .../src/v3beta1/translation_service_client.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/google-cloud-translate/src/v3/translation_service_client.ts b/packages/google-cloud-translate/src/v3/translation_service_client.ts index 569da40ef46..e2608cf4b51 100644 --- a/packages/google-cloud-translate/src/v3/translation_service_client.ts +++ b/packages/google-cloud-translate/src/v3/translation_service_client.ts @@ -142,6 +142,8 @@ export class TranslationServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); diff --git a/packages/google-cloud-translate/src/v3beta1/translation_service_client.ts b/packages/google-cloud-translate/src/v3beta1/translation_service_client.ts index 40a152ce120..1bd668fccdc 100644 --- a/packages/google-cloud-translate/src/v3beta1/translation_service_client.ts +++ b/packages/google-cloud-translate/src/v3beta1/translation_service_client.ts @@ -142,6 +142,8 @@ export class TranslationServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`);