class Apcera::TaskEvent

Attributes

payload[RW]
stage[RW]
subtask[RW]
tags[RW]
task_event_type[RW]
task_uuid[RW]
thread[RW]
time[RW]
uuid[RW]

Public Class Methods

attribute_map() click to toggle source

attribute mapping from ruby-style variable name to JSON key

# 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
new(attributes = {}) click to toggle source
# 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
swagger_types() click to toggle source

attribute type

# 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

Public Instance Methods

task_event_type=(task_event_type) click to toggle source
# File lib/apcera/models/task_event.rb, line 104
def task_event_type=(task_event_type)
  allowed_values = ["event", "error", "eos", "disconnect", "cancel"]
  if task_event_type && !allowed_values.include?(task_event_type)
    fail "invalid value for 'task_event_type', must be one of #{allowed_values}"
  end
  @task_event_type = task_event_type
end