aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGoogle APIs <noreply@google.com>2024-04-16 12:22:16 -0700
committerCopybara-Service <copybara-worker@google.com>2024-04-16 12:23:17 -0700
commitcaa099d272fdf00be53d2328259fcbdaab3a3b20 (patch)
tree57fcb4d7152245a64ab0eb058e2d31f26fa9f915
parent1c2d0272e3926d7a32bf876b1d9c6225e926e838 (diff)
downloadgoogleapis-caa099d272fdf00be53d2328259fcbdaab3a3b20.tar.gz
feat: A new message `FoundationModelTuningOptions` is added
feat: A new field `foundation_model_tuning_options` is added to message `.google.cloud.documentai.v1.TrainProcessorVersionRequest` docs: updated comments PiperOrigin-RevId: 625415406
-rw-r--r--google/cloud/documentai/v1/document.proto213
-rw-r--r--google/cloud/documentai/v1/document_io.proto4
-rw-r--r--google/cloud/documentai/v1/document_processor_service.proto314
-rw-r--r--google/cloud/documentai/v1/evaluation.proto4
-rw-r--r--google/cloud/documentai/v1/processor.proto21
5 files changed, 224 insertions, 332 deletions
diff --git a/google/cloud/documentai/v1/document.proto b/google/cloud/documentai/v1/document.proto
index 8c66f6b93..1d6f22fd1 100644
--- a/google/cloud/documentai/v1/document.proto
+++ b/google/cloud/documentai/v1/document.proto
@@ -50,8 +50,7 @@ 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;
}
@@ -69,8 +68,7 @@ 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.
@@ -174,31 +172,25 @@ 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.
@@ -210,8 +202,7 @@ 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.
@@ -224,8 +215,7 @@ 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.
@@ -237,8 +227,7 @@ 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 {
@@ -264,9 +253,8 @@ message Document {
// Font size in points (`1` point is `¹⁄₇₂` inches).
int32 font_size = 1;
- // Font size in pixels, equal to _unrounded
- // [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_
- // * _resolution_ ÷ `72.0`.
+ // Font size in pixels, equal to _unrounded [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ *
+ // _resolution_ ÷ `72.0`.
double pixel_font_size = 2;
// Letter spacing in points.
@@ -275,9 +263,8 @@ message Document {
// Name or style of the font.
string font_type = 4;
- // Whether the text is bold (equivalent to
- // [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight]
- // is at least `700`).
+ // Whether the text is bold (equivalent to [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] is at least
+ // `700`).
bool bold = 5;
// Whether the text is italic.
@@ -312,12 +299,10 @@ message Document {
google.type.Color background_color = 15;
}
- // [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.
@@ -332,8 +317,7 @@ 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.
@@ -343,12 +327,10 @@ 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.
@@ -365,8 +347,7 @@ 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.
@@ -379,8 +360,7 @@ 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.
@@ -398,13 +378,11 @@ 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.
@@ -437,12 +415,10 @@ 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;
}
@@ -485,11 +461,9 @@ 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
@@ -602,8 +576,7 @@ 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`.
@@ -618,35 +591,32 @@ 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;
@@ -658,28 +628,21 @@ 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
@@ -688,10 +651,9 @@ 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 {
@@ -700,66 +662,49 @@ 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
+ // 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. If `layout_type` is set, the bounding polygon must be exactly the
- // same to the layout element it's referring to.
+ // Optional. Identifies the bounding polygon of a layout element on the page.
+ // If `layout_type` is set, the bounding polygon must be exactly the same
+ // to the layout element it's referring to.
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];
}
@@ -879,9 +824,8 @@ 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;
@@ -920,19 +864,16 @@ message Document {
// 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/google/cloud/documentai/v1/document_io.proto b/google/cloud/documentai/v1/document_io.proto
index 26637a166..fb93ffcf1 100644
--- a/google/cloud/documentai/v1/document_io.proto
+++ b/google/cloud/documentai/v1/document_io.proto
@@ -160,9 +160,7 @@ message OcrConfig {
bool enable_symbol = 6;
// Turn on font identification model and return font style information.
- // Deprecated, use
- // [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info]
- // instead.
+ // Deprecated, use [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] instead.
bool compute_style_info = 8 [deprecated = true];
// Turn off character box detector in OCR engine. Character box detection is
diff --git a/google/cloud/documentai/v1/document_processor_service.proto b/google/cloud/documentai/v1/document_processor_service.proto
index 447b28ba1..cf40d9dd8 100644
--- a/google/cloud/documentai/v1/document_processor_service.proto
+++ b/google/cloud/documentai/v1/document_processor_service.proto
@@ -55,8 +55,7 @@ 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) {
@@ -73,8 +72,7 @@ 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: "*"
@@ -90,11 +88,9 @@ service DocumentProcessorService {
};
}
- // Fetches processor types. Note that we don't use
- // [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes]
+ // Fetches processor types. Note that we don't use [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes]
// here, because it isn't paginated.
- rpc FetchProcessorTypes(FetchProcessorTypesRequest)
- returns (FetchProcessorTypesResponse) {
+ rpc FetchProcessorTypes(FetchProcessorTypesRequest) returns (FetchProcessorTypesResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}:fetchProcessorTypes"
};
@@ -102,8 +98,7 @@ 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"
};
@@ -137,8 +132,7 @@ service DocumentProcessorService {
// Trains a new processor version.
// Operation metadata is returned as
// [TrainProcessorVersionMetadata][google.cloud.documentai.v1.TrainProcessorVersionMetadata].
- rpc TrainProcessorVersion(TrainProcessorVersionRequest)
- returns (google.longrunning.Operation) {
+ rpc TrainProcessorVersion(TrainProcessorVersionRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*/processors/*}/processorVersions:train"
body: "*"
@@ -151,8 +145,7 @@ 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/*}"
};
@@ -160,8 +153,7 @@ 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"
};
@@ -170,8 +162,7 @@ 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/*}"
};
@@ -183,8 +174,7 @@ 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: "*"
@@ -197,8 +187,7 @@ 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: "*"
@@ -210,9 +199,8 @@ service DocumentProcessorService {
};
}
- // Creates a processor from the
- // [ProcessorType][google.cloud.documentai.v1.ProcessorType] provided. The
- // processor will be at `ENABLED` state by default after its creation.
+ // Creates a processor from the [ProcessorType][google.cloud.documentai.v1.ProcessorType] provided.
+ // The processor will be at `ENABLED` state by default after its creation.
rpc CreateProcessor(CreateProcessorRequest) returns (Processor) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*}/processors"
@@ -223,8 +211,7 @@ 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/*}"
};
@@ -236,8 +223,7 @@ 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: "*"
@@ -249,8 +235,7 @@ 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: "*"
@@ -261,13 +246,10 @@ 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: "*"
@@ -280,8 +262,7 @@ 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: "*"
@@ -295,8 +276,7 @@ service DocumentProcessorService {
// Evaluates a ProcessorVersion against annotated documents, producing an
// Evaluation.
- rpc EvaluateProcessorVersion(EvaluateProcessorVersionRequest)
- returns (google.longrunning.Operation) {
+ rpc EvaluateProcessorVersion(EvaluateProcessorVersionRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{processor_version=projects/*/locations/*/processors/*/processorVersions/*}:evaluateProcessorVersion"
body: "*"
@@ -317,8 +297,7 @@ service DocumentProcessorService {
}
// Retrieves a set of evaluations for a given processor version.
- rpc ListEvaluations(ListEvaluationsRequest)
- returns (ListEvaluationsResponse) {
+ rpc ListEvaluations(ListEvaluationsRequest) returns (ListEvaluationsResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*/processors/*/processorVersions/*}/evaluations"
};
@@ -336,8 +315,7 @@ message ProcessOptions {
// A subset of pages to process. If not specified, all pages are processed.
// If a page range is set, only the given pages are extracted and processed
- // from the document. In the output document,
- // [Document.Page.page_number][google.cloud.documentai.v1.Document.Page.page_number]
+ // from the document. In the output document, [Document.Page.page_number][google.cloud.documentai.v1.Document.Page.page_number]
// refers to the page number in the original document. This configuration
// only applies to sync requests.
oneof page_range {
@@ -356,17 +334,14 @@ message ProcessOptions {
// Returns error if set on other processor types.
OcrConfig ocr_config = 1;
- // Optional. Override the schema of the
- // [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will
- // return an Invalid Argument error if this field is set when the underlying
- // [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't
- // support schema override.
+ // Optional. Override the schema of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will return an Invalid
+ // Argument error if this field is set when the underlying
+ // [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't support schema override.
DocumentSchema schema_override = 8 [(google.api.field_behavior) = OPTIONAL];
}
// Request message for the
-// [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument]
-// method.
+// [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] method.
message ProcessRequest {
// The document payload.
oneof source {
@@ -380,27 +355,24 @@ message ProcessRequest {
GcsDocument gcs_document = 8;
}
- // 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 should be skipped for this request. Default to
// `false`.
bool skip_human_review = 3;
- // Specifies which fields to include in the
- // [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document]
+ // Specifies which fields to include in the [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document]
// output. Only supports top-level document and pages field, so it must be in
// the form of `{document_field_name}` or `pages.{page_field_name}`.
google.protobuf.FieldMask field_mask = 6;
@@ -436,8 +408,7 @@ message HumanReviewStatus {
IN_PROGRESS = 3;
// Some error happened during triggering human review, see the
- // [state_message][google.cloud.documentai.v1.HumanReviewStatus.state_message]
- // for details.
+ // [state_message][google.cloud.documentai.v1.HumanReviewStatus.state_message] for details.
ERROR = 4;
}
@@ -448,17 +419,14 @@ message HumanReviewStatus {
string state_message = 2;
// The name of the operation triggered by the processed document. This field
- // is populated only when the
- // [state][google.cloud.documentai.v1.HumanReviewStatus.state] is
- // `HUMAN_REVIEW_IN_PROGRESS`. It has the same response type and metadata as
- // the long-running operation returned by
- // [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument].
+ // is populated only when the [state][google.cloud.documentai.v1.HumanReviewStatus.state] is `HUMAN_REVIEW_IN_PROGRESS`. It has
+ // the same response type and metadata as the long-running operation returned
+ // by [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument].
string human_review_operation = 3;
}
// Response message for the
-// [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument]
-// method.
+// [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] method.
message ProcessResponse {
// The document payload, will populate fields based on the processor's
// behavior.
@@ -471,15 +439,16 @@ message ProcessResponse {
// Request message for
// [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments].
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 the
@@ -510,24 +479,25 @@ message BatchProcessRequest {
// Response message for
// [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments].
-message BatchProcessResponse {}
+message BatchProcessResponse {
+
+}
// The long-running operation metadata for
// [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments].
message BatchProcessMetadata {
// The status of a each individual document in the batch process.
message IndividualProcessStatus {
- // The source of the document, same as the
- // [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source]
- // field in the request when the batch process started.
+ // The source of the document, same as the [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] field in the
+ // request when the batch process started.
string input_gcs_source = 1;
// The status processing the document.
google.rpc.Status status = 2;
// The Cloud Storage output destination (in the request as
- // [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri])
- // of the processed document if it was successful, otherwise empty.
+ // [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) of the processed
+ // document if it was successful, otherwise empty.
string output_gcs_destination = 3;
// The status of human review on the processed document.
@@ -576,9 +546,8 @@ message BatchProcessMetadata {
}
// Request message for the
-// [FetchProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes]
-// method. Some processor types may require the project be added to an
-// allowlist.
+// [FetchProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes] method.
+// Some processor types may require the project be added to an allowlist.
message FetchProcessorTypesRequest {
// Required. The location of processor types to list.
// Format: `projects/{project}/locations/{location}`.
@@ -591,17 +560,15 @@ message FetchProcessorTypesRequest {
}
// Response message for the
-// [FetchProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes]
-// method.
+// [FetchProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes] method.
message FetchProcessorTypesResponse {
// The list of processor types.
repeated ProcessorType processor_types = 1;
}
// Request message for the
-// [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes]
-// method. Some processor types may require the project be added to an
-// allowlist.
+// [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] method.
+// Some processor types may require the project be added to an allowlist.
message ListProcessorTypesRequest {
// Required. The location of processor types to list.
// Format: `projects/{project}/locations/{location}`.
@@ -622,8 +589,7 @@ message ListProcessorTypesRequest {
}
// Response message for the
-// [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes]
-// method.
+// [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] method.
message ListProcessorTypesResponse {
// The processor types.
repeated ProcessorType processor_types = 1;
@@ -634,8 +600,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) = {
@@ -654,8 +620,7 @@ message ListProcessorsRequest {
}
// Response message for the
-// [ListProcessors][google.cloud.documentai.v1.DocumentProcessorService.ListProcessors]
-// method.
+// [ListProcessors][google.cloud.documentai.v1.DocumentProcessorService.ListProcessors] method.
message ListProcessorsResponse {
// The list of processors.
repeated Processor processors = 1;
@@ -665,8 +630,7 @@ message ListProcessorsResponse {
}
// Request message for the
-// [GetProcessorType][google.cloud.documentai.v1.DocumentProcessorService.GetProcessorType]
-// method.
+// [GetProcessorType][google.cloud.documentai.v1.DocumentProcessorService.GetProcessorType] method.
message GetProcessorTypeRequest {
// Required. The processor type resource name.
string name = 1 [
@@ -677,8 +641,7 @@ message GetProcessorTypeRequest {
];
}
-// Request message for the
-// [GetProcessor][google.cloud.documentai.v1.DocumentProcessorService.GetProcessor]
+// Request message for the [GetProcessor][google.cloud.documentai.v1.DocumentProcessorService.GetProcessor]
// method.
message GetProcessorRequest {
// Required. The processor resource name.
@@ -691,8 +654,7 @@ message GetProcessorRequest {
}
// Request message for the
-// [GetProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.GetProcessorVersion]
-// method.
+// [GetProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.GetProcessorVersion] method.
message GetProcessorVersionRequest {
// Required. The processor resource name.
string name = 1 [
@@ -705,9 +667,8 @@ 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) = {
@@ -773,7 +734,9 @@ message DeployProcessorVersionRequest {
// Response message for the
// [DeployProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.DeployProcessorVersion]
// method.
-message DeployProcessorVersionResponse {}
+message DeployProcessorVersionResponse {
+
+}
// The long-running operation metadata for the
// [DeployProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.DeployProcessorVersion]
@@ -799,7 +762,9 @@ message UndeployProcessorVersionRequest {
// Response message for the
// [UndeployProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.UndeployProcessorVersion]
// method.
-message UndeployProcessorVersionResponse {}
+message UndeployProcessorVersionResponse {
+
+}
// The long-running operation metadata for the
// [UndeployProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.UndeployProcessorVersion]
@@ -810,13 +775,12 @@ message UndeployProcessorVersionMetadata {
}
// Request message for the
-// [CreateProcessor][google.cloud.documentai.v1.DocumentProcessorService.CreateProcessor]
-// method. Notice this request is sent to a regionalized backend service. If the
-// [ProcessorType][google.cloud.documentai.v1.ProcessorType] isn't available in
-// that region, the creation fails.
+// [CreateProcessor][google.cloud.documentai.v1.DocumentProcessorService.CreateProcessor] method. Notice
+// this request is sent to a regionalized backend service. If the
+// [ProcessorType][google.cloud.documentai.v1.ProcessorType] isn't available in that region, the creation fails.
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) = {
@@ -824,18 +788,14 @@ message CreateProcessorRequest {
}
];
- // Required. The processor to be created, requires
- // [Processor.type][google.cloud.documentai.v1.Processor.type] and
- // [Processor.display_name][google.cloud.documentai.v1.Processor.display_name]
- // to be set. Also, the
- // [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name]
+ // Required. The processor to be created, requires [Processor.type][google.cloud.documentai.v1.Processor.type] and
+ // [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] to be set. Also, the [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name]
// field must be set if the processor is under CMEK.
Processor processor = 2 [(google.api.field_behavior) = REQUIRED];
}
// Request message for the
-// [DeleteProcessor][google.cloud.documentai.v1.DocumentProcessorService.DeleteProcessor]
-// method.
+// [DeleteProcessor][google.cloud.documentai.v1.DocumentProcessorService.DeleteProcessor] method.
message DeleteProcessorRequest {
// Required. The processor resource name to be deleted.
string name = 1 [
@@ -847,16 +807,14 @@ message DeleteProcessorRequest {
}
// The long-running operation metadata for the
-// [DeleteProcessor][google.cloud.documentai.v1.DocumentProcessorService.DeleteProcessor]
-// method.
+// [DeleteProcessor][google.cloud.documentai.v1.DocumentProcessorService.DeleteProcessor] method.
message DeleteProcessorMetadata {
// The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 5;
}
// Request message for the
-// [EnableProcessor][google.cloud.documentai.v1.DocumentProcessorService.EnableProcessor]
-// method.
+// [EnableProcessor][google.cloud.documentai.v1.DocumentProcessorService.EnableProcessor] method.
message EnableProcessorRequest {
// Required. The processor resource name to be enabled.
string name = 1 [
@@ -868,21 +826,21 @@ message EnableProcessorRequest {
}
// Response message for the
-// [EnableProcessor][google.cloud.documentai.v1.DocumentProcessorService.EnableProcessor]
-// method. Intentionally empty proto for adding fields in future.
-message EnableProcessorResponse {}
+// [EnableProcessor][google.cloud.documentai.v1.DocumentProcessorService.EnableProcessor] method.
+// Intentionally empty proto for adding fields in future.
+message EnableProcessorResponse {
+
+}
// The long-running operation metadata for the
-// [EnableProcessor][google.cloud.documentai.v1.DocumentProcessorService.EnableProcessor]
-// method.
+// [EnableProcessor][google.cloud.documentai.v1.DocumentProcessorService.EnableProcessor] method.
message EnableProcessorMetadata {
// The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 5;
}
// Request message for the
-// [DisableProcessor][google.cloud.documentai.v1.DocumentProcessorService.DisableProcessor]
-// method.
+// [DisableProcessor][google.cloud.documentai.v1.DocumentProcessorService.DisableProcessor] method.
message DisableProcessorRequest {
// Required. The processor resource name to be disabled.
string name = 1 [
@@ -894,13 +852,14 @@ message DisableProcessorRequest {
}
// Response message for the
-// [DisableProcessor][google.cloud.documentai.v1.DocumentProcessorService.DisableProcessor]
-// method. Intentionally empty proto for adding fields in future.
-message DisableProcessorResponse {}
+// [DisableProcessor][google.cloud.documentai.v1.DocumentProcessorService.DisableProcessor] method.
+// Intentionally empty proto for adding fields in future.
+message DisableProcessorResponse {
+
+}
// The long-running operation metadata for the
-// [DisableProcessor][google.cloud.documentai.v1.DocumentProcessorService.DisableProcessor]
-// method.
+// [DisableProcessor][google.cloud.documentai.v1.DocumentProcessorService.DisableProcessor] method.
message DisableProcessorMetadata {
// The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 5;
@@ -910,9 +869,7 @@ message DisableProcessorMetadata {
// [SetDefaultProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.SetDefaultProcessorVersion]
// 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) = {
@@ -920,9 +877,8 @@ 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,
@@ -935,7 +891,9 @@ message SetDefaultProcessorVersionRequest {
// Response message for the
// [SetDefaultProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.SetDefaultProcessorVersion]
// method.
-message SetDefaultProcessorVersionResponse {}
+message SetDefaultProcessorVersionResponse {
+
+}
// The long-running operation metadata for the
// [SetDefaultProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.SetDefaultProcessorVersion]
@@ -949,8 +907,7 @@ message SetDefaultProcessorVersionMetadata {
// [TrainProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.TrainProcessorVersion]
// method.
message TrainProcessorVersionRequest {
- // The input data used to train a new
- // [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion].
+ // The input data used to train a new [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion].
message InputData {
// The documents used for training the new version.
BatchDocumentsInputConfig training_documents = 3;
@@ -976,14 +933,28 @@ message TrainProcessorVersionRequest {
TrainingMethod training_method = 3;
}
+ // Options to control foundation model tuning of the processor.
+ message FoundationModelTuningOptions {
+ // Optional. The number of steps to run for model tuning. Valid values are between
+ // 1 and 400. If not provided, recommended steps will be used.
+ int32 train_steps = 2 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The multiplier to apply to the recommended learning rate. Valid values
+ // are between 0.1 and 10. If not provided, recommended learning rate will
+ // be used.
+ float learning_rate_multiplier = 3 [(google.api.field_behavior) = OPTIONAL];
+ }
+
oneof processor_flags {
// Options to control Custom Document Extraction (CDE) Processor.
CustomDocumentExtractionOptions custom_document_extraction_options = 5;
+
+ // Options to control foundation model tuning of a processor.
+ FoundationModelTuningOptions foundation_model_tuning_options = 12;
}
- // Required. The parent (project, location and processor) to create the new
- // version for. Format:
- // `projects/{project}/locations/{location}/processors/{processor}`.
+ // Required. The parent (project, location and processor) to create the new version for.
+ // Format: `projects/{project}/locations/{location}/processors/{processor}`.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@@ -992,18 +963,16 @@ message TrainProcessorVersionRequest {
];
// Required. The processor version to be created.
- ProcessorVersion processor_version = 2
- [(google.api.field_behavior) = REQUIRED];
+ ProcessorVersion processor_version = 2 [(google.api.field_behavior) = REQUIRED];
// Optional. The schema the processor version will be trained with.
DocumentSchema document_schema = 10 [(google.api.field_behavior) = OPTIONAL];
- // Optional. The input data used to train the
- // [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion].
+ // Optional. The input data used to train the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion].
InputData input_data = 4 [(google.api.field_behavior) = OPTIONAL];
- // Optional. The processor version to use as a base for training. This
- // processor version must be a child of `parent`. Format:
+ // Optional. The processor version to use as a base for training. This processor version
+ // must be a child of `parent`. Format:
// `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`.
string base_processor_version = 8 [(google.api.field_behavior) = OPTIONAL];
}
@@ -1048,8 +1017,7 @@ message TrainProcessorVersionMetadata {
}
// Request message for the
-// [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]
-// method.
+// [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument] method.
message ReviewDocumentRequest {
// The priority level of the human review task.
enum Priority {
@@ -1067,9 +1035,8 @@ message ReviewDocumentRequest {
Document inline_document = 4;
}
- // Required. The resource name of the
- // [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the
- // document will be reviewed with.
+ // Required. The resource name of the [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the document will be
+ // reviewed with.
string human_review_config = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@@ -1088,8 +1055,7 @@ message ReviewDocumentRequest {
}
// Response message for the
-// [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]
-// method.
+// [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument] method.
message ReviewDocumentResponse {
// Possible states of the review operation.
enum State {
@@ -1115,8 +1081,7 @@ message ReviewDocumentResponse {
}
// The long-running operation metadata for the
-// [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]
-// method.
+// [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument] method.
message ReviewDocumentOperationMetadata {
// The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 5;
@@ -1125,13 +1090,9 @@ message ReviewDocumentOperationMetadata {
string question_id = 6;
}
-// Evaluates the given
-// [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] against the
-// supplied documents.
+// Evaluates the given [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] against the supplied documents.
message EvaluateProcessorVersionRequest {
- // Required. The resource name of the
- // [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to
- // evaluate.
+ // Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to evaluate.
// `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
string processor_version = 1 [
(google.api.field_behavior) = REQUIRED,
@@ -1140,10 +1101,9 @@ message EvaluateProcessorVersionRequest {
}
];
- // Optional. The documents used in the evaluation. If unspecified, use the
- // processor's dataset as evaluation input.
- BatchDocumentsInputConfig evaluation_documents = 3
- [(google.api.field_behavior) = OPTIONAL];
+ // Optional. The documents used in the evaluation. If unspecified, use the processor's
+ // dataset as evaluation input.
+ BatchDocumentsInputConfig evaluation_documents = 3 [(google.api.field_behavior) = OPTIONAL];
}
// Metadata of the
@@ -1164,8 +1124,7 @@ message EvaluateProcessorVersionResponse {
// Retrieves a specific Evaluation.
message GetEvaluationRequest {
- // Required. The resource name of the
- // [Evaluation][google.cloud.documentai.v1.Evaluation] to get.
+ // Required. The resource name of the [Evaluation][google.cloud.documentai.v1.Evaluation] to get.
// `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
@@ -1175,12 +1134,9 @@ message GetEvaluationRequest {
];
}
-// Retrieves a list of evaluations for a given
-// [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion].
+// Retrieves a list of evaluations for a given [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion].
message ListEvaluationsRequest {
- // Required. The resource name of the
- // [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list
- // evaluations for.
+ // Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list evaluations for.
// `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
diff --git a/google/cloud/documentai/v1/evaluation.proto b/google/cloud/documentai/v1/evaluation.proto
index 433fba583..0a9d62819 100644
--- a/google/cloud/documentai/v1/evaluation.proto
+++ b/google/cloud/documentai/v1/evaluation.proto
@@ -34,8 +34,8 @@ message EvaluationReference {
// The resource name of the evaluation.
string evaluation = 2 [(google.api.resource_reference) = {
- type: "documentai.googleapis.com/Evaluation"
- }];
+ type: "documentai.googleapis.com/Evaluation"
+ }];
// An aggregate of the statistics for the evaluation with fuzzy matching on.
Evaluation.Metrics aggregate_metrics = 4;
diff --git a/google/cloud/documentai/v1/processor.proto b/google/cloud/documentai/v1/processor.proto
index 29cb85547..b74097bd7 100644
--- a/google/cloud/documentai/v1/processor.proto
+++ b/google/cloud/documentai/v1/processor.proto
@@ -46,10 +46,9 @@ 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.
@@ -137,8 +136,8 @@ message ProcessorVersionAlias {
// The resource name of aliased processor version.
string processor_version = 2 [(google.api.resource_reference) = {
- type: "documentai.googleapis.com/ProcessorVersion"
- }];
+ type: "documentai.googleapis.com/ProcessorVersion"
+ }];
}
// The first-class citizen for Document AI. Each processor defines how to
@@ -204,15 +203,13 @@ 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. The processor version aliases.
- repeated ProcessorVersionAlias processor_version_aliases = 10
- [(google.api.field_behavior) = OUTPUT_ONLY];
+ repeated ProcessorVersionAlias processor_version_aliases = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
- // 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