class Google::Apis::TranslateV2::TranslationsResource
Attributes
detected_source_language[RW]
The source language of 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 will not occur and this field will be empty. Corresponds to the JSON property `detectedSourceLanguage` @return [String]
model[RW]
The `model` type used for this translation. Valid values are listed in public documentation. Can be different from requested `model`. Present only if specific model type was explicitly requested. Corresponds to the JSON property `model` @return [String]
translated_text[RW]
Text translated into the target language. Corresponds to the JSON property `translatedText` @return [String]
Public Class Methods
new(**args)
click to toggle source
# File lib/google/apis/translate_v2/classes.rb, line 258 def initialize(**args) update!(**args) end
Public Instance Methods
update!(**args)
click to toggle source
Update properties of this object
# File lib/google/apis/translate_v2/classes.rb, line 263 def update!(**args) @detected_source_language = args[:detected_source_language] if args.key?(:detected_source_language) @model = args[:model] if args.key?(:model) @translated_text = args[:translated_text] if args.key?(:translated_text) end