Class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTranslation

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/documentai_v1beta2/classes.rb,
lib/google/apis/documentai_v1beta2/representations.rb,
lib/google/apis/documentai_v1beta2/representations.rb

Overview

A translation of the text segment.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDocumentaiV1beta1DocumentTranslation

Returns a new instance of GoogleCloudDocumentaiV1beta1DocumentTranslation.



2141
2142
2143
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2141

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#language_codeString

The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Corresponds to the JSON property languageCode

Returns:

  • (String)


2124
2125
2126
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2124

def language_code
  @language_code
end

#provenanceArray<Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentProvenance>

The history of this annotation. Corresponds to the JSON property provenance



2129
2130
2131
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2129

def provenance
  @provenance
end

#text_anchorGoogle::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchor

Text reference indexing into the Document.text. Corresponds to the JSON property textAnchor



2134
2135
2136
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2134

def text_anchor
  @text_anchor
end

#translated_textString

Text translated into the target language. Corresponds to the JSON property translatedText

Returns:

  • (String)


2139
2140
2141
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2139

def translated_text
  @translated_text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2146
2147
2148
2149
2150
2151
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2146

def update!(**args)
  @language_code = args[:language_code] if args.key?(:language_code)
  @provenance = args[:provenance] if args.key?(:provenance)
  @text_anchor = args[:text_anchor] if args.key?(:text_anchor)
  @translated_text = args[:translated_text] if args.key?(:translated_text)
end