class Apcera::Port

Attributes

number[RW]
optional[RW]
routes[RW]

Public Class Methods

attribute_map() click to toggle source

attribute mapping from ruby-style variable name to JSON key

# 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
new(attributes = {}) click to toggle source
# 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
swagger_types() click to toggle source

attribute type

# File lib/apcera/models/port.rb, line 22
def self.swagger_types
  {
    :'number' => :'Integer',
    :'optional' => :'BOOLEAN',
    :'routes' => :'Array<Route>'
    
  }
end