Skip to content
This repository was archived by the owner on Mar 11, 2026. It is now read-only.

Commit 87c8d1f

Browse files
fix: preserve default values in x-goog-request-params header (#1337)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 474338479 Source-Link: googleapis/googleapis@d5d35e0 Source-Link: googleapis/googleapis-gen@efcd3f9 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9
1 parent d970880 commit 87c8d1f

6 files changed

Lines changed: 1616 additions & 1648 deletions

src/v2/config_service_v2_client.ts

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ export class ConfigServiceV2Client {
630630
options.otherArgs.headers = options.otherArgs.headers || {};
631631
options.otherArgs.headers['x-goog-request-params'] =
632632
this._gaxModule.routingHeader.fromParams({
633-
name: request.name || '',
633+
name: request.name ?? '',
634634
});
635635
this.initialize();
636636
return this.innerApiCalls.getBucket(request, options, callback);
@@ -728,7 +728,7 @@ export class ConfigServiceV2Client {
728728
options.otherArgs.headers = options.otherArgs.headers || {};
729729
options.otherArgs.headers['x-goog-request-params'] =
730730
this._gaxModule.routingHeader.fromParams({
731-
parent: request.parent || '',
731+
parent: request.parent ?? '',
732732
});
733733
this.initialize();
734734
return this.innerApiCalls.createBucket(request, options, callback);
@@ -840,7 +840,7 @@ export class ConfigServiceV2Client {
840840
options.otherArgs.headers = options.otherArgs.headers || {};
841841
options.otherArgs.headers['x-goog-request-params'] =
842842
this._gaxModule.routingHeader.fromParams({
843-
name: request.name || '',
843+
name: request.name ?? '',
844844
});
845845
this.initialize();
846846
return this.innerApiCalls.updateBucket(request, options, callback);
@@ -936,7 +936,7 @@ export class ConfigServiceV2Client {
936936
options.otherArgs.headers = options.otherArgs.headers || {};
937937
options.otherArgs.headers['x-goog-request-params'] =
938938
this._gaxModule.routingHeader.fromParams({
939-
name: request.name || '',
939+
name: request.name ?? '',
940940
});
941941
this.initialize();
942942
return this.innerApiCalls.deleteBucket(request, options, callback);
@@ -1029,7 +1029,7 @@ export class ConfigServiceV2Client {
10291029
options.otherArgs.headers = options.otherArgs.headers || {};
10301030
options.otherArgs.headers['x-goog-request-params'] =
10311031
this._gaxModule.routingHeader.fromParams({
1032-
name: request.name || '',
1032+
name: request.name ?? '',
10331033
});
10341034
this.initialize();
10351035
return this.innerApiCalls.undeleteBucket(request, options, callback);
@@ -1118,7 +1118,7 @@ export class ConfigServiceV2Client {
11181118
options.otherArgs.headers = options.otherArgs.headers || {};
11191119
options.otherArgs.headers['x-goog-request-params'] =
11201120
this._gaxModule.routingHeader.fromParams({
1121-
name: request.name || '',
1121+
name: request.name ?? '',
11221122
});
11231123
this.initialize();
11241124
return this.innerApiCalls.getView(request, options, callback);
@@ -1212,7 +1212,7 @@ export class ConfigServiceV2Client {
12121212
options.otherArgs.headers = options.otherArgs.headers || {};
12131213
options.otherArgs.headers['x-goog-request-params'] =
12141214
this._gaxModule.routingHeader.fromParams({
1215-
parent: request.parent || '',
1215+
parent: request.parent ?? '',
12161216
});
12171217
this.initialize();
12181218
return this.innerApiCalls.createView(request, options, callback);
@@ -1316,7 +1316,7 @@ export class ConfigServiceV2Client {
13161316
options.otherArgs.headers = options.otherArgs.headers || {};
13171317
options.otherArgs.headers['x-goog-request-params'] =
13181318
this._gaxModule.routingHeader.fromParams({
1319-
name: request.name || '',
1319+
name: request.name ?? '',
13201320
});
13211321
this.initialize();
13221322
return this.innerApiCalls.updateView(request, options, callback);
@@ -1408,7 +1408,7 @@ export class ConfigServiceV2Client {
14081408
options.otherArgs.headers = options.otherArgs.headers || {};
14091409
options.otherArgs.headers['x-goog-request-params'] =
14101410
this._gaxModule.routingHeader.fromParams({
1411-
name: request.name || '',
1411+
name: request.name ?? '',
14121412
});
14131413
this.initialize();
14141414
return this.innerApiCalls.deleteView(request, options, callback);
@@ -1500,7 +1500,7 @@ export class ConfigServiceV2Client {
15001500
options.otherArgs.headers = options.otherArgs.headers || {};
15011501
options.otherArgs.headers['x-goog-request-params'] =
15021502
this._gaxModule.routingHeader.fromParams({
1503-
sink_name: request.sinkName || '',
1503+
sink_name: request.sinkName ?? '',
15041504
});
15051505
this.initialize();
15061506
return this.innerApiCalls.getSink(request, options, callback);
@@ -1611,7 +1611,7 @@ export class ConfigServiceV2Client {
16111611
options.otherArgs.headers = options.otherArgs.headers || {};
16121612
options.otherArgs.headers['x-goog-request-params'] =
16131613
this._gaxModule.routingHeader.fromParams({
1614-
parent: request.parent || '',
1614+
parent: request.parent ?? '',
16151615
});
16161616
this.initialize();
16171617
return this.innerApiCalls.createSink(request, options, callback);
@@ -1740,7 +1740,7 @@ export class ConfigServiceV2Client {
17401740
options.otherArgs.headers = options.otherArgs.headers || {};
17411741
options.otherArgs.headers['x-goog-request-params'] =
17421742
this._gaxModule.routingHeader.fromParams({
1743-
sink_name: request.sinkName || '',
1743+
sink_name: request.sinkName ?? '',
17441744
});
17451745
this.initialize();
17461746
return this.innerApiCalls.updateSink(request, options, callback);
@@ -1834,7 +1834,7 @@ export class ConfigServiceV2Client {
18341834
options.otherArgs.headers = options.otherArgs.headers || {};
18351835
options.otherArgs.headers['x-goog-request-params'] =
18361836
this._gaxModule.routingHeader.fromParams({
1837-
sink_name: request.sinkName || '',
1837+
sink_name: request.sinkName ?? '',
18381838
});
18391839
this.initialize();
18401840
return this.innerApiCalls.deleteSink(request, options, callback);
@@ -1926,7 +1926,7 @@ export class ConfigServiceV2Client {
19261926
options.otherArgs.headers = options.otherArgs.headers || {};
19271927
options.otherArgs.headers['x-goog-request-params'] =
19281928
this._gaxModule.routingHeader.fromParams({
1929-
name: request.name || '',
1929+
name: request.name ?? '',
19301930
});
19311931
this.initialize();
19321932
return this.innerApiCalls.getExclusion(request, options, callback);
@@ -2024,7 +2024,7 @@ export class ConfigServiceV2Client {
20242024
options.otherArgs.headers = options.otherArgs.headers || {};
20252025
options.otherArgs.headers['x-goog-request-params'] =
20262026
this._gaxModule.routingHeader.fromParams({
2027-
parent: request.parent || '',
2027+
parent: request.parent ?? '',
20282028
});
20292029
this.initialize();
20302030
return this.innerApiCalls.createExclusion(request, options, callback);
@@ -2128,7 +2128,7 @@ export class ConfigServiceV2Client {
21282128
options.otherArgs.headers = options.otherArgs.headers || {};
21292129
options.otherArgs.headers['x-goog-request-params'] =
21302130
this._gaxModule.routingHeader.fromParams({
2131-
name: request.name || '',
2131+
name: request.name ?? '',
21322132
});
21332133
this.initialize();
21342134
return this.innerApiCalls.updateExclusion(request, options, callback);
@@ -2220,7 +2220,7 @@ export class ConfigServiceV2Client {
22202220
options.otherArgs.headers = options.otherArgs.headers || {};
22212221
options.otherArgs.headers['x-goog-request-params'] =
22222222
this._gaxModule.routingHeader.fromParams({
2223-
name: request.name || '',
2223+
name: request.name ?? '',
22242224
});
22252225
this.initialize();
22262226
return this.innerApiCalls.deleteExclusion(request, options, callback);
@@ -2326,7 +2326,7 @@ export class ConfigServiceV2Client {
23262326
options.otherArgs.headers = options.otherArgs.headers || {};
23272327
options.otherArgs.headers['x-goog-request-params'] =
23282328
this._gaxModule.routingHeader.fromParams({
2329-
name: request.name || '',
2329+
name: request.name ?? '',
23302330
});
23312331
this.initialize();
23322332
return this.innerApiCalls.getCmekSettings(request, options, callback);
@@ -2452,7 +2452,7 @@ export class ConfigServiceV2Client {
24522452
options.otherArgs.headers = options.otherArgs.headers || {};
24532453
options.otherArgs.headers['x-goog-request-params'] =
24542454
this._gaxModule.routingHeader.fromParams({
2455-
name: request.name || '',
2455+
name: request.name ?? '',
24562456
});
24572457
this.initialize();
24582458
return this.innerApiCalls.updateCmekSettings(request, options, callback);
@@ -2558,7 +2558,7 @@ export class ConfigServiceV2Client {
25582558
options.otherArgs.headers = options.otherArgs.headers || {};
25592559
options.otherArgs.headers['x-goog-request-params'] =
25602560
this._gaxModule.routingHeader.fromParams({
2561-
name: request.name || '',
2561+
name: request.name ?? '',
25622562
});
25632563
this.initialize();
25642564
return this.innerApiCalls.getSettings(request, options, callback);
@@ -2680,7 +2680,7 @@ export class ConfigServiceV2Client {
26802680
options.otherArgs.headers = options.otherArgs.headers || {};
26812681
options.otherArgs.headers['x-goog-request-params'] =
26822682
this._gaxModule.routingHeader.fromParams({
2683-
name: request.name || '',
2683+
name: request.name ?? '',
26842684
});
26852685
this.initialize();
26862686
return this.innerApiCalls.updateSettings(request, options, callback);
@@ -2928,7 +2928,7 @@ export class ConfigServiceV2Client {
29282928
options.otherArgs.headers = options.otherArgs.headers || {};
29292929
options.otherArgs.headers['x-goog-request-params'] =
29302930
this._gaxModule.routingHeader.fromParams({
2931-
parent: request.parent || '',
2931+
parent: request.parent ?? '',
29322932
});
29332933
this.initialize();
29342934
return this.innerApiCalls.listBuckets(request, options, callback);
@@ -2980,7 +2980,7 @@ export class ConfigServiceV2Client {
29802980
options.otherArgs.headers = options.otherArgs.headers || {};
29812981
options.otherArgs.headers['x-goog-request-params'] =
29822982
this._gaxModule.routingHeader.fromParams({
2983-
parent: request.parent || '',
2983+
parent: request.parent ?? '',
29842984
});
29852985
const defaultCallSettings = this._defaults['listBuckets'];
29862986
const callSettings = defaultCallSettings.merge(options);
@@ -3041,7 +3041,7 @@ export class ConfigServiceV2Client {
30413041
options.otherArgs.headers = options.otherArgs.headers || {};
30423042
options.otherArgs.headers['x-goog-request-params'] =
30433043
this._gaxModule.routingHeader.fromParams({
3044-
parent: request.parent || '',
3044+
parent: request.parent ?? '',
30453045
});
30463046
const defaultCallSettings = this._defaults['listBuckets'];
30473047
const callSettings = defaultCallSettings.merge(options);
@@ -3145,7 +3145,7 @@ export class ConfigServiceV2Client {
31453145
options.otherArgs.headers = options.otherArgs.headers || {};
31463146
options.otherArgs.headers['x-goog-request-params'] =
31473147
this._gaxModule.routingHeader.fromParams({
3148-
parent: request.parent || '',
3148+
parent: request.parent ?? '',
31493149
});
31503150
this.initialize();
31513151
return this.innerApiCalls.listViews(request, options, callback);
@@ -3191,7 +3191,7 @@ export class ConfigServiceV2Client {
31913191
options.otherArgs.headers = options.otherArgs.headers || {};
31923192
options.otherArgs.headers['x-goog-request-params'] =
31933193
this._gaxModule.routingHeader.fromParams({
3194-
parent: request.parent || '',
3194+
parent: request.parent ?? '',
31953195
});
31963196
const defaultCallSettings = this._defaults['listViews'];
31973197
const callSettings = defaultCallSettings.merge(options);
@@ -3246,7 +3246,7 @@ export class ConfigServiceV2Client {
32463246
options.otherArgs.headers = options.otherArgs.headers || {};
32473247
options.otherArgs.headers['x-goog-request-params'] =
32483248
this._gaxModule.routingHeader.fromParams({
3249-
parent: request.parent || '',
3249+
parent: request.parent ?? '',
32503250
});
32513251
const defaultCallSettings = this._defaults['listViews'];
32523252
const callSettings = defaultCallSettings.merge(options);
@@ -3352,7 +3352,7 @@ export class ConfigServiceV2Client {
33523352
options.otherArgs.headers = options.otherArgs.headers || {};
33533353
options.otherArgs.headers['x-goog-request-params'] =
33543354
this._gaxModule.routingHeader.fromParams({
3355-
parent: request.parent || '',
3355+
parent: request.parent ?? '',
33563356
});
33573357
this.initialize();
33583358
return this.innerApiCalls.listSinks(request, options, callback);
@@ -3400,7 +3400,7 @@ export class ConfigServiceV2Client {
34003400
options.otherArgs.headers = options.otherArgs.headers || {};
34013401
options.otherArgs.headers['x-goog-request-params'] =
34023402
this._gaxModule.routingHeader.fromParams({
3403-
parent: request.parent || '',
3403+
parent: request.parent ?? '',
34043404
});
34053405
const defaultCallSettings = this._defaults['listSinks'];
34063406
const callSettings = defaultCallSettings.merge(options);
@@ -3457,7 +3457,7 @@ export class ConfigServiceV2Client {
34573457
options.otherArgs.headers = options.otherArgs.headers || {};
34583458
options.otherArgs.headers['x-goog-request-params'] =
34593459
this._gaxModule.routingHeader.fromParams({
3460-
parent: request.parent || '',
3460+
parent: request.parent ?? '',
34613461
});
34623462
const defaultCallSettings = this._defaults['listSinks'];
34633463
const callSettings = defaultCallSettings.merge(options);
@@ -3563,7 +3563,7 @@ export class ConfigServiceV2Client {
35633563
options.otherArgs.headers = options.otherArgs.headers || {};
35643564
options.otherArgs.headers['x-goog-request-params'] =
35653565
this._gaxModule.routingHeader.fromParams({
3566-
parent: request.parent || '',
3566+
parent: request.parent ?? '',
35673567
});
35683568
this.initialize();
35693569
return this.innerApiCalls.listExclusions(request, options, callback);
@@ -3611,7 +3611,7 @@ export class ConfigServiceV2Client {
36113611
options.otherArgs.headers = options.otherArgs.headers || {};
36123612
options.otherArgs.headers['x-goog-request-params'] =
36133613
this._gaxModule.routingHeader.fromParams({
3614-
parent: request.parent || '',
3614+
parent: request.parent ?? '',
36153615
});
36163616
const defaultCallSettings = this._defaults['listExclusions'];
36173617
const callSettings = defaultCallSettings.merge(options);
@@ -3668,7 +3668,7 @@ export class ConfigServiceV2Client {
36683668
options.otherArgs.headers = options.otherArgs.headers || {};
36693669
options.otherArgs.headers['x-goog-request-params'] =
36703670
this._gaxModule.routingHeader.fromParams({
3671-
parent: request.parent || '',
3671+
parent: request.parent ?? '',
36723672
});
36733673
const defaultCallSettings = this._defaults['listExclusions'];
36743674
const callSettings = defaultCallSettings.merge(options);

src/v2/logging_service_v2_client.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ export class LoggingServiceV2Client {
570570
options.otherArgs.headers = options.otherArgs.headers || {};
571571
options.otherArgs.headers['x-goog-request-params'] =
572572
this._gaxModule.routingHeader.fromParams({
573-
log_name: request.logName || '',
573+
log_name: request.logName ?? '',
574574
});
575575
this.initialize();
576576
return this.innerApiCalls.deleteLog(request, options, callback);
@@ -1329,7 +1329,7 @@ export class LoggingServiceV2Client {
13291329
options.otherArgs.headers = options.otherArgs.headers || {};
13301330
options.otherArgs.headers['x-goog-request-params'] =
13311331
this._gaxModule.routingHeader.fromParams({
1332-
parent: request.parent || '',
1332+
parent: request.parent ?? '',
13331333
});
13341334
this.initialize();
13351335
return this.innerApiCalls.listLogs(request, options, callback);
@@ -1391,7 +1391,7 @@ export class LoggingServiceV2Client {
13911391
options.otherArgs.headers = options.otherArgs.headers || {};
13921392
options.otherArgs.headers['x-goog-request-params'] =
13931393
this._gaxModule.routingHeader.fromParams({
1394-
parent: request.parent || '',
1394+
parent: request.parent ?? '',
13951395
});
13961396
const defaultCallSettings = this._defaults['listLogs'];
13971397
const callSettings = defaultCallSettings.merge(options);
@@ -1462,7 +1462,7 @@ export class LoggingServiceV2Client {
14621462
options.otherArgs.headers = options.otherArgs.headers || {};
14631463
options.otherArgs.headers['x-goog-request-params'] =
14641464
this._gaxModule.routingHeader.fromParams({
1465-
parent: request.parent || '',
1465+
parent: request.parent ?? '',
14661466
});
14671467
const defaultCallSettings = this._defaults['listLogs'];
14681468
const callSettings = defaultCallSettings.merge(options);

src/v2/metrics_service_v2_client.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ export class MetricsServiceV2Client {
505505
options.otherArgs.headers = options.otherArgs.headers || {};
506506
options.otherArgs.headers['x-goog-request-params'] =
507507
this._gaxModule.routingHeader.fromParams({
508-
metric_name: request.metricName || '',
508+
metric_name: request.metricName ?? '',
509509
});
510510
this.initialize();
511511
return this.innerApiCalls.getLogMetric(request, options, callback);
@@ -595,7 +595,7 @@ export class MetricsServiceV2Client {
595595
options.otherArgs.headers = options.otherArgs.headers || {};
596596
options.otherArgs.headers['x-goog-request-params'] =
597597
this._gaxModule.routingHeader.fromParams({
598-
parent: request.parent || '',
598+
parent: request.parent ?? '',
599599
});
600600
this.initialize();
601601
return this.innerApiCalls.createLogMetric(request, options, callback);
@@ -686,7 +686,7 @@ export class MetricsServiceV2Client {
686686
options.otherArgs.headers = options.otherArgs.headers || {};
687687
options.otherArgs.headers['x-goog-request-params'] =
688688
this._gaxModule.routingHeader.fromParams({
689-
metric_name: request.metricName || '',
689+
metric_name: request.metricName ?? '',
690690
});
691691
this.initialize();
692692
return this.innerApiCalls.updateLogMetric(request, options, callback);
@@ -771,7 +771,7 @@ export class MetricsServiceV2Client {
771771
options.otherArgs.headers = options.otherArgs.headers || {};
772772
options.otherArgs.headers['x-goog-request-params'] =
773773
this._gaxModule.routingHeader.fromParams({
774-
metric_name: request.metricName || '',
774+
metric_name: request.metricName ?? '',
775775
});
776776
this.initialize();
777777
return this.innerApiCalls.deleteLogMetric(request, options, callback);
@@ -869,7 +869,7 @@ export class MetricsServiceV2Client {
869869
options.otherArgs.headers = options.otherArgs.headers || {};
870870
options.otherArgs.headers['x-goog-request-params'] =
871871
this._gaxModule.routingHeader.fromParams({
872-
parent: request.parent || '',
872+
parent: request.parent ?? '',
873873
});
874874
this.initialize();
875875
return this.innerApiCalls.listLogMetrics(request, options, callback);
@@ -914,7 +914,7 @@ export class MetricsServiceV2Client {
914914
options.otherArgs.headers = options.otherArgs.headers || {};
915915
options.otherArgs.headers['x-goog-request-params'] =
916916
this._gaxModule.routingHeader.fromParams({
917-
parent: request.parent || '',
917+
parent: request.parent ?? '',
918918
});
919919
const defaultCallSettings = this._defaults['listLogMetrics'];
920920
const callSettings = defaultCallSettings.merge(options);
@@ -968,7 +968,7 @@ export class MetricsServiceV2Client {
968968
options.otherArgs.headers = options.otherArgs.headers || {};
969969
options.otherArgs.headers['x-goog-request-params'] =
970970
this._gaxModule.routingHeader.fromParams({
971-
parent: request.parent || '',
971+
parent: request.parent ?? '',
972972
});
973973
const defaultCallSettings = this._defaults['listLogMetrics'];
974974
const callSettings = defaultCallSettings.merge(options);

0 commit comments

Comments
 (0)