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

Commit feb5188

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

6 files changed

Lines changed: 2359 additions & 2462 deletions

File tree

src/v2/cloud_tasks_client.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ export class CloudTasksClient {
434434
options.otherArgs.headers = options.otherArgs.headers || {};
435435
options.otherArgs.headers['x-goog-request-params'] =
436436
this._gaxModule.routingHeader.fromParams({
437-
name: request.name || '',
437+
name: request.name ?? '',
438438
});
439439
this.initialize();
440440
return this.innerApiCalls.getQueue(request, options, callback);
@@ -537,7 +537,7 @@ export class CloudTasksClient {
537537
options.otherArgs.headers = options.otherArgs.headers || {};
538538
options.otherArgs.headers['x-goog-request-params'] =
539539
this._gaxModule.routingHeader.fromParams({
540-
parent: request.parent || '',
540+
parent: request.parent ?? '',
541541
});
542542
this.initialize();
543543
return this.innerApiCalls.createQueue(request, options, callback);
@@ -644,7 +644,7 @@ export class CloudTasksClient {
644644
options.otherArgs.headers = options.otherArgs.headers || {};
645645
options.otherArgs.headers['x-goog-request-params'] =
646646
this._gaxModule.routingHeader.fromParams({
647-
'queue.name': request.queue!.name || '',
647+
'queue.name': request.queue!.name ?? '',
648648
});
649649
this.initialize();
650650
return this.innerApiCalls.updateQueue(request, options, callback);
@@ -740,7 +740,7 @@ export class CloudTasksClient {
740740
options.otherArgs.headers = options.otherArgs.headers || {};
741741
options.otherArgs.headers['x-goog-request-params'] =
742742
this._gaxModule.routingHeader.fromParams({
743-
name: request.name || '',
743+
name: request.name ?? '',
744744
});
745745
this.initialize();
746746
return this.innerApiCalls.deleteQueue(request, options, callback);
@@ -829,7 +829,7 @@ export class CloudTasksClient {
829829
options.otherArgs.headers = options.otherArgs.headers || {};
830830
options.otherArgs.headers['x-goog-request-params'] =
831831
this._gaxModule.routingHeader.fromParams({
832-
name: request.name || '',
832+
name: request.name ?? '',
833833
});
834834
this.initialize();
835835
return this.innerApiCalls.purgeQueue(request, options, callback);
@@ -919,7 +919,7 @@ export class CloudTasksClient {
919919
options.otherArgs.headers = options.otherArgs.headers || {};
920920
options.otherArgs.headers['x-goog-request-params'] =
921921
this._gaxModule.routingHeader.fromParams({
922-
name: request.name || '',
922+
name: request.name ?? '',
923923
});
924924
this.initialize();
925925
return this.innerApiCalls.pauseQueue(request, options, callback);
@@ -1015,7 +1015,7 @@ export class CloudTasksClient {
10151015
options.otherArgs.headers = options.otherArgs.headers || {};
10161016
options.otherArgs.headers['x-goog-request-params'] =
10171017
this._gaxModule.routingHeader.fromParams({
1018-
name: request.name || '',
1018+
name: request.name ?? '',
10191019
});
10201020
this.initialize();
10211021
return this.innerApiCalls.resumeQueue(request, options, callback);
@@ -1110,7 +1110,7 @@ export class CloudTasksClient {
11101110
options.otherArgs.headers = options.otherArgs.headers || {};
11111111
options.otherArgs.headers['x-goog-request-params'] =
11121112
this._gaxModule.routingHeader.fromParams({
1113-
resource: request.resource || '',
1113+
resource: request.resource ?? '',
11141114
});
11151115
this.initialize();
11161116
return this.innerApiCalls.getIamPolicy(request, options, callback);
@@ -1215,7 +1215,7 @@ export class CloudTasksClient {
12151215
options.otherArgs.headers = options.otherArgs.headers || {};
12161216
options.otherArgs.headers['x-goog-request-params'] =
12171217
this._gaxModule.routingHeader.fromParams({
1218-
resource: request.resource || '',
1218+
resource: request.resource ?? '',
12191219
});
12201220
this.initialize();
12211221
return this.innerApiCalls.setIamPolicy(request, options, callback);
@@ -1310,7 +1310,7 @@ export class CloudTasksClient {
13101310
options.otherArgs.headers = options.otherArgs.headers || {};
13111311
options.otherArgs.headers['x-goog-request-params'] =
13121312
this._gaxModule.routingHeader.fromParams({
1313-
resource: request.resource || '',
1313+
resource: request.resource ?? '',
13141314
});
13151315
this.initialize();
13161316
return this.innerApiCalls.testIamPermissions(request, options, callback);
@@ -1407,7 +1407,7 @@ export class CloudTasksClient {
14071407
options.otherArgs.headers = options.otherArgs.headers || {};
14081408
options.otherArgs.headers['x-goog-request-params'] =
14091409
this._gaxModule.routingHeader.fromParams({
1410-
name: request.name || '',
1410+
name: request.name ?? '',
14111411
});
14121412
this.initialize();
14131413
return this.innerApiCalls.getTask(request, options, callback);
@@ -1544,7 +1544,7 @@ export class CloudTasksClient {
15441544
options.otherArgs.headers = options.otherArgs.headers || {};
15451545
options.otherArgs.headers['x-goog-request-params'] =
15461546
this._gaxModule.routingHeader.fromParams({
1547-
parent: request.parent || '',
1547+
parent: request.parent ?? '',
15481548
});
15491549
this.initialize();
15501550
return this.innerApiCalls.createTask(request, options, callback);
@@ -1632,7 +1632,7 @@ export class CloudTasksClient {
16321632
options.otherArgs.headers = options.otherArgs.headers || {};
16331633
options.otherArgs.headers['x-goog-request-params'] =
16341634
this._gaxModule.routingHeader.fromParams({
1635-
name: request.name || '',
1635+
name: request.name ?? '',
16361636
});
16371637
this.initialize();
16381638
return this.innerApiCalls.deleteTask(request, options, callback);
@@ -1752,7 +1752,7 @@ export class CloudTasksClient {
17521752
options.otherArgs.headers = options.otherArgs.headers || {};
17531753
options.otherArgs.headers['x-goog-request-params'] =
17541754
this._gaxModule.routingHeader.fromParams({
1755-
name: request.name || '',
1755+
name: request.name ?? '',
17561756
});
17571757
this.initialize();
17581758
return this.innerApiCalls.runTask(request, options, callback);
@@ -1871,7 +1871,7 @@ export class CloudTasksClient {
18711871
options.otherArgs.headers = options.otherArgs.headers || {};
18721872
options.otherArgs.headers['x-goog-request-params'] =
18731873
this._gaxModule.routingHeader.fromParams({
1874-
parent: request.parent || '',
1874+
parent: request.parent ?? '',
18751875
});
18761876
this.initialize();
18771877
return this.innerApiCalls.listQueues(request, options, callback);
@@ -1935,7 +1935,7 @@ export class CloudTasksClient {
19351935
options.otherArgs.headers = options.otherArgs.headers || {};
19361936
options.otherArgs.headers['x-goog-request-params'] =
19371937
this._gaxModule.routingHeader.fromParams({
1938-
parent: request.parent || '',
1938+
parent: request.parent ?? '',
19391939
});
19401940
const defaultCallSettings = this._defaults['listQueues'];
19411941
const callSettings = defaultCallSettings.merge(options);
@@ -2008,7 +2008,7 @@ export class CloudTasksClient {
20082008
options.otherArgs.headers = options.otherArgs.headers || {};
20092009
options.otherArgs.headers['x-goog-request-params'] =
20102010
this._gaxModule.routingHeader.fromParams({
2011-
parent: request.parent || '',
2011+
parent: request.parent ?? '',
20122012
});
20132013
const defaultCallSettings = this._defaults['listQueues'];
20142014
const callSettings = defaultCallSettings.merge(options);
@@ -2141,7 +2141,7 @@ export class CloudTasksClient {
21412141
options.otherArgs.headers = options.otherArgs.headers || {};
21422142
options.otherArgs.headers['x-goog-request-params'] =
21432143
this._gaxModule.routingHeader.fromParams({
2144-
parent: request.parent || '',
2144+
parent: request.parent ?? '',
21452145
});
21462146
this.initialize();
21472147
return this.innerApiCalls.listTasks(request, options, callback);
@@ -2208,7 +2208,7 @@ export class CloudTasksClient {
22082208
options.otherArgs.headers = options.otherArgs.headers || {};
22092209
options.otherArgs.headers['x-goog-request-params'] =
22102210
this._gaxModule.routingHeader.fromParams({
2211-
parent: request.parent || '',
2211+
parent: request.parent ?? '',
22122212
});
22132213
const defaultCallSettings = this._defaults['listTasks'];
22142214
const callSettings = defaultCallSettings.merge(options);
@@ -2284,7 +2284,7 @@ export class CloudTasksClient {
22842284
options.otherArgs.headers = options.otherArgs.headers || {};
22852285
options.otherArgs.headers['x-goog-request-params'] =
22862286
this._gaxModule.routingHeader.fromParams({
2287-
parent: request.parent || '',
2287+
parent: request.parent ?? '',
22882288
});
22892289
const defaultCallSettings = this._defaults['listTasks'];
22902290
const callSettings = defaultCallSettings.merge(options);

src/v2beta2/cloud_tasks_client.ts

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ export class CloudTasksClient {
443443
options.otherArgs.headers = options.otherArgs.headers || {};
444444
options.otherArgs.headers['x-goog-request-params'] =
445445
this._gaxModule.routingHeader.fromParams({
446-
name: request.name || '',
446+
name: request.name ?? '',
447447
});
448448
this.initialize();
449449
return this.innerApiCalls.getQueue(request, options, callback);
@@ -548,7 +548,7 @@ export class CloudTasksClient {
548548
options.otherArgs.headers = options.otherArgs.headers || {};
549549
options.otherArgs.headers['x-goog-request-params'] =
550550
this._gaxModule.routingHeader.fromParams({
551-
parent: request.parent || '',
551+
parent: request.parent ?? '',
552552
});
553553
this.initialize();
554554
return this.innerApiCalls.createQueue(request, options, callback);
@@ -657,7 +657,7 @@ export class CloudTasksClient {
657657
options.otherArgs.headers = options.otherArgs.headers || {};
658658
options.otherArgs.headers['x-goog-request-params'] =
659659
this._gaxModule.routingHeader.fromParams({
660-
'queue.name': request.queue!.name || '',
660+
'queue.name': request.queue!.name ?? '',
661661
});
662662
this.initialize();
663663
return this.innerApiCalls.updateQueue(request, options, callback);
@@ -755,7 +755,7 @@ export class CloudTasksClient {
755755
options.otherArgs.headers = options.otherArgs.headers || {};
756756
options.otherArgs.headers['x-goog-request-params'] =
757757
this._gaxModule.routingHeader.fromParams({
758-
name: request.name || '',
758+
name: request.name ?? '',
759759
});
760760
this.initialize();
761761
return this.innerApiCalls.deleteQueue(request, options, callback);
@@ -846,7 +846,7 @@ export class CloudTasksClient {
846846
options.otherArgs.headers = options.otherArgs.headers || {};
847847
options.otherArgs.headers['x-goog-request-params'] =
848848
this._gaxModule.routingHeader.fromParams({
849-
name: request.name || '',
849+
name: request.name ?? '',
850850
});
851851
this.initialize();
852852
return this.innerApiCalls.purgeQueue(request, options, callback);
@@ -938,7 +938,7 @@ export class CloudTasksClient {
938938
options.otherArgs.headers = options.otherArgs.headers || {};
939939
options.otherArgs.headers['x-goog-request-params'] =
940940
this._gaxModule.routingHeader.fromParams({
941-
name: request.name || '',
941+
name: request.name ?? '',
942942
});
943943
this.initialize();
944944
return this.innerApiCalls.pauseQueue(request, options, callback);
@@ -1036,7 +1036,7 @@ export class CloudTasksClient {
10361036
options.otherArgs.headers = options.otherArgs.headers || {};
10371037
options.otherArgs.headers['x-goog-request-params'] =
10381038
this._gaxModule.routingHeader.fromParams({
1039-
name: request.name || '',
1039+
name: request.name ?? '',
10401040
});
10411041
this.initialize();
10421042
return this.innerApiCalls.resumeQueue(request, options, callback);
@@ -1131,7 +1131,7 @@ export class CloudTasksClient {
11311131
options.otherArgs.headers = options.otherArgs.headers || {};
11321132
options.otherArgs.headers['x-goog-request-params'] =
11331133
this._gaxModule.routingHeader.fromParams({
1134-
resource: request.resource || '',
1134+
resource: request.resource ?? '',
11351135
});
11361136
this.initialize();
11371137
return this.innerApiCalls.getIamPolicy(request, options, callback);
@@ -1236,7 +1236,7 @@ export class CloudTasksClient {
12361236
options.otherArgs.headers = options.otherArgs.headers || {};
12371237
options.otherArgs.headers['x-goog-request-params'] =
12381238
this._gaxModule.routingHeader.fromParams({
1239-
resource: request.resource || '',
1239+
resource: request.resource ?? '',
12401240
});
12411241
this.initialize();
12421242
return this.innerApiCalls.setIamPolicy(request, options, callback);
@@ -1331,7 +1331,7 @@ export class CloudTasksClient {
13311331
options.otherArgs.headers = options.otherArgs.headers || {};
13321332
options.otherArgs.headers['x-goog-request-params'] =
13331333
this._gaxModule.routingHeader.fromParams({
1334-
resource: request.resource || '',
1334+
resource: request.resource ?? '',
13351335
});
13361336
this.initialize();
13371337
return this.innerApiCalls.testIamPermissions(request, options, callback);
@@ -1428,7 +1428,7 @@ export class CloudTasksClient {
14281428
options.otherArgs.headers = options.otherArgs.headers || {};
14291429
options.otherArgs.headers['x-goog-request-params'] =
14301430
this._gaxModule.routingHeader.fromParams({
1431-
name: request.name || '',
1431+
name: request.name ?? '',
14321432
});
14331433
this.initialize();
14341434
return this.innerApiCalls.getTask(request, options, callback);
@@ -1569,7 +1569,7 @@ export class CloudTasksClient {
15691569
options.otherArgs.headers = options.otherArgs.headers || {};
15701570
options.otherArgs.headers['x-goog-request-params'] =
15711571
this._gaxModule.routingHeader.fromParams({
1572-
parent: request.parent || '',
1572+
parent: request.parent ?? '',
15731573
});
15741574
this.initialize();
15751575
return this.innerApiCalls.createTask(request, options, callback);
@@ -1659,7 +1659,7 @@ export class CloudTasksClient {
16591659
options.otherArgs.headers = options.otherArgs.headers || {};
16601660
options.otherArgs.headers['x-goog-request-params'] =
16611661
this._gaxModule.routingHeader.fromParams({
1662-
name: request.name || '',
1662+
name: request.name ?? '',
16631663
});
16641664
this.initialize();
16651665
return this.innerApiCalls.deleteTask(request, options, callback);
@@ -1840,7 +1840,7 @@ export class CloudTasksClient {
18401840
options.otherArgs.headers = options.otherArgs.headers || {};
18411841
options.otherArgs.headers['x-goog-request-params'] =
18421842
this._gaxModule.routingHeader.fromParams({
1843-
parent: request.parent || '',
1843+
parent: request.parent ?? '',
18441844
});
18451845
this.initialize();
18461846
return this.innerApiCalls.leaseTasks(request, options, callback);
@@ -1950,7 +1950,7 @@ export class CloudTasksClient {
19501950
options.otherArgs.headers = options.otherArgs.headers || {};
19511951
options.otherArgs.headers['x-goog-request-params'] =
19521952
this._gaxModule.routingHeader.fromParams({
1953-
name: request.name || '',
1953+
name: request.name ?? '',
19541954
});
19551955
this.initialize();
19561956
return this.innerApiCalls.acknowledgeTask(request, options, callback);
@@ -2065,7 +2065,7 @@ export class CloudTasksClient {
20652065
options.otherArgs.headers = options.otherArgs.headers || {};
20662066
options.otherArgs.headers['x-goog-request-params'] =
20672067
this._gaxModule.routingHeader.fromParams({
2068-
name: request.name || '',
2068+
name: request.name ?? '',
20692069
});
20702070
this.initialize();
20712071
return this.innerApiCalls.renewLease(request, options, callback);
@@ -2175,7 +2175,7 @@ export class CloudTasksClient {
21752175
options.otherArgs.headers = options.otherArgs.headers || {};
21762176
options.otherArgs.headers['x-goog-request-params'] =
21772177
this._gaxModule.routingHeader.fromParams({
2178-
name: request.name || '',
2178+
name: request.name ?? '',
21792179
});
21802180
this.initialize();
21812181
return this.innerApiCalls.cancelLease(request, options, callback);
@@ -2298,7 +2298,7 @@ export class CloudTasksClient {
22982298
options.otherArgs.headers = options.otherArgs.headers || {};
22992299
options.otherArgs.headers['x-goog-request-params'] =
23002300
this._gaxModule.routingHeader.fromParams({
2301-
name: request.name || '',
2301+
name: request.name ?? '',
23022302
});
23032303
this.initialize();
23042304
return this.innerApiCalls.runTask(request, options, callback);
@@ -2424,7 +2424,7 @@ export class CloudTasksClient {
24242424
options.otherArgs.headers = options.otherArgs.headers || {};
24252425
options.otherArgs.headers['x-goog-request-params'] =
24262426
this._gaxModule.routingHeader.fromParams({
2427-
parent: request.parent || '',
2427+
parent: request.parent ?? '',
24282428
});
24292429
this.initialize();
24302430
return this.innerApiCalls.listQueues(request, options, callback);
@@ -2493,7 +2493,7 @@ export class CloudTasksClient {
24932493
options.otherArgs.headers = options.otherArgs.headers || {};
24942494
options.otherArgs.headers['x-goog-request-params'] =
24952495
this._gaxModule.routingHeader.fromParams({
2496-
parent: request.parent || '',
2496+
parent: request.parent ?? '',
24972497
});
24982498
const defaultCallSettings = this._defaults['listQueues'];
24992499
const callSettings = defaultCallSettings.merge(options);
@@ -2571,7 +2571,7 @@ export class CloudTasksClient {
25712571
options.otherArgs.headers = options.otherArgs.headers || {};
25722572
options.otherArgs.headers['x-goog-request-params'] =
25732573
this._gaxModule.routingHeader.fromParams({
2574-
parent: request.parent || '',
2574+
parent: request.parent ?? '',
25752575
});
25762576
const defaultCallSettings = this._defaults['listQueues'];
25772577
const callSettings = defaultCallSettings.merge(options);
@@ -2706,7 +2706,7 @@ export class CloudTasksClient {
27062706
options.otherArgs.headers = options.otherArgs.headers || {};
27072707
options.otherArgs.headers['x-goog-request-params'] =
27082708
this._gaxModule.routingHeader.fromParams({
2709-
parent: request.parent || '',
2709+
parent: request.parent ?? '',
27102710
});
27112711
this.initialize();
27122712
return this.innerApiCalls.listTasks(request, options, callback);
@@ -2773,7 +2773,7 @@ export class CloudTasksClient {
27732773
options.otherArgs.headers = options.otherArgs.headers || {};
27742774
options.otherArgs.headers['x-goog-request-params'] =
27752775
this._gaxModule.routingHeader.fromParams({
2776-
parent: request.parent || '',
2776+
parent: request.parent ?? '',
27772777
});
27782778
const defaultCallSettings = this._defaults['listTasks'];
27792779
const callSettings = defaultCallSettings.merge(options);
@@ -2849,7 +2849,7 @@ export class CloudTasksClient {
28492849
options.otherArgs.headers = options.otherArgs.headers || {};
28502850
options.otherArgs.headers['x-goog-request-params'] =
28512851
this._gaxModule.routingHeader.fromParams({
2852-
parent: request.parent || '',
2852+
parent: request.parent ?? '',
28532853
});
28542854
const defaultCallSettings = this._defaults['listTasks'];
28552855
const callSettings = defaultCallSettings.merge(options);

0 commit comments

Comments
 (0)