Reference documentation and code samples for the Document AI V1beta3 API class Google::Cloud::DocumentAI::V1beta3::Document.
Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#chunked_document
def chunked_document() -> ::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument
- (::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument) — Document chunked based on chunking config.
#chunked_document=
def chunked_document=(value) -> ::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument
- value (::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument) — Document chunked based on chunking config.
- (::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument) — Document chunked based on chunking config.
#content
def content() -> ::String
-
(::String) — Optional. 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.Note: The following fields are mutually exclusive:
content
,uri
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#content=
def content=(value) -> ::String
-
value (::String) — Optional. 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.Note: The following fields are mutually exclusive:
content
,uri
. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::String) — Optional. 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.Note: The following fields are mutually exclusive:
content
,uri
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#document_layout
def document_layout() -> ::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout
- (::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout) — Parsed layout of the document.
#document_layout=
def document_layout=(value) -> ::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout
- value (::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout) — Parsed layout of the document.
- (::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout) — Parsed layout of the document.
#entities
def entities() -> ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>
- (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>) — A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.
#entities=
def entities=(value) -> ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>
- value (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>) — A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.
- (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>) — A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.
#entity_relations
def entity_relations() -> ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::EntityRelation>
- (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::EntityRelation>) — Placeholder. Relationship among Document.entities.
#entity_relations=
def entity_relations=(value) -> ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::EntityRelation>
- value (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::EntityRelation>) — Placeholder. Relationship among Document.entities.
- (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::EntityRelation>) — Placeholder. Relationship among Document.entities.
#error
def error() -> ::Google::Rpc::Status
- (::Google::Rpc::Status) — Any error that occurred while processing this document.
#error=
def error=(value) -> ::Google::Rpc::Status
- value (::Google::Rpc::Status) — Any error that occurred while processing this document.
- (::Google::Rpc::Status) — Any error that occurred while processing this document.
#mime_type
def mime_type() -> ::String
- (::String) — An IANA published media type (MIME type).
#mime_type=
def mime_type=(value) -> ::String
- value (::String) — An IANA published media type (MIME type).
- (::String) — An IANA published media type (MIME type).
#pages
def pages() -> ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page>
- (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page>) — Visual page layout for the Document.
#pages=
def pages=(value) -> ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page>
- value (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page>) — Visual page layout for the Document.
- (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page>) — Visual page layout for the Document.
#revisions
def revisions() -> ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Revision>
- (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Revision>) — Placeholder. Revision history of this document.
#revisions=
def revisions=(value) -> ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Revision>
- value (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Revision>) — Placeholder. Revision history of this document.
- (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Revision>) — Placeholder. Revision history of this document.
#shard_info
def shard_info() -> ::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo
- (::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo) — 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.
#shard_info=
def shard_info=(value) -> ::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo
- value (::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo) — 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.
- (::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo) — 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.
#text
def text() -> ::String
- (::String) — Optional. UTF-8 encoded text in reading order from the document.
#text=
def text=(value) -> ::String
- value (::String) — Optional. UTF-8 encoded text in reading order from the document.
- (::String) — Optional. UTF-8 encoded text in reading order from the document.
#text_changes
def text_changes() -> ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextChange>
- (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextChange>) — Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.
#text_changes=
def text_changes=(value) -> ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextChange>
- value (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextChange>) — Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.
- (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextChange>) — Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.
#text_styles
def text_styles() -> ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Style>
- (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Style>) — Styles for the Document.text.
#text_styles=
def text_styles=(value) -> ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Style>
- value (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Style>) — Styles for the Document.text.
- (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Style>) — Styles for the Document.text.
#uri
def uri() -> ::String
-
(::String) — Optional. Currently supports Google Cloud Storage URI of the form
gs://bucket_name/object_name
. Object versioning is not supported. For more information, refer to Google Cloud Storage Request URIs.Note: The following fields are mutually exclusive:
uri
,content
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#uri=
def uri=(value) -> ::String
-
value (::String) — Optional. Currently supports Google Cloud Storage URI of the form
gs://bucket_name/object_name
. Object versioning is not supported. For more information, refer to Google Cloud Storage Request URIs.Note: The following fields are mutually exclusive:
uri
,content
. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::String) — Optional. Currently supports Google Cloud Storage URI of the form
gs://bucket_name/object_name
. Object versioning is not supported. For more information, refer to Google Cloud Storage Request URIs.Note: The following fields are mutually exclusive:
uri
,content
. If a field in that set is populated, all other fields in the set will automatically be cleared.