@@ -53,7 +53,8 @@ option (google.api.resource_definition) = {
5353// structured information from unstructured or semi-structured documents.
5454service DocumentProcessorService {
5555 option (google.api.default_host ) = "documentai.googleapis.com" ;
56- option (google.api.oauth_scopes ) = "https://www.googleapis.com/auth/cloud-platform" ;
56+ option (google.api.oauth_scopes ) =
57+ "https://www.googleapis.com/auth/cloud-platform" ;
5758
5859 // Processes a single document.
5960 rpc ProcessDocument (ProcessRequest ) returns (ProcessResponse ) {
@@ -70,7 +71,8 @@ service DocumentProcessorService {
7071
7172 // LRO endpoint to batch process many documents. The output is written
7273 // to Cloud Storage as JSON in the [Document] format.
73- rpc BatchProcessDocuments (BatchProcessRequest ) returns (google.longrunning.Operation ) {
74+ rpc BatchProcessDocuments (BatchProcessRequest )
75+ returns (google.longrunning.Operation ) {
7476 option (google.api.http ) = {
7577 post : "/v1/{name=projects/*/locations/*/processors/*}:batchProcess"
7678 body : "*"
@@ -88,15 +90,17 @@ service DocumentProcessorService {
8890
8991 // Fetches processor types. Note that we do not use ListProcessorTypes here
9092 // because it is not paginated.
91- rpc FetchProcessorTypes (FetchProcessorTypesRequest ) returns (FetchProcessorTypesResponse ) {
93+ rpc FetchProcessorTypes (FetchProcessorTypesRequest )
94+ returns (FetchProcessorTypesResponse ) {
9295 option (google.api.http ) = {
9396 get : "/v1/{parent=projects/*/locations/*}:fetchProcessorTypes"
9497 };
9598 option (google.api.method_signature ) = "parent" ;
9699 }
97100
98101 // Lists the processor types that exist.
99- rpc ListProcessorTypes (ListProcessorTypesRequest ) returns (ListProcessorTypesResponse ) {
102+ rpc ListProcessorTypes (ListProcessorTypesRequest )
103+ returns (ListProcessorTypesResponse ) {
100104 option (google.api.http ) = {
101105 get : "/v1/{parent=projects/*/locations/*}/processorTypes"
102106 };
@@ -120,15 +124,17 @@ service DocumentProcessorService {
120124 }
121125
122126 // Gets a processor version detail.
123- rpc GetProcessorVersion (GetProcessorVersionRequest ) returns (ProcessorVersion ) {
127+ rpc GetProcessorVersion (GetProcessorVersionRequest )
128+ returns (ProcessorVersion ) {
124129 option (google.api.http ) = {
125130 get : "/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}"
126131 };
127132 option (google.api.method_signature ) = "name" ;
128133 }
129134
130135 // Lists all versions of a processor.
131- rpc ListProcessorVersions (ListProcessorVersionsRequest ) returns (ListProcessorVersionsResponse ) {
136+ rpc ListProcessorVersions (ListProcessorVersionsRequest )
137+ returns (ListProcessorVersionsResponse ) {
132138 option (google.api.http ) = {
133139 get : "/v1/{parent=projects/*/locations/*/processors/*}/processorVersions"
134140 };
@@ -137,7 +143,8 @@ service DocumentProcessorService {
137143
138144 // Deletes the processor version, all artifacts under the processor version
139145 // will be deleted.
140- rpc DeleteProcessorVersion (DeleteProcessorVersionRequest ) returns (google.longrunning.Operation ) {
146+ rpc DeleteProcessorVersion (DeleteProcessorVersionRequest )
147+ returns (google.longrunning.Operation ) {
141148 option (google.api.http ) = {
142149 delete : "/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}"
143150 };
@@ -149,7 +156,8 @@ service DocumentProcessorService {
149156 }
150157
151158 // Deploys the processor version.
152- rpc DeployProcessorVersion (DeployProcessorVersionRequest ) returns (google.longrunning.Operation ) {
159+ rpc DeployProcessorVersion (DeployProcessorVersionRequest )
160+ returns (google.longrunning.Operation ) {
153161 option (google.api.http ) = {
154162 post : "/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}:deploy"
155163 body : "*"
@@ -162,7 +170,8 @@ service DocumentProcessorService {
162170 }
163171
164172 // Undeploys the processor version.
165- rpc UndeployProcessorVersion (UndeployProcessorVersionRequest ) returns (google.longrunning.Operation ) {
173+ rpc UndeployProcessorVersion (UndeployProcessorVersionRequest )
174+ returns (google.longrunning.Operation ) {
166175 option (google.api.http ) = {
167176 post : "/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}:undeploy"
168177 body : "*"
@@ -186,7 +195,8 @@ service DocumentProcessorService {
186195
187196 // Deletes the processor, unloads all deployed model artifacts if it was
188197 // enabled and then deletes all artifacts associated with this processor.
189- rpc DeleteProcessor (DeleteProcessorRequest ) returns (google.longrunning.Operation ) {
198+ rpc DeleteProcessor (DeleteProcessorRequest )
199+ returns (google.longrunning.Operation ) {
190200 option (google.api.http ) = {
191201 delete : "/v1/{name=projects/*/locations/*/processors/*}"
192202 };
@@ -198,7 +208,8 @@ service DocumentProcessorService {
198208 }
199209
200210 // Enables a processor
201- rpc EnableProcessor (EnableProcessorRequest ) returns (google.longrunning.Operation ) {
211+ rpc EnableProcessor (EnableProcessorRequest )
212+ returns (google.longrunning.Operation ) {
202213 option (google.api.http ) = {
203214 post : "/v1/{name=projects/*/locations/*/processors/*}:enable"
204215 body : "*"
@@ -210,7 +221,8 @@ service DocumentProcessorService {
210221 }
211222
212223 // Disables a processor
213- rpc DisableProcessor (DisableProcessorRequest ) returns (google.longrunning.Operation ) {
224+ rpc DisableProcessor (DisableProcessorRequest )
225+ returns (google.longrunning.Operation ) {
214226 option (google.api.http ) = {
215227 post : "/v1/{name=projects/*/locations/*/processors/*}:disable"
216228 body : "*"
@@ -221,10 +233,13 @@ service DocumentProcessorService {
221233 };
222234 }
223235
224- // Set the default (active) version of a [Processor][google.cloud.documentai.v1.Processor] that will be used in
225- // [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] and
236+ // Set the default (active) version of a
237+ // [Processor][google.cloud.documentai.v1.Processor] that will be used in
238+ // [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument]
239+ // and
226240 // [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments].
227- rpc SetDefaultProcessorVersion (SetDefaultProcessorVersionRequest ) returns (google.longrunning.Operation ) {
241+ rpc SetDefaultProcessorVersion (SetDefaultProcessorVersionRequest )
242+ returns (google.longrunning.Operation ) {
228243 option (google.api.http ) = {
229244 post : "/v1/{processor=projects/*/locations/*/processors/*}:setDefaultProcessorVersion"
230245 body : "*"
@@ -237,7 +252,8 @@ service DocumentProcessorService {
237252
238253 // Send a document for Human Review. The input document should be processed by
239254 // the specified processor.
240- rpc ReviewDocument (ReviewDocumentRequest ) returns (google.longrunning.Operation ) {
255+ rpc ReviewDocument (ReviewDocumentRequest )
256+ returns (google.longrunning.Operation ) {
241257 option (google.api.http ) = {
242258 post : "/v1/{human_review_config=projects/*/locations/*/processors/*/humanReviewConfig}:reviewDocument"
243259 body : "*"
@@ -261,17 +277,19 @@ message ProcessRequest {
261277 RawDocument raw_document = 5 ;
262278 }
263279
264- // Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] or
280+ // Required. The resource name of the
281+ // [Processor][google.cloud.documentai.v1.Processor] or
265282 // [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]
266- // to use for processing. If a [Processor][google.cloud.documentai.v1.Processor] is specified, the server will use
267- // its [default version][google.cloud.documentai.v1.Processor.default_processor_version]. Format:
268- // `projects/{project}/locations/{location}/processors/{processor}`, or
283+ // to use for processing. If a
284+ // [Processor][google.cloud.documentai.v1.Processor] is specified, the server
285+ // will use its [default
286+ // version][google.cloud.documentai.v1.Processor.default_processor_version].
287+ // Format: `projects/{project}/locations/{location}/processors/{processor}`,
288+ // or
269289 // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
270290 string name = 1 [
271291 (google.api.field_behavior ) = REQUIRED ,
272- (google.api.resource_reference ) = {
273- type : "*"
274- }
292+ (google.api.resource_reference ) = { type : "*" }
275293 ];
276294
277295 // Whether Human Review feature should be skipped for this request. Default to
@@ -332,16 +350,15 @@ message ProcessResponse {
332350
333351// Request message for batch process document method.
334352message BatchProcessRequest {
335- // Required. The resource name of [Processor][google.cloud.documentai.v1.Processor] or
353+ // Required. The resource name of
354+ // [Processor][google.cloud.documentai.v1.Processor] or
336355 // [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion].
337356 // Format: `projects/{project}/locations/{location}/processors/{processor}`,
338357 // or
339358 // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
340359 string name = 1 [
341360 (google.api.field_behavior ) = REQUIRED ,
342- (google.api.resource_reference ) = {
343- type : "*"
344- }
361+ (google.api.resource_reference ) = { type : "*" }
345362 ];
346363
347364 // The input documents for batch process.
@@ -356,9 +373,7 @@ message BatchProcessRequest {
356373}
357374
358375// Response message for batch process document method.
359- message BatchProcessResponse {
360-
361- }
376+ message BatchProcessResponse {}
362377
363378// The long running operation metadata for batch process method.
364379message BatchProcessMetadata {
@@ -473,8 +488,8 @@ message ListProcessorTypesResponse {
473488
474489// Request message for list all processors belongs to a project.
475490message ListProcessorsRequest {
476- // Required. The parent (project and location) which owns this collection of Processors.
477- // Format: `projects/{project}/locations/{location}`
491+ // Required. The parent (project and location) which owns this collection of
492+ // Processors. Format: `projects/{project}/locations/{location}`
478493 string parent = 1 [
479494 (google.api.field_behavior ) = REQUIRED ,
480495 (google.api.resource_reference ) = {
@@ -525,8 +540,9 @@ message GetProcessorVersionRequest {
525540
526541// Request message for list all processor versions belongs to a processor.
527542message ListProcessorVersionsRequest {
528- // Required. The parent (project, location and processor) to list all versions.
529- // Format: `projects/{project}/locations/{location}/processors/{processor}`
543+ // Required. The parent (project, location and processor) to list all
544+ // versions. Format:
545+ // `projects/{project}/locations/{location}/processors/{processor}`
530546 string parent = 1 [
531547 (google.api.field_behavior ) = REQUIRED ,
532548 (google.api.resource_reference ) = {
@@ -582,9 +598,7 @@ message DeployProcessorVersionRequest {
582598}
583599
584600// Response message for the deploy processor version method.
585- message DeployProcessorVersionResponse {
586-
587- }
601+ message DeployProcessorVersionResponse {}
588602
589603// The long running operation metadata for deploy processor version method.
590604message DeployProcessorVersionMetadata {
@@ -604,9 +618,7 @@ message UndeployProcessorVersionRequest {
604618}
605619
606620// Response message for the undeploy processor version method.
607- message UndeployProcessorVersionResponse {
608-
609- }
621+ message UndeployProcessorVersionResponse {}
610622
611623// The long running operation metadata for the undeploy processor version
612624// method.
@@ -619,17 +631,18 @@ message UndeployProcessorVersionMetadata {
619631// a regionalized backend service, and if the processor type is not available
620632// on that region, the creation will fail.
621633message CreateProcessorRequest {
622- // Required. The parent (project and location) under which to create the processor.
623- // Format: `projects/{project}/locations/{location}`
634+ // Required. The parent (project and location) under which to create the
635+ // processor. Format: `projects/{project}/locations/{location}`
624636 string parent = 1 [
625637 (google.api.field_behavior ) = REQUIRED ,
626638 (google.api.resource_reference ) = {
627639 child_type : "documentai.googleapis.com/Processor"
628640 }
629641 ];
630642
631- // Required. The processor to be created, requires [processor_type] and [display_name]
632- // to be set. Also, the processor is under CMEK if CMEK fields are set.
643+ // Required. The processor to be created, requires [processor_type] and
644+ // [display_name] to be set. Also, the processor is under CMEK if CMEK fields
645+ // are set.
633646 Processor processor = 2 [(google.api.field_behavior ) = REQUIRED ];
634647}
635648
@@ -663,9 +676,7 @@ message EnableProcessorRequest {
663676
664677// Response message for the enable processor method.
665678// Intentionally empty proto for adding fields in future.
666- message EnableProcessorResponse {
667-
668- }
679+ message EnableProcessorResponse {}
669680
670681// The long running operation metadata for enable processor method.
671682message EnableProcessorMetadata {
@@ -686,9 +697,7 @@ message DisableProcessorRequest {
686697
687698// Response message for the disable processor method.
688699// Intentionally empty proto for adding fields in future.
689- message DisableProcessorResponse {
690-
691- }
700+ message DisableProcessorResponse {}
692701
693702// The long running operation metadata for disable processor method.
694703message DisableProcessorMetadata {
@@ -698,16 +707,19 @@ message DisableProcessorMetadata {
698707
699708// Request message for the set default processor version method.
700709message SetDefaultProcessorVersionRequest {
701- // Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] to change default version.
710+ // Required. The resource name of the
711+ // [Processor][google.cloud.documentai.v1.Processor] to change default
712+ // version.
702713 string processor = 1 [
703714 (google.api.field_behavior ) = REQUIRED ,
704715 (google.api.resource_reference ) = {
705716 type : "documentai.googleapis.com/Processor"
706717 }
707718 ];
708719
709- // Required. The resource name of child [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as default.
710- // Format:
720+ // Required. The resource name of child
721+ // [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as
722+ // default. Format:
711723 // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}`
712724 string default_processor_version = 2 [
713725 (google.api.field_behavior ) = REQUIRED ,
@@ -718,9 +730,7 @@ message SetDefaultProcessorVersionRequest {
718730}
719731
720732// Response message for set default processor version method.
721- message SetDefaultProcessorVersionResponse {
722-
723- }
733+ message SetDefaultProcessorVersionResponse {}
724734
725735// The long running operation metadata for set default processor version
726736// method.
@@ -747,8 +757,8 @@ message ReviewDocumentRequest {
747757 Document inline_document = 4 ;
748758 }
749759
750- // Required. The resource name of the HumanReviewConfig that the document will be
751- // reviewed with.
760+ // Required. The resource name of the HumanReviewConfig that the document will
761+ // be reviewed with.
752762 string human_review_config = 1 [
753763 (google.api.field_behavior ) = REQUIRED ,
754764 (google.api.resource_reference ) = {
0 commit comments