Class: Apcera::TaskEvent

Inherits:
BaseObject show all
Defined in:
lib/apcera/models/task_event.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ TaskEvent

Returns a new instance of TaskEvent.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/apcera/models/task_event.rb', line 55

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[:'payload']
    if (value = attributes[:'payload']).is_a?(Array)
      self.payload = value
    end
  end
  
  if attributes[:'stage']
    self.stage = attributes[:'stage']
  end
  
  if attributes[:'subtask']
    self.subtask = attributes[:'subtask']
  end
  
  if attributes[:'tags']
    if (value = attributes[:'tags']).is_a?(Array)
      self.tags = value
    end
  end
  
  if attributes[:'task_event_type']
    self.task_event_type = attributes[:'task_event_type']
  end
  
  if attributes[:'task_uuid']
    self.task_uuid = attributes[:'task_uuid']
  end
  
  if attributes[:'thread']
    self.thread = attributes[:'thread']
  end
  
  if attributes[:'time']
    self.time = attributes[:'time']
  end
  
  if attributes[:'uuid']
    self.uuid = attributes[:'uuid']
  end
  
end

Instance Attribute Details

#payloadObject

Returns the value of attribute payload.



4
5
6
# File 'lib/apcera/models/task_event.rb', line 4

def payload
  @payload
end

#stageObject

Returns the value of attribute stage.



4
5
6
# File 'lib/apcera/models/task_event.rb', line 4

def stage
  @stage
end

#subtaskObject

Returns the value of attribute subtask.



4
5
6
# File 'lib/apcera/models/task_event.rb', line 4

def subtask
  @subtask
end

#tagsObject

Returns the value of attribute tags.



4
5
6
# File 'lib/apcera/models/task_event.rb', line 4

def tags
  @tags
end

#task_event_typeObject

Returns the value of attribute task_event_type.



4
5
6
# File 'lib/apcera/models/task_event.rb', line 4

def task_event_type
  @task_event_type
end

#task_uuidObject

Returns the value of attribute task_uuid.



4
5
6
# File 'lib/apcera/models/task_event.rb', line 4

def task_uuid
  @task_uuid
end

#threadObject

Returns the value of attribute thread.



4
5
6
# File 'lib/apcera/models/task_event.rb', line 4

def thread
  @thread
end

#timeObject

Returns the value of attribute time.



4
5
6
# File 'lib/apcera/models/task_event.rb', line 4

def time
  @time
end

#uuidObject

Returns the value of attribute uuid.



4
5
6
# File 'lib/apcera/models/task_event.rb', line 4

def uuid
  @uuid
end

Class Method Details

.attribute_mapObject

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
29
30
31
32
33
34
35
36
37
# File 'lib/apcera/models/task_event.rb', line 6

def self.attribute_map
  {
    
    # Extra information about the TaskEvent.
    :'payload' => :'payload',
    
    # A logical grouping of subtasks. A stage could be \"Creating Job\" or \"Downloading Packages\".
    :'stage' => :'stage',
    
    # A description of the sub-task that this TaskEvent describes.
    :'subtask' => :'subtask',
    
    # An list of tags that provide a hint about what is being tracked.
    :'tags' => :'tags',
    
    # The type of message this TaskEvent contains.
    :'task_event_type' => :'task_event_type',
    
    # UUID of the Task that stores this event.
    :'task_uuid' => :'task_uuid',
    
    # Represents a logically independent procedure within a Task. For instance, a thread could be \"job1\" or \"job2\", or \"Link job1 and job2\".
    :'thread' => :'thread',
    
    # Time in UNIX nanoseconds immediately before the TaskEvent gets announced on NATS.
    :'time' => :'time',
    
    # UUID of the Task that stores this event.
    :'uuid' => :'uuid'
    
  }
end

.swagger_typesObject

attribute type



40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/apcera/models/task_event.rb', line 40

def self.swagger_types
  {
    :'payload' => :'Hash<String, String>',
    :'stage' => :'String',
    :'subtask' => :'SubTask',
    :'tags' => :'Array<String>',
    :'task_event_type' => :'String',
    :'task_uuid' => :'String',
    :'thread' => :'String',
    :'time' => :'Integer',
    :'uuid' => :'String'
    
  }
end