class Apcera::ProcessObject

Attributes

environment[RW]
group[RW]
heavy[RW]
start_command[RW]
start_command_raw[RW]
start_command_timeout[RW]
stop_command[RW]
stop_command_raw[RW]
stop_timeout[RW]
user[RW]

Public Class Methods

attribute_map() click to toggle source

attribute mapping from ruby-style variable name to JSON key

# File lib/apcera/models/process_object.rb, line 6
def self.attribute_map
  {
    
    # An optional list of environment values to attach to the process within the job.
    :'environment' => :'environment',
    
    # Name of the group used to run the process within a container. An empty string lets the the instance manager choose a group.
    :'group' => :'group',
    
    # Start the process in \"heavy\" mode: giving it pid 1.  Only one process within the job can set this flag to true.
    :'heavy' => :'heavy',
    
    # The command used to start the process within the container's isolation context.
    :'start_command' => :'start_command',
    
    # The command used to start the process, specified as an array. The first element in the array is the command/binary to execute, and subsequent array elements are command arguments. The expanded command string is passed directly to `exec()` without shell or template interpretation.  If `start_command_raw` is provided then `start_command`, if specified, is ignored. This property is typically used with exact processes that have an extremely well-known start command.
    :'start_command_raw' => :'start_command_raw',
    
    # The number of seconds that the system will wait for startup to complete. This includes the time that it will take for ports to become available.
    :'start_command_timeout' => :'start_command_timeout',
    
    # The command used to stop the process within the container's isolation context. If not defined, OS-level signals (like `TERM`) may be used to shut down the process.
    :'stop_command' => :'stop_command',
    
    # The command used to stop the process, specified as an array. The first element in the array is the command/binary to execute, and subsequent array elements are command arguments. The expanded command string is passed directly to `exec()` without shell or template interpretation.  If `stop_command_raw` is provided then `stop_command`, if specified, is ignored. This property is typically used with exact processes that have an extremely well-known start command.
    :'stop_command_raw' => :'stop_command_raw',
    
    # The number of seconds to give the process after `stop_command` has been run before forcing the command to shutdown via OS-level signals, such as `TERM`. If no `stop_command` is provided for the process, OS-level signals (like `TERM`) may be used to terminate the process.
    :'stop_timeout' => :'stop_timeout',
    
    # Name of the user used to run the process within a container. An empty string lets the the instance manager choose a user.
    :'user' => :'user'
    
  }
end
new(attributes = {}) click to toggle source
# File lib/apcera/models/process_object.rb, line 59
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[:'environment']
    if (value = attributes[:'environment']).is_a?(Array)
      self.environment = value
    end
  end
  
  if attributes[:'group']
    self.group = attributes[:'group']
  end
  
  if attributes[:'heavy']
    self.heavy = attributes[:'heavy']
  end
  
  if attributes[:'start_command']
    self.start_command = attributes[:'start_command']
  end
  
  if attributes[:'start_command_raw']
    if (value = attributes[:'start_command_raw']).is_a?(Array)
      self.start_command_raw = value
    end
  end
  
  if attributes[:'start_command_timeout']
    self.start_command_timeout = attributes[:'start_command_timeout']
  end
  
  if attributes[:'stop_command']
    self.stop_command = attributes[:'stop_command']
  end
  
  if attributes[:'stop_command_raw']
    if (value = attributes[:'stop_command_raw']).is_a?(Array)
      self.stop_command_raw = value
    end
  end
  
  if attributes[:'stop_timeout']
    self.stop_timeout = attributes[:'stop_timeout']
  end
  
  if attributes[:'user']
    self.user = attributes[:'user']
  end
  
end
swagger_types() click to toggle source

attribute type

# File lib/apcera/models/process_object.rb, line 43
def self.swagger_types
  {
    :'environment' => :'Hash<String, String>',
    :'group' => :'String',
    :'heavy' => :'BOOLEAN',
    :'start_command' => :'String',
    :'start_command_raw' => :'Array<String>',
    :'start_command_timeout' => :'Integer',
    :'stop_command' => :'String',
    :'stop_command_raw' => :'Array<String>',
    :'stop_timeout' => :'Integer',
    :'user' => :'String'
    
  }
end