Skip to content

Commit b0032de

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

File tree

4 files changed

+2950
-2702
lines changed

4 files changed

+2950
-2702
lines changed

packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts

+39-39
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ export class CertificateAuthorityServiceClient {
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.createCertificate(request, options, callback);
@@ -923,7 +923,7 @@ export class CertificateAuthorityServiceClient {
923923
options.otherArgs.headers = options.otherArgs.headers || {};
924924
options.otherArgs.headers['x-goog-request-params'] =
925925
this._gaxModule.routingHeader.fromParams({
926-
name: request.name || '',
926+
name: request.name ?? '',
927927
});
928928
this.initialize();
929929
return this.innerApiCalls.getCertificate(request, options, callback);
@@ -1038,7 +1038,7 @@ export class CertificateAuthorityServiceClient {
10381038
options.otherArgs.headers = options.otherArgs.headers || {};
10391039
options.otherArgs.headers['x-goog-request-params'] =
10401040
this._gaxModule.routingHeader.fromParams({
1041-
name: request.name || '',
1041+
name: request.name ?? '',
10421042
});
10431043
this.initialize();
10441044
return this.innerApiCalls.revokeCertificate(request, options, callback);
@@ -1152,7 +1152,7 @@ export class CertificateAuthorityServiceClient {
11521152
options.otherArgs.headers = options.otherArgs.headers || {};
11531153
options.otherArgs.headers['x-goog-request-params'] =
11541154
this._gaxModule.routingHeader.fromParams({
1155-
'certificate.name': request.certificate!.name || '',
1155+
'certificate.name': request.certificate!.name ?? '',
11561156
});
11571157
this.initialize();
11581158
return this.innerApiCalls.updateCertificate(request, options, callback);
@@ -1256,7 +1256,7 @@ export class CertificateAuthorityServiceClient {
12561256
options.otherArgs.headers = options.otherArgs.headers || {};
12571257
options.otherArgs.headers['x-goog-request-params'] =
12581258
this._gaxModule.routingHeader.fromParams({
1259-
name: request.name || '',
1259+
name: request.name ?? '',
12601260
});
12611261
this.initialize();
12621262
return this.innerApiCalls.fetchCertificateAuthorityCsr(
@@ -1358,7 +1358,7 @@ export class CertificateAuthorityServiceClient {
13581358
options.otherArgs.headers = options.otherArgs.headers || {};
13591359
options.otherArgs.headers['x-goog-request-params'] =
13601360
this._gaxModule.routingHeader.fromParams({
1361-
name: request.name || '',
1361+
name: request.name ?? '',
13621362
});
13631363
this.initialize();
13641364
return this.innerApiCalls.getCertificateAuthority(
@@ -1453,7 +1453,7 @@ export class CertificateAuthorityServiceClient {
14531453
options.otherArgs.headers = options.otherArgs.headers || {};
14541454
options.otherArgs.headers['x-goog-request-params'] =
14551455
this._gaxModule.routingHeader.fromParams({
1456-
name: request.name || '',
1456+
name: request.name ?? '',
14571457
});
14581458
this.initialize();
14591459
return this.innerApiCalls.getCaPool(request, options, callback);
@@ -1567,7 +1567,7 @@ export class CertificateAuthorityServiceClient {
15671567
options.otherArgs.headers = options.otherArgs.headers || {};
15681568
options.otherArgs.headers['x-goog-request-params'] =
15691569
this._gaxModule.routingHeader.fromParams({
1570-
ca_pool: request.caPool || '',
1570+
ca_pool: request.caPool ?? '',
15711571
});
15721572
this.initialize();
15731573
return this.innerApiCalls.fetchCaCerts(request, options, callback);
@@ -1665,7 +1665,7 @@ export class CertificateAuthorityServiceClient {
16651665
options.otherArgs.headers = options.otherArgs.headers || {};
16661666
options.otherArgs.headers['x-goog-request-params'] =
16671667
this._gaxModule.routingHeader.fromParams({
1668-
name: request.name || '',
1668+
name: request.name ?? '',
16691669
});
16701670
this.initialize();
16711671
return this.innerApiCalls.getCertificateRevocationList(
@@ -1767,7 +1767,7 @@ export class CertificateAuthorityServiceClient {
17671767
options.otherArgs.headers = options.otherArgs.headers || {};
17681768
options.otherArgs.headers['x-goog-request-params'] =
17691769
this._gaxModule.routingHeader.fromParams({
1770-
name: request.name || '',
1770+
name: request.name ?? '',
17711771
});
17721772
this.initialize();
17731773
return this.innerApiCalls.getCertificateTemplate(
@@ -1901,7 +1901,7 @@ export class CertificateAuthorityServiceClient {
19011901
options.otherArgs.headers = options.otherArgs.headers || {};
19021902
options.otherArgs.headers['x-goog-request-params'] =
19031903
this._gaxModule.routingHeader.fromParams({
1904-
name: request.name || '',
1904+
name: request.name ?? '',
19051905
});
19061906
this.initialize();
19071907
return this.innerApiCalls.activateCertificateAuthority(
@@ -2064,7 +2064,7 @@ export class CertificateAuthorityServiceClient {
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.createCertificateAuthority(
@@ -2221,7 +2221,7 @@ export class CertificateAuthorityServiceClient {
22212221
options.otherArgs.headers = options.otherArgs.headers || {};
22222222
options.otherArgs.headers['x-goog-request-params'] =
22232223
this._gaxModule.routingHeader.fromParams({
2224-
name: request.name || '',
2224+
name: request.name ?? '',
22252225
});
22262226
this.initialize();
22272227
return this.innerApiCalls.disableCertificateAuthority(
@@ -2378,7 +2378,7 @@ export class CertificateAuthorityServiceClient {
23782378
options.otherArgs.headers = options.otherArgs.headers || {};
23792379
options.otherArgs.headers['x-goog-request-params'] =
23802380
this._gaxModule.routingHeader.fromParams({
2381-
name: request.name || '',
2381+
name: request.name ?? '',
23822382
});
23832383
this.initialize();
23842384
return this.innerApiCalls.enableCertificateAuthority(
@@ -2535,7 +2535,7 @@ export class CertificateAuthorityServiceClient {
25352535
options.otherArgs.headers = options.otherArgs.headers || {};
25362536
options.otherArgs.headers['x-goog-request-params'] =
25372537
this._gaxModule.routingHeader.fromParams({
2538-
name: request.name || '',
2538+
name: request.name ?? '',
25392539
});
25402540
this.initialize();
25412541
return this.innerApiCalls.undeleteCertificateAuthority(
@@ -2699,7 +2699,7 @@ export class CertificateAuthorityServiceClient {
26992699
options.otherArgs.headers = options.otherArgs.headers || {};
27002700
options.otherArgs.headers['x-goog-request-params'] =
27012701
this._gaxModule.routingHeader.fromParams({
2702-
name: request.name || '',
2702+
name: request.name ?? '',
27032703
});
27042704
this.initialize();
27052705
return this.innerApiCalls.deleteCertificateAuthority(
@@ -2857,7 +2857,7 @@ export class CertificateAuthorityServiceClient {
28572857
options.otherArgs.headers = options.otherArgs.headers || {};
28582858
options.otherArgs.headers['x-goog-request-params'] =
28592859
this._gaxModule.routingHeader.fromParams({
2860-
'certificate_authority.name': request.certificateAuthority!.name || '',
2860+
'certificate_authority.name': request.certificateAuthority!.name ?? '',
28612861
});
28622862
this.initialize();
28632863
return this.innerApiCalls.updateCertificateAuthority(
@@ -3019,7 +3019,7 @@ export class CertificateAuthorityServiceClient {
30193019
options.otherArgs.headers = options.otherArgs.headers || {};
30203020
options.otherArgs.headers['x-goog-request-params'] =
30213021
this._gaxModule.routingHeader.fromParams({
3022-
parent: request.parent || '',
3022+
parent: request.parent ?? '',
30233023
});
30243024
this.initialize();
30253025
return this.innerApiCalls.createCaPool(request, options, callback);
@@ -3173,7 +3173,7 @@ export class CertificateAuthorityServiceClient {
31733173
options.otherArgs.headers = options.otherArgs.headers || {};
31743174
options.otherArgs.headers['x-goog-request-params'] =
31753175
this._gaxModule.routingHeader.fromParams({
3176-
'ca_pool.name': request.caPool!.name || '',
3176+
'ca_pool.name': request.caPool!.name ?? '',
31773177
});
31783178
this.initialize();
31793179
return this.innerApiCalls.updateCaPool(request, options, callback);
@@ -3326,7 +3326,7 @@ export class CertificateAuthorityServiceClient {
33263326
options.otherArgs.headers = options.otherArgs.headers || {};
33273327
options.otherArgs.headers['x-goog-request-params'] =
33283328
this._gaxModule.routingHeader.fromParams({
3329-
name: request.name || '',
3329+
name: request.name ?? '',
33303330
});
33313331
this.initialize();
33323332
return this.innerApiCalls.deleteCaPool(request, options, callback);
@@ -3481,7 +3481,7 @@ export class CertificateAuthorityServiceClient {
34813481
options.otherArgs.headers['x-goog-request-params'] =
34823482
this._gaxModule.routingHeader.fromParams({
34833483
'certificate_revocation_list.name':
3484-
request.certificateRevocationList!.name || '',
3484+
request.certificateRevocationList!.name ?? '',
34853485
});
34863486
this.initialize();
34873487
return this.innerApiCalls.updateCertificateRevocationList(
@@ -3644,7 +3644,7 @@ export class CertificateAuthorityServiceClient {
36443644
options.otherArgs.headers = options.otherArgs.headers || {};
36453645
options.otherArgs.headers['x-goog-request-params'] =
36463646
this._gaxModule.routingHeader.fromParams({
3647-
parent: request.parent || '',
3647+
parent: request.parent ?? '',
36483648
});
36493649
this.initialize();
36503650
return this.innerApiCalls.createCertificateTemplate(
@@ -3801,7 +3801,7 @@ export class CertificateAuthorityServiceClient {
38013801
options.otherArgs.headers = options.otherArgs.headers || {};
38023802
options.otherArgs.headers['x-goog-request-params'] =
38033803
this._gaxModule.routingHeader.fromParams({
3804-
name: request.name || '',
3804+
name: request.name ?? '',
38053805
});
38063806
this.initialize();
38073807
return this.innerApiCalls.deleteCertificateTemplate(
@@ -3959,7 +3959,7 @@ export class CertificateAuthorityServiceClient {
39593959
options.otherArgs.headers = options.otherArgs.headers || {};
39603960
options.otherArgs.headers['x-goog-request-params'] =
39613961
this._gaxModule.routingHeader.fromParams({
3962-
'certificate_template.name': request.certificateTemplate!.name || '',
3962+
'certificate_template.name': request.certificateTemplate!.name ?? '',
39633963
});
39643964
this.initialize();
39653965
return this.innerApiCalls.updateCertificateTemplate(
@@ -4112,7 +4112,7 @@ export class CertificateAuthorityServiceClient {
41124112
options.otherArgs.headers = options.otherArgs.headers || {};
41134113
options.otherArgs.headers['x-goog-request-params'] =
41144114
this._gaxModule.routingHeader.fromParams({
4115-
parent: request.parent || '',
4115+
parent: request.parent ?? '',
41164116
});
41174117
this.initialize();
41184118
return this.innerApiCalls.listCertificates(request, options, callback);
@@ -4166,7 +4166,7 @@ export class CertificateAuthorityServiceClient {
41664166
options.otherArgs.headers = options.otherArgs.headers || {};
41674167
options.otherArgs.headers['x-goog-request-params'] =
41684168
this._gaxModule.routingHeader.fromParams({
4169-
parent: request.parent || '',
4169+
parent: request.parent ?? '',
41704170
});
41714171
const defaultCallSettings = this._defaults['listCertificates'];
41724172
const callSettings = defaultCallSettings.merge(options);
@@ -4229,7 +4229,7 @@ export class CertificateAuthorityServiceClient {
42294229
options.otherArgs.headers = options.otherArgs.headers || {};
42304230
options.otherArgs.headers['x-goog-request-params'] =
42314231
this._gaxModule.routingHeader.fromParams({
4232-
parent: request.parent || '',
4232+
parent: request.parent ?? '',
42334233
});
42344234
const defaultCallSettings = this._defaults['listCertificates'];
42354235
const callSettings = defaultCallSettings.merge(options);
@@ -4345,7 +4345,7 @@ export class CertificateAuthorityServiceClient {
43454345
options.otherArgs.headers = options.otherArgs.headers || {};
43464346
options.otherArgs.headers['x-goog-request-params'] =
43474347
this._gaxModule.routingHeader.fromParams({
4348-
parent: request.parent || '',
4348+
parent: request.parent ?? '',
43494349
});
43504350
this.initialize();
43514351
return this.innerApiCalls.listCertificateAuthorities(
@@ -4399,7 +4399,7 @@ export class CertificateAuthorityServiceClient {
43994399
options.otherArgs.headers = options.otherArgs.headers || {};
44004400
options.otherArgs.headers['x-goog-request-params'] =
44014401
this._gaxModule.routingHeader.fromParams({
4402-
parent: request.parent || '',
4402+
parent: request.parent ?? '',
44034403
});
44044404
const defaultCallSettings = this._defaults['listCertificateAuthorities'];
44054405
const callSettings = defaultCallSettings.merge(options);
@@ -4458,7 +4458,7 @@ export class CertificateAuthorityServiceClient {
44584458
options.otherArgs.headers = options.otherArgs.headers || {};
44594459
options.otherArgs.headers['x-goog-request-params'] =
44604460
this._gaxModule.routingHeader.fromParams({
4461-
parent: request.parent || '',
4461+
parent: request.parent ?? '',
44624462
});
44634463
const defaultCallSettings = this._defaults['listCertificateAuthorities'];
44644464
const callSettings = defaultCallSettings.merge(options);
@@ -4574,7 +4574,7 @@ export class CertificateAuthorityServiceClient {
45744574
options.otherArgs.headers = options.otherArgs.headers || {};
45754575
options.otherArgs.headers['x-goog-request-params'] =
45764576
this._gaxModule.routingHeader.fromParams({
4577-
parent: request.parent || '',
4577+
parent: request.parent ?? '',
45784578
});
45794579
this.initialize();
45804580
return this.innerApiCalls.listCaPools(request, options, callback);
@@ -4624,7 +4624,7 @@ export class CertificateAuthorityServiceClient {
46244624
options.otherArgs.headers = options.otherArgs.headers || {};
46254625
options.otherArgs.headers['x-goog-request-params'] =
46264626
this._gaxModule.routingHeader.fromParams({
4627-
parent: request.parent || '',
4627+
parent: request.parent ?? '',
46284628
});
46294629
const defaultCallSettings = this._defaults['listCaPools'];
46304630
const callSettings = defaultCallSettings.merge(options);
@@ -4683,7 +4683,7 @@ export class CertificateAuthorityServiceClient {
46834683
options.otherArgs.headers = options.otherArgs.headers || {};
46844684
options.otherArgs.headers['x-goog-request-params'] =
46854685
this._gaxModule.routingHeader.fromParams({
4686-
parent: request.parent || '',
4686+
parent: request.parent ?? '',
46874687
});
46884688
const defaultCallSettings = this._defaults['listCaPools'];
46894689
const callSettings = defaultCallSettings.merge(options);
@@ -4799,7 +4799,7 @@ export class CertificateAuthorityServiceClient {
47994799
options.otherArgs.headers = options.otherArgs.headers || {};
48004800
options.otherArgs.headers['x-goog-request-params'] =
48014801
this._gaxModule.routingHeader.fromParams({
4802-
parent: request.parent || '',
4802+
parent: request.parent ?? '',
48034803
});
48044804
this.initialize();
48054805
return this.innerApiCalls.listCertificateRevocationLists(
@@ -4853,7 +4853,7 @@ export class CertificateAuthorityServiceClient {
48534853
options.otherArgs.headers = options.otherArgs.headers || {};
48544854
options.otherArgs.headers['x-goog-request-params'] =
48554855
this._gaxModule.routingHeader.fromParams({
4856-
parent: request.parent || '',
4856+
parent: request.parent ?? '',
48574857
});
48584858
const defaultCallSettings =
48594859
this._defaults['listCertificateRevocationLists'];
@@ -4913,7 +4913,7 @@ export class CertificateAuthorityServiceClient {
49134913
options.otherArgs.headers = options.otherArgs.headers || {};
49144914
options.otherArgs.headers['x-goog-request-params'] =
49154915
this._gaxModule.routingHeader.fromParams({
4916-
parent: request.parent || '',
4916+
parent: request.parent ?? '',
49174917
});
49184918
const defaultCallSettings =
49194919
this._defaults['listCertificateRevocationLists'];
@@ -5030,7 +5030,7 @@ export class CertificateAuthorityServiceClient {
50305030
options.otherArgs.headers = options.otherArgs.headers || {};
50315031
options.otherArgs.headers['x-goog-request-params'] =
50325032
this._gaxModule.routingHeader.fromParams({
5033-
parent: request.parent || '',
5033+
parent: request.parent ?? '',
50345034
});
50355035
this.initialize();
50365036
return this.innerApiCalls.listCertificateTemplates(
@@ -5084,7 +5084,7 @@ export class CertificateAuthorityServiceClient {
50845084
options.otherArgs.headers = options.otherArgs.headers || {};
50855085
options.otherArgs.headers['x-goog-request-params'] =
50865086
this._gaxModule.routingHeader.fromParams({
5087-
parent: request.parent || '',
5087+
parent: request.parent ?? '',
50885088
});
50895089
const defaultCallSettings = this._defaults['listCertificateTemplates'];
50905090
const callSettings = defaultCallSettings.merge(options);
@@ -5143,7 +5143,7 @@ export class CertificateAuthorityServiceClient {
51435143
options.otherArgs.headers = options.otherArgs.headers || {};
51445144
options.otherArgs.headers['x-goog-request-params'] =
51455145
this._gaxModule.routingHeader.fromParams({
5146-
parent: request.parent || '',
5146+
parent: request.parent ?? '',
51475147
});
51485148
const defaultCallSettings = this._defaults['listCertificateTemplates'];
51495149
const callSettings = defaultCallSettings.merge(options);

0 commit comments

Comments
 (0)