Class: Apcera::Instances

Inherits:
BaseObject show all
Defined in:
lib/apcera/models/instances.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ Instances

Returns a new instance of Instances.



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# 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

Instance Attribute Details

#announced_routesObject

Returns the value of attribute announced_routes.



4
5
6
# File 'lib/apcera/models/instances.rb', line 4

def announced_routes
  @announced_routes
end

#created_timeObject

Returns the value of attribute created_time.



4
5
6
# File 'lib/apcera/models/instances.rb', line 4

def created_time
  @created_time
end

#exit_codeObject

Returns the value of attribute exit_code.



4
5
6
# File 'lib/apcera/models/instances.rb', line 4

def exit_code
  @exit_code
end

#exitedObject

Returns the value of attribute exited.



4
5
6
# File 'lib/apcera/models/instances.rb', line 4

def exited
  @exited
end

#failedObject

Returns the value of attribute failed.



4
5
6
# File 'lib/apcera/models/instances.rb', line 4

def failed
  @failed
end

#hostObject

Returns the value of attribute host.



4
5
6
# File 'lib/apcera/models/instances.rb', line 4

def host
  @host
end

#instance_managerObject

Returns the value of attribute instance_manager.



4
5
6
# File 'lib/apcera/models/instances.rb', line 4

def instance_manager
  @instance_manager
end

#job_version_idObject

Returns the value of attribute job_version_id.



4
5
6
# File 'lib/apcera/models/instances.rb', line 4

def job_version_id
  @job_version_id
end

#stateObject

Returns the value of attribute state.



4
5
6
# File 'lib/apcera/models/instances.rb', line 4

def state
  @state
end

#uuidObject

Returns the value of attribute uuid.



4
5
6
# File 'lib/apcera/models/instances.rb', line 4

def uuid
  @uuid
end

Class Method Details

.attribute_mapObject

attribute mapping from ruby-style variable name to JSON key



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# 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

.swagger_typesObject

attribute type



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# 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