Skip to content

Commit

Permalink
fix: preserve default values in x-goog-request-params header (#1622)
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 907b623 commit 76c0ab5
Show file tree
Hide file tree
Showing 6 changed files with 1,609 additions and 1,504 deletions.
30 changes: 15 additions & 15 deletions src/v1/publisher_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 490,7 @@ export class PublisherClient {
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.createTopic(request, options, callback);
Expand Down Expand Up @@ -578,7 578,7 @@ export class PublisherClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
'topic.name': request.topic!.name || '',
'topic.name': request.topic!.name ?? '',
});
this.initialize();
return this.innerApiCalls.updateTopic(request, options, callback);
Expand Down Expand Up @@ -663,7 663,7 @@ export class PublisherClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
topic: request.topic || '',
topic: request.topic ?? '',
});
this.initialize();
return this.innerApiCalls.publish(request, options, callback);
Expand Down Expand Up @@ -745,7 745,7 @@ export class PublisherClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
topic: request.topic || '',
topic: request.topic ?? '',
});
this.initialize();
return this.innerApiCalls.getTopic(request, options, callback);
Expand Down Expand Up @@ -831,7 831,7 @@ export class PublisherClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
topic: request.topic || '',
topic: request.topic ?? '',
});
this.initialize();
return this.innerApiCalls.deleteTopic(request, options, callback);
Expand Down Expand Up @@ -916,7 916,7 @@ export class PublisherClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
subscription: request.subscription || '',
subscription: request.subscription ?? '',
});
this.initialize();
return this.innerApiCalls.detachSubscription(request, options, callback);
Expand Down Expand Up @@ -1010,7 1010,7 @@ export class PublisherClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project: request.project || '',
project: request.project ?? '',
});
this.initialize();
return this.innerApiCalls.listTopics(request, options, callback);
Expand Down Expand Up @@ -1051,7 1051,7 @@ export class PublisherClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project: request.project || '',
project: request.project ?? '',
});
const defaultCallSettings = this._defaults['listTopics'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1099,7 1099,7 @@ export class PublisherClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project: request.project || '',
project: request.project ?? '',
});
const defaultCallSettings = this._defaults['listTopics'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1206,7 1206,7 @@ export class PublisherClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
topic: request.topic || '',
topic: request.topic ?? '',
});
this.initialize();
return this.innerApiCalls.listTopicSubscriptions(
Expand Down Expand Up @@ -1251,7 1251,7 @@ export class PublisherClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
topic: request.topic || '',
topic: request.topic ?? '',
});
const defaultCallSettings = this._defaults['listTopicSubscriptions'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1299,7 1299,7 @@ export class PublisherClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
topic: request.topic || '',
topic: request.topic ?? '',
});
const defaultCallSettings = this._defaults['listTopicSubscriptions'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1404,7 1404,7 @@ export class PublisherClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
topic: request.topic || '',
topic: request.topic ?? '',
});
this.initialize();
return this.innerApiCalls.listTopicSnapshots(request, options, callback);
Expand Down Expand Up @@ -1445,7 1445,7 @@ export class PublisherClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
topic: request.topic || '',
topic: request.topic ?? '',
});
const defaultCallSettings = this._defaults['listTopicSnapshots'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1493,7 1493,7 @@ export class PublisherClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
topic: request.topic || '',
topic: request.topic ?? '',
});
const defaultCallSettings = this._defaults['listTopicSnapshots'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
16 changes: 8 additions & 8 deletions src/v1/schema_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 438,7 @@ export class SchemaServiceClient {
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.createSchema(request, options, callback);
Expand Down Expand Up @@ -524,7 524,7 @@ export class SchemaServiceClient {
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.getSchema(request, options, callback);
Expand Down Expand Up @@ -606,7 606,7 @@ export class SchemaServiceClient {
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.deleteSchema(request, options, callback);
Expand Down Expand Up @@ -690,7 690,7 @@ export class SchemaServiceClient {
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.validateSchema(request, options, callback);
Expand Down Expand Up @@ -782,7 782,7 @@ export class SchemaServiceClient {
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.validateMessage(request, options, callback);
Expand Down Expand Up @@ -880,7 880,7 @@ export class SchemaServiceClient {
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.listSchemas(request, options, callback);
Expand Down Expand Up @@ -925,7 925,7 @@ export class SchemaServiceClient {
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['listSchemas'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -977,7 977,7 @@ export class SchemaServiceClient {
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['listSchemas'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
38 changes: 19 additions & 19 deletions src/v1/subscriber_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 596,7 @@ export class SubscriberClient {
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.createSubscription(request, options, callback);
Expand Down Expand Up @@ -678,7 678,7 @@ export class SubscriberClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
subscription: request.subscription || '',
subscription: request.subscription ?? '',
});
this.initialize();
return this.innerApiCalls.getSubscription(request, options, callback);
Expand Down Expand Up @@ -763,7 763,7 @@ export class SubscriberClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
'subscription.name': request.subscription!.name || '',
'subscription.name': request.subscription!.name ?? '',
});
this.initialize();
return this.innerApiCalls.updateSubscription(request, options, callback);
Expand Down Expand Up @@ -849,7 849,7 @@ export class SubscriberClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
subscription: request.subscription || '',
subscription: request.subscription ?? '',
});
this.initialize();
return this.innerApiCalls.deleteSubscription(request, options, callback);
Expand Down Expand Up @@ -946,7 946,7 @@ export class SubscriberClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
subscription: request.subscription || '',
subscription: request.subscription ?? '',
});
this.initialize();
return this.innerApiCalls.modifyAckDeadline(request, options, callback);
Expand Down Expand Up @@ -1038,7 1038,7 @@ export class SubscriberClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
subscription: request.subscription || '',
subscription: request.subscription ?? '',
});
this.initialize();
return this.innerApiCalls.acknowledge(request, options, callback);
Expand Down Expand Up @@ -1134,7 1134,7 @@ export class SubscriberClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
subscription: request.subscription || '',
subscription: request.subscription ?? '',
});
this.initialize();
return this.innerApiCalls.pull(request, options, callback);
Expand Down Expand Up @@ -1228,7 1228,7 @@ export class SubscriberClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
subscription: request.subscription || '',
subscription: request.subscription ?? '',
});
this.initialize();
return this.innerApiCalls.modifyPushConfig(request, options, callback);
Expand Down Expand Up @@ -1314,7 1314,7 @@ export class SubscriberClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
snapshot: request.snapshot || '',
snapshot: request.snapshot ?? '',
});
this.initialize();
return this.innerApiCalls.getSnapshot(request, options, callback);
Expand Down Expand Up @@ -1428,7 1428,7 @@ export class SubscriberClient {
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.createSnapshot(request, options, callback);
Expand Down Expand Up @@ -1517,7 1517,7 @@ export class SubscriberClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
'snapshot.name': request.snapshot!.name || '',
'snapshot.name': request.snapshot!.name ?? '',
});
this.initialize();
return this.innerApiCalls.updateSnapshot(request, options, callback);
Expand Down Expand Up @@ -1607,7 1607,7 @@ export class SubscriberClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
snapshot: request.snapshot || '',
snapshot: request.snapshot ?? '',
});
this.initialize();
return this.innerApiCalls.deleteSnapshot(request, options, callback);
Expand Down Expand Up @@ -1710,7 1710,7 @@ export class SubscriberClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
subscription: request.subscription || '',
subscription: request.subscription ?? '',
});
this.initialize();
return this.innerApiCalls.seek(request, options, callback);
Expand Down Expand Up @@ -1828,7 1828,7 @@ export class SubscriberClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project: request.project || '',
project: request.project ?? '',
});
this.initialize();
return this.innerApiCalls.listSubscriptions(request, options, callback);
Expand Down Expand Up @@ -1869,7 1869,7 @@ export class SubscriberClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project: request.project || '',
project: request.project ?? '',
});
const defaultCallSettings = this._defaults['listSubscriptions'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1917,7 1917,7 @@ export class SubscriberClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project: request.project || '',
project: request.project ?? '',
});
const defaultCallSettings = this._defaults['listSubscriptions'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2020,7 2020,7 @@ export class SubscriberClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project: request.project || '',
project: request.project ?? '',
});
this.initialize();
return this.innerApiCalls.listSnapshots(request, options, callback);
Expand Down Expand Up @@ -2061,7 2061,7 @@ export class SubscriberClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project: request.project || '',
project: request.project ?? '',
});
const defaultCallSettings = this._defaults['listSnapshots'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2109,7 2109,7 @@ export class SubscriberClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project: request.project || '',
project: request.project ?? '',
});
const defaultCallSettings = this._defaults['listSnapshots'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
Loading

0 comments on commit 76c0ab5

Please sign in to comment.