Skip to content
This repository was archived by the owner on Jul 20, 2023. It is now read-only.

Commit 4259f2f

Browse files
fix: preserve default values in x-goog-request-params header (#104)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 474338479 Source-Link: googleapis/googleapis@d5d35e0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/efcd3f93962a103f68f003e2a1eecde6fa216a27 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9
1 parent 69ace70 commit 4259f2f

File tree

2 files changed

+273
-219
lines changed

2 files changed

+273
-219
lines changed

src/v1beta1/private_catalog_client.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ export class PrivateCatalogClient {
468468
options.otherArgs.headers = options.otherArgs.headers || {};
469469
options.otherArgs.headers['x-goog-request-params'] =
470470
this._gaxModule.routingHeader.fromParams({
471-
resource: request.resource || '',
471+
resource: request.resource ?? '',
472472
});
473473
this.initialize();
474474
return this.innerApiCalls.searchCatalogs(request, options, callback);
@@ -515,7 +515,7 @@ export class PrivateCatalogClient {
515515
options.otherArgs.headers = options.otherArgs.headers || {};
516516
options.otherArgs.headers['x-goog-request-params'] =
517517
this._gaxModule.routingHeader.fromParams({
518-
resource: request.resource || '',
518+
resource: request.resource ?? '',
519519
});
520520
const defaultCallSettings = this._defaults['searchCatalogs'];
521521
const callSettings = defaultCallSettings.merge(options);
@@ -571,7 +571,7 @@ export class PrivateCatalogClient {
571571
options.otherArgs.headers = options.otherArgs.headers || {};
572572
options.otherArgs.headers['x-goog-request-params'] =
573573
this._gaxModule.routingHeader.fromParams({
574-
resource: request.resource || '',
574+
resource: request.resource ?? '',
575575
});
576576
const defaultCallSettings = this._defaults['searchCatalogs'];
577577
const callSettings = defaultCallSettings.merge(options);
@@ -686,7 +686,7 @@ export class PrivateCatalogClient {
686686
options.otherArgs.headers = options.otherArgs.headers || {};
687687
options.otherArgs.headers['x-goog-request-params'] =
688688
this._gaxModule.routingHeader.fromParams({
689-
resource: request.resource || '',
689+
resource: request.resource ?? '',
690690
});
691691
this.initialize();
692692
return this.innerApiCalls.searchProducts(request, options, callback);
@@ -734,7 +734,7 @@ export class PrivateCatalogClient {
734734
options.otherArgs.headers = options.otherArgs.headers || {};
735735
options.otherArgs.headers['x-goog-request-params'] =
736736
this._gaxModule.routingHeader.fromParams({
737-
resource: request.resource || '',
737+
resource: request.resource ?? '',
738738
});
739739
const defaultCallSettings = this._defaults['searchProducts'];
740740
const callSettings = defaultCallSettings.merge(options);
@@ -791,7 +791,7 @@ export class PrivateCatalogClient {
791791
options.otherArgs.headers = options.otherArgs.headers || {};
792792
options.otherArgs.headers['x-goog-request-params'] =
793793
this._gaxModule.routingHeader.fromParams({
794-
resource: request.resource || '',
794+
resource: request.resource ?? '',
795795
});
796796
const defaultCallSettings = this._defaults['searchProducts'];
797797
const callSettings = defaultCallSettings.merge(options);
@@ -906,7 +906,7 @@ export class PrivateCatalogClient {
906906
options.otherArgs.headers = options.otherArgs.headers || {};
907907
options.otherArgs.headers['x-goog-request-params'] =
908908
this._gaxModule.routingHeader.fromParams({
909-
resource: request.resource || '',
909+
resource: request.resource ?? '',
910910
});
911911
this.initialize();
912912
return this.innerApiCalls.searchVersions(request, options, callback);
@@ -954,7 +954,7 @@ export class PrivateCatalogClient {
954954
options.otherArgs.headers = options.otherArgs.headers || {};
955955
options.otherArgs.headers['x-goog-request-params'] =
956956
this._gaxModule.routingHeader.fromParams({
957-
resource: request.resource || '',
957+
resource: request.resource ?? '',
958958
});
959959
const defaultCallSettings = this._defaults['searchVersions'];
960960
const callSettings = defaultCallSettings.merge(options);
@@ -1011,7 +1011,7 @@ export class PrivateCatalogClient {
10111011
options.otherArgs.headers = options.otherArgs.headers || {};
10121012
options.otherArgs.headers['x-goog-request-params'] =
10131013
this._gaxModule.routingHeader.fromParams({
1014-
resource: request.resource || '',
1014+
resource: request.resource ?? '',
10151015
});
10161016
const defaultCallSettings = this._defaults['searchVersions'];
10171017
const callSettings = defaultCallSettings.merge(options);

0 commit comments

Comments
 (0)