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

Commit cced8e7

Browse files
fix: preserve default values in x-goog-request-params header (#586)
- [ ] 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
1 parent 5b173f8 commit cced8e7

2 files changed

Lines changed: 955 additions & 902 deletions

File tree

src/v1/device_manager_client.ts

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ export class DeviceManagerClient {
448448
options.otherArgs.headers = options.otherArgs.headers || {};
449449
options.otherArgs.headers['x-goog-request-params'] =
450450
this._gaxModule.routingHeader.fromParams({
451-
parent: request.parent || '',
451+
parent: request.parent ?? '',
452452
});
453453
this.initialize();
454454
return this.innerApiCalls.createDeviceRegistry(request, options, callback);
@@ -534,7 +534,7 @@ export class DeviceManagerClient {
534534
options.otherArgs.headers = options.otherArgs.headers || {};
535535
options.otherArgs.headers['x-goog-request-params'] =
536536
this._gaxModule.routingHeader.fromParams({
537-
name: request.name || '',
537+
name: request.name ?? '',
538538
});
539539
this.initialize();
540540
return this.innerApiCalls.getDeviceRegistry(request, options, callback);
@@ -633,7 +633,7 @@ export class DeviceManagerClient {
633633
options.otherArgs.headers = options.otherArgs.headers || {};
634634
options.otherArgs.headers['x-goog-request-params'] =
635635
this._gaxModule.routingHeader.fromParams({
636-
'device_registry.name': request.deviceRegistry!.name || '',
636+
'device_registry.name': request.deviceRegistry!.name ?? '',
637637
});
638638
this.initialize();
639639
return this.innerApiCalls.updateDeviceRegistry(request, options, callback);
@@ -725,7 +725,7 @@ export class DeviceManagerClient {
725725
options.otherArgs.headers = options.otherArgs.headers || {};
726726
options.otherArgs.headers['x-goog-request-params'] =
727727
this._gaxModule.routingHeader.fromParams({
728-
name: request.name || '',
728+
name: request.name ?? '',
729729
});
730730
this.initialize();
731731
return this.innerApiCalls.deleteDeviceRegistry(request, options, callback);
@@ -814,7 +814,7 @@ export class DeviceManagerClient {
814814
options.otherArgs.headers = options.otherArgs.headers || {};
815815
options.otherArgs.headers['x-goog-request-params'] =
816816
this._gaxModule.routingHeader.fromParams({
817-
parent: request.parent || '',
817+
parent: request.parent ?? '',
818818
});
819819
this.initialize();
820820
return this.innerApiCalls.createDevice(request, options, callback);
@@ -903,7 +903,7 @@ export class DeviceManagerClient {
903903
options.otherArgs.headers = options.otherArgs.headers || {};
904904
options.otherArgs.headers['x-goog-request-params'] =
905905
this._gaxModule.routingHeader.fromParams({
906-
name: request.name || '',
906+
name: request.name ?? '',
907907
});
908908
this.initialize();
909909
return this.innerApiCalls.getDevice(request, options, callback);
@@ -994,7 +994,7 @@ export class DeviceManagerClient {
994994
options.otherArgs.headers = options.otherArgs.headers || {};
995995
options.otherArgs.headers['x-goog-request-params'] =
996996
this._gaxModule.routingHeader.fromParams({
997-
'device.name': request.device!.name || '',
997+
'device.name': request.device!.name ?? '',
998998
});
999999
this.initialize();
10001000
return this.innerApiCalls.updateDevice(request, options, callback);
@@ -1079,7 +1079,7 @@ export class DeviceManagerClient {
10791079
options.otherArgs.headers = options.otherArgs.headers || {};
10801080
options.otherArgs.headers['x-goog-request-params'] =
10811081
this._gaxModule.routingHeader.fromParams({
1082-
name: request.name || '',
1082+
name: request.name ?? '',
10831083
});
10841084
this.initialize();
10851085
return this.innerApiCalls.deleteDevice(request, options, callback);
@@ -1182,7 +1182,7 @@ export class DeviceManagerClient {
11821182
options.otherArgs.headers = options.otherArgs.headers || {};
11831183
options.otherArgs.headers['x-goog-request-params'] =
11841184
this._gaxModule.routingHeader.fromParams({
1185-
name: request.name || '',
1185+
name: request.name ?? '',
11861186
});
11871187
this.initialize();
11881188
return this.innerApiCalls.modifyCloudToDeviceConfig(
@@ -1284,7 +1284,7 @@ export class DeviceManagerClient {
12841284
options.otherArgs.headers = options.otherArgs.headers || {};
12851285
options.otherArgs.headers['x-goog-request-params'] =
12861286
this._gaxModule.routingHeader.fromParams({
1287-
name: request.name || '',
1287+
name: request.name ?? '',
12881288
});
12891289
this.initialize();
12901290
return this.innerApiCalls.listDeviceConfigVersions(
@@ -1380,7 +1380,7 @@ export class DeviceManagerClient {
13801380
options.otherArgs.headers = options.otherArgs.headers || {};
13811381
options.otherArgs.headers['x-goog-request-params'] =
13821382
this._gaxModule.routingHeader.fromParams({
1383-
name: request.name || '',
1383+
name: request.name ?? '',
13841384
});
13851385
this.initialize();
13861386
return this.innerApiCalls.listDeviceStates(request, options, callback);
@@ -1476,7 +1476,7 @@ export class DeviceManagerClient {
14761476
options.otherArgs.headers = options.otherArgs.headers || {};
14771477
options.otherArgs.headers['x-goog-request-params'] =
14781478
this._gaxModule.routingHeader.fromParams({
1479-
resource: request.resource || '',
1479+
resource: request.resource ?? '',
14801480
});
14811481
this.initialize();
14821482
return this.innerApiCalls.setIamPolicy(request, options, callback);
@@ -1565,7 +1565,7 @@ export class DeviceManagerClient {
15651565
options.otherArgs.headers = options.otherArgs.headers || {};
15661566
options.otherArgs.headers['x-goog-request-params'] =
15671567
this._gaxModule.routingHeader.fromParams({
1568-
resource: request.resource || '',
1568+
resource: request.resource ?? '',
15691569
});
15701570
this.initialize();
15711571
return this.innerApiCalls.getIamPolicy(request, options, callback);
@@ -1656,7 +1656,7 @@ export class DeviceManagerClient {
16561656
options.otherArgs.headers = options.otherArgs.headers || {};
16571657
options.otherArgs.headers['x-goog-request-params'] =
16581658
this._gaxModule.routingHeader.fromParams({
1659-
resource: request.resource || '',
1659+
resource: request.resource ?? '',
16601660
});
16611661
this.initialize();
16621662
return this.innerApiCalls.testIamPermissions(request, options, callback);
@@ -1763,7 +1763,7 @@ export class DeviceManagerClient {
17631763
options.otherArgs.headers = options.otherArgs.headers || {};
17641764
options.otherArgs.headers['x-goog-request-params'] =
17651765
this._gaxModule.routingHeader.fromParams({
1766-
name: request.name || '',
1766+
name: request.name ?? '',
17671767
});
17681768
this.initialize();
17691769
return this.innerApiCalls.sendCommandToDevice(request, options, callback);
@@ -1856,7 +1856,7 @@ export class DeviceManagerClient {
18561856
options.otherArgs.headers = options.otherArgs.headers || {};
18571857
options.otherArgs.headers['x-goog-request-params'] =
18581858
this._gaxModule.routingHeader.fromParams({
1859-
parent: request.parent || '',
1859+
parent: request.parent ?? '',
18601860
});
18611861
this.initialize();
18621862
return this.innerApiCalls.bindDeviceToGateway(request, options, callback);
@@ -1955,7 +1955,7 @@ export class DeviceManagerClient {
19551955
options.otherArgs.headers = options.otherArgs.headers || {};
19561956
options.otherArgs.headers['x-goog-request-params'] =
19571957
this._gaxModule.routingHeader.fromParams({
1958-
parent: request.parent || '',
1958+
parent: request.parent ?? '',
19591959
});
19601960
this.initialize();
19611961
return this.innerApiCalls.unbindDeviceFromGateway(
@@ -2064,7 +2064,7 @@ export class DeviceManagerClient {
20642064
options.otherArgs.headers = options.otherArgs.headers || {};
20652065
options.otherArgs.headers['x-goog-request-params'] =
20662066
this._gaxModule.routingHeader.fromParams({
2067-
parent: request.parent || '',
2067+
parent: request.parent ?? '',
20682068
});
20692069
this.initialize();
20702070
return this.innerApiCalls.listDeviceRegistries(request, options, callback);
@@ -2108,7 +2108,7 @@ export class DeviceManagerClient {
21082108
options.otherArgs.headers = options.otherArgs.headers || {};
21092109
options.otherArgs.headers['x-goog-request-params'] =
21102110
this._gaxModule.routingHeader.fromParams({
2111-
parent: request.parent || '',
2111+
parent: request.parent ?? '',
21122112
});
21132113
const defaultCallSettings = this._defaults['listDeviceRegistries'];
21142114
const callSettings = defaultCallSettings.merge(options);
@@ -2161,7 +2161,7 @@ export class DeviceManagerClient {
21612161
options.otherArgs.headers = options.otherArgs.headers || {};
21622162
options.otherArgs.headers['x-goog-request-params'] =
21632163
this._gaxModule.routingHeader.fromParams({
2164-
parent: request.parent || '',
2164+
parent: request.parent ?? '',
21652165
});
21662166
const defaultCallSettings = this._defaults['listDeviceRegistries'];
21672167
const callSettings = defaultCallSettings.merge(options);
@@ -2276,7 +2276,7 @@ export class DeviceManagerClient {
22762276
options.otherArgs.headers = options.otherArgs.headers || {};
22772277
options.otherArgs.headers['x-goog-request-params'] =
22782278
this._gaxModule.routingHeader.fromParams({
2279-
parent: request.parent || '',
2279+
parent: request.parent ?? '',
22802280
});
22812281
this.initialize();
22822282
return this.innerApiCalls.listDevices(request, options, callback);
@@ -2333,7 +2333,7 @@ export class DeviceManagerClient {
23332333
options.otherArgs.headers = options.otherArgs.headers || {};
23342334
options.otherArgs.headers['x-goog-request-params'] =
23352335
this._gaxModule.routingHeader.fromParams({
2336-
parent: request.parent || '',
2336+
parent: request.parent ?? '',
23372337
});
23382338
const defaultCallSettings = this._defaults['listDevices'];
23392339
const callSettings = defaultCallSettings.merge(options);
@@ -2399,7 +2399,7 @@ export class DeviceManagerClient {
23992399
options.otherArgs.headers = options.otherArgs.headers || {};
24002400
options.otherArgs.headers['x-goog-request-params'] =
24012401
this._gaxModule.routingHeader.fromParams({
2402-
parent: request.parent || '',
2402+
parent: request.parent ?? '',
24032403
});
24042404
const defaultCallSettings = this._defaults['listDevices'];
24052405
const callSettings = defaultCallSettings.merge(options);

0 commit comments

Comments
 (0)