Class: TranslationApiClient::TranslationOutput
- Inherits:
-
BaseObject
- Object
- BaseObject
- TranslationApiClient::TranslationOutput
- Defined in:
- lib/translationApi_client/models/translation_output.rb
Instance Attribute Summary collapse
-
#back_translation ⇒ Object
Returns the value of attribute back_translation.
-
#detected_language ⇒ Object
Returns the value of attribute detected_language.
-
#detected_language_confidence ⇒ Object
Returns the value of attribute detected_language_confidence.
-
#error ⇒ Object
Returns the value of attribute error.
-
#output ⇒ Object
Returns the value of attribute output.
-
#source ⇒ Object
Returns the value of attribute source.
-
#warning ⇒ Object
Returns the value of attribute warning.
Class Method Summary collapse
-
.attribute_map ⇒ Object
attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
attribute type.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ TranslationOutput
constructor
A new instance of TranslationOutput.
Methods inherited from BaseObject
#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash
Constructor Details
#initialize(attributes = {}) ⇒ TranslationOutput
Returns a new instance of TranslationOutput.
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/translationApi_client/models/translation_output.rb', line 47 def initialize(attributes = {}) return if !attributes.is_a?(Hash) || attributes.empty? # convert string to symbol for hash key attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo} if attributes[:'warning'] @warning = attributes[:'warning'] end if attributes[:'error'] @error = attributes[:'error'] end if attributes[:'detectedLanguage'] @detected_language = attributes[:'detectedLanguage'] end if attributes[:'detectedLanguageConfidence'] @detected_language_confidence = attributes[:'detectedLanguageConfidence'] end if attributes[:'output'] @output = attributes[:'output'] end if attributes[:'backTranslation'] @back_translation = attributes[:'backTranslation'] end if attributes[:'source'] @source = attributes[:'source'] end end |
Instance Attribute Details
#back_translation ⇒ Object
Returns the value of attribute back_translation.
4 5 6 |
# File 'lib/translationApi_client/models/translation_output.rb', line 4 def back_translation @back_translation end |
#detected_language ⇒ Object
Returns the value of attribute detected_language.
4 5 6 |
# File 'lib/translationApi_client/models/translation_output.rb', line 4 def detected_language @detected_language end |
#detected_language_confidence ⇒ Object
Returns the value of attribute detected_language_confidence.
4 5 6 |
# File 'lib/translationApi_client/models/translation_output.rb', line 4 def detected_language_confidence @detected_language_confidence end |
#error ⇒ Object
Returns the value of attribute error.
4 5 6 |
# File 'lib/translationApi_client/models/translation_output.rb', line 4 def error @error end |
#output ⇒ Object
Returns the value of attribute output.
4 5 6 |
# File 'lib/translationApi_client/models/translation_output.rb', line 4 def output @output end |
#source ⇒ Object
Returns the value of attribute source.
4 5 6 |
# File 'lib/translationApi_client/models/translation_output.rb', line 4 def source @source end |
#warning ⇒ Object
Returns the value of attribute warning.
4 5 6 |
# File 'lib/translationApi_client/models/translation_output.rb', line 4 def warning @warning end |
Class Method Details
.attribute_map ⇒ Object
attribute mapping from ruby-style variable name to JSON key
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/translationApi_client/models/translation_output.rb', line 6 def self.attribute_map { # Warning at output level :'warning' => :'warning', # Error at output level :'error' => :'error', # Result of the automatic language detection if `auto` was specified as source language :'detected_language' => :'detectedLanguage', # Automatic language detection confidence :'detected_language_confidence' => :'detectedLanguageConfidence', # Translated text :'output' => :'output', # Retranslation of output in source language, if backTranslation was specified :'back_translation' => :'backTranslation', # Source text, if withSource was specified :'source' => :'source' } end |
.swagger_types ⇒ Object
attribute type
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/translationApi_client/models/translation_output.rb', line 34 def self.swagger_types { :'warning' => :'string', :'error' => :'string', :'detected_language' => :'string', :'detected_language_confidence' => :'double', :'output' => :'string', :'back_translation' => :'string', :'source' => :'string' } end |