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

Commit

Permalink
fix: preserve default values in x-goog-request-params header (#357)
Browse files Browse the repository at this point in the history
* chore: use gapic-generator-typescript v2.17.0

PiperOrigin-RevId: 474338479

Source-Link: googleapis/googleapis@d5d35e0

Source-Link: googleapis/googleapis-gen@efcd3f9
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* test: use fully qualified request type name in tests

PiperOrigin-RevId: 475685359

Source-Link: googleapis/googleapis@7a12973

Source-Link: googleapis/googleapis-gen@370c729
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzcwYzcyOWUyYmEwNjJhMTY3NDQ5YzI3ODgyYmE1ZjM3OWM1YzM0ZCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Sep 22, 2022
1 parent b465fd2 commit 17f61ed
Show file tree
Hide file tree
Showing 8 changed files with 2,310 additions and 2,058 deletions.
46 changes: 23 additions & 23 deletions src/v1/document_processor_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ export class DocumentProcessorServiceClient {
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.processDocument(request, options, callback);
Expand Down Expand Up @@ -741,7 +741,7 @@ export class DocumentProcessorServiceClient {
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.fetchProcessorTypes(request, options, callback);
Expand Down Expand Up @@ -826,7 +826,7 @@ export class DocumentProcessorServiceClient {
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.getProcessor(request, options, callback);
Expand Down Expand Up @@ -917,7 +917,7 @@ export class DocumentProcessorServiceClient {
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.getProcessorVersion(request, options, callback);
Expand Down Expand Up @@ -1013,7 +1013,7 @@ export class DocumentProcessorServiceClient {
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.createProcessor(request, options, callback);
Expand Down Expand Up @@ -1129,7 +1129,7 @@ export class DocumentProcessorServiceClient {
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.batchProcessDocuments(request, options, callback);
Expand Down Expand Up @@ -1268,7 +1268,7 @@ export class DocumentProcessorServiceClient {
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.deleteProcessorVersion(
Expand Down Expand Up @@ -1410,7 +1410,7 @@ export class DocumentProcessorServiceClient {
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.deployProcessorVersion(
Expand Down Expand Up @@ -1552,7 +1552,7 @@ export class DocumentProcessorServiceClient {
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.undeployProcessorVersion(
Expand Down Expand Up @@ -1695,7 +1695,7 @@ export class DocumentProcessorServiceClient {
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.deleteProcessor(request, options, callback);
Expand Down Expand Up @@ -1833,7 +1833,7 @@ export class DocumentProcessorServiceClient {
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.enableProcessor(request, options, callback);
Expand Down Expand Up @@ -1971,7 +1971,7 @@ export class DocumentProcessorServiceClient {
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.disableProcessor(request, options, callback);
Expand Down Expand Up @@ -2115,7 +2115,7 @@ export class DocumentProcessorServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
processor: request.processor || '',
processor: request.processor ?? '',
});
this.initialize();
return this.innerApiCalls.setDefaultProcessorVersion(
Expand Down Expand Up @@ -2267,7 +2267,7 @@ export class DocumentProcessorServiceClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
human_review_config: request.humanReviewConfig || '',
human_review_config: request.humanReviewConfig ?? '',
});
this.initialize();
return this.innerApiCalls.reviewDocument(request, options, callback);
Expand Down Expand Up @@ -2404,7 +2404,7 @@ export class DocumentProcessorServiceClient {
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.listProcessorTypes(request, options, callback);
Expand Down Expand Up @@ -2446,7 +2446,7 @@ export class DocumentProcessorServiceClient {
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['listProcessorTypes'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2497,7 +2497,7 @@ export class DocumentProcessorServiceClient {
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['listProcessorTypes'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2605,7 +2605,7 @@ export class DocumentProcessorServiceClient {
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.listProcessors(request, options, callback);
Expand Down Expand Up @@ -2647,7 +2647,7 @@ export class DocumentProcessorServiceClient {
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['listProcessors'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2698,7 +2698,7 @@ export class DocumentProcessorServiceClient {
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['listProcessors'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2806,7 +2806,7 @@ export class DocumentProcessorServiceClient {
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.listProcessorVersions(request, options, callback);
Expand Down Expand Up @@ -2848,7 +2848,7 @@ export class DocumentProcessorServiceClient {
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['listProcessorVersions'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2899,7 +2899,7 @@ export class DocumentProcessorServiceClient {
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['listProcessorVersions'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
2 changes: 1 addition & 1 deletion src/v1beta1/document_understanding_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ export class DocumentUnderstandingServiceClient {
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.batchProcessDocuments(request, options, callback);
Expand Down
4 changes: 2 additions & 2 deletions src/v1beta2/document_understanding_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ export class DocumentUnderstandingServiceClient {
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.processDocument(request, options, callback);
Expand Down Expand Up @@ -569,7 +569,7 @@ export class DocumentUnderstandingServiceClient {
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.batchProcessDocuments(request, options, callback);
Expand Down
Loading

0 comments on commit 17f61ed

Please sign in to comment.