Class: Apcera::SubTask
- Inherits:
-
BaseObject
- Object
- BaseObject
- Apcera::SubTask
- Defined in:
- lib/apcera/models/sub_task.rb
Instance Attribute Summary collapse
-
#index ⇒ Object
Returns the value of attribute index.
-
#name ⇒ Object
Returns the value of attribute name.
-
#progress ⇒ Object
Returns the value of attribute progress.
-
#total ⇒ Object
Returns the value of attribute total.
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 = {}) ⇒ SubTask
constructor
A new instance of SubTask.
Methods inherited from BaseObject
#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ SubTask
Returns a new instance of SubTask.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/apcera/models/sub_task.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[:'index'] self.index = attributes[:'index'] end if attributes[:'name'] self.name = attributes[:'name'] end if attributes[:'progress'] self.progress = attributes[:'progress'] end if attributes[:'total'] self.total = attributes[:'total'] end end |
Instance Attribute Details
#index ⇒ Object
Returns the value of attribute index.
4 5 6 |
# File 'lib/apcera/models/sub_task.rb', line 4 def index @index end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/apcera/models/sub_task.rb', line 4 def name @name end |
#progress ⇒ Object
Returns the value of attribute progress.
4 5 6 |
# File 'lib/apcera/models/sub_task.rb', line 4 def progress @progress end |
#total ⇒ Object
Returns the value of attribute total.
4 5 6 |
# File 'lib/apcera/models/sub_task.rb', line 4 def total @total 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/sub_task.rb', line 6 def self.attribute_map { # The index of this subtask among all subtasks. :'index' => :'index', # A human-readable description of this subtask. :'name' => :'name', # Indicates how far along this unit of work is. :'progress' => :'progress', # The total number of subtasks in the current stage. :'total' => :'total' } end |
.swagger_types ⇒ Object
attribute type
25 26 27 28 29 30 31 32 33 |
# File 'lib/apcera/models/sub_task.rb', line 25 def self.swagger_types { :'index' => :'Integer', :'name' => :'String', :'progress' => :'TaskProgress', :'total' => :'Integer' } end |