Skip to content

Commit 1ba244a

Browse files
fix: preserve default values in x-goog-request-params header (#193)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 474338479 Source-Link: googleapis/googleapis@d5d35e0 Source-Link: googleapis/googleapis-gen@efcd3f9 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9
1 parent cca6e1f commit 1ba244a

File tree

2 files changed

+409
-381
lines changed

2 files changed

+409
-381
lines changed

packages/google-cloud-bigquery-connection/src/v1/connection_service_client.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ export class ConnectionServiceClient {
436436
options.otherArgs.headers = options.otherArgs.headers || {};
437437
options.otherArgs.headers['x-goog-request-params'] =
438438
this._gaxModule.routingHeader.fromParams({
439-
parent: request.parent || '',
439+
parent: request.parent ?? '',
440440
});
441441
this.initialize();
442442
return this.innerApiCalls.createConnection(request, options, callback);
@@ -534,7 +534,7 @@ export class ConnectionServiceClient {
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.getConnection(request, options, callback);
@@ -637,7 +637,7 @@ export class ConnectionServiceClient {
637637
options.otherArgs.headers = options.otherArgs.headers || {};
638638
options.otherArgs.headers['x-goog-request-params'] =
639639
this._gaxModule.routingHeader.fromParams({
640-
name: request.name || '',
640+
name: request.name ?? '',
641641
});
642642
this.initialize();
643643
return this.innerApiCalls.updateConnection(request, options, callback);
@@ -735,7 +735,7 @@ export class ConnectionServiceClient {
735735
options.otherArgs.headers = options.otherArgs.headers || {};
736736
options.otherArgs.headers['x-goog-request-params'] =
737737
this._gaxModule.routingHeader.fromParams({
738-
name: request.name || '',
738+
name: request.name ?? '',
739739
});
740740
this.initialize();
741741
return this.innerApiCalls.deleteConnection(request, options, callback);
@@ -824,7 +824,7 @@ export class ConnectionServiceClient {
824824
options.otherArgs.headers = options.otherArgs.headers || {};
825825
options.otherArgs.headers['x-goog-request-params'] =
826826
this._gaxModule.routingHeader.fromParams({
827-
resource: request.resource || '',
827+
resource: request.resource ?? '',
828828
});
829829
this.initialize();
830830
return this.innerApiCalls.getIamPolicy(request, options, callback);
@@ -922,7 +922,7 @@ export class ConnectionServiceClient {
922922
options.otherArgs.headers = options.otherArgs.headers || {};
923923
options.otherArgs.headers['x-goog-request-params'] =
924924
this._gaxModule.routingHeader.fromParams({
925-
resource: request.resource || '',
925+
resource: request.resource ?? '',
926926
});
927927
this.initialize();
928928
return this.innerApiCalls.setIamPolicy(request, options, callback);
@@ -1017,7 +1017,7 @@ export class ConnectionServiceClient {
10171017
options.otherArgs.headers = options.otherArgs.headers || {};
10181018
options.otherArgs.headers['x-goog-request-params'] =
10191019
this._gaxModule.routingHeader.fromParams({
1020-
resource: request.resource || '',
1020+
resource: request.resource ?? '',
10211021
});
10221022
this.initialize();
10231023
return this.innerApiCalls.testIamPermissions(request, options, callback);
@@ -1117,7 +1117,7 @@ export class ConnectionServiceClient {
11171117
options.otherArgs.headers = options.otherArgs.headers || {};
11181118
options.otherArgs.headers['x-goog-request-params'] =
11191119
this._gaxModule.routingHeader.fromParams({
1120-
parent: request.parent || '',
1120+
parent: request.parent ?? '',
11211121
});
11221122
this.initialize();
11231123
return this.innerApiCalls.listConnections(request, options, callback);
@@ -1156,7 +1156,7 @@ export class ConnectionServiceClient {
11561156
options.otherArgs.headers = options.otherArgs.headers || {};
11571157
options.otherArgs.headers['x-goog-request-params'] =
11581158
this._gaxModule.routingHeader.fromParams({
1159-
parent: request.parent || '',
1159+
parent: request.parent ?? '',
11601160
});
11611161
const defaultCallSettings = this._defaults['listConnections'];
11621162
const callSettings = defaultCallSettings.merge(options);
@@ -1204,7 +1204,7 @@ export class ConnectionServiceClient {
12041204
options.otherArgs.headers = options.otherArgs.headers || {};
12051205
options.otherArgs.headers['x-goog-request-params'] =
12061206
this._gaxModule.routingHeader.fromParams({
1207-
parent: request.parent || '',
1207+
parent: request.parent ?? '',
12081208
});
12091209
const defaultCallSettings = this._defaults['listConnections'];
12101210
const callSettings = defaultCallSettings.merge(options);

0 commit comments

Comments
 (0)