Skip to content

Commit

Permalink
fix: preserve default values in x-goog-request-params header (#979)
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] committed Sep 14, 2022
1 parent 386b9c7 commit 2b80e1e
Show file tree
Hide file tree
Showing 4 changed files with 690 additions and 663 deletions.
20 changes: 10 additions & 10 deletions src/v1/datastore_admin_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,8 @@ export class DatastoreAdminClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
index_id: request.indexId || '',
project_id: request.projectId ?? '',
index_id: request.indexId ?? '',
});
this.initialize();
return this.innerApiCalls.getIndex(request, options, callback);
Expand Down Expand Up @@ -684,7 +684,7 @@ export class DatastoreAdminClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
project_id: request.projectId ?? '',
});
this.initialize();
return this.innerApiCalls.exportEntities(request, options, callback);
Expand Down Expand Up @@ -847,7 +847,7 @@ export class DatastoreAdminClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
project_id: request.projectId ?? '',
});
this.initialize();
return this.innerApiCalls.importEntities(request, options, callback);
Expand Down Expand Up @@ -1001,7 +1001,7 @@ export class DatastoreAdminClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
project_id: request.projectId ?? '',
});
this.initialize();
return this.innerApiCalls.createIndex(request, options, callback);
Expand Down Expand Up @@ -1150,8 +1150,8 @@ export class DatastoreAdminClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
index_id: request.indexId || '',
project_id: request.projectId ?? '',
index_id: request.indexId ?? '',
});
this.initialize();
return this.innerApiCalls.deleteIndex(request, options, callback);
Expand Down Expand Up @@ -1282,7 +1282,7 @@ export class DatastoreAdminClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
project_id: request.projectId ?? '',
});
this.initialize();
return this.innerApiCalls.listIndexes(request, options, callback);
Expand Down Expand Up @@ -1322,7 +1322,7 @@ export class DatastoreAdminClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
project_id: request.projectId ?? '',
});
const defaultCallSettings = this._defaults['listIndexes'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1371,7 +1371,7 @@ export class DatastoreAdminClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
project_id: request.projectId ?? '',
});
const defaultCallSettings = this._defaults['listIndexes'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
14 changes: 7 additions & 7 deletions src/v1/datastore_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ export class DatastoreClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
project_id: request.projectId ?? '',
});
this.initialize();
return this.innerApiCalls.lookup(request, options, callback);
Expand Down Expand Up @@ -540,7 +540,7 @@ export class DatastoreClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
project_id: request.projectId ?? '',
});
this.initialize();
return this.innerApiCalls.runQuery(request, options, callback);
Expand Down Expand Up @@ -632,7 +632,7 @@ export class DatastoreClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
project_id: request.projectId ?? '',
});
this.initialize();
return this.innerApiCalls.beginTransaction(request, options, callback);
Expand Down Expand Up @@ -741,7 +741,7 @@ export class DatastoreClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
project_id: request.projectId ?? '',
});
this.initialize();
return this.innerApiCalls.commit(request, options, callback);
Expand Down Expand Up @@ -832,7 +832,7 @@ export class DatastoreClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
project_id: request.projectId ?? '',
});
this.initialize();
return this.innerApiCalls.rollback(request, options, callback);
Expand Down Expand Up @@ -924,7 +924,7 @@ export class DatastoreClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
project_id: request.projectId ?? '',
});
this.initialize();
return this.innerApiCalls.allocateIds(request, options, callback);
Expand Down Expand Up @@ -1016,7 +1016,7 @@ export class DatastoreClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
project_id: request.projectId ?? '',
});
this.initialize();
return this.innerApiCalls.reserveIds(request, options, callback);
Expand Down

0 comments on commit 2b80e1e

Please sign in to comment.