Skip to content

Commit

Permalink
fix: preserve default values in x-goog-request-params header (#250)
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 a2a5a31 commit 0ae94a9
Show file tree
Hide file tree
Showing 8 changed files with 2,000 additions and 1,870 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ export class LookupServiceClient {
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.resolveService(request, options, callback);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ export class RegistrationServiceClient {
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.createNamespace(request, options, callback);
Expand Down Expand Up @@ -570,7 +570,7 @@ export class RegistrationServiceClient {
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.getNamespace(request, options, callback);
Expand Down Expand Up @@ -669,7 +669,7 @@ export class RegistrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
'namespace.name': request.namespace!.name || '',
'namespace.name': request.namespace!.name ?? '',
});
this.initialize();
return this.innerApiCalls.updateNamespace(request, options, callback);
Expand Down Expand Up @@ -767,7 +767,7 @@ export class RegistrationServiceClient {
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.deleteNamespace(request, options, callback);
Expand Down Expand Up @@ -868,7 +868,7 @@ export class RegistrationServiceClient {
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.createService(request, options, callback);
Expand Down Expand Up @@ -959,7 +959,7 @@ export class RegistrationServiceClient {
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.getService(request, options, callback);
Expand Down Expand Up @@ -1052,7 +1052,7 @@ export class RegistrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
'service.name': request.service!.name || '',
'service.name': request.service!.name ?? '',
});
this.initialize();
return this.innerApiCalls.updateService(request, options, callback);
Expand Down Expand Up @@ -1144,7 +1144,7 @@ export class RegistrationServiceClient {
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.deleteService(request, options, callback);
Expand Down Expand Up @@ -1251,7 +1251,7 @@ export class RegistrationServiceClient {
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.createEndpoint(request, options, callback);
Expand Down Expand Up @@ -1342,7 +1342,7 @@ export class RegistrationServiceClient {
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.getEndpoint(request, options, callback);
Expand Down Expand Up @@ -1441,7 +1441,7 @@ export class RegistrationServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
'endpoint.name': request.endpoint!.name || '',
'endpoint.name': request.endpoint!.name ?? '',
});
this.initialize();
return this.innerApiCalls.updateEndpoint(request, options, callback);
Expand Down Expand Up @@ -1538,7 +1538,7 @@ export class RegistrationServiceClient {
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.deleteEndpoint(request, options, callback);
Expand Down Expand Up @@ -1625,7 +1625,7 @@ export class RegistrationServiceClient {
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 @@ -1720,7 +1720,7 @@ export class RegistrationServiceClient {
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 @@ -1809,7 +1809,7 @@ export class RegistrationServiceClient {
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 @@ -1944,7 +1944,7 @@ export class RegistrationServiceClient {
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.listNamespaces(request, options, callback);
Expand Down Expand Up @@ -2018,7 +2018,7 @@ export class RegistrationServiceClient {
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['listNamespaces'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2101,7 +2101,7 @@ export class RegistrationServiceClient {
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['listNamespaces'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2233,7 +2233,7 @@ export class RegistrationServiceClient {
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.listServices(request, options, callback);
Expand Down Expand Up @@ -2299,7 +2299,7 @@ export class RegistrationServiceClient {
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['listServices'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2374,7 +2374,7 @@ export class RegistrationServiceClient {
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['listServices'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2508,7 +2508,7 @@ export class RegistrationServiceClient {
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.listEndpoints(request, options, callback);
Expand Down Expand Up @@ -2576,7 +2576,7 @@ export class RegistrationServiceClient {
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['listEndpoints'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2653,7 +2653,7 @@ export class RegistrationServiceClient {
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['listEndpoints'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ export class LookupServiceClient {
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.resolveService(request, options, callback);
Expand Down
Loading

0 comments on commit 0ae94a9

Please sign in to comment.