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

Commit 64baf4b

Browse files
fix: preserve default values in x-goog-request-params header (#17)
- [ ] 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 b86b901 commit 64baf4b

4 files changed

Lines changed: 866 additions & 700 deletions

File tree

src/v2/migration_service_client.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ export class MigrationServiceClient {
438438
options.otherArgs.headers = options.otherArgs.headers || {};
439439
options.otherArgs.headers['x-goog-request-params'] =
440440
this._gaxModule.routingHeader.fromParams({
441-
parent: request.parent || '',
441+
parent: request.parent ?? '',
442442
});
443443
this.initialize();
444444
return this.innerApiCalls.createMigrationWorkflow(
@@ -542,7 +542,7 @@ export class MigrationServiceClient {
542542
options.otherArgs.headers = options.otherArgs.headers || {};
543543
options.otherArgs.headers['x-goog-request-params'] =
544544
this._gaxModule.routingHeader.fromParams({
545-
name: request.name || '',
545+
name: request.name ?? '',
546546
});
547547
this.initialize();
548548
return this.innerApiCalls.getMigrationWorkflow(request, options, callback);
@@ -640,7 +640,7 @@ export class MigrationServiceClient {
640640
options.otherArgs.headers = options.otherArgs.headers || {};
641641
options.otherArgs.headers['x-goog-request-params'] =
642642
this._gaxModule.routingHeader.fromParams({
643-
name: request.name || '',
643+
name: request.name ?? '',
644644
});
645645
this.initialize();
646646
return this.innerApiCalls.deleteMigrationWorkflow(
@@ -745,7 +745,7 @@ export class MigrationServiceClient {
745745
options.otherArgs.headers = options.otherArgs.headers || {};
746746
options.otherArgs.headers['x-goog-request-params'] =
747747
this._gaxModule.routingHeader.fromParams({
748-
name: request.name || '',
748+
name: request.name ?? '',
749749
});
750750
this.initialize();
751751
return this.innerApiCalls.startMigrationWorkflow(
@@ -849,7 +849,7 @@ export class MigrationServiceClient {
849849
options.otherArgs.headers = options.otherArgs.headers || {};
850850
options.otherArgs.headers['x-goog-request-params'] =
851851
this._gaxModule.routingHeader.fromParams({
852-
name: request.name || '',
852+
name: request.name ?? '',
853853
});
854854
this.initialize();
855855
return this.innerApiCalls.getMigrationSubtask(request, options, callback);
@@ -956,7 +956,7 @@ export class MigrationServiceClient {
956956
options.otherArgs.headers = options.otherArgs.headers || {};
957957
options.otherArgs.headers['x-goog-request-params'] =
958958
this._gaxModule.routingHeader.fromParams({
959-
parent: request.parent || '',
959+
parent: request.parent ?? '',
960960
});
961961
this.initialize();
962962
return this.innerApiCalls.listMigrationWorkflows(
@@ -1006,7 +1006,7 @@ export class MigrationServiceClient {
10061006
options.otherArgs.headers = options.otherArgs.headers || {};
10071007
options.otherArgs.headers['x-goog-request-params'] =
10081008
this._gaxModule.routingHeader.fromParams({
1009-
parent: request.parent || '',
1009+
parent: request.parent ?? '',
10101010
});
10111011
const defaultCallSettings = this._defaults['listMigrationWorkflows'];
10121012
const callSettings = defaultCallSettings.merge(options);
@@ -1061,7 +1061,7 @@ export class MigrationServiceClient {
10611061
options.otherArgs.headers = options.otherArgs.headers || {};
10621062
options.otherArgs.headers['x-goog-request-params'] =
10631063
this._gaxModule.routingHeader.fromParams({
1064-
parent: request.parent || '',
1064+
parent: request.parent ?? '',
10651065
});
10661066
const defaultCallSettings = this._defaults['listMigrationWorkflows'];
10671067
const callSettings = defaultCallSettings.merge(options);
@@ -1177,7 +1177,7 @@ export class MigrationServiceClient {
11771177
options.otherArgs.headers = options.otherArgs.headers || {};
11781178
options.otherArgs.headers['x-goog-request-params'] =
11791179
this._gaxModule.routingHeader.fromParams({
1180-
parent: request.parent || '',
1180+
parent: request.parent ?? '',
11811181
});
11821182
this.initialize();
11831183
return this.innerApiCalls.listMigrationSubtasks(request, options, callback);
@@ -1227,7 +1227,7 @@ export class MigrationServiceClient {
12271227
options.otherArgs.headers = options.otherArgs.headers || {};
12281228
options.otherArgs.headers['x-goog-request-params'] =
12291229
this._gaxModule.routingHeader.fromParams({
1230-
parent: request.parent || '',
1230+
parent: request.parent ?? '',
12311231
});
12321232
const defaultCallSettings = this._defaults['listMigrationSubtasks'];
12331233
const callSettings = defaultCallSettings.merge(options);
@@ -1286,7 +1286,7 @@ export class MigrationServiceClient {
12861286
options.otherArgs.headers = options.otherArgs.headers || {};
12871287
options.otherArgs.headers['x-goog-request-params'] =
12881288
this._gaxModule.routingHeader.fromParams({
1289-
parent: request.parent || '',
1289+
parent: request.parent ?? '',
12901290
});
12911291
const defaultCallSettings = this._defaults['listMigrationSubtasks'];
12921292
const callSettings = defaultCallSettings.merge(options);

src/v2alpha/migration_service_client.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ export class MigrationServiceClient {
438438
options.otherArgs.headers = options.otherArgs.headers || {};
439439
options.otherArgs.headers['x-goog-request-params'] =
440440
this._gaxModule.routingHeader.fromParams({
441-
parent: request.parent || '',
441+
parent: request.parent ?? '',
442442
});
443443
this.initialize();
444444
return this.innerApiCalls.createMigrationWorkflow(
@@ -542,7 +542,7 @@ export class MigrationServiceClient {
542542
options.otherArgs.headers = options.otherArgs.headers || {};
543543
options.otherArgs.headers['x-goog-request-params'] =
544544
this._gaxModule.routingHeader.fromParams({
545-
name: request.name || '',
545+
name: request.name ?? '',
546546
});
547547
this.initialize();
548548
return this.innerApiCalls.getMigrationWorkflow(request, options, callback);
@@ -640,7 +640,7 @@ export class MigrationServiceClient {
640640
options.otherArgs.headers = options.otherArgs.headers || {};
641641
options.otherArgs.headers['x-goog-request-params'] =
642642
this._gaxModule.routingHeader.fromParams({
643-
name: request.name || '',
643+
name: request.name ?? '',
644644
});
645645
this.initialize();
646646
return this.innerApiCalls.deleteMigrationWorkflow(
@@ -745,7 +745,7 @@ export class MigrationServiceClient {
745745
options.otherArgs.headers = options.otherArgs.headers || {};
746746
options.otherArgs.headers['x-goog-request-params'] =
747747
this._gaxModule.routingHeader.fromParams({
748-
name: request.name || '',
748+
name: request.name ?? '',
749749
});
750750
this.initialize();
751751
return this.innerApiCalls.startMigrationWorkflow(
@@ -849,7 +849,7 @@ export class MigrationServiceClient {
849849
options.otherArgs.headers = options.otherArgs.headers || {};
850850
options.otherArgs.headers['x-goog-request-params'] =
851851
this._gaxModule.routingHeader.fromParams({
852-
name: request.name || '',
852+
name: request.name ?? '',
853853
});
854854
this.initialize();
855855
return this.innerApiCalls.getMigrationSubtask(request, options, callback);
@@ -956,7 +956,7 @@ export class MigrationServiceClient {
956956
options.otherArgs.headers = options.otherArgs.headers || {};
957957
options.otherArgs.headers['x-goog-request-params'] =
958958
this._gaxModule.routingHeader.fromParams({
959-
parent: request.parent || '',
959+
parent: request.parent ?? '',
960960
});
961961
this.initialize();
962962
return this.innerApiCalls.listMigrationWorkflows(
@@ -1006,7 +1006,7 @@ export class MigrationServiceClient {
10061006
options.otherArgs.headers = options.otherArgs.headers || {};
10071007
options.otherArgs.headers['x-goog-request-params'] =
10081008
this._gaxModule.routingHeader.fromParams({
1009-
parent: request.parent || '',
1009+
parent: request.parent ?? '',
10101010
});
10111011
const defaultCallSettings = this._defaults['listMigrationWorkflows'];
10121012
const callSettings = defaultCallSettings.merge(options);
@@ -1061,7 +1061,7 @@ export class MigrationServiceClient {
10611061
options.otherArgs.headers = options.otherArgs.headers || {};
10621062
options.otherArgs.headers['x-goog-request-params'] =
10631063
this._gaxModule.routingHeader.fromParams({
1064-
parent: request.parent || '',
1064+
parent: request.parent ?? '',
10651065
});
10661066
const defaultCallSettings = this._defaults['listMigrationWorkflows'];
10671067
const callSettings = defaultCallSettings.merge(options);
@@ -1177,7 +1177,7 @@ export class MigrationServiceClient {
11771177
options.otherArgs.headers = options.otherArgs.headers || {};
11781178
options.otherArgs.headers['x-goog-request-params'] =
11791179
this._gaxModule.routingHeader.fromParams({
1180-
parent: request.parent || '',
1180+
parent: request.parent ?? '',
11811181
});
11821182
this.initialize();
11831183
return this.innerApiCalls.listMigrationSubtasks(request, options, callback);
@@ -1227,7 +1227,7 @@ export class MigrationServiceClient {
12271227
options.otherArgs.headers = options.otherArgs.headers || {};
12281228
options.otherArgs.headers['x-goog-request-params'] =
12291229
this._gaxModule.routingHeader.fromParams({
1230-
parent: request.parent || '',
1230+
parent: request.parent ?? '',
12311231
});
12321232
const defaultCallSettings = this._defaults['listMigrationSubtasks'];
12331233
const callSettings = defaultCallSettings.merge(options);
@@ -1286,7 +1286,7 @@ export class MigrationServiceClient {
12861286
options.otherArgs.headers = options.otherArgs.headers || {};
12871287
options.otherArgs.headers['x-goog-request-params'] =
12881288
this._gaxModule.routingHeader.fromParams({
1289-
parent: request.parent || '',
1289+
parent: request.parent ?? '',
12901290
});
12911291
const defaultCallSettings = this._defaults['listMigrationSubtasks'];
12921292
const callSettings = defaultCallSettings.merge(options);

0 commit comments

Comments
 (0)