Reference documentation and code samples for the Google Cloud Document Ai V1 Client class 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.
Generated from protobuf message google.cloud.documentai.v1.Document
Namespace
Google \ Cloud \ DocumentAI \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ uri
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
.
↳ content
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.
↳ mime_type
↳ text
string
Optional. UTF-8 encoded text in reading order from the document.
↳ text_styles
↳ pages
↳ entities
array< Document\Entity
>
A list of entities detected on Document.text . For document shards, entities in this list may cross shard boundaries.
↳ entity_relations
↳ text_changes
array< 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.
↳ shard_info
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.
↳ error
↳ revisions
↳ document_layout
↳ chunked_document
getUri
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 .
string
hasUri
setUri
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 .
var
string
$this
getContent
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.
string
hasContent
setContent
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.
var
string
$this
getMimeType
An IANA published media type (MIME type) .
string
setMimeType
An IANA published media type (MIME type) .
var
string
$this
getText
Optional. UTF-8 encoded text in reading order from the document.
string
setText
Optional. UTF-8 encoded text in reading order from the document.
var
string
$this
getTextStyles
Styles for the Document.text .
setTextStyles
Styles for the Document.text .
$this
getPages
Visual page layout for the Document .
setPages
Visual page layout for the Document .
$this
getEntities
A list of entities detected on Document.text . For document shards, entities in this list may cross shard boundaries.
setEntities
A list of entities detected on Document.text . For document shards, entities in this list may cross shard boundaries.
$this
getEntityRelations
Placeholder. Relationship among Document.entities .
setEntityRelations
Placeholder. Relationship among Document.entities .
$this
getTextChanges
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.
setTextChanges
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.
$this
getShardInfo
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.
hasShardInfo
clearShardInfo
setShardInfo
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.
$this
getError
Any error that occurred while processing this document.
hasError
clearError
setError
Any error that occurred while processing this document.
$this
getRevisions
Placeholder. Revision history of this document.
setRevisions
Placeholder. Revision history of this document.
$this
getDocumentLayout
Parsed layout of the document.
hasDocumentLayout
clearDocumentLayout
setDocumentLayout
Parsed layout of the document.
$this
getChunkedDocument
Document chunked based on chunking config.
hasChunkedDocument
clearChunkedDocument
setChunkedDocument
Document chunked based on chunking config.
$this
getSource
string