Skip to content

Commit 5877838

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

2 files changed

Lines changed: 986 additions & 962 deletions

File tree

packages/google-cloud-clouddms/src/v1/data_migration_service_client.ts

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ export class DataMigrationServiceClient {
667667
options.otherArgs.headers = options.otherArgs.headers || {};
668668
options.otherArgs.headers['x-goog-request-params'] =
669669
this._gaxModule.routingHeader.fromParams({
670-
name: request.name || '',
670+
name: request.name ?? '',
671671
});
672672
this.initialize();
673673
return this.innerApiCalls.getMigrationJob(request, options, callback);
@@ -767,7 +767,7 @@ export class DataMigrationServiceClient {
767767
options.otherArgs.headers = options.otherArgs.headers || {};
768768
options.otherArgs.headers['x-goog-request-params'] =
769769
this._gaxModule.routingHeader.fromParams({
770-
migration_job: request.migrationJob || '',
770+
migration_job: request.migrationJob ?? '',
771771
});
772772
this.initialize();
773773
return this.innerApiCalls.generateSshScript(request, options, callback);
@@ -858,7 +858,7 @@ export class DataMigrationServiceClient {
858858
options.otherArgs.headers = options.otherArgs.headers || {};
859859
options.otherArgs.headers['x-goog-request-params'] =
860860
this._gaxModule.routingHeader.fromParams({
861-
name: request.name || '',
861+
name: request.name ?? '',
862862
});
863863
this.initialize();
864864
return this.innerApiCalls.getConnectionProfile(request, options, callback);
@@ -976,7 +976,7 @@ export class DataMigrationServiceClient {
976976
options.otherArgs.headers = options.otherArgs.headers || {};
977977
options.otherArgs.headers['x-goog-request-params'] =
978978
this._gaxModule.routingHeader.fromParams({
979-
parent: request.parent || '',
979+
parent: request.parent ?? '',
980980
});
981981
this.initialize();
982982
return this.innerApiCalls.createMigrationJob(request, options, callback);
@@ -1125,7 +1125,7 @@ export class DataMigrationServiceClient {
11251125
options.otherArgs.headers = options.otherArgs.headers || {};
11261126
options.otherArgs.headers['x-goog-request-params'] =
11271127
this._gaxModule.routingHeader.fromParams({
1128-
'migration_job.name': request.migrationJob!.name || '',
1128+
'migration_job.name': request.migrationJob!.name ?? '',
11291129
});
11301130
this.initialize();
11311131
return this.innerApiCalls.updateMigrationJob(request, options, callback);
@@ -1275,7 +1275,7 @@ export class DataMigrationServiceClient {
12751275
options.otherArgs.headers = options.otherArgs.headers || {};
12761276
options.otherArgs.headers['x-goog-request-params'] =
12771277
this._gaxModule.routingHeader.fromParams({
1278-
name: request.name || '',
1278+
name: request.name ?? '',
12791279
});
12801280
this.initialize();
12811281
return this.innerApiCalls.deleteMigrationJob(request, options, callback);
@@ -1413,7 +1413,7 @@ export class DataMigrationServiceClient {
14131413
options.otherArgs.headers = options.otherArgs.headers || {};
14141414
options.otherArgs.headers['x-goog-request-params'] =
14151415
this._gaxModule.routingHeader.fromParams({
1416-
name: request.name || '',
1416+
name: request.name ?? '',
14171417
});
14181418
this.initialize();
14191419
return this.innerApiCalls.startMigrationJob(request, options, callback);
@@ -1551,7 +1551,7 @@ export class DataMigrationServiceClient {
15511551
options.otherArgs.headers = options.otherArgs.headers || {};
15521552
options.otherArgs.headers['x-goog-request-params'] =
15531553
this._gaxModule.routingHeader.fromParams({
1554-
name: request.name || '',
1554+
name: request.name ?? '',
15551555
});
15561556
this.initialize();
15571557
return this.innerApiCalls.stopMigrationJob(request, options, callback);
@@ -1690,7 +1690,7 @@ export class DataMigrationServiceClient {
16901690
options.otherArgs.headers = options.otherArgs.headers || {};
16911691
options.otherArgs.headers['x-goog-request-params'] =
16921692
this._gaxModule.routingHeader.fromParams({
1693-
name: request.name || '',
1693+
name: request.name ?? '',
16941694
});
16951695
this.initialize();
16961696
return this.innerApiCalls.resumeMigrationJob(request, options, callback);
@@ -1829,7 +1829,7 @@ export class DataMigrationServiceClient {
18291829
options.otherArgs.headers = options.otherArgs.headers || {};
18301830
options.otherArgs.headers['x-goog-request-params'] =
18311831
this._gaxModule.routingHeader.fromParams({
1832-
name: request.name || '',
1832+
name: request.name ?? '',
18331833
});
18341834
this.initialize();
18351835
return this.innerApiCalls.promoteMigrationJob(request, options, callback);
@@ -1968,7 +1968,7 @@ export class DataMigrationServiceClient {
19681968
options.otherArgs.headers = options.otherArgs.headers || {};
19691969
options.otherArgs.headers['x-goog-request-params'] =
19701970
this._gaxModule.routingHeader.fromParams({
1971-
name: request.name || '',
1971+
name: request.name ?? '',
19721972
});
19731973
this.initialize();
19741974
return this.innerApiCalls.verifyMigrationJob(request, options, callback);
@@ -2108,7 +2108,7 @@ export class DataMigrationServiceClient {
21082108
options.otherArgs.headers = options.otherArgs.headers || {};
21092109
options.otherArgs.headers['x-goog-request-params'] =
21102110
this._gaxModule.routingHeader.fromParams({
2111-
name: request.name || '',
2111+
name: request.name ?? '',
21122112
});
21132113
this.initialize();
21142114
return this.innerApiCalls.restartMigrationJob(request, options, callback);
@@ -2258,7 +2258,7 @@ export class DataMigrationServiceClient {
22582258
options.otherArgs.headers = options.otherArgs.headers || {};
22592259
options.otherArgs.headers['x-goog-request-params'] =
22602260
this._gaxModule.routingHeader.fromParams({
2261-
parent: request.parent || '',
2261+
parent: request.parent ?? '',
22622262
});
22632263
this.initialize();
22642264
return this.innerApiCalls.createConnectionProfile(
@@ -2411,7 +2411,7 @@ export class DataMigrationServiceClient {
24112411
options.otherArgs.headers = options.otherArgs.headers || {};
24122412
options.otherArgs.headers['x-goog-request-params'] =
24132413
this._gaxModule.routingHeader.fromParams({
2414-
'connection_profile.name': request.connectionProfile!.name || '',
2414+
'connection_profile.name': request.connectionProfile!.name ?? '',
24152415
});
24162416
this.initialize();
24172417
return this.innerApiCalls.updateConnectionProfile(
@@ -2566,7 +2566,7 @@ export class DataMigrationServiceClient {
25662566
options.otherArgs.headers = options.otherArgs.headers || {};
25672567
options.otherArgs.headers['x-goog-request-params'] =
25682568
this._gaxModule.routingHeader.fromParams({
2569-
name: request.name || '',
2569+
name: request.name ?? '',
25702570
});
25712571
this.initialize();
25722572
return this.innerApiCalls.deleteConnectionProfile(
@@ -2723,7 +2723,7 @@ export class DataMigrationServiceClient {
27232723
options.otherArgs.headers = options.otherArgs.headers || {};
27242724
options.otherArgs.headers['x-goog-request-params'] =
27252725
this._gaxModule.routingHeader.fromParams({
2726-
parent: request.parent || '',
2726+
parent: request.parent ?? '',
27272727
});
27282728
this.initialize();
27292729
return this.innerApiCalls.listMigrationJobs(request, options, callback);
@@ -2781,7 +2781,7 @@ export class DataMigrationServiceClient {
27812781
options.otherArgs.headers = options.otherArgs.headers || {};
27822782
options.otherArgs.headers['x-goog-request-params'] =
27832783
this._gaxModule.routingHeader.fromParams({
2784-
parent: request.parent || '',
2784+
parent: request.parent ?? '',
27852785
});
27862786
const defaultCallSettings = this._defaults['listMigrationJobs'];
27872787
const callSettings = defaultCallSettings.merge(options);
@@ -2848,7 +2848,7 @@ export class DataMigrationServiceClient {
28482848
options.otherArgs.headers = options.otherArgs.headers || {};
28492849
options.otherArgs.headers['x-goog-request-params'] =
28502850
this._gaxModule.routingHeader.fromParams({
2851-
parent: request.parent || '',
2851+
parent: request.parent ?? '',
28522852
});
28532853
const defaultCallSettings = this._defaults['listMigrationJobs'];
28542854
const callSettings = defaultCallSettings.merge(options);
@@ -2971,7 +2971,7 @@ export class DataMigrationServiceClient {
29712971
options.otherArgs.headers = options.otherArgs.headers || {};
29722972
options.otherArgs.headers['x-goog-request-params'] =
29732973
this._gaxModule.routingHeader.fromParams({
2974-
parent: request.parent || '',
2974+
parent: request.parent ?? '',
29752975
});
29762976
this.initialize();
29772977
return this.innerApiCalls.listConnectionProfiles(
@@ -3032,7 +3032,7 @@ export class DataMigrationServiceClient {
30323032
options.otherArgs.headers = options.otherArgs.headers || {};
30333033
options.otherArgs.headers['x-goog-request-params'] =
30343034
this._gaxModule.routingHeader.fromParams({
3035-
parent: request.parent || '',
3035+
parent: request.parent ?? '',
30363036
});
30373037
const defaultCallSettings = this._defaults['listConnectionProfiles'];
30383038
const callSettings = defaultCallSettings.merge(options);
@@ -3098,7 +3098,7 @@ export class DataMigrationServiceClient {
30983098
options.otherArgs.headers = options.otherArgs.headers || {};
30993099
options.otherArgs.headers['x-goog-request-params'] =
31003100
this._gaxModule.routingHeader.fromParams({
3101-
parent: request.parent || '',
3101+
parent: request.parent ?? '',
31023102
});
31033103
const defaultCallSettings = this._defaults['listConnectionProfiles'];
31043104
const callSettings = defaultCallSettings.merge(options);

0 commit comments

Comments
 (0)