class Apcera::Instances

Attributes

announced_routes[RW]
created_time[RW]
exit_code[RW]
exited[RW]
failed[RW]
host[RW]
instance_manager[RW]
job_version_id[RW]
state[RW]
uuid[RW]

Public Class Methods

attribute_map() click to toggle source

attribute mapping from ruby-style variable name to JSON key

# File lib/apcera/models/instances.rb, line 6
def self.attribute_map
  {
    
    # Indicates whether the routes for this instance have been announced.
    :'announced_routes' => :'announced_routes',
    
    # UNIX timestamp for when instance was created.
    :'created_time' => :'created_time',
    
    # Exit code of the main processes; should only be checked if `exited` is `true`.
    :'exit_code' => :'exit_code',
    
    # Set to true if the instance started and its main process managed to exit.
    :'exited' => :'exited',
    
    # Set to `true` if the instance has failed in some way.
    :'failed' => :'failed',
    
    # Name of the host the instance is running on.
    :'host' => :'host',
    
    # UUID of the instance manager running the instance.
    :'instance_manager' => :'instance_manager',
    
    # The sequence number of the job the instance is running.
    :'job_version_id' => :'job_version_id',
    
    # State of the instance.
    :'state' => :'state',
    
    # The instance's unique identifier.
    :'uuid' => :'uuid'
    
  }
end
new(attributes = {}) click to toggle source
# File lib/apcera/models/instances.rb, line 59
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[:'announced_routes']
    self.announced_routes = attributes[:'announced_routes']
  end
  
  if attributes[:'created_time']
    self.created_time = attributes[:'created_time']
  end
  
  if attributes[:'exit_code']
    self.exit_code = attributes[:'exit_code']
  end
  
  if attributes[:'exited']
    self.exited = attributes[:'exited']
  end
  
  if attributes[:'failed']
    self.failed = attributes[:'failed']
  end
  
  if attributes[:'host']
    self.host = attributes[:'host']
  end
  
  if attributes[:'instance_manager']
    self.instance_manager = attributes[:'instance_manager']
  end
  
  if attributes[:'job_version_id']
    self.job_version_id = attributes[:'job_version_id']
  end
  
  if attributes[:'state']
    self.state = attributes[:'state']
  end
  
  if attributes[:'uuid']
    self.uuid = attributes[:'uuid']
  end
  
end
swagger_types() click to toggle source

attribute type

# File lib/apcera/models/instances.rb, line 43
def self.swagger_types
  {
    :'announced_routes' => :'BOOLEAN',
    :'created_time' => :'Float',
    :'exit_code' => :'Integer',
    :'exited' => :'BOOLEAN',
    :'failed' => :'BOOLEAN',
    :'host' => :'String',
    :'instance_manager' => :'String',
    :'job_version_id' => :'Integer',
    :'state' => :'InstanceState',
    :'uuid' => :'String'
    
  }
end