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

Commit 42310b7

Browse files
fix: preserve default values in x-goog-request-params header (#97)
- [ ] 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 d636ecf commit 42310b7

4 files changed

Lines changed: 1347 additions & 1348 deletions

File tree

src/v1/tpu_client.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ export class TpuClient {
542542
options.otherArgs.headers = options.otherArgs.headers || {};
543543
options.otherArgs.headers['x-goog-request-params'] =
544544
this._gaxModule.routingHeader.fromParams({
545-
name: request.name || '',
545+
name: request.name ?? '',
546546
});
547547
this.initialize();
548548
return this.innerApiCalls.getNode(request, options, callback);
@@ -633,7 +633,7 @@ export class TpuClient {
633633
options.otherArgs.headers = options.otherArgs.headers || {};
634634
options.otherArgs.headers['x-goog-request-params'] =
635635
this._gaxModule.routingHeader.fromParams({
636-
name: request.name || '',
636+
name: request.name ?? '',
637637
});
638638
this.initialize();
639639
return this.innerApiCalls.getTensorFlowVersion(request, options, callback);
@@ -718,7 +718,7 @@ export class TpuClient {
718718
options.otherArgs.headers = options.otherArgs.headers || {};
719719
options.otherArgs.headers['x-goog-request-params'] =
720720
this._gaxModule.routingHeader.fromParams({
721-
name: request.name || '',
721+
name: request.name ?? '',
722722
});
723723
this.initialize();
724724
return this.innerApiCalls.getAcceleratorType(request, options, callback);
@@ -826,7 +826,7 @@ export class TpuClient {
826826
options.otherArgs.headers = options.otherArgs.headers || {};
827827
options.otherArgs.headers['x-goog-request-params'] =
828828
this._gaxModule.routingHeader.fromParams({
829-
parent: request.parent || '',
829+
parent: request.parent ?? '',
830830
});
831831
this.initialize();
832832
return this.innerApiCalls.createNode(request, options, callback);
@@ -964,7 +964,7 @@ export class TpuClient {
964964
options.otherArgs.headers = options.otherArgs.headers || {};
965965
options.otherArgs.headers['x-goog-request-params'] =
966966
this._gaxModule.routingHeader.fromParams({
967-
name: request.name || '',
967+
name: request.name ?? '',
968968
});
969969
this.initialize();
970970
return this.innerApiCalls.deleteNode(request, options, callback);
@@ -1104,7 +1104,7 @@ export class TpuClient {
11041104
options.otherArgs.headers = options.otherArgs.headers || {};
11051105
options.otherArgs.headers['x-goog-request-params'] =
11061106
this._gaxModule.routingHeader.fromParams({
1107-
name: request.name || '',
1107+
name: request.name ?? '',
11081108
});
11091109
this.initialize();
11101110
return this.innerApiCalls.reimageNode(request, options, callback);
@@ -1242,7 +1242,7 @@ export class TpuClient {
12421242
options.otherArgs.headers = options.otherArgs.headers || {};
12431243
options.otherArgs.headers['x-goog-request-params'] =
12441244
this._gaxModule.routingHeader.fromParams({
1245-
name: request.name || '',
1245+
name: request.name ?? '',
12461246
});
12471247
this.initialize();
12481248
return this.innerApiCalls.stopNode(request, options, callback);
@@ -1380,7 +1380,7 @@ export class TpuClient {
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.startNode(request, options, callback);
@@ -1505,7 +1505,7 @@ export class TpuClient {
15051505
options.otherArgs.headers = options.otherArgs.headers || {};
15061506
options.otherArgs.headers['x-goog-request-params'] =
15071507
this._gaxModule.routingHeader.fromParams({
1508-
parent: request.parent || '',
1508+
parent: request.parent ?? '',
15091509
});
15101510
this.initialize();
15111511
return this.innerApiCalls.listNodes(request, options, callback);
@@ -1543,7 +1543,7 @@ export class TpuClient {
15431543
options.otherArgs.headers = options.otherArgs.headers || {};
15441544
options.otherArgs.headers['x-goog-request-params'] =
15451545
this._gaxModule.routingHeader.fromParams({
1546-
parent: request.parent || '',
1546+
parent: request.parent ?? '',
15471547
});
15481548
const defaultCallSettings = this._defaults['listNodes'];
15491549
const callSettings = defaultCallSettings.merge(options);
@@ -1590,7 +1590,7 @@ export class TpuClient {
15901590
options.otherArgs.headers = options.otherArgs.headers || {};
15911591
options.otherArgs.headers['x-goog-request-params'] =
15921592
this._gaxModule.routingHeader.fromParams({
1593-
parent: request.parent || '',
1593+
parent: request.parent ?? '',
15941594
});
15951595
const defaultCallSettings = this._defaults['listNodes'];
15961596
const callSettings = defaultCallSettings.merge(options);
@@ -1698,7 +1698,7 @@ export class TpuClient {
16981698
options.otherArgs.headers = options.otherArgs.headers || {};
16991699
options.otherArgs.headers['x-goog-request-params'] =
17001700
this._gaxModule.routingHeader.fromParams({
1701-
parent: request.parent || '',
1701+
parent: request.parent ?? '',
17021702
});
17031703
this.initialize();
17041704
return this.innerApiCalls.listTensorFlowVersions(
@@ -1744,7 +1744,7 @@ export class TpuClient {
17441744
options.otherArgs.headers = options.otherArgs.headers || {};
17451745
options.otherArgs.headers['x-goog-request-params'] =
17461746
this._gaxModule.routingHeader.fromParams({
1747-
parent: request.parent || '',
1747+
parent: request.parent ?? '',
17481748
});
17491749
const defaultCallSettings = this._defaults['listTensorFlowVersions'];
17501750
const callSettings = defaultCallSettings.merge(options);
@@ -1795,7 +1795,7 @@ export class TpuClient {
17951795
options.otherArgs.headers = options.otherArgs.headers || {};
17961796
options.otherArgs.headers['x-goog-request-params'] =
17971797
this._gaxModule.routingHeader.fromParams({
1798-
parent: request.parent || '',
1798+
parent: request.parent ?? '',
17991799
});
18001800
const defaultCallSettings = this._defaults['listTensorFlowVersions'];
18011801
const callSettings = defaultCallSettings.merge(options);
@@ -1903,7 +1903,7 @@ export class TpuClient {
19031903
options.otherArgs.headers = options.otherArgs.headers || {};
19041904
options.otherArgs.headers['x-goog-request-params'] =
19051905
this._gaxModule.routingHeader.fromParams({
1906-
parent: request.parent || '',
1906+
parent: request.parent ?? '',
19071907
});
19081908
this.initialize();
19091909
return this.innerApiCalls.listAcceleratorTypes(request, options, callback);
@@ -1945,7 +1945,7 @@ export class TpuClient {
19451945
options.otherArgs.headers = options.otherArgs.headers || {};
19461946
options.otherArgs.headers['x-goog-request-params'] =
19471947
this._gaxModule.routingHeader.fromParams({
1948-
parent: request.parent || '',
1948+
parent: request.parent ?? '',
19491949
});
19501950
const defaultCallSettings = this._defaults['listAcceleratorTypes'];
19511951
const callSettings = defaultCallSettings.merge(options);
@@ -1996,7 +1996,7 @@ export class TpuClient {
19961996
options.otherArgs.headers = options.otherArgs.headers || {};
19971997
options.otherArgs.headers['x-goog-request-params'] =
19981998
this._gaxModule.routingHeader.fromParams({
1999-
parent: request.parent || '',
1999+
parent: request.parent ?? '',
20002000
});
20012001
const defaultCallSettings = this._defaults['listAcceleratorTypes'];
20022002
const callSettings = defaultCallSettings.merge(options);

src/v2alpha1/tpu_client.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ export class TpuClient {
567567
options.otherArgs.headers = options.otherArgs.headers || {};
568568
options.otherArgs.headers['x-goog-request-params'] =
569569
this._gaxModule.routingHeader.fromParams({
570-
name: request.name || '',
570+
name: request.name ?? '',
571571
});
572572
this.initialize();
573573
return this.innerApiCalls.getNode(request, options, callback);
@@ -664,7 +664,7 @@ export class TpuClient {
664664
options.otherArgs.headers = options.otherArgs.headers || {};
665665
options.otherArgs.headers['x-goog-request-params'] =
666666
this._gaxModule.routingHeader.fromParams({
667-
parent: request.parent || '',
667+
parent: request.parent ?? '',
668668
});
669669
this.initialize();
670670
return this.innerApiCalls.generateServiceIdentity(
@@ -759,7 +759,7 @@ export class TpuClient {
759759
options.otherArgs.headers = options.otherArgs.headers || {};
760760
options.otherArgs.headers['x-goog-request-params'] =
761761
this._gaxModule.routingHeader.fromParams({
762-
name: request.name || '',
762+
name: request.name ?? '',
763763
});
764764
this.initialize();
765765
return this.innerApiCalls.getAcceleratorType(request, options, callback);
@@ -850,7 +850,7 @@ export class TpuClient {
850850
options.otherArgs.headers = options.otherArgs.headers || {};
851851
options.otherArgs.headers['x-goog-request-params'] =
852852
this._gaxModule.routingHeader.fromParams({
853-
name: request.name || '',
853+
name: request.name ?? '',
854854
});
855855
this.initialize();
856856
return this.innerApiCalls.getRuntimeVersion(request, options, callback);
@@ -946,7 +946,7 @@ export class TpuClient {
946946
options.otherArgs.headers = options.otherArgs.headers || {};
947947
options.otherArgs.headers['x-goog-request-params'] =
948948
this._gaxModule.routingHeader.fromParams({
949-
name: request.name || '',
949+
name: request.name ?? '',
950950
});
951951
this.initialize();
952952
return this.innerApiCalls.getGuestAttributes(request, options, callback);
@@ -1054,7 +1054,7 @@ export class TpuClient {
10541054
options.otherArgs.headers = options.otherArgs.headers || {};
10551055
options.otherArgs.headers['x-goog-request-params'] =
10561056
this._gaxModule.routingHeader.fromParams({
1057-
parent: request.parent || '',
1057+
parent: request.parent ?? '',
10581058
});
10591059
this.initialize();
10601060
return this.innerApiCalls.createNode(request, options, callback);
@@ -1192,7 +1192,7 @@ export class TpuClient {
11921192
options.otherArgs.headers = options.otherArgs.headers || {};
11931193
options.otherArgs.headers['x-goog-request-params'] =
11941194
this._gaxModule.routingHeader.fromParams({
1195-
name: request.name || '',
1195+
name: request.name ?? '',
11961196
});
11971197
this.initialize();
11981198
return this.innerApiCalls.deleteNode(request, options, callback);
@@ -1330,7 +1330,7 @@ export class TpuClient {
13301330
options.otherArgs.headers = options.otherArgs.headers || {};
13311331
options.otherArgs.headers['x-goog-request-params'] =
13321332
this._gaxModule.routingHeader.fromParams({
1333-
name: request.name || '',
1333+
name: request.name ?? '',
13341334
});
13351335
this.initialize();
13361336
return this.innerApiCalls.stopNode(request, options, callback);
@@ -1468,7 +1468,7 @@ export class TpuClient {
14681468
options.otherArgs.headers = options.otherArgs.headers || {};
14691469
options.otherArgs.headers['x-goog-request-params'] =
14701470
this._gaxModule.routingHeader.fromParams({
1471-
name: request.name || '',
1471+
name: request.name ?? '',
14721472
});
14731473
this.initialize();
14741474
return this.innerApiCalls.startNode(request, options, callback);
@@ -1609,7 +1609,7 @@ export class TpuClient {
16091609
options.otherArgs.headers = options.otherArgs.headers || {};
16101610
options.otherArgs.headers['x-goog-request-params'] =
16111611
this._gaxModule.routingHeader.fromParams({
1612-
'node.name': request.node!.name || '',
1612+
'node.name': request.node!.name ?? '',
16131613
});
16141614
this.initialize();
16151615
return this.innerApiCalls.updateNode(request, options, callback);
@@ -1736,7 +1736,7 @@ export class TpuClient {
17361736
options.otherArgs.headers = options.otherArgs.headers || {};
17371737
options.otherArgs.headers['x-goog-request-params'] =
17381738
this._gaxModule.routingHeader.fromParams({
1739-
parent: request.parent || '',
1739+
parent: request.parent ?? '',
17401740
});
17411741
this.initialize();
17421742
return this.innerApiCalls.listNodes(request, options, callback);
@@ -1774,7 +1774,7 @@ export class TpuClient {
17741774
options.otherArgs.headers = options.otherArgs.headers || {};
17751775
options.otherArgs.headers['x-goog-request-params'] =
17761776
this._gaxModule.routingHeader.fromParams({
1777-
parent: request.parent || '',
1777+
parent: request.parent ?? '',
17781778
});
17791779
const defaultCallSettings = this._defaults['listNodes'];
17801780
const callSettings = defaultCallSettings.merge(options);
@@ -1821,7 +1821,7 @@ export class TpuClient {
18211821
options.otherArgs.headers = options.otherArgs.headers || {};
18221822
options.otherArgs.headers['x-goog-request-params'] =
18231823
this._gaxModule.routingHeader.fromParams({
1824-
parent: request.parent || '',
1824+
parent: request.parent ?? '',
18251825
});
18261826
const defaultCallSettings = this._defaults['listNodes'];
18271827
const callSettings = defaultCallSettings.merge(options);
@@ -1929,7 +1929,7 @@ export class TpuClient {
19291929
options.otherArgs.headers = options.otherArgs.headers || {};
19301930
options.otherArgs.headers['x-goog-request-params'] =
19311931
this._gaxModule.routingHeader.fromParams({
1932-
parent: request.parent || '',
1932+
parent: request.parent ?? '',
19331933
});
19341934
this.initialize();
19351935
return this.innerApiCalls.listAcceleratorTypes(request, options, callback);
@@ -1971,7 +1971,7 @@ export class TpuClient {
19711971
options.otherArgs.headers = options.otherArgs.headers || {};
19721972
options.otherArgs.headers['x-goog-request-params'] =
19731973
this._gaxModule.routingHeader.fromParams({
1974-
parent: request.parent || '',
1974+
parent: request.parent ?? '',
19751975
});
19761976
const defaultCallSettings = this._defaults['listAcceleratorTypes'];
19771977
const callSettings = defaultCallSettings.merge(options);
@@ -2022,7 +2022,7 @@ export class TpuClient {
20222022
options.otherArgs.headers = options.otherArgs.headers || {};
20232023
options.otherArgs.headers['x-goog-request-params'] =
20242024
this._gaxModule.routingHeader.fromParams({
2025-
parent: request.parent || '',
2025+
parent: request.parent ?? '',
20262026
});
20272027
const defaultCallSettings = this._defaults['listAcceleratorTypes'];
20282028
const callSettings = defaultCallSettings.merge(options);
@@ -2130,7 +2130,7 @@ export class TpuClient {
21302130
options.otherArgs.headers = options.otherArgs.headers || {};
21312131
options.otherArgs.headers['x-goog-request-params'] =
21322132
this._gaxModule.routingHeader.fromParams({
2133-
parent: request.parent || '',
2133+
parent: request.parent ?? '',
21342134
});
21352135
this.initialize();
21362136
return this.innerApiCalls.listRuntimeVersions(request, options, callback);
@@ -2172,7 +2172,7 @@ export class TpuClient {
21722172
options.otherArgs.headers = options.otherArgs.headers || {};
21732173
options.otherArgs.headers['x-goog-request-params'] =
21742174
this._gaxModule.routingHeader.fromParams({
2175-
parent: request.parent || '',
2175+
parent: request.parent ?? '',
21762176
});
21772177
const defaultCallSettings = this._defaults['listRuntimeVersions'];
21782178
const callSettings = defaultCallSettings.merge(options);
@@ -2223,7 +2223,7 @@ export class TpuClient {
22232223
options.otherArgs.headers = options.otherArgs.headers || {};
22242224
options.otherArgs.headers['x-goog-request-params'] =
22252225
this._gaxModule.routingHeader.fromParams({
2226-
parent: request.parent || '',
2226+
parent: request.parent ?? '',
22272227
});
22282228
const defaultCallSettings = this._defaults['listRuntimeVersions'];
22292229
const callSettings = defaultCallSettings.merge(options);

0 commit comments

Comments
 (0)