Class: Google::Apis::TranslateV2::TranslationsResource
- Inherits:
-
Object
- Object
- Google::Apis::TranslateV2::TranslationsResource
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/translate_v2/classes.rb,
generated/google/apis/translate_v2/representations.rb,
generated/google/apis/translate_v2/representations.rb
Instance Attribute Summary collapse
-
#detected_source_language ⇒ String
Detected source language if source parameter is unspecified.
-
#translated_text ⇒ String
The translation.
Instance Method Summary collapse
-
#initialize(**args) ⇒ TranslationsResource
constructor
A new instance of TranslationsResource.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ TranslationsResource
Returns a new instance of TranslationsResource.
156 157 158 |
# File 'generated/google/apis/translate_v2/classes.rb', line 156 def initialize(**args) update!(**args) end |
Instance Attribute Details
#detected_source_language ⇒ String
Detected source language if source parameter is unspecified.
Corresponds to the JSON property detectedSourceLanguage
149 150 151 |
# File 'generated/google/apis/translate_v2/classes.rb', line 149 def detected_source_language @detected_source_language end |
#translated_text ⇒ String
The translation.
Corresponds to the JSON property translatedText
154 155 156 |
# File 'generated/google/apis/translate_v2/classes.rb', line 154 def translated_text @translated_text end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
161 162 163 164 |
# File 'generated/google/apis/translate_v2/classes.rb', line 161 def update!(**args) @detected_source_language = args[:detected_source_language] if args.key?(:detected_source_language) @translated_text = args[:translated_text] if args.key?(:translated_text) end |