class Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2Document

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.

Attributes

content[RW]

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. Corresponds to the JSON property `content` NOTE: Values are automatically base64 encoded/decoded in the client library. @return [String]

entities[RW]

A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries. Corresponds to the JSON property `entities` @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentEntity>]

entity_relations[RW]

Relationship among Document.entities. Corresponds to the JSON property `entityRelations` @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentEntityRelation>]

error[RW]

The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [ gRPC](github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https: //cloud.google.com/apis/design/errors). Corresponds to the JSON property `error` @return [Google::Apis::DocumentaiV1beta3::GoogleRpcStatus]

labels[RW]

Labels for this document. Corresponds to the JSON property `labels` @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentLabel>]

mime_type[RW]

An IANA published MIME type (also referred to as media type). For more information, see www.iana.org/assignments/media-types/media-types. xhtml. Corresponds to the JSON property `mimeType` @return [String]

pages[RW]

Visual page layout for the Document. Corresponds to the JSON property `pages` @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentPage>]

revisions[RW]

Revision history of this document. Corresponds to the JSON property `revisions` @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentRevision>]

shard_info[RW]

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. Corresponds to the JSON property `shardInfo` @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentShardInfo]

text[RW]

Optional. UTF-8 encoded text in reading order from the document. Corresponds to the JSON property `text` @return [String]

text_changes[RW]

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. Corresponds to the JSON property `textChanges` @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentTextChange>]

text_styles[RW]

Styles for the Document.text. Corresponds to the JSON property `textStyles` @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentStyle>]

uri[RW]

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](cloud.google.com/storage/docs/reference- uris) for more info. Corresponds to the JSON property `uri` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/documentai_v1beta3/classes.rb, line 2882
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/documentai_v1beta3/classes.rb, line 2887
def update!(**args)
  @content = args[:content] if args.key?(:content)
  @entities = args[:entities] if args.key?(:entities)
  @entity_relations = args[:entity_relations] if args.key?(:entity_relations)
  @error = args[:error] if args.key?(:error)
  @labels = args[:labels] if args.key?(:labels)
  @mime_type = args[:mime_type] if args.key?(:mime_type)
  @pages = args[:pages] if args.key?(:pages)
  @revisions = args[:revisions] if args.key?(:revisions)
  @shard_info = args[:shard_info] if args.key?(:shard_info)
  @text = args[:text] if args.key?(:text)
  @text_changes = args[:text_changes] if args.key?(:text_changes)
  @text_styles = args[:text_styles] if args.key?(:text_styles)
  @uri = args[:uri] if args.key?(:uri)
end