Skip to content

Commit

Permalink
fix: preserve default values in x-goog-request-params header (#820)
Browse files Browse the repository at this point in the history
* chore: use gapic-generator-typescript v2.17.0

PiperOrigin-RevId: 474338479

Source-Link: googleapis/googleapis@d5d35e0

Source-Link: googleapis/googleapis-gen@efcd3f9
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* test: use fully qualified request type name in tests

PiperOrigin-RevId: 475685359

Source-Link: googleapis/googleapis@7a12973

Source-Link: googleapis/googleapis-gen@370c729
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzcwYzcyOWUyYmEwNjJhMTY3NDQ5YzI3ODgyYmE1ZjM3OWM1YzM0ZCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* test: fix translation

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Alexander Fenster <fenster@google.com>
  • Loading branch information
3 people authored Sep 21, 2022
1 parent 5d45801 commit 4950dff
Show file tree
Hide file tree
Showing 4 changed files with 1,152 additions and 1,042 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.translateText(request, options, callback);
Expand Down Expand Up @@ -717,7 +717,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.detectLanguage(request, options, callback);
Expand Down Expand Up @@ -844,7 +844,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.getSupportedLanguages(request, options, callback);
Expand Down Expand Up @@ -992,7 +992,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.translateDocument(request, options, callback);
Expand Down Expand Up @@ -1078,7 +1078,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
name: request.name || '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.getGlossary(request, options, callback);
Expand Down Expand Up @@ -1238,7 +1238,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.batchTranslateText(request, options, callback);
Expand Down Expand Up @@ -1435,7 +1435,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.batchTranslateDocument(
Expand Down Expand Up @@ -1580,7 +1580,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.createGlossary(request, options, callback);
Expand Down Expand Up @@ -1720,7 +1720,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
name: request.name || '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.deleteGlossary(request, options, callback);
Expand Down Expand Up @@ -1875,7 +1875,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.listGlossaries(request, options, callback);
Expand Down Expand Up @@ -1934,7 +1934,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
const defaultCallSettings = this._defaults['listGlossaries'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2002,7 +2002,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
const defaultCallSettings = this._defaults['listGlossaries'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.translateText(request, options, callback);
Expand Down Expand Up @@ -722,7 +722,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.detectLanguage(request, options, callback);
Expand Down Expand Up @@ -849,7 +849,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.getSupportedLanguages(request, options, callback);
Expand Down Expand Up @@ -1002,7 +1002,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.translateDocument(request, options, callback);
Expand Down Expand Up @@ -1094,7 +1094,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
name: request.name || '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.getGlossary(request, options, callback);
Expand Down Expand Up @@ -1253,7 +1253,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.batchTranslateText(request, options, callback);
Expand Down Expand Up @@ -1450,7 +1450,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.batchTranslateDocument(
Expand Down Expand Up @@ -1595,7 +1595,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.createGlossary(request, options, callback);
Expand Down Expand Up @@ -1735,7 +1735,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
name: request.name || '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.deleteGlossary(request, options, callback);
Expand Down Expand Up @@ -1890,7 +1890,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.listGlossaries(request, options, callback);
Expand Down Expand Up @@ -1949,7 +1949,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
const defaultCallSettings = this._defaults['listGlossaries'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2017,7 +2017,7 @@ export class TranslationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
const defaultCallSettings = this._defaults['listGlossaries'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
Loading

0 comments on commit 4950dff

Please sign in to comment.