Class: Google::Apis::TranslateV3::Romanization
- Inherits:
-
Object
- Object
- Google::Apis::TranslateV3::Romanization
- 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
-
#detected_language_code ⇒ String
The ISO-639 language code of source text in the initial request, detected automatically, if no source language was passed within the initial request.
-
#romanized_text ⇒ String
Romanized text.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Romanization
constructor
A new instance of Romanization.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Romanization
Returns a new instance of Romanization.
1899 1900 1901 |
# File 'lib/google/apis/translate_v3/classes.rb', line 1899 def initialize(**args) update!(**args) end |
Instance Attribute Details
#detected_language_code ⇒ String
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
1891 1892 1893 |
# File 'lib/google/apis/translate_v3/classes.rb', line 1891 def detected_language_code @detected_language_code end |
#romanized_text ⇒ String
Romanized text. If an error occurs during romanization, this field might be
excluded from the response.
Corresponds to the JSON property romanizedText
1897 1898 1899 |
# File 'lib/google/apis/translate_v3/classes.rb', line 1897 def romanized_text @romanized_text end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1904 1905 1906 1907 |
# File 'lib/google/apis/translate_v3/classes.rb', line 1904 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 |