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

Commit

Permalink
fix: preserve default values in x-goog-request-params header (#586)
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: https://github.com/googleapis/googleapis-gen/commit/efcd3f93962a103f68f003e2a1eecde6fa216a27
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9
  • Loading branch information
gcf-owl-bot[bot] authored Sep 14, 2022
1 parent 5b173f8 commit cced8e7
Show file tree
Hide file tree
Showing 2 changed files with 955 additions and 902 deletions.
46 changes: 23 additions & 23 deletions src/v1/device_manager_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ export class DeviceManagerClient {
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.createDeviceRegistry(request, options, callback);
Expand Down Expand Up @@ -534,7 +534,7 @@ export class DeviceManagerClient {
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.getDeviceRegistry(request, options, callback);
Expand Down Expand Up @@ -633,7 +633,7 @@ export class DeviceManagerClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
'device_registry.name': request.deviceRegistry!.name || '',
'device_registry.name': request.deviceRegistry!.name ?? '',
});
this.initialize();
return this.innerApiCalls.updateDeviceRegistry(request, options, callback);
Expand Down Expand Up @@ -725,7 +725,7 @@ export class DeviceManagerClient {
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.deleteDeviceRegistry(request, options, callback);
Expand Down Expand Up @@ -814,7 +814,7 @@ export class DeviceManagerClient {
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.createDevice(request, options, callback);
Expand Down Expand Up @@ -903,7 +903,7 @@ export class DeviceManagerClient {
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.getDevice(request, options, callback);
Expand Down Expand Up @@ -994,7 +994,7 @@ export class DeviceManagerClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
'device.name': request.device!.name || '',
'device.name': request.device!.name ?? '',
});
this.initialize();
return this.innerApiCalls.updateDevice(request, options, callback);
Expand Down Expand Up @@ -1079,7 +1079,7 @@ export class DeviceManagerClient {
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.deleteDevice(request, options, callback);
Expand Down Expand Up @@ -1182,7 +1182,7 @@ export class DeviceManagerClient {
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.modifyCloudToDeviceConfig(
Expand Down Expand Up @@ -1284,7 +1284,7 @@ export class DeviceManagerClient {
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.listDeviceConfigVersions(
Expand Down Expand Up @@ -1380,7 +1380,7 @@ export class DeviceManagerClient {
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.listDeviceStates(request, options, callback);
Expand Down Expand Up @@ -1476,7 +1476,7 @@ export class DeviceManagerClient {
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 @@ -1565,7 +1565,7 @@ export class DeviceManagerClient {
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 @@ -1656,7 +1656,7 @@ export class DeviceManagerClient {
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 @@ -1763,7 +1763,7 @@ export class DeviceManagerClient {
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.sendCommandToDevice(request, options, callback);
Expand Down Expand Up @@ -1856,7 +1856,7 @@ export class DeviceManagerClient {
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.bindDeviceToGateway(request, options, callback);
Expand Down Expand Up @@ -1955,7 +1955,7 @@ export class DeviceManagerClient {
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.unbindDeviceFromGateway(
Expand Down Expand Up @@ -2064,7 +2064,7 @@ export class DeviceManagerClient {
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.listDeviceRegistries(request, options, callback);
Expand Down Expand Up @@ -2108,7 +2108,7 @@ export class DeviceManagerClient {
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['listDeviceRegistries'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2161,7 +2161,7 @@ export class DeviceManagerClient {
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['listDeviceRegistries'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2276,7 +2276,7 @@ export class DeviceManagerClient {
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.listDevices(request, options, callback);
Expand Down Expand Up @@ -2333,7 +2333,7 @@ export class DeviceManagerClient {
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['listDevices'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2399,7 +2399,7 @@ export class DeviceManagerClient {
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['listDevices'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
Loading

0 comments on commit cced8e7

Please sign in to comment.