Class: Apcera::Port
- Inherits:
-
BaseObject
- Object
- BaseObject
- Apcera::Port
- Defined in:
- lib/apcera/models/port.rb
Instance Attribute Summary collapse
-
#number ⇒ Object
Returns the value of attribute number.
-
#optional ⇒ Object
Returns the value of attribute optional.
-
#routes ⇒ Object
Returns the value of attribute routes.
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 = {}) ⇒ Port
constructor
A new instance of Port.
Methods inherited from BaseObject
#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ Port
Returns a new instance of Port.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/apcera/models/port.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[:'number'] self.number = attributes[:'number'] end if attributes[:'optional'] self.optional = attributes[:'optional'] end if attributes[:'routes'] if (value = attributes[:'routes']).is_a?(Array) self.routes = value end end end |
Instance Attribute Details
#number ⇒ Object
Returns the value of attribute number.
4 5 6 |
# File 'lib/apcera/models/port.rb', line 4 def number @number end |
#optional ⇒ Object
Returns the value of attribute optional.
4 5 6 |
# File 'lib/apcera/models/port.rb', line 4 def optional @optional end |
#routes ⇒ Object
Returns the value of attribute routes.
4 5 6 |
# File 'lib/apcera/models/port.rb', line 4 def routes @routes 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/apcera/models/port.rb', line 6 def self.attribute_map { # The numerical port exposed for connectivity. :'number' => :'number', # A value of `true` indicates that the instance manager (IM) should attempt to verify that connectivity has been established for this port; if `false`, no such verification occurs. :'optional' => :'optional', # An array of URLs to map to the port. :'routes' => :'routes' } end |
.swagger_types ⇒ Object
attribute type
22 23 24 25 26 27 28 29 |
# File 'lib/apcera/models/port.rb', line 22 def self.swagger_types { :'number' => :'Integer', :'optional' => :'BOOLEAN', :'routes' => :'Array<Route>' } end |