lib/iron_titan/models/job.rb in iron_titan-0.0.6 vs lib/iron_titan/models/job.rb in iron_titan-0.0.7
- old
+ new
@@ -1,11 +1,11 @@
=begin
Titan API
The ultimate, language agnostic, container based job processing framework.
-OpenAPI spec version: 0.0.6
+OpenAPI spec version: 0.0.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
=end
@@ -15,10 +15,13 @@
module IronTitan
class Job
# Docker image to use for job.
attr_accessor :image
+ # If this field is set, then this job is a retry of a previous job. retry_from_id points to the previous job.
+ attr_accessor :retry_from_id
+
# Time when job was submitted.
attr_accessor :created_at
# Priority of the job. 3 levels from 0-2. Default 0.
attr_accessor :priority
@@ -51,11 +54,11 @@
attr_accessor :started_at
# Unique identifier representing a specific job.
attr_accessor :id
- # If this field is set, then the job was retried and RetryId points to new job.
+ # If this field is set, then this job was retried and RetryId points to new job.
attr_accessor :retry_id
# Status of job. One of: [pending, running, success, error, timeout]
attr_accessor :status
@@ -63,10 +66,12 @@
def self.attribute_map
{
:'image' => :'image',
+ :'retry_from_id' => :'retry_from_id',
+
:'created_at' => :'created_at',
:'priority' => :'priority',
:'retries_delay' => :'retries_delay',
@@ -98,10 +103,11 @@
# Attribute type mapping.
def self.swagger_types
{
:'image' => :'String',
+ :'retry_from_id' => :'String',
:'created_at' => :'DateTime',
:'priority' => :'Integer',
:'retries_delay' => :'Integer',
:'error' => :'String',
:'timeout' => :'Integer',
@@ -127,10 +133,14 @@
if attributes[:'image']
self.image = attributes[:'image']
end
+ if attributes[:'retry_from_id']
+ self.retry_from_id = attributes[:'retry_from_id']
+ end
+
if attributes[:'created_at']
self.created_at = attributes[:'created_at']
end
if attributes[:'priority']
@@ -190,10 +200,11 @@
# Check equality by comparing each attribute.
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
image == o.image &&
+ retry_from_id == o.retry_from_id &&
created_at == o.created_at &&
priority == o.priority &&
retries_delay == o.retries_delay &&
error == o.error &&
timeout == o.timeout &&
@@ -213,10 +224,10 @@
self == o
end
# Calculate hash code according to all attributes.
def hash
- [image, created_at, priority, retries_delay, error, timeout, retries, completed_at, delay, payload, name, started_at, id, retry_id, status].hash
+ [image, retry_from_id, created_at, priority, retries_delay, error, timeout, retries, completed_at, delay, payload, name, started_at, id, retry_id, status].hash
end
# build the object from hash
def build_from_hash(attributes)
return nil unless attributes.is_a?(Hash)