class TranslationApiClient::SupportedLanguageResponse
Attributes
error[RW]
language_pairs[RW]
warning[RW]
Public Class Methods
attribute_map()
click to toggle source
attribute mapping from ruby-style variable name to JSON key
# File lib/translationApi_client/models/supported_language_response.rb, line 6 def self.attribute_map { # Warning at request level :'warning' => :'warning', # Error at request level :'error' => :'error', # Array of language pairs :'language_pairs' => :'languagePairs' } end
new(attributes = {})
click to toggle source
# File lib/translationApi_client/models/supported_language_response.rb, line 31 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[:'languagePairs'] if (value = attributes[:'languagePairs']).is_a?(Array) @language_pairs = value end end end
swagger_types()
click to toggle source
attribute type
# File lib/translationApi_client/models/supported_language_response.rb, line 22 def self.swagger_types { :'warning' => :'string', :'error' => :'string', :'language_pairs' => :'array[LanguagePair]' } end