Skip to content

Commit

Permalink
fix: preserve default values in x-goog-request-params header (#657)
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 70164af commit 4317525
Show file tree
Hide file tree
Showing 6 changed files with 2,359 additions and 2,462 deletions.
40 changes: 20 additions & 20 deletions packages/google-cloud-tasks/src/v2/cloud_tasks_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ export class CloudTasksClient {
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.getQueue(request, options, callback);
Expand Down Expand Up @@ -537,7 +537,7 @@ export class CloudTasksClient {
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.createQueue(request, options, callback);
Expand Down Expand Up @@ -644,7 +644,7 @@ export class CloudTasksClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
'queue.name': request.queue!.name || '',
'queue.name': request.queue!.name ?? '',
});
this.initialize();
return this.innerApiCalls.updateQueue(request, options, callback);
Expand Down Expand Up @@ -740,7 +740,7 @@ export class CloudTasksClient {
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.deleteQueue(request, options, callback);
Expand Down Expand Up @@ -829,7 +829,7 @@ export class CloudTasksClient {
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.purgeQueue(request, options, callback);
Expand Down Expand Up @@ -919,7 +919,7 @@ export class CloudTasksClient {
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.pauseQueue(request, options, callback);
Expand Down Expand Up @@ -1015,7 +1015,7 @@ export class CloudTasksClient {
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.resumeQueue(request, options, callback);
Expand Down Expand Up @@ -1110,7 +1110,7 @@ export class CloudTasksClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
resource: request.resource || '',
resource: request.resource ?? '',
});
this.initialize();
return this.innerApiCalls.getIamPolicy(request, options, callback);
Expand Down Expand Up @@ -1215,7 +1215,7 @@ export class CloudTasksClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
resource: request.resource || '',
resource: request.resource ?? '',
});
this.initialize();
return this.innerApiCalls.setIamPolicy(request, options, callback);
Expand Down Expand Up @@ -1310,7 +1310,7 @@ export class CloudTasksClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
resource: request.resource || '',
resource: request.resource ?? '',
});
this.initialize();
return this.innerApiCalls.testIamPermissions(request, options, callback);
Expand Down Expand Up @@ -1407,7 +1407,7 @@ export class CloudTasksClient {
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.getTask(request, options, callback);
Expand Down Expand Up @@ -1544,7 +1544,7 @@ export class CloudTasksClient {
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.createTask(request, options, callback);
Expand Down Expand Up @@ -1632,7 +1632,7 @@ export class CloudTasksClient {
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.deleteTask(request, options, callback);
Expand Down Expand Up @@ -1752,7 +1752,7 @@ export class CloudTasksClient {
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.runTask(request, options, callback);
Expand Down Expand Up @@ -1871,7 +1871,7 @@ export class CloudTasksClient {
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.listQueues(request, options, callback);
Expand Down Expand Up @@ -1935,7 +1935,7 @@ export class CloudTasksClient {
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['listQueues'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2008,7 +2008,7 @@ export class CloudTasksClient {
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['listQueues'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2141,7 +2141,7 @@ export class CloudTasksClient {
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.listTasks(request, options, callback);
Expand Down Expand Up @@ -2208,7 +2208,7 @@ export class CloudTasksClient {
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['listTasks'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2284,7 +2284,7 @@ export class CloudTasksClient {
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['listTasks'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
48 changes: 24 additions & 24 deletions packages/google-cloud-tasks/src/v2beta2/cloud_tasks_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ export class CloudTasksClient {
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.getQueue(request, options, callback);
Expand Down Expand Up @@ -548,7 +548,7 @@ export class CloudTasksClient {
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.createQueue(request, options, callback);
Expand Down Expand Up @@ -657,7 +657,7 @@ export class CloudTasksClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
'queue.name': request.queue!.name || '',
'queue.name': request.queue!.name ?? '',
});
this.initialize();
return this.innerApiCalls.updateQueue(request, options, callback);
Expand Down Expand Up @@ -755,7 +755,7 @@ export class CloudTasksClient {
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.deleteQueue(request, options, callback);
Expand Down Expand Up @@ -846,7 +846,7 @@ export class CloudTasksClient {
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.purgeQueue(request, options, callback);
Expand Down Expand Up @@ -938,7 +938,7 @@ export class CloudTasksClient {
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.pauseQueue(request, options, callback);
Expand Down Expand Up @@ -1036,7 +1036,7 @@ export class CloudTasksClient {
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.resumeQueue(request, options, callback);
Expand Down Expand Up @@ -1131,7 +1131,7 @@ export class CloudTasksClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
resource: request.resource || '',
resource: request.resource ?? '',
});
this.initialize();
return this.innerApiCalls.getIamPolicy(request, options, callback);
Expand Down Expand Up @@ -1236,7 +1236,7 @@ export class CloudTasksClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
resource: request.resource || '',
resource: request.resource ?? '',
});
this.initialize();
return this.innerApiCalls.setIamPolicy(request, options, callback);
Expand Down Expand Up @@ -1331,7 +1331,7 @@ export class CloudTasksClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
resource: request.resource || '',
resource: request.resource ?? '',
});
this.initialize();
return this.innerApiCalls.testIamPermissions(request, options, callback);
Expand Down Expand Up @@ -1428,7 +1428,7 @@ export class CloudTasksClient {
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.getTask(request, options, callback);
Expand Down Expand Up @@ -1569,7 +1569,7 @@ export class CloudTasksClient {
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.createTask(request, options, callback);
Expand Down Expand Up @@ -1659,7 +1659,7 @@ export class CloudTasksClient {
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.deleteTask(request, options, callback);
Expand Down Expand Up @@ -1840,7 +1840,7 @@ export class CloudTasksClient {
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.leaseTasks(request, options, callback);
Expand Down Expand Up @@ -1950,7 +1950,7 @@ export class CloudTasksClient {
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.acknowledgeTask(request, options, callback);
Expand Down Expand Up @@ -2065,7 +2065,7 @@ export class CloudTasksClient {
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.renewLease(request, options, callback);
Expand Down Expand Up @@ -2175,7 +2175,7 @@ export class CloudTasksClient {
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.cancelLease(request, options, callback);
Expand Down Expand Up @@ -2298,7 +2298,7 @@ export class CloudTasksClient {
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.runTask(request, options, callback);
Expand Down Expand Up @@ -2424,7 +2424,7 @@ export class CloudTasksClient {
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.listQueues(request, options, callback);
Expand Down Expand Up @@ -2493,7 +2493,7 @@ export class CloudTasksClient {
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['listQueues'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2571,7 +2571,7 @@ export class CloudTasksClient {
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['listQueues'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2706,7 +2706,7 @@ export class CloudTasksClient {
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.listTasks(request, options, callback);
Expand Down Expand Up @@ -2773,7 +2773,7 @@ export class CloudTasksClient {
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['listTasks'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2849,7 +2849,7 @@ export class CloudTasksClient {
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['listTasks'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
Loading

0 comments on commit 4317525

Please sign in to comment.