Class: Apcera::Task
- Inherits:
-
BaseObject
- Object
- BaseObject
- Apcera::Task
- Defined in:
- lib/apcera/models/task.rb
Instance Attribute Summary collapse
-
#errored ⇒ Object
Returns the value of attribute errored.
-
#events ⇒ Object
Returns the value of attribute events.
-
#state ⇒ Object
Returns the value of attribute state.
-
#time_completed ⇒ Object
Returns the value of attribute time_completed.
-
#time_started ⇒ Object
Returns the value of attribute time_started.
-
#uuid ⇒ Object
Returns the value of attribute uuid.
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 = {}) ⇒ Task
constructor
A new instance of Task.
Methods inherited from BaseObject
#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ Task
Returns a new instance of Task.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/apcera/models/task.rb', line 43 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[:'errored'] self.errored = attributes[:'errored'] end if attributes[:'events'] if (value = attributes[:'events']).is_a?(Array) self.events = value end end if attributes[:'state'] self.state = attributes[:'state'] end if attributes[:'time_completed'] self.time_completed = attributes[:'time_completed'] end if attributes[:'time_started'] self.time_started = attributes[:'time_started'] end if attributes[:'uuid'] self.uuid = attributes[:'uuid'] end end |
Instance Attribute Details
#errored ⇒ Object
Returns the value of attribute errored.
4 5 6 |
# File 'lib/apcera/models/task.rb', line 4 def errored @errored end |
#events ⇒ Object
Returns the value of attribute events.
4 5 6 |
# File 'lib/apcera/models/task.rb', line 4 def events @events end |
#state ⇒ Object
Returns the value of attribute state.
4 5 6 |
# File 'lib/apcera/models/task.rb', line 4 def state @state end |
#time_completed ⇒ Object
Returns the value of attribute time_completed.
4 5 6 |
# File 'lib/apcera/models/task.rb', line 4 def time_completed @time_completed end |
#time_started ⇒ Object
Returns the value of attribute time_started.
4 5 6 |
# File 'lib/apcera/models/task.rb', line 4 def time_started @time_started end |
#uuid ⇒ Object
Returns the value of attribute uuid.
4 5 6 |
# File 'lib/apcera/models/task.rb', line 4 def uuid @uuid 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 23 24 25 26 27 28 |
# File 'lib/apcera/models/task.rb', line 6 def self.attribute_map { # Describes the error for a Task that has encountered an error. :'errored' => :'errored', # List of all TaskEvents that have been published for this particular task. :'events' => :'events', # The Task's current state. Can be `running`, `stopped` or `complete`. :'state' => :'state', # Indicates the time when the task completed. Stored as a UNIX timestamp with nanosecond precision. :'time_completed' => :'time_completed', # Indicates the time when the task was started. Stored as a UNIX timestamp with nanosecond precision. :'time_started' => :'time_started', # The task's unique identifier. :'uuid' => :'uuid' } end |
.swagger_types ⇒ Object
attribute type
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/apcera/models/task.rb', line 31 def self.swagger_types { :'errored' => :'String', :'events' => :'Array<TaskEvent>', :'state' => :'String', :'time_completed' => :'Integer', :'time_started' => :'Integer', :'uuid' => :'String' } end |