diff --git a/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document.proto b/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document.proto index c4fbb21ceca..680cf88282f 100644 --- a/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document.proto +++ b/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document.proto @@ -50,7 +50,8 @@ message Document { // Total number of shards. int64 shard_count = 2; - // The index of the first character in [Document.text][google.cloud.documentai.v1.Document.text] in the overall + // The index of the first character in + // [Document.text][google.cloud.documentai.v1.Document.text] in the overall // document global text. int64 text_offset = 3; } @@ -67,7 +68,8 @@ message Document { string unit = 2; } - // Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. + // Text anchor indexing into the + // [Document.text][google.cloud.documentai.v1.Document.text]. TextAnchor text_anchor = 1; // Text color. @@ -168,25 +170,31 @@ message Document { PAGE_LEFT = 4; } - // Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. + // Text anchor indexing into the + // [Document.text][google.cloud.documentai.v1.Document.text]. TextAnchor text_anchor = 1; - // Confidence of the current [Layout][google.cloud.documentai.v1.Document.Page.Layout] within context of the object this - // layout is for. e.g. confidence can be for a single token, a table, - // a visual element, etc. depending on context. Range `[0, 1]`. + // Confidence of the current + // [Layout][google.cloud.documentai.v1.Document.Page.Layout] within + // context of the object this layout is for. e.g. confidence can be for a + // single token, a table, a visual element, etc. depending on context. + // Range `[0, 1]`. float confidence = 2; - // The bounding polygon for the [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + // The bounding polygon for the + // [Layout][google.cloud.documentai.v1.Document.Page.Layout]. BoundingPoly bounding_poly = 3; - // Detected orientation for the [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + // Detected orientation for the + // [Layout][google.cloud.documentai.v1.Document.Page.Layout]. Orientation orientation = 4; } // A block has a set of lines (collected into paragraphs) that have a // common line-spacing and orientation. message Block { - // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Block][google.cloud.documentai.v1.Document.Page.Block]. + // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + // [Block][google.cloud.documentai.v1.Document.Page.Block]. Layout layout = 1; // A list of detected languages together with confidence. @@ -198,7 +206,8 @@ message Document { // A collection of lines that a human would perceive as a paragraph. message Paragraph { - // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. + // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + // [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. Layout layout = 1; // A list of detected languages together with confidence. @@ -211,7 +220,8 @@ message Document { // A collection of tokens that a human would perceive as a line. // Does not cross column boundaries, can be horizontal, vertical, etc. message Line { - // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Line][google.cloud.documentai.v1.Document.Page.Line]. + // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + // [Line][google.cloud.documentai.v1.Document.Page.Line]. Layout layout = 1; // A list of detected languages together with confidence. @@ -223,7 +233,8 @@ message Document { // A detected token. message Token { - // Detected break at the end of a [Token][google.cloud.documentai.v1.Document.Page.Token]. + // Detected break at the end of a + // [Token][google.cloud.documentai.v1.Document.Page.Token]. message DetectedBreak { // Enum to denote the type of break found. enum Type { @@ -244,10 +255,12 @@ message Document { Type type = 1; } - // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Token][google.cloud.documentai.v1.Document.Page.Token]. + // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + // [Token][google.cloud.documentai.v1.Document.Page.Token]. Layout layout = 1; - // Detected break at the end of a [Token][google.cloud.documentai.v1.Document.Page.Token]. + // Detected break at the end of a + // [Token][google.cloud.documentai.v1.Document.Page.Token]. DetectedBreak detected_break = 2; // A list of detected languages together with confidence. @@ -259,7 +272,8 @@ message Document { // A detected symbol. message Symbol { - // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. + // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + // [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. Layout layout = 1; // A list of detected languages together with confidence. @@ -269,10 +283,12 @@ message Document { // Detected non-text visual elements e.g. checkbox, signature etc. on the // page. message VisualElement { - // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + // [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. Layout layout = 1; - // Type of the [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + // Type of the + // [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. string type = 2; // A list of detected languages together with confidence. @@ -289,7 +305,8 @@ message Document { // A cell representation inside the table. message TableCell { - // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. + // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + // [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. Layout layout = 1; // How many rows this cell spans. @@ -302,7 +319,8 @@ message Document { repeated DetectedLanguage detected_languages = 4; } - // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Table][google.cloud.documentai.v1.Document.Page.Table]. + // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + // [Table][google.cloud.documentai.v1.Document.Page.Table]. Layout layout = 1; // Header rows of the table. @@ -320,11 +338,13 @@ message Document { // A form field detected on the page. message FormField { - // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. e.g. `Address`, `Email`, - // `Grand total`, `Phone number`, etc. + // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the + // [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. + // e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. Layout field_name = 1; - // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. + // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the + // [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. Layout field_value = 2; // A list of detected languages for name together with confidence. @@ -335,9 +355,10 @@ message Document { // If the value is non-textual, this field represents the type. Current // valid values are: - // - blank (this indicates the field_value is normal text) - // - "unfilled_checkbox" - // - "filled_checkbox" + // + // - blank (this indicates the `field_value` is normal text) + // - `unfilled_checkbox` + // - `filled_checkbox` string value_type = 5; // Created for Labeling UI to export key text. @@ -356,10 +377,12 @@ message Document { // A detected barcode. message DetectedBarcode { - // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + // [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. Layout layout = 1; - // Detailed barcode information of the [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + // Detailed barcode information of the + // [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. Barcode barcode = 2; } @@ -402,9 +425,11 @@ message Document { repeated DetectedDefect detected_defects = 2; } - // 1-based index for current [Page][google.cloud.documentai.v1.Document.Page] in a parent [Document][google.cloud.documentai.v1.Document]. - // Useful when a page is taken out of a [Document][google.cloud.documentai.v1.Document] for individual - // processing. + // 1-based index for current + // [Page][google.cloud.documentai.v1.Document.Page] in a parent + // [Document][google.cloud.documentai.v1.Document]. Useful when a page is + // taken out of a [Document][google.cloud.documentai.v1.Document] for + // individual processing. int32 page_number = 1; // Rendered image for this page. This image is preprocessed to remove any @@ -505,8 +530,8 @@ message Document { // Optional. An optional field to store a normalized string. // For some entity types, one of respective `structured_value` fields may // also be populated. Also not all the types of `structured_value` will be - // normalized. For example, some processors may not generate float - // or int normalized text by default. + // normalized. For example, some processors may not generate `float` + // or `integer` normalized text by default. // // Below are sample formats mapped to structured values. // @@ -517,7 +542,8 @@ message Document { } // Optional. Provenance of the entity. - // Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. + // Text anchor indexing into the + // [Document.text][google.cloud.documentai.v1.Document.text]. TextAnchor text_anchor = 1 [(google.api.field_behavior) = OPTIONAL]; // Required. Entity type from a schema e.g. `Address`. @@ -532,32 +558,35 @@ message Document { // Optional. Confidence of detected Schema entity. Range `[0, 1]`. float confidence = 5 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Represents the provenance of this entity wrt. the location on the - // page where it was found. + // Optional. Represents the provenance of this entity wrt. the location on + // the page where it was found. PageAnchor page_anchor = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. Canonical id. This will be a unique value in the entity list // for this document. string id = 7 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Normalized entity value. Absent if the extracted value could not be - // converted or the type (e.g. address) is not supported for certain + // Optional. Normalized entity value. Absent if the extracted value could + // not be converted or the type (e.g. address) is not supported for certain // parsers. This field is also only populated for certain supported document // types. - NormalizedValue normalized_value = 9 [(google.api.field_behavior) = OPTIONAL]; + NormalizedValue normalized_value = 9 + [(google.api.field_behavior) = OPTIONAL]; - // Optional. Entities can be nested to form a hierarchical data structure representing - // the content in the document. + // Optional. Entities can be nested to form a hierarchical data structure + // representing the content in the document. repeated Entity properties = 10 [(google.api.field_behavior) = OPTIONAL]; // Optional. The history of this annotation. Provenance provenance = 11 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Whether the entity will be redacted for de-identification purposes. + // Optional. Whether the entity will be redacted for de-identification + // purposes. bool redacted = 12 [(google.api.field_behavior) = OPTIONAL]; } - // Relationship between [Entities][google.cloud.documentai.v1.Document.Entity]. + // Relationship between + // [Entities][google.cloud.documentai.v1.Document.Entity]. message EntityRelation { // Subject entity id. string subject_id = 1; @@ -569,21 +598,28 @@ message Document { string relation = 3; } - // Text reference indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. + // Text reference indexing into the + // [Document.text][google.cloud.documentai.v1.Document.text]. message TextAnchor { - // A text segment in the [Document.text][google.cloud.documentai.v1.Document.text]. The indices may be out of bounds - // which indicate that the text extends into another document shard for - // large sharded documents. See [ShardInfo.text_offset][google.cloud.documentai.v1.Document.ShardInfo.text_offset] + // A text segment in the + // [Document.text][google.cloud.documentai.v1.Document.text]. The indices + // may be out of bounds which indicate that the text extends into another + // document shard for large sharded documents. See + // [ShardInfo.text_offset][google.cloud.documentai.v1.Document.ShardInfo.text_offset] message TextSegment { - // [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] start UTF-8 char index in the [Document.text][google.cloud.documentai.v1.Document.text]. + // [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] + // start UTF-8 char index in the + // [Document.text][google.cloud.documentai.v1.Document.text]. int64 start_index = 1; - // [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] half open end UTF-8 char index in the + // [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] + // half open end UTF-8 char index in the // [Document.text][google.cloud.documentai.v1.Document.text]. int64 end_index = 2; } - // The text segments from the [Document.text][google.cloud.documentai.v1.Document.text]. + // The text segments from the + // [Document.text][google.cloud.documentai.v1.Document.text]. repeated TextSegment text_segments = 1; // Contains the content of the text span so that users do @@ -592,9 +628,10 @@ message Document { string content = 2; } - // Referencing the visual context of the entity in the [Document.pages][google.cloud.documentai.v1.Document.pages]. - // Page anchors can be cross-page, consist of multiple bounding polygons and - // optionally reference specific layout element types. + // Referencing the visual context of the entity in the + // [Document.pages][google.cloud.documentai.v1.Document.pages]. Page anchors + // can be cross-page, consist of multiple bounding polygons and optionally + // reference specific layout element types. message PageAnchor { // Represents a weak reference to a page element within a document. message PageRef { @@ -603,47 +640,65 @@ message Document { // Layout Unspecified. LAYOUT_TYPE_UNSPECIFIED = 0; - // References a [Page.blocks][google.cloud.documentai.v1.Document.Page.blocks] element. + // References a + // [Page.blocks][google.cloud.documentai.v1.Document.Page.blocks] + // element. BLOCK = 1; - // References a [Page.paragraphs][google.cloud.documentai.v1.Document.Page.paragraphs] element. + // References a + // [Page.paragraphs][google.cloud.documentai.v1.Document.Page.paragraphs] + // element. PARAGRAPH = 2; - // References a [Page.lines][google.cloud.documentai.v1.Document.Page.lines] element. + // References a + // [Page.lines][google.cloud.documentai.v1.Document.Page.lines] element. LINE = 3; - // References a [Page.tokens][google.cloud.documentai.v1.Document.Page.tokens] element. + // References a + // [Page.tokens][google.cloud.documentai.v1.Document.Page.tokens] + // element. TOKEN = 4; - // References a [Page.visual_elements][google.cloud.documentai.v1.Document.Page.visual_elements] element. + // References a + // [Page.visual_elements][google.cloud.documentai.v1.Document.Page.visual_elements] + // element. VISUAL_ELEMENT = 5; - // Refrrences a [Page.tables][google.cloud.documentai.v1.Document.Page.tables] element. + // Refrrences a + // [Page.tables][google.cloud.documentai.v1.Document.Page.tables] + // element. TABLE = 6; - // References a [Page.form_fields][google.cloud.documentai.v1.Document.Page.form_fields] element. + // References a + // [Page.form_fields][google.cloud.documentai.v1.Document.Page.form_fields] + // element. FORM_FIELD = 7; } - // Required. Index into the [Document.pages][google.cloud.documentai.v1.Document.pages] element, for example using - // [Document.pages][page_refs.page] to locate the related page element. - // This field is skipped when its value is the default 0. See + // Required. Index into the + // [Document.pages][google.cloud.documentai.v1.Document.pages] element, + // for example using + // `[Document.pages][page_refs.page]` to locate the related page element. + // This field is skipped when its value is the default `0`. See // https://developers.google.com/protocol-buffers/docs/proto3#json. int64 page = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. The type of the layout element that is being referenced if any. + // Optional. The type of the layout element that is being referenced if + // any. LayoutType layout_type = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Deprecated. Use [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] instead. - string layout_id = 3 [ - deprecated = true, - (google.api.field_behavior) = OPTIONAL - ]; + // Optional. Deprecated. Use + // [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] + // instead. + string layout_id = 3 + [deprecated = true, (google.api.field_behavior) = OPTIONAL]; - // Optional. Identifies the bounding polygon of a layout element on the page. + // Optional. Identifies the bounding polygon of a layout element on the + // page. BoundingPoly bounding_poly = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Confidence of detected page element, if applicable. Range `[0, 1]`. + // Optional. Confidence of detected page element, if applicable. Range + // `[0, 1]`. float confidence = 5 [(google.api.field_behavior) = OPTIONAL]; } @@ -754,8 +809,9 @@ message Document { // This message is used for text changes aka. OCR corrections. message TextChange { // Provenance of the correction. - // Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. There can only be a - // single `TextAnchor.text_segments` element. If the start and + // Text anchor indexing into the + // [Document.text][google.cloud.documentai.v1.Document.text]. There can + // only be a single `TextAnchor.text_segments` element. If the start and // end index of the text segment are the same, the text change is inserted // before that index. TextAnchor text_anchor = 1; @@ -790,22 +846,25 @@ message Document { // Optional. UTF-8 encoded text in reading order from the document. string text = 4 [(google.api.field_behavior) = OPTIONAL]; - // Placeholder. Styles for the [Document.text][google.cloud.documentai.v1.Document.text]. - repeated Style text_styles = 5; + // Styles for the [Document.text][google.cloud.documentai.v1.Document.text]. + repeated Style text_styles = 5 [deprecated = true]; // Visual page layout for the [Document][google.cloud.documentai.v1.Document]. repeated Page pages = 6; - // A list of entities detected on [Document.text][google.cloud.documentai.v1.Document.text]. For document shards, - // entities in this list may cross shard boundaries. + // A list of entities detected on + // [Document.text][google.cloud.documentai.v1.Document.text]. For document + // shards, entities in this list may cross shard boundaries. repeated Entity entities = 7; - // Placeholder. Relationship among [Document.entities][google.cloud.documentai.v1.Document.entities]. + // Placeholder. Relationship among + // [Document.entities][google.cloud.documentai.v1.Document.entities]. repeated EntityRelation entity_relations = 8; - // Placeholder. A list of text corrections made to [Document.text][google.cloud.documentai.v1.Document.text]. This - // is usually used for annotating corrections to OCR mistakes. Text changes - // for a given revision may not overlap with each other. + // Placeholder. A list of text corrections made to + // [Document.text][google.cloud.documentai.v1.Document.text]. This is usually + // used for annotating corrections to OCR mistakes. Text changes for a given + // revision may not overlap with each other. repeated TextChange text_changes = 14; // Information about the sharding if this document is sharded part of a larger diff --git a/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document_processor_service.proto b/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document_processor_service.proto index e748ae1f748..016d99a8edd 100644 --- a/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document_processor_service.proto +++ b/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document_processor_service.proto @@ -53,7 +53,8 @@ option (google.api.resource_definition) = { // structured information from unstructured or semi-structured documents. service DocumentProcessorService { option (google.api.default_host) = "documentai.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Processes a single document. rpc ProcessDocument(ProcessRequest) returns (ProcessResponse) { @@ -70,7 +71,8 @@ service DocumentProcessorService { // LRO endpoint to batch process many documents. The output is written // to Cloud Storage as JSON in the [Document] format. - rpc BatchProcessDocuments(BatchProcessRequest) returns (google.longrunning.Operation) { + rpc BatchProcessDocuments(BatchProcessRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/processors/*}:batchProcess" body: "*" @@ -88,7 +90,8 @@ service DocumentProcessorService { // Fetches processor types. Note that we do not use ListProcessorTypes here // because it is not paginated. - rpc FetchProcessorTypes(FetchProcessorTypesRequest) returns (FetchProcessorTypesResponse) { + rpc FetchProcessorTypes(FetchProcessorTypesRequest) + returns (FetchProcessorTypesResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}:fetchProcessorTypes" }; @@ -96,7 +99,8 @@ service DocumentProcessorService { } // Lists the processor types that exist. - rpc ListProcessorTypes(ListProcessorTypesRequest) returns (ListProcessorTypesResponse) { + rpc ListProcessorTypes(ListProcessorTypesRequest) + returns (ListProcessorTypesResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/processorTypes" }; @@ -120,7 +124,8 @@ service DocumentProcessorService { } // Gets a processor version detail. - rpc GetProcessorVersion(GetProcessorVersionRequest) returns (ProcessorVersion) { + rpc GetProcessorVersion(GetProcessorVersionRequest) + returns (ProcessorVersion) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}" }; @@ -128,7 +133,8 @@ service DocumentProcessorService { } // Lists all versions of a processor. - rpc ListProcessorVersions(ListProcessorVersionsRequest) returns (ListProcessorVersionsResponse) { + rpc ListProcessorVersions(ListProcessorVersionsRequest) + returns (ListProcessorVersionsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/processors/*}/processorVersions" }; @@ -137,7 +143,8 @@ service DocumentProcessorService { // Deletes the processor version, all artifacts under the processor version // will be deleted. - rpc DeleteProcessorVersion(DeleteProcessorVersionRequest) returns (google.longrunning.Operation) { + rpc DeleteProcessorVersion(DeleteProcessorVersionRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}" }; @@ -149,7 +156,8 @@ service DocumentProcessorService { } // Deploys the processor version. - rpc DeployProcessorVersion(DeployProcessorVersionRequest) returns (google.longrunning.Operation) { + rpc DeployProcessorVersion(DeployProcessorVersionRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}:deploy" body: "*" @@ -162,7 +170,8 @@ service DocumentProcessorService { } // Undeploys the processor version. - rpc UndeployProcessorVersion(UndeployProcessorVersionRequest) returns (google.longrunning.Operation) { + rpc UndeployProcessorVersion(UndeployProcessorVersionRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}:undeploy" body: "*" @@ -186,7 +195,8 @@ service DocumentProcessorService { // Deletes the processor, unloads all deployed model artifacts if it was // enabled and then deletes all artifacts associated with this processor. - rpc DeleteProcessor(DeleteProcessorRequest) returns (google.longrunning.Operation) { + rpc DeleteProcessor(DeleteProcessorRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/processors/*}" }; @@ -198,7 +208,8 @@ service DocumentProcessorService { } // Enables a processor - rpc EnableProcessor(EnableProcessorRequest) returns (google.longrunning.Operation) { + rpc EnableProcessor(EnableProcessorRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/processors/*}:enable" body: "*" @@ -210,7 +221,8 @@ service DocumentProcessorService { } // Disables a processor - rpc DisableProcessor(DisableProcessorRequest) returns (google.longrunning.Operation) { + rpc DisableProcessor(DisableProcessorRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/processors/*}:disable" body: "*" @@ -221,10 +233,13 @@ service DocumentProcessorService { }; } - // Set the default (active) version of a [Processor][google.cloud.documentai.v1.Processor] that will be used in - // [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] and + // Set the default (active) version of a + // [Processor][google.cloud.documentai.v1.Processor] that will be used in + // [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] + // and // [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments]. - rpc SetDefaultProcessorVersion(SetDefaultProcessorVersionRequest) returns (google.longrunning.Operation) { + rpc SetDefaultProcessorVersion(SetDefaultProcessorVersionRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{processor=projects/*/locations/*/processors/*}:setDefaultProcessorVersion" body: "*" @@ -237,7 +252,8 @@ service DocumentProcessorService { // Send a document for Human Review. The input document should be processed by // the specified processor. - rpc ReviewDocument(ReviewDocumentRequest) returns (google.longrunning.Operation) { + rpc ReviewDocument(ReviewDocumentRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{human_review_config=projects/*/locations/*/processors/*/humanReviewConfig}:reviewDocument" body: "*" @@ -261,17 +277,19 @@ message ProcessRequest { RawDocument raw_document = 5; } - // Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] or + // Required. The resource name of the + // [Processor][google.cloud.documentai.v1.Processor] or // [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] - // to use for processing. If a [Processor][google.cloud.documentai.v1.Processor] is specified, the server will use - // its [default version][google.cloud.documentai.v1.Processor.default_processor_version]. Format: - // `projects/{project}/locations/{location}/processors/{processor}`, or + // to use for processing. If a + // [Processor][google.cloud.documentai.v1.Processor] is specified, the server + // will use its [default + // version][google.cloud.documentai.v1.Processor.default_processor_version]. + // Format: `projects/{project}/locations/{location}/processors/{processor}`, + // or // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "*" - } + (google.api.resource_reference) = { type: "*" } ]; // Whether Human Review feature should be skipped for this request. Default to @@ -332,16 +350,15 @@ message ProcessResponse { // Request message for batch process document method. message BatchProcessRequest { - // Required. The resource name of [Processor][google.cloud.documentai.v1.Processor] or + // Required. The resource name of + // [Processor][google.cloud.documentai.v1.Processor] or // [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. // Format: `projects/{project}/locations/{location}/processors/{processor}`, // or // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "*" - } + (google.api.resource_reference) = { type: "*" } ]; // The input documents for batch process. @@ -356,9 +373,7 @@ message BatchProcessRequest { } // Response message for batch process document method. -message BatchProcessResponse { - -} +message BatchProcessResponse {} // The long running operation metadata for batch process method. message BatchProcessMetadata { @@ -473,8 +488,8 @@ message ListProcessorTypesResponse { // Request message for list all processors belongs to a project. message ListProcessorsRequest { - // Required. The parent (project and location) which owns this collection of Processors. - // Format: `projects/{project}/locations/{location}` + // Required. The parent (project and location) which owns this collection of + // Processors. Format: `projects/{project}/locations/{location}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -525,8 +540,9 @@ message GetProcessorVersionRequest { // Request message for list all processor versions belongs to a processor. message ListProcessorVersionsRequest { - // Required. The parent (project, location and processor) to list all versions. - // Format: `projects/{project}/locations/{location}/processors/{processor}` + // Required. The parent (project, location and processor) to list all + // versions. Format: + // `projects/{project}/locations/{location}/processors/{processor}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -582,9 +598,7 @@ message DeployProcessorVersionRequest { } // Response message for the deploy processor version method. -message DeployProcessorVersionResponse { - -} +message DeployProcessorVersionResponse {} // The long running operation metadata for deploy processor version method. message DeployProcessorVersionMetadata { @@ -604,9 +618,7 @@ message UndeployProcessorVersionRequest { } // Response message for the undeploy processor version method. -message UndeployProcessorVersionResponse { - -} +message UndeployProcessorVersionResponse {} // The long running operation metadata for the undeploy processor version // method. @@ -619,8 +631,8 @@ message UndeployProcessorVersionMetadata { // a regionalized backend service, and if the processor type is not available // on that region, the creation will fail. message CreateProcessorRequest { - // Required. The parent (project and location) under which to create the processor. - // Format: `projects/{project}/locations/{location}` + // Required. The parent (project and location) under which to create the + // processor. Format: `projects/{project}/locations/{location}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -628,8 +640,9 @@ message CreateProcessorRequest { } ]; - // Required. The processor to be created, requires [processor_type] and [display_name] - // to be set. Also, the processor is under CMEK if CMEK fields are set. + // Required. The processor to be created, requires [processor_type] and + // [display_name] to be set. Also, the processor is under CMEK if CMEK fields + // are set. Processor processor = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -663,9 +676,7 @@ message EnableProcessorRequest { // Response message for the enable processor method. // Intentionally empty proto for adding fields in future. -message EnableProcessorResponse { - -} +message EnableProcessorResponse {} // The long running operation metadata for enable processor method. message EnableProcessorMetadata { @@ -686,9 +697,7 @@ message DisableProcessorRequest { // Response message for the disable processor method. // Intentionally empty proto for adding fields in future. -message DisableProcessorResponse { - -} +message DisableProcessorResponse {} // The long running operation metadata for disable processor method. message DisableProcessorMetadata { @@ -698,7 +707,9 @@ message DisableProcessorMetadata { // Request message for the set default processor version method. message SetDefaultProcessorVersionRequest { - // Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] to change default version. + // Required. The resource name of the + // [Processor][google.cloud.documentai.v1.Processor] to change default + // version. string processor = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -706,8 +717,9 @@ message SetDefaultProcessorVersionRequest { } ]; - // Required. The resource name of child [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as default. - // Format: + // Required. The resource name of child + // [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as + // default. Format: // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}` string default_processor_version = 2 [ (google.api.field_behavior) = REQUIRED, @@ -718,9 +730,7 @@ message SetDefaultProcessorVersionRequest { } // Response message for set default processor version method. -message SetDefaultProcessorVersionResponse { - -} +message SetDefaultProcessorVersionResponse {} // The long running operation metadata for set default processor version // method. @@ -747,8 +757,8 @@ message ReviewDocumentRequest { Document inline_document = 4; } - // Required. The resource name of the HumanReviewConfig that the document will be - // reviewed with. + // Required. The resource name of the HumanReviewConfig that the document will + // be reviewed with. string human_review_config = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document_schema.proto b/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document_schema.proto index ceb25a1d69a..679a6ee59e8 100644 --- a/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document_schema.proto +++ b/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document_schema.proto @@ -88,7 +88,7 @@ message DocumentSchema { // conventions: // // - *use `snake_casing`* - // - name matching is case-insensitive + // - name matching is case-sensitive // - Maximum 64 characters. // - Must start with a letter. // - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward diff --git a/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/processor.proto b/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/processor.proto index 3ffe6927df9..ac599e987b6 100644 --- a/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/processor.proto +++ b/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/processor.proto @@ -46,9 +46,10 @@ message ProcessorVersion { google.protobuf.Timestamp deprecation_time = 1; // If set, the processor version that will be used as a replacement. - string replacement_processor_version = 2 [(google.api.resource_reference) = { - type: "documentai.googleapis.com/ProcessorVersion" - }]; + string replacement_processor_version = 2 + [(google.api.resource_reference) = { + type: "documentai.googleapis.com/ProcessorVersion" + }]; } // The possible states of the processor version. @@ -171,10 +172,11 @@ message Processor { // The default processor version. string default_processor_version = 9 [(google.api.resource_reference) = { - type: "documentai.googleapis.com/ProcessorVersion" - }]; + type: "documentai.googleapis.com/ProcessorVersion" + }]; - // Output only. Immutable. The http endpoint that can be called to invoke processing. + // Output only. Immutable. The http endpoint that can be called to invoke + // processing. string process_endpoint = 6 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.field_behavior) = IMMUTABLE diff --git a/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/processor_type.proto b/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/processor_type.proto index 2c9ee923051..a54274532cb 100644 --- a/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/processor_type.proto +++ b/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/processor_type.proto @@ -60,4 +60,7 @@ message ProcessorType { // Launch stage of the processor type google.api.LaunchStage launch_stage = 8; + + // A set of Cloud Storage URIs of sample documents for this processor. + repeated string sample_document_uris = 9; } diff --git a/packages/google-cloud-contentwarehouse/protos/protos.json b/packages/google-cloud-contentwarehouse/protos/protos.json index 86463c3306c..aef02965d37 100644 --- a/packages/google-cloud-contentwarehouse/protos/protos.json +++ b/packages/google-cloud-contentwarehouse/protos/protos.json @@ -2554,7 +2554,10 @@ "textStyles": { "rule": "repeated", "type": "Style", - "id": 5 + "id": 5, + "options": { + "deprecated": true + } }, "pages": { "rule": "repeated",