Class: Google::Apis::TranslateV3::Romanization

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

Overview

A single romanization response.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Romanization

Returns a new instance of Romanization.



1417
1418
1419
# File 'lib/google/apis/translate_v3/classes.rb', line 1417

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

Instance Attribute Details

#detected_language_codeString

The ISO-639 language code of source text in the initial request, detected automatically, if no source language was passed within the initial request. If the source language was passed, auto-detection of the language does not occur and this field is empty. Corresponds to the JSON property detectedLanguageCode

Returns:

  • (String)


1409
1410
1411
# File 'lib/google/apis/translate_v3/classes.rb', line 1409

def detected_language_code
  @detected_language_code
end

#romanized_textString

Romanized text. If an error occurs during romanization, this field might be excluded from the response. Corresponds to the JSON property romanizedText

Returns:

  • (String)


1415
1416
1417
# File 'lib/google/apis/translate_v3/classes.rb', line 1415

def romanized_text
  @romanized_text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1422
1423
1424
1425
# File 'lib/google/apis/translate_v3/classes.rb', line 1422

def update!(**args)
  @detected_language_code = args[:detected_language_code] if args.key?(:detected_language_code)
  @romanized_text = args[:romanized_text] if args.key?(:romanized_text)
end