Skip to content

Commit

Permalink
fix: preserve default values in x-goog-request-params header (#573)
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: googleapis/googleapis-gen@efcd3f9
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9
  • Loading branch information
gcf-owl-bot[bot] authored Sep 14, 2022
1 parent 6654ac9 commit 3e3130e
Show file tree
Hide file tree
Showing 4 changed files with 1,573 additions and 1,471 deletions.
12 changes: 6 additions & 6 deletions packages/google-cloud-kms/src/v1/ekm_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ export class EkmServiceClient {
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.getEkmConnection(request, options, callback);
Expand Down Expand Up @@ -533,7 +533,7 @@ export class EkmServiceClient {
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.createEkmConnection(request, options, callback);
Expand Down Expand Up @@ -621,7 +621,7 @@ export class EkmServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
'ekm_connection.name': request.ekmConnection!.name || '',
'ekm_connection.name': request.ekmConnection!.name ?? '',
});
this.initialize();
return this.innerApiCalls.updateEkmConnection(request, options, callback);
Expand Down Expand Up @@ -733,7 +733,7 @@ export class EkmServiceClient {
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.listEkmConnections(request, options, callback);
Expand Down Expand Up @@ -790,7 +790,7 @@ export class EkmServiceClient {
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['listEkmConnections'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -856,7 +856,7 @@ export class EkmServiceClient {
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['listEkmConnections'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
68 changes: 34 additions & 34 deletions packages/google-cloud-kms/src/v1/key_management_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ export class KeyManagementServiceClient {
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.getKeyRing(request, options, callback);
Expand Down Expand Up @@ -566,7 +566,7 @@ export class KeyManagementServiceClient {
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.getCryptoKey(request, options, callback);
Expand Down Expand Up @@ -653,7 +653,7 @@ export class KeyManagementServiceClient {
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.getCryptoKeyVersion(request, options, callback);
Expand Down Expand Up @@ -742,7 +742,7 @@ export class KeyManagementServiceClient {
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.getPublicKey(request, options, callback);
Expand Down Expand Up @@ -826,7 +826,7 @@ export class KeyManagementServiceClient {
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.getImportJob(request, options, callback);
Expand Down Expand Up @@ -918,7 +918,7 @@ export class KeyManagementServiceClient {
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.createKeyRing(request, options, callback);
Expand Down Expand Up @@ -1022,7 +1022,7 @@ export class KeyManagementServiceClient {
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.createCryptoKey(request, options, callback);
Expand Down Expand Up @@ -1123,7 +1123,7 @@ export class KeyManagementServiceClient {
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.createCryptoKeyVersion(
Expand Down Expand Up @@ -1285,7 +1285,7 @@ export class KeyManagementServiceClient {
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.importCryptoKeyVersion(
Expand Down Expand Up @@ -1384,7 +1384,7 @@ export class KeyManagementServiceClient {
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.createImportJob(request, options, callback);
Expand Down Expand Up @@ -1469,7 +1469,7 @@ export class KeyManagementServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
'crypto_key.name': request.cryptoKey!.name || '',
'crypto_key.name': request.cryptoKey!.name ?? '',
});
this.initialize();
return this.innerApiCalls.updateCryptoKey(request, options, callback);
Expand Down Expand Up @@ -1574,7 +1574,7 @@ export class KeyManagementServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
'crypto_key_version.name': request.cryptoKeyVersion!.name || '',
'crypto_key_version.name': request.cryptoKeyVersion!.name ?? '',
});
this.initialize();
return this.innerApiCalls.updateCryptoKeyVersion(
Expand Down Expand Up @@ -1684,7 +1684,7 @@ export class KeyManagementServiceClient {
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.updateCryptoKeyPrimaryVersion(
Expand Down Expand Up @@ -1800,7 +1800,7 @@ export class KeyManagementServiceClient {
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.destroyCryptoKeyVersion(
Expand Down Expand Up @@ -1904,7 +1904,7 @@ export class KeyManagementServiceClient {
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.restoreCryptoKeyVersion(
Expand Down Expand Up @@ -2062,7 +2062,7 @@ export class KeyManagementServiceClient {
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.encrypt(request, options, callback);
Expand Down Expand Up @@ -2196,7 +2196,7 @@ export class KeyManagementServiceClient {
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.decrypt(request, options, callback);
Expand Down Expand Up @@ -2338,7 +2338,7 @@ export class KeyManagementServiceClient {
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.asymmetricSign(request, options, callback);
Expand Down Expand Up @@ -2453,7 +2453,7 @@ export class KeyManagementServiceClient {
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.asymmetricDecrypt(request, options, callback);
Expand Down Expand Up @@ -2561,7 +2561,7 @@ export class KeyManagementServiceClient {
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.macSign(request, options, callback);
Expand Down Expand Up @@ -2691,7 +2691,7 @@ export class KeyManagementServiceClient {
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.macVerify(request, options, callback);
Expand Down Expand Up @@ -2786,7 +2786,7 @@ export class KeyManagementServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
location: request.location || '',
location: request.location ?? '',
});
this.initialize();
return this.innerApiCalls.generateRandomBytes(request, options, callback);
Expand Down Expand Up @@ -2896,7 +2896,7 @@ export class KeyManagementServiceClient {
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.listKeyRings(request, options, callback);
Expand Down Expand Up @@ -2953,7 +2953,7 @@ export class KeyManagementServiceClient {
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['listKeyRings'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -3019,7 +3019,7 @@ export class KeyManagementServiceClient {
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['listKeyRings'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -3135,7 +3135,7 @@ export class KeyManagementServiceClient {
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.listCryptoKeys(request, options, callback);
Expand Down Expand Up @@ -3193,7 +3193,7 @@ export class KeyManagementServiceClient {
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['listCryptoKeys'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -3260,7 +3260,7 @@ export class KeyManagementServiceClient {
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['listCryptoKeys'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -3385,7 +3385,7 @@ export class KeyManagementServiceClient {
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.listCryptoKeyVersions(request, options, callback);
Expand Down Expand Up @@ -3444,7 +3444,7 @@ export class KeyManagementServiceClient {
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['listCryptoKeyVersions'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -3512,7 +3512,7 @@ export class KeyManagementServiceClient {
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['listCryptoKeyVersions'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -3626,7 +3626,7 @@ export class KeyManagementServiceClient {
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.listImportJobs(request, options, callback);
Expand Down Expand Up @@ -3682,7 +3682,7 @@ export class KeyManagementServiceClient {
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['listImportJobs'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -3747,7 +3747,7 @@ export class KeyManagementServiceClient {
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['listImportJobs'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
Loading

0 comments on commit 3e3130e

Please sign in to comment.