Document AI V1 API - Class Google::Cloud::DocumentAI::V1::Document (v0.11.0)

Reference documentation and code samples for the Document AI V1 API class Google::Cloud::DocumentAI::V1::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

#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::V1::Document::Entity>
Returns

#entities=

def entities=(value) -> ::Array<::Google::Cloud::DocumentAI::V1::Document::Entity>
Parameter
Returns

#entity_relations

def entity_relations() -> ::Array<::Google::Cloud::DocumentAI::V1::Document::EntityRelation>
Returns

#entity_relations=

def entity_relations=(value) -> ::Array<::Google::Cloud::DocumentAI::V1::Document::EntityRelation>
Parameter
Returns

#error

def error() -> ::Google::Rpc::Status
Returns

#error=

def error=(value) -> ::Google::Rpc::Status
Parameter
Returns

#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::V1::Document::Page>
Returns

#pages=

def pages=(value) -> ::Array<::Google::Cloud::DocumentAI::V1::Document::Page>
Parameter
Returns

#revisions

def revisions() -> ::Array<::Google::Cloud::DocumentAI::V1::Document::Revision>
Returns

#revisions=

def revisions=(value) -> ::Array<::Google::Cloud::DocumentAI::V1::Document::Revision>
Parameter
Returns

#shard_info

def shard_info() -> ::Google::Cloud::DocumentAI::V1::Document::ShardInfo
Returns

#shard_info=

def shard_info=(value) -> ::Google::Cloud::DocumentAI::V1::Document::ShardInfo
Parameter
Returns

#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::V1::Document::TextChange>
Returns

#text_changes=

def text_changes=(value) -> ::Array<::Google::Cloud::DocumentAI::V1::Document::TextChange>
Parameter
Returns

#text_styles

def text_styles() -> ::Array<::Google::Cloud::DocumentAI::V1::Document::Style>
Returns

#text_styles=

def text_styles=(value) -> ::Array<::Google::Cloud::DocumentAI::V1::Document::Style>
Parameter
Returns

#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.