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

fix: preserve default values in x-goog-request-params header #17

Merged
merged 2 commits into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/v2/migration_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ export class MigrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.createMigrationWorkflow(
Expand Down Expand Up @@ -542,7 +542,7 @@ export class MigrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
name: request.name || '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.getMigrationWorkflow(request, options, callback);
Expand Down Expand Up @@ -640,7 +640,7 @@ export class MigrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
name: request.name || '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.deleteMigrationWorkflow(
Expand Down Expand Up @@ -745,7 +745,7 @@ export class MigrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
name: request.name || '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.startMigrationWorkflow(
Expand Down Expand Up @@ -849,7 +849,7 @@ export class MigrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
name: request.name || '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.getMigrationSubtask(request, options, callback);
Expand Down Expand Up @@ -956,7 +956,7 @@ export class MigrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.listMigrationWorkflows(
Expand Down Expand Up @@ -1006,7 +1006,7 @@ export class MigrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
const defaultCallSettings = this._defaults['listMigrationWorkflows'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1061,7 +1061,7 @@ export class MigrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
const defaultCallSettings = this._defaults['listMigrationWorkflows'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1177,7 +1177,7 @@ export class MigrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.listMigrationSubtasks(request, options, callback);
Expand Down Expand Up @@ -1227,7 +1227,7 @@ export class MigrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
const defaultCallSettings = this._defaults['listMigrationSubtasks'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1286,7 +1286,7 @@ export class MigrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
const defaultCallSettings = this._defaults['listMigrationSubtasks'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
22 changes: 11 additions & 11 deletions src/v2alpha/migration_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ export class MigrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.createMigrationWorkflow(
Expand Down Expand Up @@ -542,7 +542,7 @@ export class MigrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
name: request.name || '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.getMigrationWorkflow(request, options, callback);
Expand Down Expand Up @@ -640,7 +640,7 @@ export class MigrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
name: request.name || '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.deleteMigrationWorkflow(
Expand Down Expand Up @@ -745,7 +745,7 @@ export class MigrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
name: request.name || '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.startMigrationWorkflow(
Expand Down Expand Up @@ -849,7 +849,7 @@ export class MigrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
name: request.name || '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.getMigrationSubtask(request, options, callback);
Expand Down Expand Up @@ -956,7 +956,7 @@ export class MigrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.listMigrationWorkflows(
Expand Down Expand Up @@ -1006,7 +1006,7 @@ export class MigrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
const defaultCallSettings = this._defaults['listMigrationWorkflows'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1061,7 +1061,7 @@ export class MigrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
const defaultCallSettings = this._defaults['listMigrationWorkflows'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1177,7 +1177,7 @@ export class MigrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.listMigrationSubtasks(request, options, callback);
Expand Down Expand Up @@ -1227,7 +1227,7 @@ export class MigrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
const defaultCallSettings = this._defaults['listMigrationSubtasks'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1286,7 +1286,7 @@ export class MigrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
const defaultCallSettings = this._defaults['listMigrationSubtasks'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
Loading