Class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTranslation
- Inherits:
-
Object
- Object
- Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTranslation
- 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
-
#language_code ⇒ String
The BCP-47 language code, such as "en-US" or "sr-Latn".
-
#provenance ⇒ Array<Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentProvenance>
The history of this annotation.
-
#text_anchor ⇒ Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchor
Text reference indexing into the Document.text.
-
#translated_text ⇒ String
Text translated into the target language.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDocumentaiV1beta1DocumentTranslation
constructor
A new instance of GoogleCloudDocumentaiV1beta1DocumentTranslation.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDocumentaiV1beta1DocumentTranslation
Returns a new instance of GoogleCloudDocumentaiV1beta1DocumentTranslation.
2351 2352 2353 |
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2351 def initialize(**args) update!(**args) end |
Instance Attribute Details
#language_code ⇒ String
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
2334 2335 2336 |
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2334 def language_code @language_code end |
#provenance ⇒ Array<Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentProvenance>
The history of this annotation.
Corresponds to the JSON property provenance
2339 2340 2341 |
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2339 def provenance @provenance end |
#text_anchor ⇒ Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchor
Text reference indexing into the Document.text.
Corresponds to the JSON property textAnchor
2344 2345 2346 |
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2344 def text_anchor @text_anchor end |
#translated_text ⇒ String
Text translated into the target language.
Corresponds to the JSON property translatedText
2349 2350 2351 |
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2349 def translated_text @translated_text end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2356 2357 2358 2359 2360 2361 |
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2356 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 |