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

Commit 2ab539d

Browse files
fix: preserve default values in x-goog-request-params header (#573)
- [ ] 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 190c29b commit 2ab539d

4 files changed

Lines changed: 1573 additions & 1471 deletions

File tree

src/v1/ekm_service_client.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ export class EkmServiceClient {
439439
options.otherArgs.headers = options.otherArgs.headers || {};
440440
options.otherArgs.headers['x-goog-request-params'] =
441441
this._gaxModule.routingHeader.fromParams({
442-
name: request.name || '',
442+
name: request.name ?? '',
443443
});
444444
this.initialize();
445445
return this.innerApiCalls.getEkmConnection(request, options, callback);
@@ -533,7 +533,7 @@ export class EkmServiceClient {
533533
options.otherArgs.headers = options.otherArgs.headers || {};
534534
options.otherArgs.headers['x-goog-request-params'] =
535535
this._gaxModule.routingHeader.fromParams({
536-
parent: request.parent || '',
536+
parent: request.parent ?? '',
537537
});
538538
this.initialize();
539539
return this.innerApiCalls.createEkmConnection(request, options, callback);
@@ -621,7 +621,7 @@ export class EkmServiceClient {
621621
options.otherArgs.headers = options.otherArgs.headers || {};
622622
options.otherArgs.headers['x-goog-request-params'] =
623623
this._gaxModule.routingHeader.fromParams({
624-
'ekm_connection.name': request.ekmConnection!.name || '',
624+
'ekm_connection.name': request.ekmConnection!.name ?? '',
625625
});
626626
this.initialize();
627627
return this.innerApiCalls.updateEkmConnection(request, options, callback);
@@ -733,7 +733,7 @@ export class EkmServiceClient {
733733
options.otherArgs.headers = options.otherArgs.headers || {};
734734
options.otherArgs.headers['x-goog-request-params'] =
735735
this._gaxModule.routingHeader.fromParams({
736-
parent: request.parent || '',
736+
parent: request.parent ?? '',
737737
});
738738
this.initialize();
739739
return this.innerApiCalls.listEkmConnections(request, options, callback);
@@ -790,7 +790,7 @@ export class EkmServiceClient {
790790
options.otherArgs.headers = options.otherArgs.headers || {};
791791
options.otherArgs.headers['x-goog-request-params'] =
792792
this._gaxModule.routingHeader.fromParams({
793-
parent: request.parent || '',
793+
parent: request.parent ?? '',
794794
});
795795
const defaultCallSettings = this._defaults['listEkmConnections'];
796796
const callSettings = defaultCallSettings.merge(options);
@@ -856,7 +856,7 @@ export class EkmServiceClient {
856856
options.otherArgs.headers = options.otherArgs.headers || {};
857857
options.otherArgs.headers['x-goog-request-params'] =
858858
this._gaxModule.routingHeader.fromParams({
859-
parent: request.parent || '',
859+
parent: request.parent ?? '',
860860
});
861861
const defaultCallSettings = this._defaults['listEkmConnections'];
862862
const callSettings = defaultCallSettings.merge(options);

src/v1/key_management_service_client.ts

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ export class KeyManagementServiceClient {
480480
options.otherArgs.headers = options.otherArgs.headers || {};
481481
options.otherArgs.headers['x-goog-request-params'] =
482482
this._gaxModule.routingHeader.fromParams({
483-
name: request.name || '',
483+
name: request.name ?? '',
484484
});
485485
this.initialize();
486486
return this.innerApiCalls.getKeyRing(request, options, callback);
@@ -566,7 +566,7 @@ export class KeyManagementServiceClient {
566566
options.otherArgs.headers = options.otherArgs.headers || {};
567567
options.otherArgs.headers['x-goog-request-params'] =
568568
this._gaxModule.routingHeader.fromParams({
569-
name: request.name || '',
569+
name: request.name ?? '',
570570
});
571571
this.initialize();
572572
return this.innerApiCalls.getCryptoKey(request, options, callback);
@@ -653,7 +653,7 @@ export class KeyManagementServiceClient {
653653
options.otherArgs.headers = options.otherArgs.headers || {};
654654
options.otherArgs.headers['x-goog-request-params'] =
655655
this._gaxModule.routingHeader.fromParams({
656-
name: request.name || '',
656+
name: request.name ?? '',
657657
});
658658
this.initialize();
659659
return this.innerApiCalls.getCryptoKeyVersion(request, options, callback);
@@ -742,7 +742,7 @@ export class KeyManagementServiceClient {
742742
options.otherArgs.headers = options.otherArgs.headers || {};
743743
options.otherArgs.headers['x-goog-request-params'] =
744744
this._gaxModule.routingHeader.fromParams({
745-
name: request.name || '',
745+
name: request.name ?? '',
746746
});
747747
this.initialize();
748748
return this.innerApiCalls.getPublicKey(request, options, callback);
@@ -826,7 +826,7 @@ export class KeyManagementServiceClient {
826826
options.otherArgs.headers = options.otherArgs.headers || {};
827827
options.otherArgs.headers['x-goog-request-params'] =
828828
this._gaxModule.routingHeader.fromParams({
829-
name: request.name || '',
829+
name: request.name ?? '',
830830
});
831831
this.initialize();
832832
return this.innerApiCalls.getImportJob(request, options, callback);
@@ -918,7 +918,7 @@ export class KeyManagementServiceClient {
918918
options.otherArgs.headers = options.otherArgs.headers || {};
919919
options.otherArgs.headers['x-goog-request-params'] =
920920
this._gaxModule.routingHeader.fromParams({
921-
parent: request.parent || '',
921+
parent: request.parent ?? '',
922922
});
923923
this.initialize();
924924
return this.innerApiCalls.createKeyRing(request, options, callback);
@@ -1022,7 +1022,7 @@ export class KeyManagementServiceClient {
10221022
options.otherArgs.headers = options.otherArgs.headers || {};
10231023
options.otherArgs.headers['x-goog-request-params'] =
10241024
this._gaxModule.routingHeader.fromParams({
1025-
parent: request.parent || '',
1025+
parent: request.parent ?? '',
10261026
});
10271027
this.initialize();
10281028
return this.innerApiCalls.createCryptoKey(request, options, callback);
@@ -1123,7 +1123,7 @@ export class KeyManagementServiceClient {
11231123
options.otherArgs.headers = options.otherArgs.headers || {};
11241124
options.otherArgs.headers['x-goog-request-params'] =
11251125
this._gaxModule.routingHeader.fromParams({
1126-
parent: request.parent || '',
1126+
parent: request.parent ?? '',
11271127
});
11281128
this.initialize();
11291129
return this.innerApiCalls.createCryptoKeyVersion(
@@ -1285,7 +1285,7 @@ export class KeyManagementServiceClient {
12851285
options.otherArgs.headers = options.otherArgs.headers || {};
12861286
options.otherArgs.headers['x-goog-request-params'] =
12871287
this._gaxModule.routingHeader.fromParams({
1288-
parent: request.parent || '',
1288+
parent: request.parent ?? '',
12891289
});
12901290
this.initialize();
12911291
return this.innerApiCalls.importCryptoKeyVersion(
@@ -1384,7 +1384,7 @@ export class KeyManagementServiceClient {
13841384
options.otherArgs.headers = options.otherArgs.headers || {};
13851385
options.otherArgs.headers['x-goog-request-params'] =
13861386
this._gaxModule.routingHeader.fromParams({
1387-
parent: request.parent || '',
1387+
parent: request.parent ?? '',
13881388
});
13891389
this.initialize();
13901390
return this.innerApiCalls.createImportJob(request, options, callback);
@@ -1469,7 +1469,7 @@ export class KeyManagementServiceClient {
14691469
options.otherArgs.headers = options.otherArgs.headers || {};
14701470
options.otherArgs.headers['x-goog-request-params'] =
14711471
this._gaxModule.routingHeader.fromParams({
1472-
'crypto_key.name': request.cryptoKey!.name || '',
1472+
'crypto_key.name': request.cryptoKey!.name ?? '',
14731473
});
14741474
this.initialize();
14751475
return this.innerApiCalls.updateCryptoKey(request, options, callback);
@@ -1574,7 +1574,7 @@ export class KeyManagementServiceClient {
15741574
options.otherArgs.headers = options.otherArgs.headers || {};
15751575
options.otherArgs.headers['x-goog-request-params'] =
15761576
this._gaxModule.routingHeader.fromParams({
1577-
'crypto_key_version.name': request.cryptoKeyVersion!.name || '',
1577+
'crypto_key_version.name': request.cryptoKeyVersion!.name ?? '',
15781578
});
15791579
this.initialize();
15801580
return this.innerApiCalls.updateCryptoKeyVersion(
@@ -1684,7 +1684,7 @@ export class KeyManagementServiceClient {
16841684
options.otherArgs.headers = options.otherArgs.headers || {};
16851685
options.otherArgs.headers['x-goog-request-params'] =
16861686
this._gaxModule.routingHeader.fromParams({
1687-
name: request.name || '',
1687+
name: request.name ?? '',
16881688
});
16891689
this.initialize();
16901690
return this.innerApiCalls.updateCryptoKeyPrimaryVersion(
@@ -1800,7 +1800,7 @@ export class KeyManagementServiceClient {
18001800
options.otherArgs.headers = options.otherArgs.headers || {};
18011801
options.otherArgs.headers['x-goog-request-params'] =
18021802
this._gaxModule.routingHeader.fromParams({
1803-
name: request.name || '',
1803+
name: request.name ?? '',
18041804
});
18051805
this.initialize();
18061806
return this.innerApiCalls.destroyCryptoKeyVersion(
@@ -1904,7 +1904,7 @@ export class KeyManagementServiceClient {
19041904
options.otherArgs.headers = options.otherArgs.headers || {};
19051905
options.otherArgs.headers['x-goog-request-params'] =
19061906
this._gaxModule.routingHeader.fromParams({
1907-
name: request.name || '',
1907+
name: request.name ?? '',
19081908
});
19091909
this.initialize();
19101910
return this.innerApiCalls.restoreCryptoKeyVersion(
@@ -2062,7 +2062,7 @@ export class KeyManagementServiceClient {
20622062
options.otherArgs.headers = options.otherArgs.headers || {};
20632063
options.otherArgs.headers['x-goog-request-params'] =
20642064
this._gaxModule.routingHeader.fromParams({
2065-
name: request.name || '',
2065+
name: request.name ?? '',
20662066
});
20672067
this.initialize();
20682068
return this.innerApiCalls.encrypt(request, options, callback);
@@ -2196,7 +2196,7 @@ export class KeyManagementServiceClient {
21962196
options.otherArgs.headers = options.otherArgs.headers || {};
21972197
options.otherArgs.headers['x-goog-request-params'] =
21982198
this._gaxModule.routingHeader.fromParams({
2199-
name: request.name || '',
2199+
name: request.name ?? '',
22002200
});
22012201
this.initialize();
22022202
return this.innerApiCalls.decrypt(request, options, callback);
@@ -2338,7 +2338,7 @@ export class KeyManagementServiceClient {
23382338
options.otherArgs.headers = options.otherArgs.headers || {};
23392339
options.otherArgs.headers['x-goog-request-params'] =
23402340
this._gaxModule.routingHeader.fromParams({
2341-
name: request.name || '',
2341+
name: request.name ?? '',
23422342
});
23432343
this.initialize();
23442344
return this.innerApiCalls.asymmetricSign(request, options, callback);
@@ -2453,7 +2453,7 @@ export class KeyManagementServiceClient {
24532453
options.otherArgs.headers = options.otherArgs.headers || {};
24542454
options.otherArgs.headers['x-goog-request-params'] =
24552455
this._gaxModule.routingHeader.fromParams({
2456-
name: request.name || '',
2456+
name: request.name ?? '',
24572457
});
24582458
this.initialize();
24592459
return this.innerApiCalls.asymmetricDecrypt(request, options, callback);
@@ -2561,7 +2561,7 @@ export class KeyManagementServiceClient {
25612561
options.otherArgs.headers = options.otherArgs.headers || {};
25622562
options.otherArgs.headers['x-goog-request-params'] =
25632563
this._gaxModule.routingHeader.fromParams({
2564-
name: request.name || '',
2564+
name: request.name ?? '',
25652565
});
25662566
this.initialize();
25672567
return this.innerApiCalls.macSign(request, options, callback);
@@ -2691,7 +2691,7 @@ export class KeyManagementServiceClient {
26912691
options.otherArgs.headers = options.otherArgs.headers || {};
26922692
options.otherArgs.headers['x-goog-request-params'] =
26932693
this._gaxModule.routingHeader.fromParams({
2694-
name: request.name || '',
2694+
name: request.name ?? '',
26952695
});
26962696
this.initialize();
26972697
return this.innerApiCalls.macVerify(request, options, callback);
@@ -2786,7 +2786,7 @@ export class KeyManagementServiceClient {
27862786
options.otherArgs.headers = options.otherArgs.headers || {};
27872787
options.otherArgs.headers['x-goog-request-params'] =
27882788
this._gaxModule.routingHeader.fromParams({
2789-
location: request.location || '',
2789+
location: request.location ?? '',
27902790
});
27912791
this.initialize();
27922792
return this.innerApiCalls.generateRandomBytes(request, options, callback);
@@ -2896,7 +2896,7 @@ export class KeyManagementServiceClient {
28962896
options.otherArgs.headers = options.otherArgs.headers || {};
28972897
options.otherArgs.headers['x-goog-request-params'] =
28982898
this._gaxModule.routingHeader.fromParams({
2899-
parent: request.parent || '',
2899+
parent: request.parent ?? '',
29002900
});
29012901
this.initialize();
29022902
return this.innerApiCalls.listKeyRings(request, options, callback);
@@ -2953,7 +2953,7 @@ export class KeyManagementServiceClient {
29532953
options.otherArgs.headers = options.otherArgs.headers || {};
29542954
options.otherArgs.headers['x-goog-request-params'] =
29552955
this._gaxModule.routingHeader.fromParams({
2956-
parent: request.parent || '',
2956+
parent: request.parent ?? '',
29572957
});
29582958
const defaultCallSettings = this._defaults['listKeyRings'];
29592959
const callSettings = defaultCallSettings.merge(options);
@@ -3019,7 +3019,7 @@ export class KeyManagementServiceClient {
30193019
options.otherArgs.headers = options.otherArgs.headers || {};
30203020
options.otherArgs.headers['x-goog-request-params'] =
30213021
this._gaxModule.routingHeader.fromParams({
3022-
parent: request.parent || '',
3022+
parent: request.parent ?? '',
30233023
});
30243024
const defaultCallSettings = this._defaults['listKeyRings'];
30253025
const callSettings = defaultCallSettings.merge(options);
@@ -3135,7 +3135,7 @@ export class KeyManagementServiceClient {
31353135
options.otherArgs.headers = options.otherArgs.headers || {};
31363136
options.otherArgs.headers['x-goog-request-params'] =
31373137
this._gaxModule.routingHeader.fromParams({
3138-
parent: request.parent || '',
3138+
parent: request.parent ?? '',
31393139
});
31403140
this.initialize();
31413141
return this.innerApiCalls.listCryptoKeys(request, options, callback);
@@ -3193,7 +3193,7 @@ export class KeyManagementServiceClient {
31933193
options.otherArgs.headers = options.otherArgs.headers || {};
31943194
options.otherArgs.headers['x-goog-request-params'] =
31953195
this._gaxModule.routingHeader.fromParams({
3196-
parent: request.parent || '',
3196+
parent: request.parent ?? '',
31973197
});
31983198
const defaultCallSettings = this._defaults['listCryptoKeys'];
31993199
const callSettings = defaultCallSettings.merge(options);
@@ -3260,7 +3260,7 @@ export class KeyManagementServiceClient {
32603260
options.otherArgs.headers = options.otherArgs.headers || {};
32613261
options.otherArgs.headers['x-goog-request-params'] =
32623262
this._gaxModule.routingHeader.fromParams({
3263-
parent: request.parent || '',
3263+
parent: request.parent ?? '',
32643264
});
32653265
const defaultCallSettings = this._defaults['listCryptoKeys'];
32663266
const callSettings = defaultCallSettings.merge(options);
@@ -3385,7 +3385,7 @@ export class KeyManagementServiceClient {
33853385
options.otherArgs.headers = options.otherArgs.headers || {};
33863386
options.otherArgs.headers['x-goog-request-params'] =
33873387
this._gaxModule.routingHeader.fromParams({
3388-
parent: request.parent || '',
3388+
parent: request.parent ?? '',
33893389
});
33903390
this.initialize();
33913391
return this.innerApiCalls.listCryptoKeyVersions(request, options, callback);
@@ -3444,7 +3444,7 @@ export class KeyManagementServiceClient {
34443444
options.otherArgs.headers = options.otherArgs.headers || {};
34453445
options.otherArgs.headers['x-goog-request-params'] =
34463446
this._gaxModule.routingHeader.fromParams({
3447-
parent: request.parent || '',
3447+
parent: request.parent ?? '',
34483448
});
34493449
const defaultCallSettings = this._defaults['listCryptoKeyVersions'];
34503450
const callSettings = defaultCallSettings.merge(options);
@@ -3512,7 +3512,7 @@ export class KeyManagementServiceClient {
35123512
options.otherArgs.headers = options.otherArgs.headers || {};
35133513
options.otherArgs.headers['x-goog-request-params'] =
35143514
this._gaxModule.routingHeader.fromParams({
3515-
parent: request.parent || '',
3515+
parent: request.parent ?? '',
35163516
});
35173517
const defaultCallSettings = this._defaults['listCryptoKeyVersions'];
35183518
const callSettings = defaultCallSettings.merge(options);
@@ -3626,7 +3626,7 @@ export class KeyManagementServiceClient {
36263626
options.otherArgs.headers = options.otherArgs.headers || {};
36273627
options.otherArgs.headers['x-goog-request-params'] =
36283628
this._gaxModule.routingHeader.fromParams({
3629-
parent: request.parent || '',
3629+
parent: request.parent ?? '',
36303630
});
36313631
this.initialize();
36323632
return this.innerApiCalls.listImportJobs(request, options, callback);
@@ -3682,7 +3682,7 @@ export class KeyManagementServiceClient {
36823682
options.otherArgs.headers = options.otherArgs.headers || {};
36833683
options.otherArgs.headers['x-goog-request-params'] =
36843684
this._gaxModule.routingHeader.fromParams({
3685-
parent: request.parent || '',
3685+
parent: request.parent ?? '',
36863686
});
36873687
const defaultCallSettings = this._defaults['listImportJobs'];
36883688
const callSettings = defaultCallSettings.merge(options);
@@ -3747,7 +3747,7 @@ export class KeyManagementServiceClient {
37473747
options.otherArgs.headers = options.otherArgs.headers || {};
37483748
options.otherArgs.headers['x-goog-request-params'] =
37493749
this._gaxModule.routingHeader.fromParams({
3750-
parent: request.parent || '',
3750+
parent: request.parent ?? '',
37513751
});
37523752
const defaultCallSettings = this._defaults['listImportJobs'];
37533753
const callSettings = defaultCallSettings.merge(options);

0 commit comments

Comments
 (0)