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

Commit 18e64cc

Browse files
fix: preserve default values in x-goog-request-params header (#81)
- [ ] 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 9054e83 commit 18e64cc

12 files changed

Lines changed: 1644 additions & 1073 deletions

src/v1beta3/flex_templates_service_client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,8 @@ export class FlexTemplatesServiceClient {
400400
options.otherArgs.headers = options.otherArgs.headers || {};
401401
options.otherArgs.headers['x-goog-request-params'] =
402402
this._gaxModule.routingHeader.fromParams({
403-
project_id: request.projectId || '',
404-
location: request.location || '',
403+
project_id: request.projectId ?? '',
404+
location: request.location ?? '',
405405
});
406406
this.initialize();
407407
return this.innerApiCalls.launchFlexTemplate(request, options, callback);

src/v1beta3/jobs_v1_beta3_client.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,8 @@ export class JobsV1Beta3Client {
426426
options.otherArgs.headers = options.otherArgs.headers || {};
427427
options.otherArgs.headers['x-goog-request-params'] =
428428
this._gaxModule.routingHeader.fromParams({
429-
project_id: request.projectId || '',
430-
location: request.location || '',
429+
project_id: request.projectId ?? '',
430+
location: request.location ?? '',
431431
});
432432
this.initialize();
433433
return this.innerApiCalls.createJob(request, options, callback);
@@ -524,9 +524,9 @@ export class JobsV1Beta3Client {
524524
options.otherArgs.headers = options.otherArgs.headers || {};
525525
options.otherArgs.headers['x-goog-request-params'] =
526526
this._gaxModule.routingHeader.fromParams({
527-
project_id: request.projectId || '',
528-
location: request.location || '',
529-
job_id: request.jobId || '',
527+
project_id: request.projectId ?? '',
528+
location: request.location ?? '',
529+
job_id: request.jobId ?? '',
530530
});
531531
this.initialize();
532532
return this.innerApiCalls.getJob(request, options, callback);
@@ -624,9 +624,9 @@ export class JobsV1Beta3Client {
624624
options.otherArgs.headers = options.otherArgs.headers || {};
625625
options.otherArgs.headers['x-goog-request-params'] =
626626
this._gaxModule.routingHeader.fromParams({
627-
project_id: request.projectId || '',
628-
location: request.location || '',
629-
job_id: request.jobId || '',
627+
project_id: request.projectId ?? '',
628+
location: request.location ?? '',
629+
job_id: request.jobId ?? '',
630630
});
631631
this.initialize();
632632
return this.innerApiCalls.updateJob(request, options, callback);
@@ -800,9 +800,9 @@ export class JobsV1Beta3Client {
800800
options.otherArgs.headers = options.otherArgs.headers || {};
801801
options.otherArgs.headers['x-goog-request-params'] =
802802
this._gaxModule.routingHeader.fromParams({
803-
project_id: request.projectId || '',
804-
location: request.location || '',
805-
job_id: request.jobId || '',
803+
project_id: request.projectId ?? '',
804+
location: request.location ?? '',
805+
job_id: request.jobId ?? '',
806806
});
807807
this.initialize();
808808
return this.innerApiCalls.snapshotJob(request, options, callback);
@@ -912,8 +912,8 @@ export class JobsV1Beta3Client {
912912
options.otherArgs.headers = options.otherArgs.headers || {};
913913
options.otherArgs.headers['x-goog-request-params'] =
914914
this._gaxModule.routingHeader.fromParams({
915-
project_id: request.projectId || '',
916-
location: request.location || '',
915+
project_id: request.projectId ?? '',
916+
location: request.location ?? '',
917917
});
918918
this.initialize();
919919
return this.innerApiCalls.listJobs(request, options, callback);
@@ -963,8 +963,8 @@ export class JobsV1Beta3Client {
963963
options.otherArgs.headers = options.otherArgs.headers || {};
964964
options.otherArgs.headers['x-goog-request-params'] =
965965
this._gaxModule.routingHeader.fromParams({
966-
project_id: request.projectId || '',
967-
location: request.location || '',
966+
project_id: request.projectId ?? '',
967+
location: request.location ?? '',
968968
});
969969
const defaultCallSettings = this._defaults['listJobs'];
970970
const callSettings = defaultCallSettings.merge(options);
@@ -1023,8 +1023,8 @@ export class JobsV1Beta3Client {
10231023
options.otherArgs.headers = options.otherArgs.headers || {};
10241024
options.otherArgs.headers['x-goog-request-params'] =
10251025
this._gaxModule.routingHeader.fromParams({
1026-
project_id: request.projectId || '',
1027-
location: request.location || '',
1026+
project_id: request.projectId ?? '',
1027+
location: request.location ?? '',
10281028
});
10291029
const defaultCallSettings = this._defaults['listJobs'];
10301030
const callSettings = defaultCallSettings.merge(options);
@@ -1132,7 +1132,7 @@ export class JobsV1Beta3Client {
11321132
options.otherArgs.headers = options.otherArgs.headers || {};
11331133
options.otherArgs.headers['x-goog-request-params'] =
11341134
this._gaxModule.routingHeader.fromParams({
1135-
project_id: request.projectId || '',
1135+
project_id: request.projectId ?? '',
11361136
});
11371137
this.initialize();
11381138
return this.innerApiCalls.aggregatedListJobs(request, options, callback);
@@ -1182,7 +1182,7 @@ export class JobsV1Beta3Client {
11821182
options.otherArgs.headers = options.otherArgs.headers || {};
11831183
options.otherArgs.headers['x-goog-request-params'] =
11841184
this._gaxModule.routingHeader.fromParams({
1185-
project_id: request.projectId || '',
1185+
project_id: request.projectId ?? '',
11861186
});
11871187
const defaultCallSettings = this._defaults['aggregatedListJobs'];
11881188
const callSettings = defaultCallSettings.merge(options);
@@ -1241,7 +1241,7 @@ export class JobsV1Beta3Client {
12411241
options.otherArgs.headers = options.otherArgs.headers || {};
12421242
options.otherArgs.headers['x-goog-request-params'] =
12431243
this._gaxModule.routingHeader.fromParams({
1244-
project_id: request.projectId || '',
1244+
project_id: request.projectId ?? '',
12451245
});
12461246
const defaultCallSettings = this._defaults['aggregatedListJobs'];
12471247
const callSettings = defaultCallSettings.merge(options);

src/v1beta3/messages_v1_beta3_client.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -437,9 +437,9 @@ export class MessagesV1Beta3Client {
437437
options.otherArgs.headers = options.otherArgs.headers || {};
438438
options.otherArgs.headers['x-goog-request-params'] =
439439
this._gaxModule.routingHeader.fromParams({
440-
project_id: request.projectId || '',
441-
location: request.location || '',
442-
job_id: request.jobId || '',
440+
project_id: request.projectId ?? '',
441+
location: request.location ?? '',
442+
job_id: request.jobId ?? '',
443443
});
444444
this.initialize();
445445
return this.innerApiCalls.listJobMessages(request, options, callback);
@@ -495,9 +495,9 @@ export class MessagesV1Beta3Client {
495495
options.otherArgs.headers = options.otherArgs.headers || {};
496496
options.otherArgs.headers['x-goog-request-params'] =
497497
this._gaxModule.routingHeader.fromParams({
498-
project_id: request.projectId || '',
499-
location: request.location || '',
500-
job_id: request.jobId || '',
498+
project_id: request.projectId ?? '',
499+
location: request.location ?? '',
500+
job_id: request.jobId ?? '',
501501
});
502502
const defaultCallSettings = this._defaults['listJobMessages'];
503503
const callSettings = defaultCallSettings.merge(options);
@@ -562,9 +562,9 @@ export class MessagesV1Beta3Client {
562562
options.otherArgs.headers = options.otherArgs.headers || {};
563563
options.otherArgs.headers['x-goog-request-params'] =
564564
this._gaxModule.routingHeader.fromParams({
565-
project_id: request.projectId || '',
566-
location: request.location || '',
567-
job_id: request.jobId || '',
565+
project_id: request.projectId ?? '',
566+
location: request.location ?? '',
567+
job_id: request.jobId ?? '',
568568
});
569569
const defaultCallSettings = this._defaults['listJobMessages'];
570570
const callSettings = defaultCallSettings.merge(options);

src/v1beta3/metrics_v1_beta3_client.ts

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,9 @@ export class MetricsV1Beta3Client {
423423
options.otherArgs.headers = options.otherArgs.headers || {};
424424
options.otherArgs.headers['x-goog-request-params'] =
425425
this._gaxModule.routingHeader.fromParams({
426-
project_id: request.projectId || '',
427-
location: request.location || '',
428-
job_id: request.jobId || '',
426+
project_id: request.projectId ?? '',
427+
location: request.location ?? '',
428+
job_id: request.jobId ?? '',
429429
});
430430
this.initialize();
431431
return this.innerApiCalls.getJobMetrics(request, options, callback);
@@ -530,9 +530,9 @@ export class MetricsV1Beta3Client {
530530
options.otherArgs.headers = options.otherArgs.headers || {};
531531
options.otherArgs.headers['x-goog-request-params'] =
532532
this._gaxModule.routingHeader.fromParams({
533-
project_id: request.projectId || '',
534-
location: request.location || '',
535-
job_id: request.jobId || '',
533+
project_id: request.projectId ?? '',
534+
location: request.location ?? '',
535+
job_id: request.jobId ?? '',
536536
});
537537
this.initialize();
538538
return this.innerApiCalls.getJobExecutionDetails(
@@ -584,9 +584,9 @@ export class MetricsV1Beta3Client {
584584
options.otherArgs.headers = options.otherArgs.headers || {};
585585
options.otherArgs.headers['x-goog-request-params'] =
586586
this._gaxModule.routingHeader.fromParams({
587-
project_id: request.projectId || '',
588-
location: request.location || '',
589-
job_id: request.jobId || '',
587+
project_id: request.projectId ?? '',
588+
location: request.location ?? '',
589+
job_id: request.jobId ?? '',
590590
});
591591
const defaultCallSettings = this._defaults['getJobExecutionDetails'];
592592
const callSettings = defaultCallSettings.merge(options);
@@ -643,9 +643,9 @@ export class MetricsV1Beta3Client {
643643
options.otherArgs.headers = options.otherArgs.headers || {};
644644
options.otherArgs.headers['x-goog-request-params'] =
645645
this._gaxModule.routingHeader.fromParams({
646-
project_id: request.projectId || '',
647-
location: request.location || '',
648-
job_id: request.jobId || '',
646+
project_id: request.projectId ?? '',
647+
location: request.location ?? '',
648+
job_id: request.jobId ?? '',
649649
});
650650
const defaultCallSettings = this._defaults['getJobExecutionDetails'];
651651
const callSettings = defaultCallSettings.merge(options);
@@ -762,10 +762,10 @@ export class MetricsV1Beta3Client {
762762
options.otherArgs.headers = options.otherArgs.headers || {};
763763
options.otherArgs.headers['x-goog-request-params'] =
764764
this._gaxModule.routingHeader.fromParams({
765-
project_id: request.projectId || '',
766-
location: request.location || '',
767-
job_id: request.jobId || '',
768-
stage_id: request.stageId || '',
765+
project_id: request.projectId ?? '',
766+
location: request.location ?? '',
767+
job_id: request.jobId ?? '',
768+
stage_id: request.stageId ?? '',
769769
});
770770
this.initialize();
771771
return this.innerApiCalls.getStageExecutionDetails(
@@ -823,10 +823,10 @@ export class MetricsV1Beta3Client {
823823
options.otherArgs.headers = options.otherArgs.headers || {};
824824
options.otherArgs.headers['x-goog-request-params'] =
825825
this._gaxModule.routingHeader.fromParams({
826-
project_id: request.projectId || '',
827-
location: request.location || '',
828-
job_id: request.jobId || '',
829-
stage_id: request.stageId || '',
826+
project_id: request.projectId ?? '',
827+
location: request.location ?? '',
828+
job_id: request.jobId ?? '',
829+
stage_id: request.stageId ?? '',
830830
});
831831
const defaultCallSettings = this._defaults['getStageExecutionDetails'];
832832
const callSettings = defaultCallSettings.merge(options);
@@ -889,10 +889,10 @@ export class MetricsV1Beta3Client {
889889
options.otherArgs.headers = options.otherArgs.headers || {};
890890
options.otherArgs.headers['x-goog-request-params'] =
891891
this._gaxModule.routingHeader.fromParams({
892-
project_id: request.projectId || '',
893-
location: request.location || '',
894-
job_id: request.jobId || '',
895-
stage_id: request.stageId || '',
892+
project_id: request.projectId ?? '',
893+
location: request.location ?? '',
894+
job_id: request.jobId ?? '',
895+
stage_id: request.stageId ?? '',
896896
});
897897
const defaultCallSettings = this._defaults['getStageExecutionDetails'];
898898
const callSettings = defaultCallSettings.merge(options);

src/v1beta3/snapshots_v1_beta3_client.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,9 @@ export class SnapshotsV1Beta3Client {
391391
options.otherArgs.headers = options.otherArgs.headers || {};
392392
options.otherArgs.headers['x-goog-request-params'] =
393393
this._gaxModule.routingHeader.fromParams({
394-
project_id: request.projectId || '',
395-
location: request.location || '',
396-
snapshot_id: request.snapshotId || '',
394+
project_id: request.projectId ?? '',
395+
location: request.location ?? '',
396+
snapshot_id: request.snapshotId ?? '',
397397
});
398398
this.initialize();
399399
return this.innerApiCalls.getSnapshot(request, options, callback);
@@ -482,9 +482,9 @@ export class SnapshotsV1Beta3Client {
482482
options.otherArgs.headers = options.otherArgs.headers || {};
483483
options.otherArgs.headers['x-goog-request-params'] =
484484
this._gaxModule.routingHeader.fromParams({
485-
project_id: request.projectId || '',
486-
location: request.location || '',
487-
snapshot_id: request.snapshotId || '',
485+
project_id: request.projectId ?? '',
486+
location: request.location ?? '',
487+
snapshot_id: request.snapshotId ?? '',
488488
});
489489
this.initialize();
490490
return this.innerApiCalls.deleteSnapshot(request, options, callback);
@@ -573,9 +573,9 @@ export class SnapshotsV1Beta3Client {
573573
options.otherArgs.headers = options.otherArgs.headers || {};
574574
options.otherArgs.headers['x-goog-request-params'] =
575575
this._gaxModule.routingHeader.fromParams({
576-
project_id: request.projectId || '',
577-
location: request.location || '',
578-
job_id: request.jobId || '',
576+
project_id: request.projectId ?? '',
577+
location: request.location ?? '',
578+
job_id: request.jobId ?? '',
579579
});
580580
this.initialize();
581581
return this.innerApiCalls.listSnapshots(request, options, callback);

src/v1beta3/templates_service_client.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,8 @@ export class TemplatesServiceClient {
409409
options.otherArgs.headers = options.otherArgs.headers || {};
410410
options.otherArgs.headers['x-goog-request-params'] =
411411
this._gaxModule.routingHeader.fromParams({
412-
project_id: request.projectId || '',
413-
location: request.location || '',
412+
project_id: request.projectId ?? '',
413+
location: request.location ?? '',
414414
});
415415
this.initialize();
416416
return this.innerApiCalls.createJobFromTemplate(request, options, callback);
@@ -511,8 +511,8 @@ export class TemplatesServiceClient {
511511
options.otherArgs.headers = options.otherArgs.headers || {};
512512
options.otherArgs.headers['x-goog-request-params'] =
513513
this._gaxModule.routingHeader.fromParams({
514-
project_id: request.projectId || '',
515-
location: request.location || '',
514+
project_id: request.projectId ?? '',
515+
location: request.location ?? '',
516516
});
517517
this.initialize();
518518
return this.innerApiCalls.launchTemplate(request, options, callback);
@@ -605,8 +605,8 @@ export class TemplatesServiceClient {
605605
options.otherArgs.headers = options.otherArgs.headers || {};
606606
options.otherArgs.headers['x-goog-request-params'] =
607607
this._gaxModule.routingHeader.fromParams({
608-
project_id: request.projectId || '',
609-
location: request.location || '',
608+
project_id: request.projectId ?? '',
609+
location: request.location ?? '',
610610
});
611611
this.initialize();
612612
return this.innerApiCalls.getTemplate(request, options, callback);

0 commit comments

Comments
 (0)