Class: TranslationApiClient::TranslationResponse
- Inherits:
-
BaseObject
- Object
- BaseObject
- TranslationApiClient::TranslationResponse
- Defined in:
- lib/translationApi_client/models/translation_response.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#outputs ⇒ Object
Returns the value of attribute outputs.
-
#request_id ⇒ Object
Returns the value of attribute request_id.
-
#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 = {}) ⇒ TranslationResponse
constructor
A new instance of TranslationResponse.
Methods inherited from BaseObject
#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash
Constructor Details
#initialize(attributes = {}) ⇒ TranslationResponse
Returns a new instance of TranslationResponse.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/translationApi_client/models/translation_response.rb', line 35 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[:'requestId'] @request_id = attributes[:'requestId'] end if attributes[:'outputs'] if (value = attributes[:'outputs']).is_a?(Array) @outputs = value end end end |
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
4 5 6 |
# File 'lib/translationApi_client/models/translation_response.rb', line 4 def error @error end |
#outputs ⇒ Object
Returns the value of attribute outputs.
4 5 6 |
# File 'lib/translationApi_client/models/translation_response.rb', line 4 def outputs @outputs end |
#request_id ⇒ Object
Returns the value of attribute request_id.
4 5 6 |
# File 'lib/translationApi_client/models/translation_response.rb', line 4 def request_id @request_id end |
#warning ⇒ Object
Returns the value of attribute warning.
4 5 6 |
# File 'lib/translationApi_client/models/translation_response.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 |
# File 'lib/translationApi_client/models/translation_response.rb', line 6 def self.attribute_map { # Warning at request level :'warning' => :'warning', # Error at request level :'error' => :'error', # Request identifier to use to get the status, the result of the request and to cancel it in asynchronous mode :'request_id' => :'requestId', # Outputs of translation :'outputs' => :'outputs' } end |
.swagger_types ⇒ Object
attribute type
25 26 27 28 29 30 31 32 33 |
# File 'lib/translationApi_client/models/translation_response.rb', line 25 def self.swagger_types { :'warning' => :'string', :'error' => :'string', :'request_id' => :'string', :'outputs' => :'array[TranslationOutput]' } end |