Skip to content

Commit

Permalink
fix: preserve default values in x-goog-request-params header (#471)
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] authored Sep 14, 2022
1 parent bf6ce7d commit e1425e5
Show file tree
Hide file tree
Showing 4 changed files with 710 additions and 762 deletions.
20 changes: 10 additions & 10 deletions packages/google-cloud-scheduler/src/v1/cloud_scheduler_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ export class CloudSchedulerClient {
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.getJob(request, options, callback);
Expand Down Expand Up @@ -508,7 +508,7 @@ export class CloudSchedulerClient {
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.createJob(request, options, callback);
Expand Down Expand Up @@ -604,7 +604,7 @@ export class CloudSchedulerClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
'job.name': request.job!.name || '',
'job.name': request.job!.name ?? '',
});
this.initialize();
return this.innerApiCalls.updateJob(request, options, callback);
Expand Down Expand Up @@ -688,7 +688,7 @@ export class CloudSchedulerClient {
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.deleteJob(request, options, callback);
Expand Down Expand Up @@ -778,7 +778,7 @@ export class CloudSchedulerClient {
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.pauseJob(request, options, callback);
Expand Down Expand Up @@ -867,7 +867,7 @@ export class CloudSchedulerClient {
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.resumeJob(request, options, callback);
Expand Down Expand Up @@ -954,7 +954,7 @@ export class CloudSchedulerClient {
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.runJob(request, options, callback);
Expand Down Expand Up @@ -1057,7 +1057,7 @@ export class CloudSchedulerClient {
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.listJobs(request, options, callback);
Expand Down Expand Up @@ -1107,7 +1107,7 @@ export class CloudSchedulerClient {
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['listJobs'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1166,7 +1166,7 @@ export class CloudSchedulerClient {
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['listJobs'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ export class CloudSchedulerClient {
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.getJob(request, options, callback);
Expand Down Expand Up @@ -518,7 +518,7 @@ export class CloudSchedulerClient {
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.createJob(request, options, callback);
Expand Down Expand Up @@ -622,7 +622,7 @@ export class CloudSchedulerClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
'job.name': request.job!.name || '',
'job.name': request.job!.name ?? '',
});
this.initialize();
return this.innerApiCalls.updateJob(request, options, callback);
Expand Down Expand Up @@ -714,7 +714,7 @@ export class CloudSchedulerClient {
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.deleteJob(request, options, callback);
Expand Down Expand Up @@ -806,7 +806,7 @@ export class CloudSchedulerClient {
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.pauseJob(request, options, callback);
Expand Down Expand Up @@ -903,7 +903,7 @@ export class CloudSchedulerClient {
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.resumeJob(request, options, callback);
Expand Down Expand Up @@ -992,7 +992,7 @@ export class CloudSchedulerClient {
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.runJob(request, options, callback);
Expand Down Expand Up @@ -1103,7 +1103,7 @@ export class CloudSchedulerClient {
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.listJobs(request, options, callback);
Expand Down Expand Up @@ -1153,7 +1153,7 @@ export class CloudSchedulerClient {
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['listJobs'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1212,7 +1212,7 @@ export class CloudSchedulerClient {
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['listJobs'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
Loading

0 comments on commit e1425e5

Please sign in to comment.