class Apcera::Job
Attributes
bindings[RW]
created_at[RW]
created_by[RW]
docker_origin[RW]
fqn[RW]
health[RW]
logs[RW]
name[RW]
network_ref[RW]
num_instances[RW]
packages[RW]
ports[RW]
processes[RW]
resources[RW]
restart[RW]
rollout[RW]
state[RW]
updated_at[RW]
updated_by[RW]
uuid[RW]
version_id[RW]
weight[RW]
Public Class Methods
attribute_map()
click to toggle source
attribute mapping from ruby-style variable name to JSON key
# File lib/apcera/models/job.rb, line 6 def self.attribute_map { # A list of service bindings associated with the job. :'bindings' => :'bindings', # Time at which the job was created. :'created_at' => :'created_at', # The principal name of user who created the job. :'created_by' => :'created_by', # For jobs that run Docker images, specifies the Docker registry, image name and tag that were used to create the job. This field can't be changed after the job is created. :'docker_origin' => :'docker_origin', # Job's fully-qualified name. :'fqn' => :'fqn', # 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', # Indicates the health of the job. If empty then the job's health has not been retrieved from the health manager yet. :'health' => :'health', # An array of logs the job will be producing that should be collected for aggregation or streaming. :'logs' => :'logs', # Name of the job. :'name' => :'name', # An object that contains information about the [virtual network](#virtualnetwork) the job belongs to. :'network_ref' => :'network_ref', # The number of job instances currently running. :'num_instances' => :'num_instances', # Array of packages for this Job. Includes both user-specified packages and the packages calculated by the package manager. :'packages' => :'packages', # An array of ports associated with the job. :'ports' => :'ports', # A list of processes associated with the job. :'processes' => :'processes', # A list of compute and network resources that this job can consume. :'resources' => :'resources', # Configuration related to restarting the job. :'restart' => :'restart', # Configuration related to rolling updates of the job. :'rollout' => :'rollout', # 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', # General state of this Job in the system. :'state' => :'state', # Map of tags (arbitrary strings) to values. :'tags' => :'tags', # Time at which the job was most recently updated. :'updated_at' => :'updated_at', # The principal name of the last user to update the job. :'updated_by' => :'updated_by', # The job's unique identifier. :'uuid' => :'uuid', # An auto-incremented number that indicates the revision of the object. :'version_id' => :'version_id', # A job's weight is used to route requests to this job relative to other job that have the same routes. See [Sharing Routes and Route Weights](http://docs.apcera.com/jobs/routes/#about-route-weights). :'weight' => :'weight' } end
new(attributes = {})
click to toggle source
# File lib/apcera/models/job.rb, line 119 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[:'bindings'] if (value = attributes[:'bindings']).is_a?(Array) self.bindings = value end end if attributes[:'created_at'] self.created_at = attributes[:'created_at'] end if attributes[:'created_by'] self.created_by = attributes[:'created_by'] end if attributes[:'docker_origin'] self.docker_origin = attributes[:'docker_origin'] end if attributes[:'fqn'] self.fqn = attributes[:'fqn'] end if attributes[:'hard_scheduling_tags'] if (value = attributes[:'hard_scheduling_tags']).is_a?(Array) self.hard_scheduling_tags = value end end if attributes[:'health'] self.health = attributes[:'health'] end if attributes[:'logs'] if (value = attributes[:'logs']).is_a?(Array) self.logs = value end end if attributes[:'name'] self.name = attributes[:'name'] end if attributes[:'network_ref'] self.network_ref = attributes[:'network_ref'] end if attributes[:'num_instances'] self.num_instances = attributes[:'num_instances'] end if attributes[:'packages'] if (value = attributes[:'packages']).is_a?(Array) self.packages = value end end if attributes[:'ports'] if (value = attributes[:'ports']).is_a?(Array) self.ports = value end end if attributes[:'processes'] self.processes = attributes[:'processes'] end if attributes[:'resources'] self.resources = attributes[:'resources'] end if attributes[:'restart'] self.restart = attributes[:'restart'] end if attributes[:'rollout'] self.rollout = attributes[:'rollout'] end if attributes[:'soft_scheduling_tags'] if (value = attributes[:'soft_scheduling_tags']).is_a?(Array) self.soft_scheduling_tags = value end end if attributes[:'state'] self.state = attributes[:'state'] end if attributes[:'tags'] if (value = attributes[:'tags']).is_a?(Array) self.tags = value end end if attributes[:'updated_at'] self.updated_at = attributes[:'updated_at'] end if attributes[:'updated_by'] self.updated_by = attributes[:'updated_by'] end if attributes[:'uuid'] self.uuid = attributes[:'uuid'] end if attributes[:'version_id'] self.version_id = attributes[:'version_id'] end if attributes[:'weight'] self.weight = attributes[:'weight'] end end
swagger_types()
click to toggle source
attribute type
# File lib/apcera/models/job.rb, line 88 def self.swagger_types { :'bindings' => :'Hash<String, Binding>', :'created_at' => :'DateTime', :'created_by' => :'String', :'docker_origin' => :'DockerOrigin', :'fqn' => :'String', :'hard_scheduling_tags' => :'Hash<String, BOOLEAN>', :'health' => :'JobHealth', :'logs' => :'Array<Log>', :'name' => :'String', :'network_ref' => :'JobNetworkReference', :'num_instances' => :'Integer', :'packages' => :'Array<PackageInfo>', :'ports' => :'Array<Port>', :'processes' => :'Process', :'resources' => :'Resource', :'restart' => :'RestartConfig', :'rollout' => :'RolloutConfig', :'soft_scheduling_tags' => :'Hash<String, BOOLEAN>', :'state' => :'String', :'tags' => :'Hash<String, String>', :'updated_at' => :'DateTime', :'updated_by' => :'String', :'uuid' => :'String', :'version_id' => :'Integer', :'weight' => :'Integer' } end
Public Instance Methods
state=(state)
click to toggle source
# File lib/apcera/models/job.rb, line 242 def state=(state) allowed_values = ["invalid", "unknown", "created", "errored", "staging", "staging_failed", "ready", "started", "stopped", "finished"] if state && !allowed_values.include?(state) fail "invalid value for 'state', must be one of #{allowed_values}" end @state = state end