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.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#content
def content() -> ::String
Returns
-
(::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.
#content=
def content=(value) -> ::String
Parameter
-
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.
Returns
-
(::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.
#entities
def entities() -> ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>
Returns
- (::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>
Parameter
- 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.
Returns
- (::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>
Returns
- (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::EntityRelation>) — Relationship among Document.entities.
#entity_relations=
def entity_relations=(value) -> ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::EntityRelation>
Parameter
- value (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::EntityRelation>) — Relationship among Document.entities.
Returns
- (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::EntityRelation>) — Relationship among Document.entities.
#error
def error() -> ::Google::Rpc::Status
Returns
- (::Google::Rpc::Status) — Any error that occurred while processing this document.
#error=
def error=(value) -> ::Google::Rpc::Status
Parameter
- value (::Google::Rpc::Status) — Any error that occurred while processing this document.
Returns
- (::Google::Rpc::Status) — Any error that occurred while processing this document.
#mime_type
def mime_type() -> ::String
Returns
- (::String) — 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.
#mime_type=
def mime_type=(value) -> ::String
Parameter
- value (::String) — 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.
Returns
- (::String) — 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.
#pages
def pages() -> ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page>
Returns
- (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page>) — Visual page layout for the Document.
#pages=
def pages=(value) -> ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page>
Parameter
- value (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page>) — Visual page layout for the Document.
Returns
- (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page>) — Visual page layout for the Document.
#revisions
def revisions() -> ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Revision>
Returns
- (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Revision>) — Revision history of this document.
#revisions=
def revisions=(value) -> ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Revision>
Parameter
- value (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Revision>) — Revision history of this document.
Returns
- (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Revision>) — Revision history of this document.
#shard_info
def shard_info() -> ::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo
Returns
- (::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
Parameter
- 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.
Returns
- (::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
Returns
- (::String) — Optional. UTF-8 encoded text in reading order from the document.
#text=
def text=(value) -> ::String
Parameter
- value (::String) — Optional. UTF-8 encoded text in reading order from the document.
Returns
- (::String) — Optional. UTF-8 encoded text in reading order from the document.
#text_changes
def text_changes() -> ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextChange>
Returns
- (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextChange>) — 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>
Parameter
- value (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextChange>) — 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.
Returns
- (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextChange>) — 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>
Returns
- (::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>
Parameter
- value (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Style>) — Styles for the Document.text.
Returns
- (::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Style>) — Styles for the Document.text.
#uri
def uri() -> ::String
Returns
-
(::String) — Optional. 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 for more info.
#uri=
def uri=(value) -> ::String
Parameter
-
value (::String) — Optional. 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 for more info.
Returns
-
(::String) — Optional. 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 for more info.