Class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTranslation

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/documentai_v1beta2/classes.rb,
generated/google/apis/documentai_v1beta2/representations.rb,
generated/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) ⇒ GoogleCloudDocumentaiV1beta2DocumentTranslation

Returns a new instance of GoogleCloudDocumentaiV1beta2DocumentTranslation.



3563
3564
3565
# File 'generated/google/apis/documentai_v1beta2/classes.rb', line 3563

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)


3546
3547
3548
# File 'generated/google/apis/documentai_v1beta2/classes.rb', line 3546

def language_code
  @language_code
end

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

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



3551
3552
3553
# File 'generated/google/apis/documentai_v1beta2/classes.rb', line 3551

def provenance
  @provenance
end

#text_anchorGoogle::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTextAnchor

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



3556
3557
3558
# File 'generated/google/apis/documentai_v1beta2/classes.rb', line 3556

def text_anchor
  @text_anchor
end

#translated_textString

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

Returns:

  • (String)


3561
3562
3563
# File 'generated/google/apis/documentai_v1beta2/classes.rb', line 3561

def translated_text
  @translated_text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3568
3569
3570
3571
3572
3573
# File 'generated/google/apis/documentai_v1beta2/classes.rb', line 3568

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