class Apcera::PolicyError

Attributes

errors[RW]
job[RW]
job_changed[RW]
repairable[RW]

Public Class Methods

attribute_map() click to toggle source

attribute mapping from ruby-style variable name to JSON key

# File lib/apcera/models/policy_error.rb, line 6
def self.attribute_map
  {
    
    # An array of specific policy errors that occurred.
    :'errors' => :'errors',
    
    # A reference to the job associated with the policy error.
    :'job' => :'job',
    
    # If `true`, the policy error was the result of changes to a job.
    :'job_changed' => :'job_changed',
    
    # If `true`, the error is repairable.
    :'repairable' => :'repairable'
    
  }
end
new(attributes = {}) click to toggle source
# File lib/apcera/models/policy_error.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[:'errors']
    if (value = attributes[:'errors']).is_a?(Array)
      self.errors = value
    end
  end
  
  if attributes[:'job']
    self.job = attributes[:'job']
  end
  
  if attributes[:'job_changed']
    self.job_changed = attributes[:'job_changed']
  end
  
  if attributes[:'repairable']
    self.repairable = attributes[:'repairable']
  end
  
end
swagger_types() click to toggle source

attribute type

# File lib/apcera/models/policy_error.rb, line 25
def self.swagger_types
  {
    :'errors' => :'Array<String>',
    :'job' => :'Job',
    :'job_changed' => :'BOOLEAN',
    :'repairable' => :'BOOLEAN'
    
  }
end