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

Commit af162f0

Browse files
fix: preserve default values in x-goog-request-params header (#403)
- [ ] 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 7e09614 commit af162f0

2 files changed

Lines changed: 759 additions & 722 deletions

File tree

src/v1/secret_manager_service_client.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ export class SecretManagerServiceClient {
455455
options.otherArgs.headers = options.otherArgs.headers || {};
456456
options.otherArgs.headers['x-goog-request-params'] =
457457
this._gaxModule.routingHeader.fromParams({
458-
parent: request.parent || '',
458+
parent: request.parent ?? '',
459459
});
460460
this.initialize();
461461
return this.innerApiCalls.createSecret(request, options, callback);
@@ -550,7 +550,7 @@ export class SecretManagerServiceClient {
550550
options.otherArgs.headers = options.otherArgs.headers || {};
551551
options.otherArgs.headers['x-goog-request-params'] =
552552
this._gaxModule.routingHeader.fromParams({
553-
parent: request.parent || '',
553+
parent: request.parent ?? '',
554554
});
555555
this.initialize();
556556
return this.innerApiCalls.addSecretVersion(request, options, callback);
@@ -635,7 +635,7 @@ export class SecretManagerServiceClient {
635635
options.otherArgs.headers = options.otherArgs.headers || {};
636636
options.otherArgs.headers['x-goog-request-params'] =
637637
this._gaxModule.routingHeader.fromParams({
638-
name: request.name || '',
638+
name: request.name ?? '',
639639
});
640640
this.initialize();
641641
return this.innerApiCalls.getSecret(request, options, callback);
@@ -728,7 +728,7 @@ export class SecretManagerServiceClient {
728728
options.otherArgs.headers = options.otherArgs.headers || {};
729729
options.otherArgs.headers['x-goog-request-params'] =
730730
this._gaxModule.routingHeader.fromParams({
731-
'secret.name': request.secret!.name || '',
731+
'secret.name': request.secret!.name ?? '',
732732
});
733733
this.initialize();
734734
return this.innerApiCalls.updateSecret(request, options, callback);
@@ -824,7 +824,7 @@ export class SecretManagerServiceClient {
824824
options.otherArgs.headers = options.otherArgs.headers || {};
825825
options.otherArgs.headers['x-goog-request-params'] =
826826
this._gaxModule.routingHeader.fromParams({
827-
name: request.name || '',
827+
name: request.name ?? '',
828828
});
829829
this.initialize();
830830
return this.innerApiCalls.deleteSecret(request, options, callback);
@@ -922,7 +922,7 @@ export class SecretManagerServiceClient {
922922
options.otherArgs.headers = options.otherArgs.headers || {};
923923
options.otherArgs.headers['x-goog-request-params'] =
924924
this._gaxModule.routingHeader.fromParams({
925-
name: request.name || '',
925+
name: request.name ?? '',
926926
});
927927
this.initialize();
928928
return this.innerApiCalls.getSecretVersion(request, options, callback);
@@ -1026,7 +1026,7 @@ export class SecretManagerServiceClient {
10261026
options.otherArgs.headers = options.otherArgs.headers || {};
10271027
options.otherArgs.headers['x-goog-request-params'] =
10281028
this._gaxModule.routingHeader.fromParams({
1029-
name: request.name || '',
1029+
name: request.name ?? '',
10301030
});
10311031
this.initialize();
10321032
return this.innerApiCalls.accessSecretVersion(request, options, callback);
@@ -1131,7 +1131,7 @@ export class SecretManagerServiceClient {
11311131
options.otherArgs.headers = options.otherArgs.headers || {};
11321132
options.otherArgs.headers['x-goog-request-params'] =
11331133
this._gaxModule.routingHeader.fromParams({
1134-
name: request.name || '',
1134+
name: request.name ?? '',
11351135
});
11361136
this.initialize();
11371137
return this.innerApiCalls.disableSecretVersion(request, options, callback);
@@ -1236,7 +1236,7 @@ export class SecretManagerServiceClient {
12361236
options.otherArgs.headers = options.otherArgs.headers || {};
12371237
options.otherArgs.headers['x-goog-request-params'] =
12381238
this._gaxModule.routingHeader.fromParams({
1239-
name: request.name || '',
1239+
name: request.name ?? '',
12401240
});
12411241
this.initialize();
12421242
return this.innerApiCalls.enableSecretVersion(request, options, callback);
@@ -1342,7 +1342,7 @@ export class SecretManagerServiceClient {
13421342
options.otherArgs.headers = options.otherArgs.headers || {};
13431343
options.otherArgs.headers['x-goog-request-params'] =
13441344
this._gaxModule.routingHeader.fromParams({
1345-
name: request.name || '',
1345+
name: request.name ?? '',
13461346
});
13471347
this.initialize();
13481348
return this.innerApiCalls.destroySecretVersion(request, options, callback);
@@ -1441,7 +1441,7 @@ export class SecretManagerServiceClient {
14411441
options.otherArgs.headers = options.otherArgs.headers || {};
14421442
options.otherArgs.headers['x-goog-request-params'] =
14431443
this._gaxModule.routingHeader.fromParams({
1444-
resource: request.resource || '',
1444+
resource: request.resource ?? '',
14451445
});
14461446
this.initialize();
14471447
return this.innerApiCalls.setIamPolicy(request, options, callback);
@@ -1529,7 +1529,7 @@ export class SecretManagerServiceClient {
15291529
options.otherArgs.headers = options.otherArgs.headers || {};
15301530
options.otherArgs.headers['x-goog-request-params'] =
15311531
this._gaxModule.routingHeader.fromParams({
1532-
resource: request.resource || '',
1532+
resource: request.resource ?? '',
15331533
});
15341534
this.initialize();
15351535
return this.innerApiCalls.getIamPolicy(request, options, callback);
@@ -1624,7 +1624,7 @@ export class SecretManagerServiceClient {
16241624
options.otherArgs.headers = options.otherArgs.headers || {};
16251625
options.otherArgs.headers['x-goog-request-params'] =
16261626
this._gaxModule.routingHeader.fromParams({
1627-
resource: request.resource || '',
1627+
resource: request.resource ?? '',
16281628
});
16291629
this.initialize();
16301630
return this.innerApiCalls.testIamPermissions(request, options, callback);
@@ -1733,7 +1733,7 @@ export class SecretManagerServiceClient {
17331733
options.otherArgs.headers = options.otherArgs.headers || {};
17341734
options.otherArgs.headers['x-goog-request-params'] =
17351735
this._gaxModule.routingHeader.fromParams({
1736-
parent: request.parent || '',
1736+
parent: request.parent ?? '',
17371737
});
17381738
this.initialize();
17391739
return this.innerApiCalls.listSecrets(request, options, callback);
@@ -1781,7 +1781,7 @@ export class SecretManagerServiceClient {
17811781
options.otherArgs.headers = options.otherArgs.headers || {};
17821782
options.otherArgs.headers['x-goog-request-params'] =
17831783
this._gaxModule.routingHeader.fromParams({
1784-
parent: request.parent || '',
1784+
parent: request.parent ?? '',
17851785
});
17861786
const defaultCallSettings = this._defaults['listSecrets'];
17871787
const callSettings = defaultCallSettings.merge(options);
@@ -1838,7 +1838,7 @@ export class SecretManagerServiceClient {
18381838
options.otherArgs.headers = options.otherArgs.headers || {};
18391839
options.otherArgs.headers['x-goog-request-params'] =
18401840
this._gaxModule.routingHeader.fromParams({
1841-
parent: request.parent || '',
1841+
parent: request.parent ?? '',
18421842
});
18431843
const defaultCallSettings = this._defaults['listSecrets'];
18441844
const callSettings = defaultCallSettings.merge(options);
@@ -1954,7 +1954,7 @@ export class SecretManagerServiceClient {
19541954
options.otherArgs.headers = options.otherArgs.headers || {};
19551955
options.otherArgs.headers['x-goog-request-params'] =
19561956
this._gaxModule.routingHeader.fromParams({
1957-
parent: request.parent || '',
1957+
parent: request.parent ?? '',
19581958
});
19591959
this.initialize();
19601960
return this.innerApiCalls.listSecretVersions(request, options, callback);
@@ -2003,7 +2003,7 @@ export class SecretManagerServiceClient {
20032003
options.otherArgs.headers = options.otherArgs.headers || {};
20042004
options.otherArgs.headers['x-goog-request-params'] =
20052005
this._gaxModule.routingHeader.fromParams({
2006-
parent: request.parent || '',
2006+
parent: request.parent ?? '',
20072007
});
20082008
const defaultCallSettings = this._defaults['listSecretVersions'];
20092009
const callSettings = defaultCallSettings.merge(options);
@@ -2061,7 +2061,7 @@ export class SecretManagerServiceClient {
20612061
options.otherArgs.headers = options.otherArgs.headers || {};
20622062
options.otherArgs.headers['x-goog-request-params'] =
20632063
this._gaxModule.routingHeader.fromParams({
2064-
parent: request.parent || '',
2064+
parent: request.parent ?? '',
20652065
});
20662066
const defaultCallSettings = this._defaults['listSecretVersions'];
20672067
const callSettings = defaultCallSettings.merge(options);

0 commit comments

Comments
 (0)