class Apcera::CreateDockerJobRequest

Attributes

allow_egress[RW]
env[RW]
exposed_ports[RW]
group[RW]
hard_scheduling_tags[RW]
ignore_volumes[RW]
image_url[RW]
interactive[RW]
job_fqn[RW]
resources[RW]
restart[RW]
routes[RW]
soft_scheduling_tags[RW]
start[RW]
start_command[RW]
stop_command[RW]
user[RW]
volume_provider_fqn[RW]
volumes[RW]

Public Class Methods

attribute_map() click to toggle source

attribute mapping from ruby-style variable name to JSON key

# File lib/apcera/models/create_docker_job_request.rb, line 6
def self.attribute_map
  {
    
    # If `true`, the job is allowed outbound network connectivity.
    :'allow_egress' => :'allow_egress',
    
    # List of environment variables that are added to the job.
    :'env' => :'env',
    
    # An array of ports exposed on job instances.
    :'exposed_ports' => :'exposed_ports',
    
    # Group to run Docker image as (default: picked by Apcera).
    :'group' => :'group',
    
    # List of hard scheduling tags. See [Hard Tags](http://enterprise-docs.apcera.com/other/job-scheduling/#hard-tags) for more information.
    :'hard_scheduling_tags' => :'hard_scheduling_tags',
    
    # If `true`, volumes specified in the Docker image spec are ignored and no data will be persisted. If `false` or not specified, and the Docker image specifies volumes, then you must supply a provider FQN in the request object's `volume_provider_fqn` property.
    :'ignore_volumes' => :'ignore_volumes',
    
    # Docker image URL.
    :'image_url' => :'image_url',
    
    # If `true`, the start command is removed from the job definition. The start command string is saved to the `DOCKER_START_COMMAND` environment variable on the job's environment.
    :'interactive' => :'interactive',
    
    # The fully-qualified name of the job to create from the Docker image.
    :'job_fqn' => :'job_fqn',
    
    # A list of compute and network resources that the job can consume.
    :'resources' => :'resources',
    
    # Configuration related to restarting the job.
    :'restart' => :'restart',
    
    # A map of routes to the ports where the routes are available.
    :'routes' => :'routes',
    
    # List of soft scheduling tags. See [Soft Tags](http://enterprise-docs.apcera.com/other/job-scheduling/#soft-tags) for more information.
    :'soft_scheduling_tags' => :'soft_scheduling_tags',
    
    # If `true` the job is started after its created. Default is `false`.
    :'start' => :'start',
    
    # 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.
    :'start_command' => :'start_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.
    :'stop_command' => :'stop_command',
    
    # User to run Docker image as. Defaults to user in the Docker image configuration, or 'root' if image doesn't have a user configured.
    :'user' => :'user',
    
    # Volume provider's fully-qualified name. Required if `ignore_volumes` is not set to `true`.
    :'volume_provider_fqn' => :'volume_provider_fqn',
    
    # A list of volumes used by the Docker image for persistence.
    :'volumes' => :'volumes'
    
  }
end
new(attributes = {}) click to toggle source
# File lib/apcera/models/create_docker_job_request.rb, line 95
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[:'allow_egress']
    self.allow_egress = attributes[:'allow_egress']
  end
  
  if attributes[:'env']
    if (value = attributes[:'env']).is_a?(Array)
      self.env = value
    end
  end
  
  if attributes[:'exposed_ports']
    if (value = attributes[:'exposed_ports']).is_a?(Array)
      self.exposed_ports = value
    end
  end
  
  if attributes[:'group']
    self.group = attributes[:'group']
  end
  
  if attributes[:'hard_scheduling_tags']
    if (value = attributes[:'hard_scheduling_tags']).is_a?(Array)
      self.hard_scheduling_tags = value
    end
  end
  
  if attributes[:'ignore_volumes']
    self.ignore_volumes = attributes[:'ignore_volumes']
  end
  
  if attributes[:'image_url']
    self.image_url = attributes[:'image_url']
  end
  
  if attributes[:'interactive']
    self.interactive = attributes[:'interactive']
  end
  
  if attributes[:'job_fqn']
    self.job_fqn = attributes[:'job_fqn']
  end
  
  if attributes[:'resources']
    self.resources = attributes[:'resources']
  end
  
  if attributes[:'restart']
    self.restart = attributes[:'restart']
  end
  
  if attributes[:'routes']
    if (value = attributes[:'routes']).is_a?(Array)
      self.routes = value
    end
  end
  
  if attributes[:'soft_scheduling_tags']
    if (value = attributes[:'soft_scheduling_tags']).is_a?(Array)
      self.soft_scheduling_tags = value
    end
  end
  
  if attributes[:'start']
    self.start = attributes[:'start']
  end
  
  if attributes[:'start_command']
    if (value = attributes[:'start_command']).is_a?(Array)
      self.start_command = value
    end
  end
  
  if attributes[:'stop_command']
    if (value = attributes[:'stop_command']).is_a?(Array)
      self.stop_command = value
    end
  end
  
  if attributes[:'user']
    self.user = attributes[:'user']
  end
  
  if attributes[:'volume_provider_fqn']
    self.volume_provider_fqn = attributes[:'volume_provider_fqn']
  end
  
  if attributes[:'volumes']
    if (value = attributes[:'volumes']).is_a?(Array)
      self.volumes = value
    end
  end
  
end
swagger_types() click to toggle source

attribute type

# File lib/apcera/models/create_docker_job_request.rb, line 70
def self.swagger_types
  {
    :'allow_egress' => :'BOOLEAN',
    :'env' => :'Hash<String, String>',
    :'exposed_ports' => :'Array<Integer>',
    :'group' => :'String',
    :'hard_scheduling_tags' => :'Hash<String, BOOLEAN>',
    :'ignore_volumes' => :'BOOLEAN',
    :'image_url' => :'String',
    :'interactive' => :'BOOLEAN',
    :'job_fqn' => :'String',
    :'resources' => :'Resource',
    :'restart' => :'RestartConfig',
    :'routes' => :'Hash<String, Integer>',
    :'soft_scheduling_tags' => :'Hash<String, BOOLEAN>',
    :'start' => :'BOOLEAN',
    :'start_command' => :'Array<String>',
    :'stop_command' => :'Array<String>',
    :'user' => :'String',
    :'volume_provider_fqn' => :'String',
    :'volumes' => :'Array<String>'
    
  }
end