class Apcera::JobHealth

Attributes

flapping[RW]
instance_state_count[RW]
score[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/job_health.rb, line 6
def self.attribute_map
  {
    
    # Indicates if job is in a flapping state (true) or not (false).
    :'flapping' => :'flapping',
    
    # Map of instance states to the number of instances in that state, as reported by the health manager.
    :'instance_state_count' => :'instance_state_count',
    
    # Score is the ratio of running instances to configured instances, capped between 0 and 1.
    :'score' => :'score',
    
    # UUID of the job.
    :'uuid' => :'uuid'
    
  }
end
new(attributes = {}) click to toggle source
# File lib/apcera/models/job_health.rb, line 35
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[:'flapping']
    self.flapping = attributes[:'flapping']
  end
  
  if attributes[:'instance_state_count']
    if (value = attributes[:'instance_state_count']).is_a?(Array)
      self.instance_state_count = value
    end
  end
  
  if attributes[:'score']
    self.score = attributes[:'score']
  end
  
  if attributes[:'uuid']
    self.uuid = attributes[:'uuid']
  end
  
end
swagger_types() click to toggle source

attribute type

# File lib/apcera/models/job_health.rb, line 25
def self.swagger_types
  {
    :'flapping' => :'BOOLEAN',
    :'instance_state_count' => :'Hash<String, InstanceState>',
    :'score' => :'Integer',
    :'uuid' => :'BOOLEAN'
    
  }
end