Class: Apcera::PolicyError
- Inherits:
-
BaseObject
- Object
- BaseObject
- Apcera::PolicyError
- Defined in:
- lib/apcera/models/policy_error.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#job ⇒ Object
Returns the value of attribute job.
-
#job_changed ⇒ Object
Returns the value of attribute job_changed.
-
#repairable ⇒ Object
Returns the value of attribute repairable.
Class Method Summary collapse
-
.attribute_map ⇒ Object
attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
attribute type.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ PolicyError
constructor
A new instance of PolicyError.
Methods inherited from BaseObject
#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ PolicyError
Returns a new instance of PolicyError.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# 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 |
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
4 5 6 |
# File 'lib/apcera/models/policy_error.rb', line 4 def errors @errors end |
#job ⇒ Object
Returns the value of attribute job.
4 5 6 |
# File 'lib/apcera/models/policy_error.rb', line 4 def job @job end |
#job_changed ⇒ Object
Returns the value of attribute job_changed.
4 5 6 |
# File 'lib/apcera/models/policy_error.rb', line 4 def job_changed @job_changed end |
#repairable ⇒ Object
Returns the value of attribute repairable.
4 5 6 |
# File 'lib/apcera/models/policy_error.rb', line 4 def repairable @repairable end |
Class Method Details
.attribute_map ⇒ Object
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 |
# 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 |
.swagger_types ⇒ Object
attribute type
25 26 27 28 29 30 31 32 33 |
# File 'lib/apcera/models/policy_error.rb', line 25 def self.swagger_types { :'errors' => :'Array<String>', :'job' => :'Job', :'job_changed' => :'BOOLEAN', :'repairable' => :'BOOLEAN' } end |