Enum value maps for Document_Page_Layout_Orientation.
var ( Document_Page_Layout_Orientation_name = map[int32]string{ 0: "ORIENTATION_UNSPECIFIED", 1: "PAGE_UP", 2: "PAGE_RIGHT", 3: "PAGE_DOWN", 4: "PAGE_LEFT", } Document_Page_Layout_Orientation_value = map[string]int32{ "ORIENTATION_UNSPECIFIED": 0, "PAGE_UP": 1, "PAGE_RIGHT": 2, "PAGE_DOWN": 3, "PAGE_LEFT": 4, } )
Enum value maps for Document_Page_Token_DetectedBreak_Type.
var ( Document_Page_Token_DetectedBreak_Type_name = map[int32]string{ 0: "TYPE_UNSPECIFIED", 1: "SPACE", 2: "WIDE_SPACE", 3: "HYPHEN", } Document_Page_Token_DetectedBreak_Type_value = map[string]int32{ "TYPE_UNSPECIFIED": 0, "SPACE": 1, "WIDE_SPACE": 2, "HYPHEN": 3, } )
Enum value maps for OperationMetadata_State.
var ( OperationMetadata_State_name = map[int32]string{ 0: "STATE_UNSPECIFIED", 1: "ACCEPTED", 2: "WAITING", 3: "RUNNING", 4: "SUCCEEDED", 5: "CANCELLED", 6: "FAILED", } OperationMetadata_State_value = map[string]int32{ "STATE_UNSPECIFIED": 0, "ACCEPTED": 1, "WAITING": 2, "RUNNING": 3, "SUCCEEDED": 4, "CANCELLED": 5, "FAILED": 6, } )
var File_google_cloud_documentai_v1beta1_document_proto protoreflect.FileDescriptor
var File_google_cloud_documentai_v1beta1_document_understanding_proto protoreflect.FileDescriptor
var File_google_cloud_documentai_v1beta1_geometry_proto protoreflect.FileDescriptor
func RegisterDocumentUnderstandingServiceServer(s *grpc.Server, srv DocumentUnderstandingServiceServer)
Request to batch process documents as an asynchronous operation.
type BatchProcessDocumentsRequest struct { // Required. Individual requests for each document. Requests []*ProcessDocumentRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` // Target project and location to make a call. // // Format: `projects/{project-id}/locations/{location-id}`. // // If no location is specified, a region will be chosen automatically. Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"` // contains filtered or unexported fields }
func (*BatchProcessDocumentsRequest) Descriptor() ([]byte, []int)
Deprecated: Use BatchProcessDocumentsRequest.ProtoReflect.Descriptor instead.
func (x *BatchProcessDocumentsRequest) GetParent() string
func (x *BatchProcessDocumentsRequest) GetRequests() []*ProcessDocumentRequest
func (*BatchProcessDocumentsRequest) ProtoMessage()
func (x *BatchProcessDocumentsRequest) ProtoReflect() protoreflect.Message
func (x *BatchProcessDocumentsRequest) Reset()
func (x *BatchProcessDocumentsRequest) String() string
Response to an batch document processing request. This is returned in the LRO Operation after the operation is complete.
type BatchProcessDocumentsResponse struct { // Responses for each individual document. Responses []*ProcessDocumentResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` // contains filtered or unexported fields }
func (*BatchProcessDocumentsResponse) Descriptor() ([]byte, []int)
Deprecated: Use BatchProcessDocumentsResponse.ProtoReflect.Descriptor instead.
func (x *BatchProcessDocumentsResponse) GetResponses() []*ProcessDocumentResponse
func (*BatchProcessDocumentsResponse) ProtoMessage()
func (x *BatchProcessDocumentsResponse) ProtoReflect() protoreflect.Message
func (x *BatchProcessDocumentsResponse) Reset()
func (x *BatchProcessDocumentsResponse) String() string
A bounding polygon for the detected image annotation.
type BoundingPoly struct { // The bounding polygon vertices. Vertices []*Vertex `protobuf:"bytes,1,rep,name=vertices,proto3" json:"vertices,omitempty"` // The bounding polygon normalized vertices. NormalizedVertices []*NormalizedVertex `protobuf:"bytes,2,rep,name=normalized_vertices,json=normalizedVertices,proto3" json:"normalized_vertices,omitempty"` // contains filtered or unexported fields }
func (*BoundingPoly) Descriptor() ([]byte, []int)
Deprecated: Use BoundingPoly.ProtoReflect.Descriptor instead.
func (x *BoundingPoly) GetNormalizedVertices() []*NormalizedVertex
func (x *BoundingPoly) GetVertices() []*Vertex
func (*BoundingPoly) ProtoMessage()
func (x *BoundingPoly) ProtoReflect() protoreflect.Message
func (x *BoundingPoly) Reset()
func (x *BoundingPoly) String() string
Document represents the canonical document resource in Document Understanding AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document Understanding AI to iterate and optimize for quality.
type Document struct { // Original source document from the user. // // Types that are assignable to Source: // // *Document_Uri // *Document_Content Source isDocument_Source `protobuf_oneof:"source"` // An IANA published MIME type (also referred to as media type). For more // information, see // https://www.iana.org/assignments/media-types/media-types.xhtml. MimeType string `protobuf:"bytes,3,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` // UTF-8 encoded text in reading order from the document. Text string `protobuf:"bytes,4,opt,name=text,proto3" json:"text,omitempty"` // Styles for the // [Document.text][google.cloud.documentai.v1beta1.Document.text]. TextStyles []*Document_Style `protobuf:"bytes,5,rep,name=text_styles,json=textStyles,proto3" json:"text_styles,omitempty"` // Visual page layout for the // [Document][google.cloud.documentai.v1beta1.Document]. Pages []*Document_Page `protobuf:"bytes,6,rep,name=pages,proto3" json:"pages,omitempty"` // A list of entities detected on // [Document.text][google.cloud.documentai.v1beta1.Document.text]. For // document shards, entities in this list may cross shard boundaries. Entities []*Document_Entity `protobuf:"bytes,7,rep,name=entities,proto3" json:"entities,omitempty"` // Relationship among // [Document.entities][google.cloud.documentai.v1beta1.Document.entities]. EntityRelations []*Document_EntityRelation `protobuf:"bytes,8,rep,name=entity_relations,json=entityRelations,proto3" json:"entity_relations,omitempty"` // Information about the sharding if this document is sharded part of a larger // document. If the document is not sharded, this message is not specified. ShardInfo *Document_ShardInfo `protobuf:"bytes,9,opt,name=shard_info,json=shardInfo,proto3" json:"shard_info,omitempty"` // Any error that occurred while processing this document. Error *status.Status `protobuf:"bytes,10,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*Document) Descriptor() ([]byte, []int)
Deprecated: Use Document.ProtoReflect.Descriptor instead.
func (x *Document) GetContent() []byte
func (x *Document) GetEntities() []*Document_Entity
func (x *Document) GetEntityRelations() []*Document_EntityRelation
func (x *Document) GetError() *status.Status
func (x *Document) GetMimeType() string
func (x *Document) GetPages() []*Document_Page
func (x *Document) GetShardInfo() *Document_ShardInfo
func (m *Document) GetSource() isDocument_Source
func (x *Document) GetText() string
func (x *Document) GetTextStyles() []*Document_Style
func (x *Document) GetUri() string
func (*Document) ProtoMessage()
func (x *Document) ProtoReflect() protoreflect.Message
func (x *Document) Reset()
func (x *Document) String() string
DocumentUnderstandingServiceClient is the client API for DocumentUnderstandingService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type DocumentUnderstandingServiceClient interface { // LRO endpoint to batch process many documents. BatchProcessDocuments(ctx context.Context, in *BatchProcessDocumentsRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) }
func NewDocumentUnderstandingServiceClient(cc grpc.ClientConnInterface) DocumentUnderstandingServiceClient
DocumentUnderstandingServiceServer is the server API for DocumentUnderstandingService service.
type DocumentUnderstandingServiceServer interface { // LRO endpoint to batch process many documents. BatchProcessDocuments(context.Context, *BatchProcessDocumentsRequest) (*longrunning.Operation, error) }
type Document_Content struct { // Inline document content, represented as a stream of bytes. // Note: As with all `bytes` fields, protobuffers use a pure binary // representation, whereas JSON representations use base64. Content []byte `protobuf:"bytes,2,opt,name=content,proto3,oneof"` }
A phrase in the text that is a known entity type, such as a person, an organization, or location.
type Document_Entity struct { // Provenance of the entity. // Text anchor indexing into the // [Document.text][google.cloud.documentai.v1beta1.Document.text]. TextAnchor *Document_TextAnchor `protobuf:"bytes,1,opt,name=text_anchor,json=textAnchor,proto3" json:"text_anchor,omitempty"` // Required. Entity type from a schema e.g. `Address`. Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // Text value in the document e.g. `1600 Amphitheatre Pkwy`. MentionText string `protobuf:"bytes,3,opt,name=mention_text,json=mentionText,proto3" json:"mention_text,omitempty"` // Canonical mention name. This will be a unique value in the entity list // for this document. MentionId string `protobuf:"bytes,4,opt,name=mention_id,json=mentionId,proto3" json:"mention_id,omitempty"` // contains filtered or unexported fields }
func (*Document_Entity) Descriptor() ([]byte, []int)
Deprecated: Use Document_Entity.ProtoReflect.Descriptor instead.
func (x *Document_Entity) GetMentionId() string
func (x *Document_Entity) GetMentionText() string
func (x *Document_Entity) GetTextAnchor() *Document_TextAnchor
func (x *Document_Entity) GetType() string
func (*Document_Entity) ProtoMessage()
func (x *Document_Entity) ProtoReflect() protoreflect.Message
func (x *Document_Entity) Reset()
func (x *Document_Entity) String() string
Relationship between [Entities][google.cloud.documentai.v1beta1.Document.Entity].
type Document_EntityRelation struct { // Subject entity mention_id. SubjectId string `protobuf:"bytes,1,opt,name=subject_id,json=subjectId,proto3" json:"subject_id,omitempty"` // Object entity mention_id. ObjectId string `protobuf:"bytes,2,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"` // Relationship description. Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"` // contains filtered or unexported fields }
func (*Document_EntityRelation) Descriptor() ([]byte, []int)
Deprecated: Use Document_EntityRelation.ProtoReflect.Descriptor instead.
func (x *Document_EntityRelation) GetObjectId() string
func (x *Document_EntityRelation) GetRelation() string
func (x *Document_EntityRelation) GetSubjectId() string
func (*Document_EntityRelation) ProtoMessage()
func (x *Document_EntityRelation) ProtoReflect() protoreflect.Message
func (x *Document_EntityRelation) Reset()
func (x *Document_EntityRelation) String() string
A page in a Document[google.cloud.documentai.v1beta1.Document].
type Document_Page struct { // 1-based index for current // [Page][google.cloud.documentai.v1beta1.Document.Page] in a parent // [Document][google.cloud.documentai.v1beta1.Document]. Useful when a page // is taken out of a [Document][google.cloud.documentai.v1beta1.Document] // for individual processing. PageNumber int32 `protobuf:"varint,1,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` // Physical dimension of the page. Dimension *Document_Page_Dimension `protobuf:"bytes,2,opt,name=dimension,proto3" json:"dimension,omitempty"` // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout] for the // page. Layout *Document_Page_Layout `protobuf:"bytes,3,opt,name=layout,proto3" json:"layout,omitempty"` // A list of detected languages together with confidence. DetectedLanguages []*Document_Page_DetectedLanguage `protobuf:"bytes,4,rep,name=detected_languages,json=detectedLanguages,proto3" json:"detected_languages,omitempty"` // A list of visually detected text blocks on the page. // A block has a set of lines (collected into paragraphs) that have a common // line-spacing and orientation. Blocks []*Document_Page_Block `protobuf:"bytes,5,rep,name=blocks,proto3" json:"blocks,omitempty"` // A list of visually detected text paragraphs on the page. // A collection of lines that a human would perceive as a paragraph. Paragraphs []*Document_Page_Paragraph `protobuf:"bytes,6,rep,name=paragraphs,proto3" json:"paragraphs,omitempty"` // A list of visually detected text lines on the page. // A collection of tokens that a human would perceive as a line. Lines []*Document_Page_Line `protobuf:"bytes,7,rep,name=lines,proto3" json:"lines,omitempty"` // A list of visually detected tokens on the page. Tokens []*Document_Page_Token `protobuf:"bytes,8,rep,name=tokens,proto3" json:"tokens,omitempty"` // A list of detected non-text visual elements e.g. checkbox, // signature etc. on the page. VisualElements []*Document_Page_VisualElement `protobuf:"bytes,9,rep,name=visual_elements,json=visualElements,proto3" json:"visual_elements,omitempty"` // A list of visually detected tables on the page. Tables []*Document_Page_Table `protobuf:"bytes,10,rep,name=tables,proto3" json:"tables,omitempty"` // A list of visually detected form fields on the page. FormFields []*Document_Page_FormField `protobuf:"bytes,11,rep,name=form_fields,json=formFields,proto3" json:"form_fields,omitempty"` // contains filtered or unexported fields }
func (*Document_Page) Descriptor() ([]byte, []int)
Deprecated: Use Document_Page.ProtoReflect.Descriptor instead.
func (x *Document_Page) GetBlocks() []*Document_Page_Block
func (x *Document_Page) GetDetectedLanguages() []*Document_Page_DetectedLanguage
func (x *Document_Page) GetDimension() *Document_Page_Dimension
func (x *Document_Page) GetFormFields() []*Document_Page_FormField
func (x *Document_Page) GetLayout() *Document_Page_Layout
func (x *Document_Page) GetLines() []*Document_Page_Line
func (x *Document_Page) GetPageNumber() int32
func (x *Document_Page) GetParagraphs() []*Document_Page_Paragraph
func (x *Document_Page) GetTables() []*Document_Page_Table
func (x *Document_Page) GetTokens() []*Document_Page_Token
func (x *Document_Page) GetVisualElements() []*Document_Page_VisualElement
func (*Document_Page) ProtoMessage()
func (x *Document_Page) ProtoReflect() protoreflect.Message
func (x *Document_Page) Reset()
func (x *Document_Page) String() string
A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.
type Document_Page_Block struct { // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout] for // [Block][google.cloud.documentai.v1beta1.Document.Page.Block]. Layout *Document_Page_Layout `protobuf:"bytes,1,opt,name=layout,proto3" json:"layout,omitempty"` // A list of detected languages together with confidence. DetectedLanguages []*Document_Page_DetectedLanguage `protobuf:"bytes,2,rep,name=detected_languages,json=detectedLanguages,proto3" json:"detected_languages,omitempty"` // contains filtered or unexported fields }
func (*Document_Page_Block) Descriptor() ([]byte, []int)
Deprecated: Use Document_Page_Block.ProtoReflect.Descriptor instead.
func (x *Document_Page_Block) GetDetectedLanguages() []*Document_Page_DetectedLanguage
func (x *Document_Page_Block) GetLayout() *Document_Page_Layout
func (*Document_Page_Block) ProtoMessage()
func (x *Document_Page_Block) ProtoReflect() protoreflect.Message
func (x *Document_Page_Block) Reset()
func (x *Document_Page_Block) String() string
Detected language for a structural component.
type Document_Page_DetectedLanguage struct { // The BCP-47 language code, such as "en-US" or "sr-Latn". For more // information, see // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. LanguageCode string `protobuf:"bytes,1,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` // Confidence of detected language. Range [0, 1]. Confidence float32 `protobuf:"fixed32,2,opt,name=confidence,proto3" json:"confidence,omitempty"` // contains filtered or unexported fields }
func (*Document_Page_DetectedLanguage) Descriptor() ([]byte, []int)
Deprecated: Use Document_Page_DetectedLanguage.ProtoReflect.Descriptor instead.
func (x *Document_Page_DetectedLanguage) GetConfidence() float32
func (x *Document_Page_DetectedLanguage) GetLanguageCode() string
func (*Document_Page_DetectedLanguage) ProtoMessage()
func (x *Document_Page_DetectedLanguage) ProtoReflect() protoreflect.Message
func (x *Document_Page_DetectedLanguage) Reset()
func (x *Document_Page_DetectedLanguage) String() string
Dimension for the page.
type Document_Page_Dimension struct { // Page width. Width float32 `protobuf:"fixed32,1,opt,name=width,proto3" json:"width,omitempty"` // Page height. Height float32 `protobuf:"fixed32,2,opt,name=height,proto3" json:"height,omitempty"` // Dimension unit. Unit string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"` // contains filtered or unexported fields }
func (*Document_Page_Dimension) Descriptor() ([]byte, []int)
Deprecated: Use Document_Page_Dimension.ProtoReflect.Descriptor instead.
func (x *Document_Page_Dimension) GetHeight() float32
func (x *Document_Page_Dimension) GetUnit() string
func (x *Document_Page_Dimension) GetWidth() float32
func (*Document_Page_Dimension) ProtoMessage()
func (x *Document_Page_Dimension) ProtoReflect() protoreflect.Message
func (x *Document_Page_Dimension) Reset()
func (x *Document_Page_Dimension) String() string
A form field detected on the page.
type Document_Page_FormField struct { // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout] for the // [FormField][google.cloud.documentai.v1beta1.Document.Page.FormField] // name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. FieldName *Document_Page_Layout `protobuf:"bytes,1,opt,name=field_name,json=fieldName,proto3" json:"field_name,omitempty"` // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout] for the // [FormField][google.cloud.documentai.v1beta1.Document.Page.FormField] // value. FieldValue *Document_Page_Layout `protobuf:"bytes,2,opt,name=field_value,json=fieldValue,proto3" json:"field_value,omitempty"` // A list of detected languages for name together with confidence. NameDetectedLanguages []*Document_Page_DetectedLanguage `protobuf:"bytes,3,rep,name=name_detected_languages,json=nameDetectedLanguages,proto3" json:"name_detected_languages,omitempty"` // A list of detected languages for value together with confidence. ValueDetectedLanguages []*Document_Page_DetectedLanguage `protobuf:"bytes,4,rep,name=value_detected_languages,json=valueDetectedLanguages,proto3" json:"value_detected_languages,omitempty"` // contains filtered or unexported fields }
func (*Document_Page_FormField) Descriptor() ([]byte, []int)
Deprecated: Use Document_Page_FormField.ProtoReflect.Descriptor instead.
func (x *Document_Page_FormField) GetFieldName() *Document_Page_Layout
func (x *Document_Page_FormField) GetFieldValue() *Document_Page_Layout
func (x *Document_Page_FormField) GetNameDetectedLanguages() []*Document_Page_DetectedLanguage
func (x *Document_Page_FormField) GetValueDetectedLanguages() []*Document_Page_DetectedLanguage
func (*Document_Page_FormField) ProtoMessage()
func (x *Document_Page_FormField) ProtoReflect() protoreflect.Message
func (x *Document_Page_FormField) Reset()
func (x *Document_Page_FormField) String() string
Visual element describing a layout unit on a page.
type Document_Page_Layout struct { // Text anchor indexing into the // [Document.text][google.cloud.documentai.v1beta1.Document.text]. TextAnchor *Document_TextAnchor `protobuf:"bytes,1,opt,name=text_anchor,json=textAnchor,proto3" json:"text_anchor,omitempty"` // Confidence of the current // [Layout][google.cloud.documentai.v1beta1.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 float32 `protobuf:"fixed32,2,opt,name=confidence,proto3" json:"confidence,omitempty"` // The bounding polygon for the // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout]. BoundingPoly *BoundingPoly `protobuf:"bytes,3,opt,name=bounding_poly,json=boundingPoly,proto3" json:"bounding_poly,omitempty"` // Detected orientation for the // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout]. Orientation Document_Page_Layout_Orientation `protobuf:"varint,4,opt,name=orientation,proto3,enum=google.cloud.documentai.v1beta1.Document_Page_Layout_Orientation" json:"orientation,omitempty"` // contains filtered or unexported fields }
func (*Document_Page_Layout) Descriptor() ([]byte, []int)
Deprecated: Use Document_Page_Layout.ProtoReflect.Descriptor instead.
func (x *Document_Page_Layout) GetBoundingPoly() *BoundingPoly
func (x *Document_Page_Layout) GetConfidence() float32
func (x *Document_Page_Layout) GetOrientation() Document_Page_Layout_Orientation
func (x *Document_Page_Layout) GetTextAnchor() *Document_TextAnchor
func (*Document_Page_Layout) ProtoMessage()
func (x *Document_Page_Layout) ProtoReflect() protoreflect.Message
func (x *Document_Page_Layout) Reset()
func (x *Document_Page_Layout) String() string
Detected human reading orientation.
type Document_Page_Layout_Orientation int32
const ( // Unspecified orientation. Document_Page_Layout_ORIENTATION_UNSPECIFIED Document_Page_Layout_Orientation = 0 // Orientation is aligned with page up. Document_Page_Layout_PAGE_UP Document_Page_Layout_Orientation = 1 // Orientation is aligned with page right. // Turn the head 90 degrees clockwise from upright to read. Document_Page_Layout_PAGE_RIGHT Document_Page_Layout_Orientation = 2 // Orientation is aligned with page down. // Turn the head 180 degrees from upright to read. Document_Page_Layout_PAGE_DOWN Document_Page_Layout_Orientation = 3 // Orientation is aligned with page left. // Turn the head 90 degrees counterclockwise from upright to read. Document_Page_Layout_PAGE_LEFT Document_Page_Layout_Orientation = 4 )
func (Document_Page_Layout_Orientation) Descriptor() protoreflect.EnumDescriptor
func (x Document_Page_Layout_Orientation) Enum() *Document_Page_Layout_Orientation
func (Document_Page_Layout_Orientation) EnumDescriptor() ([]byte, []int)
Deprecated: Use Document_Page_Layout_Orientation.Descriptor instead.
func (x Document_Page_Layout_Orientation) Number() protoreflect.EnumNumber
func (x Document_Page_Layout_Orientation) String() string
func (Document_Page_Layout_Orientation) Type() protoreflect.EnumType
A collection of tokens that a human would perceive as a line. Does not cross column boundaries, can be horizontal, vertical, etc.
type Document_Page_Line struct { // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout] for // [Line][google.cloud.documentai.v1beta1.Document.Page.Line]. Layout *Document_Page_Layout `protobuf:"bytes,1,opt,name=layout,proto3" json:"layout,omitempty"` // A list of detected languages together with confidence. DetectedLanguages []*Document_Page_DetectedLanguage `protobuf:"bytes,2,rep,name=detected_languages,json=detectedLanguages,proto3" json:"detected_languages,omitempty"` // contains filtered or unexported fields }
func (*Document_Page_Line) Descriptor() ([]byte, []int)
Deprecated: Use Document_Page_Line.ProtoReflect.Descriptor instead.
func (x *Document_Page_Line) GetDetectedLanguages() []*Document_Page_DetectedLanguage
func (x *Document_Page_Line) GetLayout() *Document_Page_Layout
func (*Document_Page_Line) ProtoMessage()
func (x *Document_Page_Line) ProtoReflect() protoreflect.Message
func (x *Document_Page_Line) Reset()
func (x *Document_Page_Line) String() string
A collection of lines that a human would perceive as a paragraph.
type Document_Page_Paragraph struct { // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout] for // [Paragraph][google.cloud.documentai.v1beta1.Document.Page.Paragraph]. Layout *Document_Page_Layout `protobuf:"bytes,1,opt,name=layout,proto3" json:"layout,omitempty"` // A list of detected languages together with confidence. DetectedLanguages []*Document_Page_DetectedLanguage `protobuf:"bytes,2,rep,name=detected_languages,json=detectedLanguages,proto3" json:"detected_languages,omitempty"` // contains filtered or unexported fields }
func (*Document_Page_Paragraph) Descriptor() ([]byte, []int)
Deprecated: Use Document_Page_Paragraph.ProtoReflect.Descriptor instead.
func (x *Document_Page_Paragraph) GetDetectedLanguages() []*Document_Page_DetectedLanguage
func (x *Document_Page_Paragraph) GetLayout() *Document_Page_Layout
func (*Document_Page_Paragraph) ProtoMessage()
func (x *Document_Page_Paragraph) ProtoReflect() protoreflect.Message
func (x *Document_Page_Paragraph) Reset()
func (x *Document_Page_Paragraph) String() string
A table representation similar to HTML table structure.
type Document_Page_Table struct { // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout] for // [Table][google.cloud.documentai.v1beta1.Document.Page.Table]. Layout *Document_Page_Layout `protobuf:"bytes,1,opt,name=layout,proto3" json:"layout,omitempty"` // Header rows of the table. HeaderRows []*Document_Page_Table_TableRow `protobuf:"bytes,2,rep,name=header_rows,json=headerRows,proto3" json:"header_rows,omitempty"` // Body rows of the table. BodyRows []*Document_Page_Table_TableRow `protobuf:"bytes,3,rep,name=body_rows,json=bodyRows,proto3" json:"body_rows,omitempty"` // A list of detected languages together with confidence. DetectedLanguages []*Document_Page_DetectedLanguage `protobuf:"bytes,4,rep,name=detected_languages,json=detectedLanguages,proto3" json:"detected_languages,omitempty"` // contains filtered or unexported fields }
func (*Document_Page_Table) Descriptor() ([]byte, []int)
Deprecated: Use Document_Page_Table.ProtoReflect.Descriptor instead.
func (x *Document_Page_Table) GetBodyRows() []*Document_Page_Table_TableRow
func (x *Document_Page_Table) GetDetectedLanguages() []*Document_Page_DetectedLanguage
func (x *Document_Page_Table) GetHeaderRows() []*Document_Page_Table_TableRow
func (x *Document_Page_Table) GetLayout() *Document_Page_Layout
func (*Document_Page_Table) ProtoMessage()
func (x *Document_Page_Table) ProtoReflect() protoreflect.Message
func (x *Document_Page_Table) Reset()
func (x *Document_Page_Table) String() string
A cell representation inside the table.
type Document_Page_Table_TableCell struct { // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout] for // [TableCell][google.cloud.documentai.v1beta1.Document.Page.Table.TableCell]. Layout *Document_Page_Layout `protobuf:"bytes,1,opt,name=layout,proto3" json:"layout,omitempty"` // How many rows this cell spans. RowSpan int32 `protobuf:"varint,2,opt,name=row_span,json=rowSpan,proto3" json:"row_span,omitempty"` // How many columns this cell spans. ColSpan int32 `protobuf:"varint,3,opt,name=col_span,json=colSpan,proto3" json:"col_span,omitempty"` // A list of detected languages together with confidence. DetectedLanguages []*Document_Page_DetectedLanguage `protobuf:"bytes,4,rep,name=detected_languages,json=detectedLanguages,proto3" json:"detected_languages,omitempty"` // contains filtered or unexported fields }
func (*Document_Page_Table_TableCell) Descriptor() ([]byte, []int)
Deprecated: Use Document_Page_Table_TableCell.ProtoReflect.Descriptor instead.
func (x *Document_Page_Table_TableCell) GetColSpan() int32
func (x *Document_Page_Table_TableCell) GetDetectedLanguages() []*Document_Page_DetectedLanguage
func (x *Document_Page_Table_TableCell) GetLayout() *Document_Page_Layout
func (x *Document_Page_Table_TableCell) GetRowSpan() int32
func (*Document_Page_Table_TableCell) ProtoMessage()
func (x *Document_Page_Table_TableCell) ProtoReflect() protoreflect.Message
func (x *Document_Page_Table_TableCell) Reset()
func (x *Document_Page_Table_TableCell) String() string
A row of table cells.
type Document_Page_Table_TableRow struct { // Cells that make up this row. Cells []*Document_Page_Table_TableCell `protobuf:"bytes,1,rep,name=cells,proto3" json:"cells,omitempty"` // contains filtered or unexported fields }
func (*Document_Page_Table_TableRow) Descriptor() ([]byte, []int)
Deprecated: Use Document_Page_Table_TableRow.ProtoReflect.Descriptor instead.
func (x *Document_Page_Table_TableRow) GetCells() []*Document_Page_Table_TableCell
func (*Document_Page_Table_TableRow) ProtoMessage()
func (x *Document_Page_Table_TableRow) ProtoReflect() protoreflect.Message
func (x *Document_Page_Table_TableRow) Reset()
func (x *Document_Page_Table_TableRow) String() string
A detected token.
type Document_Page_Token struct { // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout] for // [Token][google.cloud.documentai.v1beta1.Document.Page.Token]. Layout *Document_Page_Layout `protobuf:"bytes,1,opt,name=layout,proto3" json:"layout,omitempty"` // Detected break at the end of a // [Token][google.cloud.documentai.v1beta1.Document.Page.Token]. DetectedBreak *Document_Page_Token_DetectedBreak `protobuf:"bytes,2,opt,name=detected_break,json=detectedBreak,proto3" json:"detected_break,omitempty"` // A list of detected languages together with confidence. DetectedLanguages []*Document_Page_DetectedLanguage `protobuf:"bytes,3,rep,name=detected_languages,json=detectedLanguages,proto3" json:"detected_languages,omitempty"` // contains filtered or unexported fields }
func (*Document_Page_Token) Descriptor() ([]byte, []int)
Deprecated: Use Document_Page_Token.ProtoReflect.Descriptor instead.
func (x *Document_Page_Token) GetDetectedBreak() *Document_Page_Token_DetectedBreak
func (x *Document_Page_Token) GetDetectedLanguages() []*Document_Page_DetectedLanguage
func (x *Document_Page_Token) GetLayout() *Document_Page_Layout
func (*Document_Page_Token) ProtoMessage()
func (x *Document_Page_Token) ProtoReflect() protoreflect.Message
func (x *Document_Page_Token) Reset()
func (x *Document_Page_Token) String() string
Detected break at the end of a [Token][google.cloud.documentai.v1beta1.Document.Page.Token].
type Document_Page_Token_DetectedBreak struct { // Detected break type. Type Document_Page_Token_DetectedBreak_Type `protobuf:"varint,1,opt,name=type,proto3,enum=google.cloud.documentai.v1beta1.Document_Page_Token_DetectedBreak_Type" json:"type,omitempty"` // contains filtered or unexported fields }
func (*Document_Page_Token_DetectedBreak) Descriptor() ([]byte, []int)
Deprecated: Use Document_Page_Token_DetectedBreak.ProtoReflect.Descriptor instead.
func (x *Document_Page_Token_DetectedBreak) GetType() Document_Page_Token_DetectedBreak_Type
func (*Document_Page_Token_DetectedBreak) ProtoMessage()
func (x *Document_Page_Token_DetectedBreak) ProtoReflect() protoreflect.Message
func (x *Document_Page_Token_DetectedBreak) Reset()
func (x *Document_Page_Token_DetectedBreak) String() string
Enum to denote the type of break found.
type Document_Page_Token_DetectedBreak_Type int32
const ( // Unspecified break type. Document_Page_Token_DetectedBreak_TYPE_UNSPECIFIED Document_Page_Token_DetectedBreak_Type = 0 // A single whitespace. Document_Page_Token_DetectedBreak_SPACE Document_Page_Token_DetectedBreak_Type = 1 // A wider whitespace. Document_Page_Token_DetectedBreak_WIDE_SPACE Document_Page_Token_DetectedBreak_Type = 2 // A hyphen that indicates that a token has been split across lines. Document_Page_Token_DetectedBreak_HYPHEN Document_Page_Token_DetectedBreak_Type = 3 )
func (Document_Page_Token_DetectedBreak_Type) Descriptor() protoreflect.EnumDescriptor
func (x Document_Page_Token_DetectedBreak_Type) Enum() *Document_Page_Token_DetectedBreak_Type
func (Document_Page_Token_DetectedBreak_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use Document_Page_Token_DetectedBreak_Type.Descriptor instead.
func (x Document_Page_Token_DetectedBreak_Type) Number() protoreflect.EnumNumber
func (x Document_Page_Token_DetectedBreak_Type) String() string
func (Document_Page_Token_DetectedBreak_Type) Type() protoreflect.EnumType
Detected non-text visual elements e.g. checkbox, signature etc. on the page.
type Document_Page_VisualElement struct { // [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout] for // [Token][google.cloud.documentai.v1beta1.Document.Page.Token]. Layout *Document_Page_Layout `protobuf:"bytes,1,opt,name=layout,proto3" json:"layout,omitempty"` // Type of the // [VisualElement][google.cloud.documentai.v1beta1.Document.Page.VisualElement]. Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // A list of detected languages together with confidence. DetectedLanguages []*Document_Page_DetectedLanguage `protobuf:"bytes,3,rep,name=detected_languages,json=detectedLanguages,proto3" json:"detected_languages,omitempty"` // contains filtered or unexported fields }
func (*Document_Page_VisualElement) Descriptor() ([]byte, []int)
Deprecated: Use Document_Page_VisualElement.ProtoReflect.Descriptor instead.
func (x *Document_Page_VisualElement) GetDetectedLanguages() []*Document_Page_DetectedLanguage
func (x *Document_Page_VisualElement) GetLayout() *Document_Page_Layout
func (x *Document_Page_VisualElement) GetType() string
func (*Document_Page_VisualElement) ProtoMessage()
func (x *Document_Page_VisualElement) ProtoReflect() protoreflect.Message
func (x *Document_Page_VisualElement) Reset()
func (x *Document_Page_VisualElement) String() string
For a large document, sharding may be performed to produce several document shards. Each document shard contains this field to detail which shard it is.
type Document_ShardInfo struct { // The 0-based index of this shard. ShardIndex int64 `protobuf:"varint,1,opt,name=shard_index,json=shardIndex,proto3" json:"shard_index,omitempty"` // Total number of shards. ShardCount int64 `protobuf:"varint,2,opt,name=shard_count,json=shardCount,proto3" json:"shard_count,omitempty"` // The index of the first character in // [Document.text][google.cloud.documentai.v1beta1.Document.text] in the // overall document global text. TextOffset int64 `protobuf:"varint,3,opt,name=text_offset,json=textOffset,proto3" json:"text_offset,omitempty"` // contains filtered or unexported fields }
func (*Document_ShardInfo) Descriptor() ([]byte, []int)
Deprecated: Use Document_ShardInfo.ProtoReflect.Descriptor instead.
func (x *Document_ShardInfo) GetShardCount() int64
func (x *Document_ShardInfo) GetShardIndex() int64
func (x *Document_ShardInfo) GetTextOffset() int64
func (*Document_ShardInfo) ProtoMessage()
func (x *Document_ShardInfo) ProtoReflect() protoreflect.Message
func (x *Document_ShardInfo) Reset()
func (x *Document_ShardInfo) String() string
Annotation for common text style attributes. This adheres to CSS conventions as much as possible.
type Document_Style struct { // Text anchor indexing into the // [Document.text][google.cloud.documentai.v1beta1.Document.text]. TextAnchor *Document_TextAnchor `protobuf:"bytes,1,opt,name=text_anchor,json=textAnchor,proto3" json:"text_anchor,omitempty"` // Text color. Color *color.Color `protobuf:"bytes,2,opt,name=color,proto3" json:"color,omitempty"` // Text background color. BackgroundColor *color.Color `protobuf:"bytes,3,opt,name=background_color,json=backgroundColor,proto3" json:"background_color,omitempty"` // Font weight. Possible values are normal, bold, bolder, and lighter. // https://www.w3schools.com/cssref/pr_font_weight.asp FontWeight string `protobuf:"bytes,4,opt,name=font_weight,json=fontWeight,proto3" json:"font_weight,omitempty"` // Text style. Possible values are normal, italic, and oblique. // https://www.w3schools.com/cssref/pr_font_font-style.asp TextStyle string `protobuf:"bytes,5,opt,name=text_style,json=textStyle,proto3" json:"text_style,omitempty"` // Text decoration. Follows CSS standard. // <text-decoration-line> <text-decoration-color> <text-decoration-style> // https://www.w3schools.com/cssref/pr_text_text-decoration.asp TextDecoration string `protobuf:"bytes,6,opt,name=text_decoration,json=textDecoration,proto3" json:"text_decoration,omitempty"` // Font size. FontSize *Document_Style_FontSize `protobuf:"bytes,7,opt,name=font_size,json=fontSize,proto3" json:"font_size,omitempty"` // contains filtered or unexported fields }
func (*Document_Style) Descriptor() ([]byte, []int)
Deprecated: Use Document_Style.ProtoReflect.Descriptor instead.
func (x *Document_Style) GetBackgroundColor() *color.Color
func (x *Document_Style) GetColor() *color.Color
func (x *Document_Style) GetFontSize() *Document_Style_FontSize
func (x *Document_Style) GetFontWeight() string
func (x *Document_Style) GetTextAnchor() *Document_TextAnchor
func (x *Document_Style) GetTextDecoration() string
func (x *Document_Style) GetTextStyle() string
func (*Document_Style) ProtoMessage()
func (x *Document_Style) ProtoReflect() protoreflect.Message
func (x *Document_Style) Reset()
func (x *Document_Style) String() string
Font size with unit.
type Document_Style_FontSize struct { // Font size for the text. Size float32 `protobuf:"fixed32,1,opt,name=size,proto3" json:"size,omitempty"` // Unit for the font size. Follows CSS naming (in, px, pt, etc.). Unit string `protobuf:"bytes,2,opt,name=unit,proto3" json:"unit,omitempty"` // contains filtered or unexported fields }
func (*Document_Style_FontSize) Descriptor() ([]byte, []int)
Deprecated: Use Document_Style_FontSize.ProtoReflect.Descriptor instead.
func (x *Document_Style_FontSize) GetSize() float32
func (x *Document_Style_FontSize) GetUnit() string
func (*Document_Style_FontSize) ProtoMessage()
func (x *Document_Style_FontSize) ProtoReflect() protoreflect.Message
func (x *Document_Style_FontSize) Reset()
func (x *Document_Style_FontSize) String() string
Text reference indexing into the [Document.text][google.cloud.documentai.v1beta1.Document.text].
type Document_TextAnchor struct { // The text segments from the // [Document.text][google.cloud.documentai.v1beta1.Document.text]. TextSegments []*Document_TextAnchor_TextSegment `protobuf:"bytes,1,rep,name=text_segments,json=textSegments,proto3" json:"text_segments,omitempty"` // contains filtered or unexported fields }
func (*Document_TextAnchor) Descriptor() ([]byte, []int)
Deprecated: Use Document_TextAnchor.ProtoReflect.Descriptor instead.
func (x *Document_TextAnchor) GetTextSegments() []*Document_TextAnchor_TextSegment
func (*Document_TextAnchor) ProtoMessage()
func (x *Document_TextAnchor) ProtoReflect() protoreflect.Message
func (x *Document_TextAnchor) Reset()
func (x *Document_TextAnchor) String() string
A text segment in the [Document.text][google.cloud.documentai.v1beta1.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.v1beta1.Document.ShardInfo.text_offset]
type Document_TextAnchor_TextSegment struct { // [TextSegment][google.cloud.documentai.v1beta1.Document.TextAnchor.TextSegment] // start UTF-8 char index in the // [Document.text][google.cloud.documentai.v1beta1.Document.text]. StartIndex int64 `protobuf:"varint,1,opt,name=start_index,json=startIndex,proto3" json:"start_index,omitempty"` // [TextSegment][google.cloud.documentai.v1beta1.Document.TextAnchor.TextSegment] // half open end UTF-8 char index in the // [Document.text][google.cloud.documentai.v1beta1.Document.text]. EndIndex int64 `protobuf:"varint,2,opt,name=end_index,json=endIndex,proto3" json:"end_index,omitempty"` // contains filtered or unexported fields }
func (*Document_TextAnchor_TextSegment) Descriptor() ([]byte, []int)
Deprecated: Use Document_TextAnchor_TextSegment.ProtoReflect.Descriptor instead.
func (x *Document_TextAnchor_TextSegment) GetEndIndex() int64
func (x *Document_TextAnchor_TextSegment) GetStartIndex() int64
func (*Document_TextAnchor_TextSegment) ProtoMessage()
func (x *Document_TextAnchor_TextSegment) ProtoReflect() protoreflect.Message
func (x *Document_TextAnchor_TextSegment) Reset()
func (x *Document_TextAnchor_TextSegment) String() string
type Document_Uri struct { // Currently supports Google Cloud Storage URI of the form // // `gs://bucket_name/object_name`. Object versioning is not supported. // See [Google Cloud Storage Request // URIs](https://cloud.google.com/storage/docs/reference-uris) for more // info. Uri string `protobuf:"bytes,1,opt,name=uri,proto3,oneof"` }
Parameters to control entity extraction behavior.
type EntityExtractionParams struct { // Whether to enable entity extraction. Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` // Model version of the entity extraction. Default is // "builtin/stable". Specify "builtin/latest" for the latest model. ModelVersion string `protobuf:"bytes,2,opt,name=model_version,json=modelVersion,proto3" json:"model_version,omitempty"` // contains filtered or unexported fields }
func (*EntityExtractionParams) Descriptor() ([]byte, []int)
Deprecated: Use EntityExtractionParams.ProtoReflect.Descriptor instead.
func (x *EntityExtractionParams) GetEnabled() bool
func (x *EntityExtractionParams) GetModelVersion() string
func (*EntityExtractionParams) ProtoMessage()
func (x *EntityExtractionParams) ProtoReflect() protoreflect.Message
func (x *EntityExtractionParams) Reset()
func (x *EntityExtractionParams) String() string
Parameters to control form extraction behavior.
type FormExtractionParams struct { // Whether to enable form extraction. Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` // User can provide pairs of (key text, value type) to improve the parsing // result. // // For example, if a document has a field called "Date" that holds a date // value and a field called "Amount" that may hold either a currency value // (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the // following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key": // "Amount", "value_types": [ "PRICE", "NUMBER" ]} ] // // If the value type is unknown, but you want to provide hints for the keys, // you can leave the value_types field blank. e.g. {"key": "Date", // "value_types": []} KeyValuePairHints []*KeyValuePairHint `protobuf:"bytes,2,rep,name=key_value_pair_hints,json=keyValuePairHints,proto3" json:"key_value_pair_hints,omitempty"` // Model version of the form extraction system. Default is // "builtin/stable". Specify "builtin/latest" for the latest model. ModelVersion string `protobuf:"bytes,3,opt,name=model_version,json=modelVersion,proto3" json:"model_version,omitempty"` // contains filtered or unexported fields }
func (*FormExtractionParams) Descriptor() ([]byte, []int)
Deprecated: Use FormExtractionParams.ProtoReflect.Descriptor instead.
func (x *FormExtractionParams) GetEnabled() bool
func (x *FormExtractionParams) GetKeyValuePairHints() []*KeyValuePairHint
func (x *FormExtractionParams) GetModelVersion() string
func (*FormExtractionParams) ProtoMessage()
func (x *FormExtractionParams) ProtoReflect() protoreflect.Message
func (x *FormExtractionParams) Reset()
func (x *FormExtractionParams) String() string
The Google Cloud Storage location where the output file will be written to.
type GcsDestination struct { Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` // contains filtered or unexported fields }
func (*GcsDestination) Descriptor() ([]byte, []int)
Deprecated: Use GcsDestination.ProtoReflect.Descriptor instead.
func (x *GcsDestination) GetUri() string
func (*GcsDestination) ProtoMessage()
func (x *GcsDestination) ProtoReflect() protoreflect.Message
func (x *GcsDestination) Reset()
func (x *GcsDestination) String() string
The Google Cloud Storage location where the input file will be read from.
type GcsSource struct { Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` // contains filtered or unexported fields }
func (*GcsSource) Descriptor() ([]byte, []int)
Deprecated: Use GcsSource.ProtoReflect.Descriptor instead.
func (x *GcsSource) GetUri() string
func (*GcsSource) ProtoMessage()
func (x *GcsSource) ProtoReflect() protoreflect.Message
func (x *GcsSource) Reset()
func (x *GcsSource) String() string
The desired input location and metadata.
type InputConfig struct { // Required. // // Types that are assignable to Source: // *InputConfig_GcsSource Source isInputConfig_Source `protobuf_oneof:"source"` // Required. Mimetype of the input. Current supported mimetypes are // application/pdf, image/tiff, and image/gif. MimeType string `protobuf:"bytes,2,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` // contains filtered or unexported fields }
func (*InputConfig) Descriptor() ([]byte, []int)
Deprecated: Use InputConfig.ProtoReflect.Descriptor instead.
func (x *InputConfig) GetGcsSource() *GcsSource
func (x *InputConfig) GetMimeType() string
func (m *InputConfig) GetSource() isInputConfig_Source
func (*InputConfig) ProtoMessage()
func (x *InputConfig) ProtoReflect() protoreflect.Message
func (x *InputConfig) Reset()
func (x *InputConfig) String() string
type InputConfig_GcsSource struct { // The Google Cloud Storage location to read the input from. This must be a // single file. GcsSource *GcsSource `protobuf:"bytes,1,opt,name=gcs_source,json=gcsSource,proto3,oneof"` }
User-provided hint for key value pair.
type KeyValuePairHint struct { // The key text for the hint. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // Type of the value. This is case-insensitive, and could be one of: // ADDRESS, LOCATION, ORGANIZATION, PERSON, PHONE_NUMBER, // ID, NUMBER, EMAIL, PRICE, TERMS, DATE, NAME. Types not in this list will // be ignored. ValueTypes []string `protobuf:"bytes,2,rep,name=value_types,json=valueTypes,proto3" json:"value_types,omitempty"` // contains filtered or unexported fields }
func (*KeyValuePairHint) Descriptor() ([]byte, []int)
Deprecated: Use KeyValuePairHint.ProtoReflect.Descriptor instead.
func (x *KeyValuePairHint) GetKey() string
func (x *KeyValuePairHint) GetValueTypes() []string
func (*KeyValuePairHint) ProtoMessage()
func (x *KeyValuePairHint) ProtoReflect() protoreflect.Message
func (x *KeyValuePairHint) Reset()
func (x *KeyValuePairHint) String() string
A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
type NormalizedVertex struct { // X coordinate. X float32 `protobuf:"fixed32,1,opt,name=x,proto3" json:"x,omitempty"` // Y coordinate. Y float32 `protobuf:"fixed32,2,opt,name=y,proto3" json:"y,omitempty"` // contains filtered or unexported fields }
func (*NormalizedVertex) Descriptor() ([]byte, []int)
Deprecated: Use NormalizedVertex.ProtoReflect.Descriptor instead.
func (x *NormalizedVertex) GetX() float32
func (x *NormalizedVertex) GetY() float32
func (*NormalizedVertex) ProtoMessage()
func (x *NormalizedVertex) ProtoReflect() protoreflect.Message
func (x *NormalizedVertex) Reset()
func (x *NormalizedVertex) String() string
Parameters to control Optical Character Recognition (OCR) behavior.
type OcrParams struct { // List of languages to use for OCR. In most cases, an empty value // yields the best results since it enables automatic language detection. For // languages based on the Latin alphabet, setting `language_hints` is not // needed. In rare cases, when the language of the text in the image is known, // setting a hint will help get better results (although it will be a // significant hindrance if the hint is wrong). Document processing returns an // error if one or more of the specified languages is not one of the // supported languages. LanguageHints []string `protobuf:"bytes,1,rep,name=language_hints,json=languageHints,proto3" json:"language_hints,omitempty"` // contains filtered or unexported fields }
func (*OcrParams) Descriptor() ([]byte, []int)
Deprecated: Use OcrParams.ProtoReflect.Descriptor instead.
func (x *OcrParams) GetLanguageHints() []string
func (*OcrParams) ProtoMessage()
func (x *OcrParams) ProtoReflect() protoreflect.Message
func (x *OcrParams) Reset()
func (x *OcrParams) String() string
Contains metadata for the BatchProcessDocuments operation.
type OperationMetadata struct { // The state of the current batch processing. State OperationMetadata_State `protobuf:"varint,1,opt,name=state,proto3,enum=google.cloud.documentai.v1beta1.OperationMetadata_State" json:"state,omitempty"` // A message providing more details about the current state of processing. StateMessage string `protobuf:"bytes,2,opt,name=state_message,json=stateMessage,proto3" json:"state_message,omitempty"` // The creation time of the operation. CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` // The last update time of the operation. UpdateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` // contains filtered or unexported fields }
func (*OperationMetadata) Descriptor() ([]byte, []int)
Deprecated: Use OperationMetadata.ProtoReflect.Descriptor instead.
func (x *OperationMetadata) GetCreateTime() *timestamppb.Timestamp
func (x *OperationMetadata) GetState() OperationMetadata_State
func (x *OperationMetadata) GetStateMessage() string
func (x *OperationMetadata) GetUpdateTime() *timestamppb.Timestamp
func (*OperationMetadata) ProtoMessage()
func (x *OperationMetadata) ProtoReflect() protoreflect.Message
func (x *OperationMetadata) Reset()
func (x *OperationMetadata) String() string
type OperationMetadata_State int32
const ( // The default value. This value is used if the state is omitted. OperationMetadata_STATE_UNSPECIFIED OperationMetadata_State = 0 // Request is received. OperationMetadata_ACCEPTED OperationMetadata_State = 1 // Request operation is waiting for scheduling. OperationMetadata_WAITING OperationMetadata_State = 2 // Request is being processed. OperationMetadata_RUNNING OperationMetadata_State = 3 // The batch processing completed successfully. OperationMetadata_SUCCEEDED OperationMetadata_State = 4 // The batch processing was cancelled. OperationMetadata_CANCELLED OperationMetadata_State = 5 // The batch processing has failed. OperationMetadata_FAILED OperationMetadata_State = 6 )
func (OperationMetadata_State) Descriptor() protoreflect.EnumDescriptor
func (x OperationMetadata_State) Enum() *OperationMetadata_State
func (OperationMetadata_State) EnumDescriptor() ([]byte, []int)
Deprecated: Use OperationMetadata_State.Descriptor instead.
func (x OperationMetadata_State) Number() protoreflect.EnumNumber
func (x OperationMetadata_State) String() string
func (OperationMetadata_State) Type() protoreflect.EnumType
The desired output location and metadata.
type OutputConfig struct { // Required. // // Types that are assignable to Destination: // *OutputConfig_GcsDestination Destination isOutputConfig_Destination `protobuf_oneof:"destination"` // The max number of pages to include into each output Document shard JSON on // Google Cloud Storage. // // The valid range is [1, 100]. If not specified, the default value is 20. // // For example, for one pdf file with 100 pages, 100 parsed pages will be // produced. If `pages_per_shard` = 20, then 5 Document shard JSON files each // containing 20 parsed pages will be written under the prefix // [OutputConfig.gcs_destination.uri][] and suffix pages-x-to-y.json where // x and y are 1-indexed page numbers. // // Example GCS outputs with 157 pages and pages_per_shard = 50: // // <prefix>pages-001-to-050.json // <prefix>pages-051-to-100.json // <prefix>pages-101-to-150.json // <prefix>pages-151-to-157.json PagesPerShard int32 `protobuf:"varint,2,opt,name=pages_per_shard,json=pagesPerShard,proto3" json:"pages_per_shard,omitempty"` // contains filtered or unexported fields }
func (*OutputConfig) Descriptor() ([]byte, []int)
Deprecated: Use OutputConfig.ProtoReflect.Descriptor instead.
func (m *OutputConfig) GetDestination() isOutputConfig_Destination
func (x *OutputConfig) GetGcsDestination() *GcsDestination
func (x *OutputConfig) GetPagesPerShard() int32
func (*OutputConfig) ProtoMessage()
func (x *OutputConfig) ProtoReflect() protoreflect.Message
func (x *OutputConfig) Reset()
func (x *OutputConfig) String() string
type OutputConfig_GcsDestination struct { // The Google Cloud Storage location to write the output to. GcsDestination *GcsDestination `protobuf:"bytes,1,opt,name=gcs_destination,json=gcsDestination,proto3,oneof"` }
Request to process one document.
type ProcessDocumentRequest struct { // Required. Information about the input file. InputConfig *InputConfig `protobuf:"bytes,1,opt,name=input_config,json=inputConfig,proto3" json:"input_config,omitempty"` // Required. The desired output location. OutputConfig *OutputConfig `protobuf:"bytes,2,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"` // Specifies a known document type for deeper structure detection. Valid // values are currently "general" and "invoice". If not provided, "general"\ // is used as default. If any other value is given, the request is rejected. DocumentType string `protobuf:"bytes,3,opt,name=document_type,json=documentType,proto3" json:"document_type,omitempty"` // Controls table extraction behavior. If not specified, the system will // decide reasonable defaults. TableExtractionParams *TableExtractionParams `protobuf:"bytes,4,opt,name=table_extraction_params,json=tableExtractionParams,proto3" json:"table_extraction_params,omitempty"` // Controls form extraction behavior. If not specified, the system will // decide reasonable defaults. FormExtractionParams *FormExtractionParams `protobuf:"bytes,5,opt,name=form_extraction_params,json=formExtractionParams,proto3" json:"form_extraction_params,omitempty"` // Controls entity extraction behavior. If not specified, the system will // decide reasonable defaults. EntityExtractionParams *EntityExtractionParams `protobuf:"bytes,6,opt,name=entity_extraction_params,json=entityExtractionParams,proto3" json:"entity_extraction_params,omitempty"` // Controls OCR behavior. If not specified, the system will decide reasonable // defaults. OcrParams *OcrParams `protobuf:"bytes,7,opt,name=ocr_params,json=ocrParams,proto3" json:"ocr_params,omitempty"` // contains filtered or unexported fields }
func (*ProcessDocumentRequest) Descriptor() ([]byte, []int)
Deprecated: Use ProcessDocumentRequest.ProtoReflect.Descriptor instead.
func (x *ProcessDocumentRequest) GetDocumentType() string
func (x *ProcessDocumentRequest) GetEntityExtractionParams() *EntityExtractionParams
func (x *ProcessDocumentRequest) GetFormExtractionParams() *FormExtractionParams
func (x *ProcessDocumentRequest) GetInputConfig() *InputConfig
func (x *ProcessDocumentRequest) GetOcrParams() *OcrParams
func (x *ProcessDocumentRequest) GetOutputConfig() *OutputConfig
func (x *ProcessDocumentRequest) GetTableExtractionParams() *TableExtractionParams
func (*ProcessDocumentRequest) ProtoMessage()
func (x *ProcessDocumentRequest) ProtoReflect() protoreflect.Message
func (x *ProcessDocumentRequest) Reset()
func (x *ProcessDocumentRequest) String() string
Response to a single document processing request.
type ProcessDocumentResponse struct { // Information about the input file. This is the same as the corresponding // input config in the request. InputConfig *InputConfig `protobuf:"bytes,1,opt,name=input_config,json=inputConfig,proto3" json:"input_config,omitempty"` // The output location of the parsed responses. The responses are written to // this location as JSON-serialized `Document` objects. OutputConfig *OutputConfig `protobuf:"bytes,2,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"` // contains filtered or unexported fields }
func (*ProcessDocumentResponse) Descriptor() ([]byte, []int)
Deprecated: Use ProcessDocumentResponse.ProtoReflect.Descriptor instead.
func (x *ProcessDocumentResponse) GetInputConfig() *InputConfig
func (x *ProcessDocumentResponse) GetOutputConfig() *OutputConfig
func (*ProcessDocumentResponse) ProtoMessage()
func (x *ProcessDocumentResponse) ProtoReflect() protoreflect.Message
func (x *ProcessDocumentResponse) Reset()
func (x *ProcessDocumentResponse) String() string
A hint for a table bounding box on the page for table parsing.
type TableBoundHint struct { // Optional. Page number for multi-paged inputs this hint applies to. If not // provided, this hint will apply to all pages by default. This value is // 1-based. PageNumber int32 `protobuf:"varint,1,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` // Bounding box hint for a table on this page. The coordinates must be // normalized to [0,1] and the bounding box must be an axis-aligned rectangle. BoundingBox *BoundingPoly `protobuf:"bytes,2,opt,name=bounding_box,json=boundingBox,proto3" json:"bounding_box,omitempty"` // contains filtered or unexported fields }
func (*TableBoundHint) Descriptor() ([]byte, []int)
Deprecated: Use TableBoundHint.ProtoReflect.Descriptor instead.
func (x *TableBoundHint) GetBoundingBox() *BoundingPoly
func (x *TableBoundHint) GetPageNumber() int32
func (*TableBoundHint) ProtoMessage()
func (x *TableBoundHint) ProtoReflect() protoreflect.Message
func (x *TableBoundHint) Reset()
func (x *TableBoundHint) String() string
Parameters to control table extraction behavior.
type TableExtractionParams struct { // Whether to enable table extraction. Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` // Optional. Table bounding box hints that can be provided to complex cases // which our algorithm cannot locate the table(s) in. TableBoundHints []*TableBoundHint `protobuf:"bytes,2,rep,name=table_bound_hints,json=tableBoundHints,proto3" json:"table_bound_hints,omitempty"` // Optional. Table header hints. The extraction will bias towards producing // these terms as table headers, which may improve accuracy. HeaderHints []string `protobuf:"bytes,3,rep,name=header_hints,json=headerHints,proto3" json:"header_hints,omitempty"` // Model version of the table extraction system. Default is "builtin/stable". // Specify "builtin/latest" for the latest model. ModelVersion string `protobuf:"bytes,4,opt,name=model_version,json=modelVersion,proto3" json:"model_version,omitempty"` // contains filtered or unexported fields }
func (*TableExtractionParams) Descriptor() ([]byte, []int)
Deprecated: Use TableExtractionParams.ProtoReflect.Descriptor instead.
func (x *TableExtractionParams) GetEnabled() bool
func (x *TableExtractionParams) GetHeaderHints() []string
func (x *TableExtractionParams) GetModelVersion() string
func (x *TableExtractionParams) GetTableBoundHints() []*TableBoundHint
func (*TableExtractionParams) ProtoMessage()
func (x *TableExtractionParams) ProtoReflect() protoreflect.Message
func (x *TableExtractionParams) Reset()
func (x *TableExtractionParams) String() string
UnimplementedDocumentUnderstandingServiceServer can be embedded to have forward compatible implementations.
type UnimplementedDocumentUnderstandingServiceServer struct { }
func (*UnimplementedDocumentUnderstandingServiceServer) BatchProcessDocuments(context.Context, *BatchProcessDocumentsRequest) (*longrunning.Operation, error)
A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
type Vertex struct { // X coordinate. X int32 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` // Y coordinate. Y int32 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"` // contains filtered or unexported fields }
func (*Vertex) Descriptor() ([]byte, []int)
Deprecated: Use Vertex.ProtoReflect.Descriptor instead.
func (x *Vertex) GetX() int32
func (x *Vertex) GetY() int32
func (*Vertex) ProtoMessage()
func (x *Vertex) ProtoReflect() protoreflect.Message
func (x *Vertex) Reset()
func (x *Vertex) String() string