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

Commit

Permalink
fix: preserve default values in x-goog-request-params header (#81)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 474338479

Source-Link: googleapis/googleapis@d5d35e0

Source-Link: googleapis/googleapis-gen@efcd3f9
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9
  • Loading branch information
gcf-owl-bot[bot] committed Sep 14, 2022
1 parent 9054e83 commit 18e64cc
Show file tree
Hide file tree
Showing 12 changed files with 1,644 additions and 1,073 deletions.
4 changes: 2 additions & 2 deletions src/v1beta3/flex_templates_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ export class FlexTemplatesServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
});
this.initialize();
return this.innerApiCalls.launchFlexTemplate(request, options, callback);
Expand Down
40 changes: 20 additions & 20 deletions src/v1beta3/jobs_v1_beta3_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,8 @@ export class JobsV1Beta3Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
});
this.initialize();
return this.innerApiCalls.createJob(request, options, callback);
Expand Down Expand Up @@ -524,9 +524,9 @@ export class JobsV1Beta3Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
job_id: request.jobId || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
job_id: request.jobId ?? '',
});
this.initialize();
return this.innerApiCalls.getJob(request, options, callback);
Expand Down Expand Up @@ -624,9 +624,9 @@ export class JobsV1Beta3Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
job_id: request.jobId || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
job_id: request.jobId ?? '',
});
this.initialize();
return this.innerApiCalls.updateJob(request, options, callback);
Expand Down Expand Up @@ -800,9 +800,9 @@ export class JobsV1Beta3Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
job_id: request.jobId || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
job_id: request.jobId ?? '',
});
this.initialize();
return this.innerApiCalls.snapshotJob(request, options, callback);
Expand Down Expand Up @@ -912,8 +912,8 @@ export class JobsV1Beta3Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
});
this.initialize();
return this.innerApiCalls.listJobs(request, options, callback);
Expand Down Expand Up @@ -963,8 +963,8 @@ export class JobsV1Beta3Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
});
const defaultCallSettings = this._defaults['listJobs'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1023,8 +1023,8 @@ export class JobsV1Beta3Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
});
const defaultCallSettings = this._defaults['listJobs'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1132,7 +1132,7 @@ export class JobsV1Beta3Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
project_id: request.projectId ?? '',
});
this.initialize();
return this.innerApiCalls.aggregatedListJobs(request, options, callback);
Expand Down Expand Up @@ -1182,7 +1182,7 @@ export class JobsV1Beta3Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
project_id: request.projectId ?? '',
});
const defaultCallSettings = this._defaults['aggregatedListJobs'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1241,7 +1241,7 @@ export class JobsV1Beta3Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
project_id: request.projectId ?? '',
});
const defaultCallSettings = this._defaults['aggregatedListJobs'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
18 changes: 9 additions & 9 deletions src/v1beta3/messages_v1_beta3_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,9 @@ export class MessagesV1Beta3Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
job_id: request.jobId || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
job_id: request.jobId ?? '',
});
this.initialize();
return this.innerApiCalls.listJobMessages(request, options, callback);
Expand Down Expand Up @@ -495,9 +495,9 @@ export class MessagesV1Beta3Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
job_id: request.jobId || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
job_id: request.jobId ?? '',
});
const defaultCallSettings = this._defaults['listJobMessages'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -562,9 +562,9 @@ export class MessagesV1Beta3Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
job_id: request.jobId || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
job_id: request.jobId ?? '',
});
const defaultCallSettings = this._defaults['listJobMessages'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
48 changes: 24 additions & 24 deletions src/v1beta3/metrics_v1_beta3_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,9 @@ export class MetricsV1Beta3Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
job_id: request.jobId || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
job_id: request.jobId ?? '',
});
this.initialize();
return this.innerApiCalls.getJobMetrics(request, options, callback);
Expand Down Expand Up @@ -530,9 +530,9 @@ export class MetricsV1Beta3Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
job_id: request.jobId || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
job_id: request.jobId ?? '',
});
this.initialize();
return this.innerApiCalls.getJobExecutionDetails(
Expand Down Expand Up @@ -584,9 +584,9 @@ export class MetricsV1Beta3Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
job_id: request.jobId || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
job_id: request.jobId ?? '',
});
const defaultCallSettings = this._defaults['getJobExecutionDetails'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -643,9 +643,9 @@ export class MetricsV1Beta3Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
job_id: request.jobId || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
job_id: request.jobId ?? '',
});
const defaultCallSettings = this._defaults['getJobExecutionDetails'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -762,10 +762,10 @@ export class MetricsV1Beta3Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
job_id: request.jobId || '',
stage_id: request.stageId || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
job_id: request.jobId ?? '',
stage_id: request.stageId ?? '',
});
this.initialize();
return this.innerApiCalls.getStageExecutionDetails(
Expand Down Expand Up @@ -823,10 +823,10 @@ export class MetricsV1Beta3Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
job_id: request.jobId || '',
stage_id: request.stageId || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
job_id: request.jobId ?? '',
stage_id: request.stageId ?? '',
});
const defaultCallSettings = this._defaults['getStageExecutionDetails'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -889,10 +889,10 @@ export class MetricsV1Beta3Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
job_id: request.jobId || '',
stage_id: request.stageId || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
job_id: request.jobId ?? '',
stage_id: request.stageId ?? '',
});
const defaultCallSettings = this._defaults['getStageExecutionDetails'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
18 changes: 9 additions & 9 deletions src/v1beta3/snapshots_v1_beta3_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,9 @@ export class SnapshotsV1Beta3Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
snapshot_id: request.snapshotId || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
snapshot_id: request.snapshotId ?? '',
});
this.initialize();
return this.innerApiCalls.getSnapshot(request, options, callback);
Expand Down Expand Up @@ -482,9 +482,9 @@ export class SnapshotsV1Beta3Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
snapshot_id: request.snapshotId || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
snapshot_id: request.snapshotId ?? '',
});
this.initialize();
return this.innerApiCalls.deleteSnapshot(request, options, callback);
Expand Down Expand Up @@ -573,9 +573,9 @@ export class SnapshotsV1Beta3Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
job_id: request.jobId || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
job_id: request.jobId ?? '',
});
this.initialize();
return this.innerApiCalls.listSnapshots(request, options, callback);
Expand Down
12 changes: 6 additions & 6 deletions src/v1beta3/templates_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,8 @@ export class TemplatesServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
});
this.initialize();
return this.innerApiCalls.createJobFromTemplate(request, options, callback);
Expand Down Expand Up @@ -511,8 +511,8 @@ export class TemplatesServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
});
this.initialize();
return this.innerApiCalls.launchTemplate(request, options, callback);
Expand Down Expand Up @@ -605,8 +605,8 @@ export class TemplatesServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
location: request.location || '',
project_id: request.projectId ?? '',
location: request.location ?? '',
});
this.initialize();
return this.innerApiCalls.getTemplate(request, options, callback);
Expand Down
Loading

0 comments on commit 18e64cc

Please sign in to comment.