Class: TranslationApiClient::LanguagePair
- Inherits:
-
BaseObject
- Object
- BaseObject
- TranslationApiClient::LanguagePair
- Defined in:
- lib/translationApi_client/models/language_pair.rb
Instance Attribute Summary collapse
-
#profile_ids ⇒ Object
Returns the value of attribute profile_ids.
-
#source ⇒ Object
Returns the value of attribute source.
-
#target ⇒ Object
Returns the value of attribute target.
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 = {}) ⇒ LanguagePair
constructor
A new instance of LanguagePair.
Methods inherited from BaseObject
#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash
Constructor Details
#initialize(attributes = {}) ⇒ LanguagePair
Returns a new instance of LanguagePair.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/translationApi_client/models/language_pair.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[:'source'] @source = attributes[:'source'] end if attributes[:'target'] @target = attributes[:'target'] end if attributes[:'profileIds'] if (value = attributes[:'profileIds']).is_a?(Array) @profile_ids = value end end end |
Instance Attribute Details
#profile_ids ⇒ Object
Returns the value of attribute profile_ids.
4 5 6 |
# File 'lib/translationApi_client/models/language_pair.rb', line 4 def profile_ids @profile_ids end |
#source ⇒ Object
Returns the value of attribute source.
4 5 6 |
# File 'lib/translationApi_client/models/language_pair.rb', line 4 def source @source end |
#target ⇒ Object
Returns the value of attribute target.
4 5 6 |
# File 'lib/translationApi_client/models/language_pair.rb', line 4 def target @target 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 |
# File 'lib/translationApi_client/models/language_pair.rb', line 6 def self.attribute_map { # Source language :'source' => :'source', # Target language :'target' => :'target', # Array of profile identifiers :'profile_ids' => :'profileIds' } end |
.swagger_types ⇒ Object
attribute type
22 23 24 25 26 27 28 29 |
# File 'lib/translationApi_client/models/language_pair.rb', line 22 def self.swagger_types { :'source' => :'string', :'target' => :'string', :'profile_ids' => :'array[ProfileId]' } end |