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

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

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
88 changes: 44 additions & 44 deletions src/v2/dlp_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ export class DlpServiceClient {
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.inspectContent(request, options, callback);
Expand Down Expand Up @@ -689,7 +689,7 @@ export class DlpServiceClient {
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.redactImage(request, options, callback);
Expand Down Expand Up @@ -820,7 +820,7 @@ export class DlpServiceClient {
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.deidentifyContent(request, options, callback);
Expand Down Expand Up @@ -954,7 +954,7 @@ export class DlpServiceClient {
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.reidentifyContent(request, options, callback);
Expand Down Expand Up @@ -1052,7 +1052,7 @@ export class DlpServiceClient {
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.listInfoTypes(request, options, callback);
Expand Down Expand Up @@ -1173,7 +1173,7 @@ export class DlpServiceClient {
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.createInspectTemplate(request, options, callback);
Expand Down Expand Up @@ -1271,7 +1271,7 @@ export class DlpServiceClient {
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.updateInspectTemplate(request, options, callback);
Expand Down Expand Up @@ -1365,7 +1365,7 @@ export class DlpServiceClient {
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.getInspectTemplate(request, options, callback);
Expand Down Expand Up @@ -1459,7 +1459,7 @@ export class DlpServiceClient {
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.deleteInspectTemplate(request, options, callback);
Expand Down Expand Up @@ -1581,7 +1581,7 @@ export class DlpServiceClient {
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.createDeidentifyTemplate(
Expand Down Expand Up @@ -1684,7 +1684,7 @@ export class DlpServiceClient {
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.updateDeidentifyTemplate(
Expand Down Expand Up @@ -1783,7 +1783,7 @@ export class DlpServiceClient {
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.getDeidentifyTemplate(request, options, callback);
Expand Down Expand Up @@ -1878,7 +1878,7 @@ export class DlpServiceClient {
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.deleteDeidentifyTemplate(
Expand Down Expand Up @@ -1993,7 +1993,7 @@ export class DlpServiceClient {
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.createJobTrigger(request, options, callback);
Expand Down Expand Up @@ -2084,7 +2084,7 @@ export class DlpServiceClient {
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.updateJobTrigger(request, options, callback);
Expand Down Expand Up @@ -2180,7 +2180,7 @@ export class DlpServiceClient {
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.hybridInspectJobTrigger(
Expand Down Expand Up @@ -2269,7 +2269,7 @@ export class DlpServiceClient {
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.getJobTrigger(request, options, callback);
Expand Down Expand Up @@ -2356,7 +2356,7 @@ export class DlpServiceClient {
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.deleteJobTrigger(request, options, callback);
Expand Down Expand Up @@ -2449,7 +2449,7 @@ export class DlpServiceClient {
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.activateJobTrigger(request, options, callback);
Expand Down Expand Up @@ -2565,7 +2565,7 @@ export class DlpServiceClient {
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.createDlpJob(request, options, callback);
Expand Down Expand Up @@ -2650,7 +2650,7 @@ export class DlpServiceClient {
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.getDlpJob(request, options, callback);
Expand Down Expand Up @@ -2737,7 +2737,7 @@ export class DlpServiceClient {
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.deleteDlpJob(request, options, callback);
Expand Down Expand Up @@ -2824,7 +2824,7 @@ export class DlpServiceClient {
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.cancelDlpJob(request, options, callback);
Expand Down Expand Up @@ -2945,7 +2945,7 @@ export class DlpServiceClient {
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.createStoredInfoType(request, options, callback);
Expand Down Expand Up @@ -3047,7 +3047,7 @@ export class DlpServiceClient {
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.updateStoredInfoType(request, options, callback);
Expand Down Expand Up @@ -3136,7 +3136,7 @@ export class DlpServiceClient {
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.getStoredInfoType(request, options, callback);
Expand Down Expand Up @@ -3231,7 +3231,7 @@ export class DlpServiceClient {
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.deleteStoredInfoType(request, options, callback);
Expand Down Expand Up @@ -3327,7 +3327,7 @@ export class DlpServiceClient {
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.hybridInspectDlpJob(request, options, callback);
Expand Down Expand Up @@ -3411,7 +3411,7 @@ export class DlpServiceClient {
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.finishDlpJob(request, options, callback);
Expand Down Expand Up @@ -3548,7 +3548,7 @@ export class DlpServiceClient {
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.listInspectTemplates(request, options, callback);
Expand Down Expand Up @@ -3623,7 +3623,7 @@ export class DlpServiceClient {
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['listInspectTemplates'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -3707,7 +3707,7 @@ export class DlpServiceClient {
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['listInspectTemplates'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -3850,7 +3850,7 @@ export class DlpServiceClient {
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.listDeidentifyTemplates(
Expand Down Expand Up @@ -3929,7 +3929,7 @@ export class DlpServiceClient {
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['listDeidentifyTemplates'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -4013,7 +4013,7 @@ export class DlpServiceClient {
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['listDeidentifyTemplates'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -4174,7 +4174,7 @@ export class DlpServiceClient {
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.listJobTriggers(request, options, callback);
Expand Down Expand Up @@ -4274,7 +4274,7 @@ export class DlpServiceClient {
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['listJobTriggers'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -4383,7 +4383,7 @@ export class DlpServiceClient {
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['listJobTriggers'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -4543,7 +4543,7 @@ export class DlpServiceClient {
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.listDlpJobs(request, options, callback);
Expand Down Expand Up @@ -4643,7 +4643,7 @@ export class DlpServiceClient {
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['listDlpJobs'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -4752,7 +4752,7 @@ export class DlpServiceClient {
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['listDlpJobs'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -4892,7 +4892,7 @@ export class DlpServiceClient {
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.listStoredInfoTypes(request, options, callback);
Expand Down Expand Up @@ -4964,7 +4964,7 @@ export class DlpServiceClient {
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['listStoredInfoTypes'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -5045,7 +5045,7 @@ export class DlpServiceClient {
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['listStoredInfoTypes'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
Loading