iron_titan 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +100 -29
  3. data/lib/iron_titan/api/core_api.rb +71 -12
  4. data/lib/iron_titan/api/images_api.rb +32 -32
  5. data/lib/iron_titan/api/jobs_api.rb +335 -75
  6. data/lib/iron_titan/api_client.rb +2 -2
  7. data/lib/iron_titan/api_error.rb +1 -1
  8. data/lib/iron_titan/models/error.rb +1 -1
  9. data/lib/iron_titan/models/error_body.rb +1 -1
  10. data/lib/iron_titan/models/id_status.rb +182 -0
  11. data/lib/iron_titan/models/image.rb +8 -8
  12. data/lib/iron_titan/models/image_wrapper.rb +1 -1
  13. data/lib/iron_titan/models/images_wrapper.rb +1 -1
  14. data/lib/iron_titan/models/job.rb +110 -103
  15. data/lib/iron_titan/models/job_wrapper.rb +1 -1
  16. data/lib/iron_titan/models/jobs_wrapper.rb +15 -5
  17. data/lib/iron_titan/models/new_job.rb +27 -50
  18. data/lib/iron_titan/models/new_job_with_image.rb +249 -0
  19. data/lib/iron_titan/models/new_jobs_wrapper.rb +2 -2
  20. data/lib/iron_titan/models/reason.rb +152 -0
  21. data/lib/iron_titan/version.rb +2 -2
  22. data/lib/iron_titan.rb +11 -9
  23. data/spec/api/core_api_spec.rb +21 -5
  24. data/spec/api/images_api_spec.rb +12 -12
  25. data/spec/api/jobs_api_spec.rb +92 -24
  26. data/spec/models/Error_spec.rb +2 -2
  27. data/spec/models/Job_spec.rb +15 -25
  28. data/spec/models/error_body_spec.rb +2 -2
  29. data/spec/models/id_status_spec.rb +56 -0
  30. data/spec/models/image_spec.rb +3 -3
  31. data/spec/models/image_wrapper_spec.rb +2 -2
  32. data/spec/models/images_wrapper_spec.rb +2 -2
  33. data/spec/models/job_wrapper_spec.rb +2 -2
  34. data/spec/models/jobs_wrapper_spec.rb +12 -2
  35. data/spec/models/log_spec.rb +1 -1
  36. data/spec/models/new_job_spec.rb +3 -33
  37. data/spec/models/new_job_with_image_spec.rb +116 -0
  38. data/spec/models/new_jobs_wrapper_spec.rb +2 -2
  39. data/spec/models/reason_spec.rb +36 -0
  40. metadata +11 -2
@@ -3,7 +3,7 @@ Titan API
3
3
 
4
4
  The ultimate, language agnostic, container based job processing framework.
5
5
 
6
- OpenAPI spec version: 0.1.1
6
+ OpenAPI spec version: 0.2.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -3,7 +3,7 @@ Titan API
3
3
 
4
4
  The ultimate, language agnostic, container based job processing framework.
5
5
 
6
- OpenAPI spec version: 0.1.1
6
+ OpenAPI spec version: 0.2.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -0,0 +1,182 @@
1
+ =begin
2
+ Titan API
3
+
4
+ The ultimate, language agnostic, container based job processing framework.
5
+
6
+ OpenAPI spec version: 0.2.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module IronTitan
16
+ class IdStatus
17
+ # Unique identifier representing a specific job.
18
+ attr_accessor :id
19
+
20
+ # States and valid transitions.\n\n +---------+\n +---------> delayed <----------------+\n +----+----+ |\n | |\n | |\n +----v----+ |\n +---------> queued <----------------+\n +----+----+ *\n | *\n | retry * creates new job\n +----v----+ *\n | running | *\n +--+-+-+--+ |\n +---------|-|-|-----+-------------+\n +---|---------+ | +-----|---------+ |\n | | | | | |\n+-----v---^-+ +--v-------^+ +--v---^-+\n| succeeded | | cancelled | | failed |\n+-----------+ +-----------+ +--------+\n\n* delayed - has a delay.\n* queued - Ready to be consumed when it's turn comes.\n* running - Currently consumed by a runner which will attempt to process it.\n* succeeded - (or complete? success/error is common javascript terminology)\n* failed - Something went wrong. In this case more information can be obtained\n by inspecting the \"reason\" field.\n - timeout\n - killed - forcibly killed by worker due to resource restrictions or access\n violations.\n - bad_exit - exited with non-zero status due to program termination/crash.\n* cancelled - cancelled via API. More information in the reason field.\n - client_request - Request was cancelled by a client. See \"details\" for any\n details.
21
+ attr_accessor :status
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+
27
+ :'id' => :'id',
28
+
29
+ :'status' => :'status'
30
+
31
+ }
32
+ end
33
+
34
+ # Attribute type mapping.
35
+ def self.swagger_types
36
+ {
37
+ :'id' => :'String',
38
+ :'status' => :'String'
39
+
40
+ }
41
+ end
42
+
43
+ def initialize(attributes = {})
44
+ return unless attributes.is_a?(Hash)
45
+
46
+ # convert string to symbol for hash key
47
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
48
+
49
+
50
+ if attributes[:'id']
51
+ self.id = attributes[:'id']
52
+ end
53
+
54
+ if attributes[:'status']
55
+ self.status = attributes[:'status']
56
+ end
57
+
58
+ end
59
+
60
+ # Custom attribute writer method checking allowed values (enum).
61
+ def status=(status)
62
+ allowed_values = ["delayed", "queued", "running", "succeeded", "failed", "cancelled"]
63
+ if status && !allowed_values.include?(status)
64
+ fail "invalid value for 'status', must be one of #{allowed_values}"
65
+ end
66
+ @status = status
67
+ end
68
+
69
+ # Check equality by comparing each attribute.
70
+ def ==(o)
71
+ return true if self.equal?(o)
72
+ self.class == o.class &&
73
+ id == o.id &&
74
+ status == o.status
75
+ end
76
+
77
+ # @see the `==` method
78
+ def eql?(o)
79
+ self == o
80
+ end
81
+
82
+ # Calculate hash code according to all attributes.
83
+ def hash
84
+ [id, status].hash
85
+ end
86
+
87
+ # build the object from hash
88
+ def build_from_hash(attributes)
89
+ return nil unless attributes.is_a?(Hash)
90
+ self.class.swagger_types.each_pair do |key, type|
91
+ if type =~ /^Array<(.*)>/i
92
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
93
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
94
+ else
95
+ #TODO show warning in debug mode
96
+ end
97
+ elsif !attributes[self.class.attribute_map[key]].nil?
98
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
99
+ else
100
+ # data not found in attributes(hash), not an issue as the data can be optional
101
+ end
102
+ end
103
+
104
+ self
105
+ end
106
+
107
+ def _deserialize(type, value)
108
+ case type.to_sym
109
+ when :DateTime
110
+ DateTime.parse(value)
111
+ when :Date
112
+ Date.parse(value)
113
+ when :String
114
+ value.to_s
115
+ when :Integer
116
+ value.to_i
117
+ when :Float
118
+ value.to_f
119
+ when :BOOLEAN
120
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
121
+ true
122
+ else
123
+ false
124
+ end
125
+ when :Object
126
+ # generic object (usually a Hash), return directly
127
+ value
128
+ when /\AArray<(?<inner_type>.+)>\z/
129
+ inner_type = Regexp.last_match[:inner_type]
130
+ value.map { |v| _deserialize(inner_type, v) }
131
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
132
+ k_type = Regexp.last_match[:k_type]
133
+ v_type = Regexp.last_match[:v_type]
134
+ {}.tap do |hash|
135
+ value.each do |k, v|
136
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
137
+ end
138
+ end
139
+ else # model
140
+ _model = IronTitan.const_get(type).new
141
+ _model.build_from_hash(value)
142
+ end
143
+ end
144
+
145
+ def to_s
146
+ to_hash.to_s
147
+ end
148
+
149
+ # to_body is an alias to to_body (backward compatibility))
150
+ def to_body
151
+ to_hash
152
+ end
153
+
154
+ # return the object in the form of hash
155
+ def to_hash
156
+ hash = {}
157
+ self.class.attribute_map.each_pair do |attr, param|
158
+ value = self.send(attr)
159
+ next if value.nil?
160
+ hash[param] = _to_hash(value)
161
+ end
162
+ hash
163
+ end
164
+
165
+ # Method to output non-array value in the form of hash
166
+ # For object, use to_hash. Otherwise, just return the value
167
+ def _to_hash(value)
168
+ if value.is_a?(Array)
169
+ value.compact.map{ |v| _to_hash(v) }
170
+ elsif value.is_a?(Hash)
171
+ {}.tap do |hash|
172
+ value.each { |k, v| hash[k] = _to_hash(v) }
173
+ end
174
+ elsif value.respond_to? :to_hash
175
+ value.to_hash
176
+ else
177
+ value
178
+ end
179
+ end
180
+
181
+ end
182
+ end
@@ -3,7 +3,7 @@ Titan API
3
3
 
4
4
  The ultimate, language agnostic, container based job processing framework.
5
5
 
6
- OpenAPI spec version: 0.1.1
6
+ OpenAPI spec version: 0.2.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -15,7 +15,7 @@ require 'date'
15
15
  module IronTitan
16
16
  class Image
17
17
  # Docker image to use for job.
18
- attr_accessor :name
18
+ attr_accessor :image
19
19
 
20
20
  # Time when image first used/created.
21
21
  attr_accessor :created_at
@@ -24,7 +24,7 @@ module IronTitan
24
24
  def self.attribute_map
25
25
  {
26
26
 
27
- :'name' => :'name',
27
+ :'image' => :'image',
28
28
 
29
29
  :'created_at' => :'created_at'
30
30
 
@@ -34,7 +34,7 @@ module IronTitan
34
34
  # Attribute type mapping.
35
35
  def self.swagger_types
36
36
  {
37
- :'name' => :'String',
37
+ :'image' => :'String',
38
38
  :'created_at' => :'DateTime'
39
39
 
40
40
  }
@@ -47,8 +47,8 @@ module IronTitan
47
47
  attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
48
48
 
49
49
 
50
- if attributes[:'name']
51
- self.name = attributes[:'name']
50
+ if attributes[:'image']
51
+ self.image = attributes[:'image']
52
52
  end
53
53
 
54
54
  if attributes[:'created_at']
@@ -61,7 +61,7 @@ module IronTitan
61
61
  def ==(o)
62
62
  return true if self.equal?(o)
63
63
  self.class == o.class &&
64
- name == o.name &&
64
+ image == o.image &&
65
65
  created_at == o.created_at
66
66
  end
67
67
 
@@ -72,7 +72,7 @@ module IronTitan
72
72
 
73
73
  # Calculate hash code according to all attributes.
74
74
  def hash
75
- [name, created_at].hash
75
+ [image, created_at].hash
76
76
  end
77
77
 
78
78
  # build the object from hash
@@ -3,7 +3,7 @@ Titan API
3
3
 
4
4
  The ultimate, language agnostic, container based job processing framework.
5
5
 
6
- OpenAPI spec version: 0.1.1
6
+ OpenAPI spec version: 0.2.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -3,7 +3,7 @@ Titan API
3
3
 
4
4
  The ultimate, language agnostic, container based job processing framework.
5
5
 
6
- OpenAPI spec version: 0.1.1
6
+ OpenAPI spec version: 0.2.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -3,7 +3,7 @@ Titan API
3
3
 
4
4
  The ultimate, language agnostic, container based job processing framework.
5
5
 
6
- OpenAPI spec version: 0.1.1
6
+ OpenAPI spec version: 0.2.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -14,89 +14,83 @@ require 'date'
14
14
 
15
15
  module IronTitan
16
16
  class Job
17
- # Docker image to use for job.
18
- attr_accessor :image
17
+ # Payload for the job. This is what you pass into each job to make it do something.
18
+ attr_accessor :payload
19
19
 
20
- # If this field is set, then this job is a retry of a previous job. retry_from_id points to the previous job.
21
- attr_accessor :retry_from_id
20
+ # Number of seconds to wait before queueing the job for consumption for the first time. Must be a positive integer. Jobs with a delay start in state \"delayed\" and transition to \"running\" after delay seconds.
21
+ attr_accessor :delay
22
22
 
23
- # Time when job was submitted.
24
- attr_accessor :created_at
23
+ # Maximum runtime in seconds. If a consumer retrieves the job, but does not change it's status within timeout seconds, the job is considered failed, with reason timeout (Titan may allow a small grace period). The consumer should also kill the job after timeout seconds. If a consumer tries to change status after Titan has already timed out the job, the consumer will be ignored.
24
+ attr_accessor :timeout
25
25
 
26
- # Priority of the job. 3 levels from 0-2. Default 0.
26
+ # Priority of the job. Higher has more priority. 3 levels from 0-2. Jobs at same priority are processed in FIFO order.
27
27
  attr_accessor :priority
28
28
 
29
- # Time in seconds to wait before next attempt. Default 60.
30
- attr_accessor :retries_delay
29
+ # Number of automatic retries this job is allowed. A retry will be attempted if a task fails. Max 25.\nAutomatic retries are performed by titan when a task reaches a failed state and has `max_retries` > 0. A retry is performed by queueing a new job with the same image id and payload. The new job's max_retries is one less than the original. The new job's `retry_of` field is set to the original Job ID. Titan will delay the new job for retries_delay seconds before queueing it. Cancelled or successful tasks are never automatically retried.
30
+ attr_accessor :max_retries
31
31
 
32
- # Сorresponding error message, only when status=='error'.
33
- attr_accessor :error
32
+ # Time in seconds to wait before retrying the job. Must be a non-negative integer.
33
+ attr_accessor :retries_delay
34
34
 
35
- # Maximum runtime in seconds. If job runs for longer, it will be killed. Default 60 seconds.
36
- attr_accessor :timeout
35
+ # Unique identifier representing a specific job.
36
+ attr_accessor :id
37
37
 
38
- # Max number of retries. A retry will be attempted if a task fails. Default 3. TODO: naming: retries or max_retries?
39
- attr_accessor :retries
38
+ # States and valid transitions.\n\n +---------+\n +---------> delayed <----------------+\n +----+----+ |\n | |\n | |\n +----v----+ |\n +---------> queued <----------------+\n +----+----+ *\n | *\n | retry * creates new job\n +----v----+ *\n | running | *\n +--+-+-+--+ |\n +---------|-|-|-----+-------------+\n +---|---------+ | +-----|---------+ |\n | | | | | |\n+-----v---^-+ +--v-------^+ +--v---^-+\n| succeeded | | cancelled | | failed |\n+-----------+ +-----------+ +--------+\n\n* delayed - has a delay.\n* queued - Ready to be consumed when it's turn comes.\n* running - Currently consumed by a runner which will attempt to process it.\n* succeeded - (or complete? success/error is common javascript terminology)\n* failed - Something went wrong. In this case more information can be obtained\n by inspecting the \"reason\" field.\n - timeout\n - killed - forcibly killed by worker due to resource restrictions or access\n violations.\n - bad_exit - exited with non-zero status due to program termination/crash.\n* cancelled - cancelled via API. More information in the reason field.\n - client_request - Request was cancelled by a client. See \"details\" for any\n details.
39
+ attr_accessor :status
40
40
 
41
- # Time when job completed, whether it was successul or failed.
42
- attr_accessor :completed_at
41
+ # Image to execute to run this Job. Get details via the /image/{id} endpoint.
42
+ attr_accessor :image_id
43
43
 
44
- # Number of seconds to wait before starting. Default 0.
45
- attr_accessor :delay
44
+ attr_accessor :reason
46
45
 
47
- # Payload for the job. This is what you pass into each job to make it do something.
48
- attr_accessor :payload
46
+ # Some description of the reason this Job is in current state. Used only for presentation purposes. Should be human-readable.
47
+ attr_accessor :details
49
48
 
50
- # Docker image to use for job. Default is the same as the 'image' parameter.
51
- attr_accessor :name
49
+ # Time when job was submitted. Always in UTC.
50
+ attr_accessor :created_at
52
51
 
53
- # Time when job started execution.
52
+ # Time when job started execution. Always in UTC.
54
53
  attr_accessor :started_at
55
54
 
56
- # Unique identifier representing a specific job.
57
- attr_accessor :id
58
-
59
- # If this field is set, then this job was retried and RetryId points to new job.
60
- attr_accessor :retry_id
55
+ # Time when job completed, whether it was successul or failed. Always in UTC.
56
+ attr_accessor :completed_at
61
57
 
62
- # Status of job. One of: [pending, running, success, error, timeout]
63
- attr_accessor :status
58
+ # If this field is set, then this job is a retry of the ID in this field.
59
+ attr_accessor :retry_of
64
60
 
65
61
  # Attribute mapping from ruby-style variable name to JSON key.
66
62
  def self.attribute_map
67
63
  {
68
64
 
69
- :'image' => :'image',
65
+ :'payload' => :'payload',
70
66
 
71
- :'retry_from_id' => :'retry_from_id',
67
+ :'delay' => :'delay',
72
68
 
73
- :'created_at' => :'created_at',
69
+ :'timeout' => :'timeout',
74
70
 
75
71
  :'priority' => :'priority',
76
72
 
77
- :'retries_delay' => :'retries_delay',
73
+ :'max_retries' => :'max_retries',
78
74
 
79
- :'error' => :'error',
75
+ :'retries_delay' => :'retries_delay',
80
76
 
81
- :'timeout' => :'timeout',
77
+ :'id' => :'id',
82
78
 
83
- :'retries' => :'retries',
79
+ :'status' => :'status',
84
80
 
85
- :'completed_at' => :'completed_at',
81
+ :'image_id' => :'image_id',
86
82
 
87
- :'delay' => :'delay',
83
+ :'reason' => :'reason',
88
84
 
89
- :'payload' => :'payload',
85
+ :'details' => :'details',
90
86
 
91
- :'name' => :'name',
87
+ :'created_at' => :'created_at',
92
88
 
93
89
  :'started_at' => :'started_at',
94
90
 
95
- :'id' => :'id',
96
-
97
- :'retry_id' => :'retry_id',
91
+ :'completed_at' => :'completed_at',
98
92
 
99
- :'status' => :'status'
93
+ :'retry_of' => :'retry_of'
100
94
 
101
95
  }
102
96
  end
@@ -104,22 +98,21 @@ module IronTitan
104
98
  # Attribute type mapping.
105
99
  def self.swagger_types
106
100
  {
107
- :'image' => :'String',
108
- :'retry_from_id' => :'String',
109
- :'created_at' => :'DateTime',
101
+ :'payload' => :'String',
102
+ :'delay' => :'Integer',
103
+ :'timeout' => :'Integer',
110
104
  :'priority' => :'Integer',
105
+ :'max_retries' => :'Integer',
111
106
  :'retries_delay' => :'Integer',
112
- :'error' => :'String',
113
- :'timeout' => :'Integer',
114
- :'retries' => :'Integer',
115
- :'completed_at' => :'DateTime',
116
- :'delay' => :'Integer',
117
- :'payload' => :'String',
118
- :'name' => :'String',
119
- :'started_at' => :'DateTime',
120
107
  :'id' => :'String',
121
- :'retry_id' => :'String',
122
- :'status' => :'String'
108
+ :'status' => :'String',
109
+ :'image_id' => :'String',
110
+ :'reason' => :'Reason',
111
+ :'details' => :'String',
112
+ :'created_at' => :'DateTime',
113
+ :'started_at' => :'DateTime',
114
+ :'completed_at' => :'DateTime',
115
+ :'retry_of' => :'String'
123
116
 
124
117
  }
125
118
  end
@@ -131,92 +124,106 @@ module IronTitan
131
124
  attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
132
125
 
133
126
 
134
- if attributes[:'image']
135
- self.image = attributes[:'image']
127
+ if attributes[:'payload']
128
+ self.payload = attributes[:'payload']
136
129
  end
137
130
 
138
- if attributes[:'retry_from_id']
139
- self.retry_from_id = attributes[:'retry_from_id']
131
+ if attributes[:'delay']
132
+ self.delay = attributes[:'delay']
133
+ else
134
+ self.delay = 0
140
135
  end
141
136
 
142
- if attributes[:'created_at']
143
- self.created_at = attributes[:'created_at']
137
+ if attributes[:'timeout']
138
+ self.timeout = attributes[:'timeout']
139
+ else
140
+ self.timeout = 60
144
141
  end
145
142
 
146
143
  if attributes[:'priority']
147
144
  self.priority = attributes[:'priority']
145
+ else
146
+ self.priority = 0
147
+ end
148
+
149
+ if attributes[:'max_retries']
150
+ self.max_retries = attributes[:'max_retries']
151
+ else
152
+ self.max_retries = 3
148
153
  end
149
154
 
150
155
  if attributes[:'retries_delay']
151
156
  self.retries_delay = attributes[:'retries_delay']
157
+ else
158
+ self.retries_delay = 60
152
159
  end
153
160
 
154
- if attributes[:'error']
155
- self.error = attributes[:'error']
161
+ if attributes[:'id']
162
+ self.id = attributes[:'id']
156
163
  end
157
164
 
158
- if attributes[:'timeout']
159
- self.timeout = attributes[:'timeout']
165
+ if attributes[:'status']
166
+ self.status = attributes[:'status']
160
167
  end
161
168
 
162
- if attributes[:'retries']
163
- self.retries = attributes[:'retries']
169
+ if attributes[:'image_id']
170
+ self.image_id = attributes[:'image_id']
164
171
  end
165
172
 
166
- if attributes[:'completed_at']
167
- self.completed_at = attributes[:'completed_at']
173
+ if attributes[:'reason']
174
+ self.reason = attributes[:'reason']
168
175
  end
169
176
 
170
- if attributes[:'delay']
171
- self.delay = attributes[:'delay']
177
+ if attributes[:'details']
178
+ self.details = attributes[:'details']
172
179
  end
173
180
 
174
- if attributes[:'payload']
175
- self.payload = attributes[:'payload']
176
- end
177
-
178
- if attributes[:'name']
179
- self.name = attributes[:'name']
181
+ if attributes[:'created_at']
182
+ self.created_at = attributes[:'created_at']
180
183
  end
181
184
 
182
185
  if attributes[:'started_at']
183
186
  self.started_at = attributes[:'started_at']
184
187
  end
185
188
 
186
- if attributes[:'id']
187
- self.id = attributes[:'id']
189
+ if attributes[:'completed_at']
190
+ self.completed_at = attributes[:'completed_at']
188
191
  end
189
192
 
190
- if attributes[:'retry_id']
191
- self.retry_id = attributes[:'retry_id']
193
+ if attributes[:'retry_of']
194
+ self.retry_of = attributes[:'retry_of']
192
195
  end
193
196
 
194
- if attributes[:'status']
195
- self.status = attributes[:'status']
197
+ end
198
+
199
+ # Custom attribute writer method checking allowed values (enum).
200
+ def status=(status)
201
+ allowed_values = ["delayed", "queued", "running", "succeeded", "failed", "cancelled"]
202
+ if status && !allowed_values.include?(status)
203
+ fail "invalid value for 'status', must be one of #{allowed_values}"
196
204
  end
197
-
205
+ @status = status
198
206
  end
199
207
 
200
208
  # Check equality by comparing each attribute.
201
209
  def ==(o)
202
210
  return true if self.equal?(o)
203
211
  self.class == o.class &&
204
- image == o.image &&
205
- retry_from_id == o.retry_from_id &&
206
- created_at == o.created_at &&
212
+ payload == o.payload &&
213
+ delay == o.delay &&
214
+ timeout == o.timeout &&
207
215
  priority == o.priority &&
216
+ max_retries == o.max_retries &&
208
217
  retries_delay == o.retries_delay &&
209
- error == o.error &&
210
- timeout == o.timeout &&
211
- retries == o.retries &&
212
- completed_at == o.completed_at &&
213
- delay == o.delay &&
214
- payload == o.payload &&
215
- name == o.name &&
216
- started_at == o.started_at &&
217
218
  id == o.id &&
218
- retry_id == o.retry_id &&
219
- status == o.status
219
+ status == o.status &&
220
+ image_id == o.image_id &&
221
+ reason == o.reason &&
222
+ details == o.details &&
223
+ created_at == o.created_at &&
224
+ started_at == o.started_at &&
225
+ completed_at == o.completed_at &&
226
+ retry_of == o.retry_of
220
227
  end
221
228
 
222
229
  # @see the `==` method
@@ -226,7 +233,7 @@ module IronTitan
226
233
 
227
234
  # Calculate hash code according to all attributes.
228
235
  def hash
229
- [image, retry_from_id, created_at, priority, retries_delay, error, timeout, retries, completed_at, delay, payload, name, started_at, id, retry_id, status].hash
236
+ [payload, delay, timeout, priority, max_retries, retries_delay, id, status, image_id, reason, details, created_at, started_at, completed_at, retry_of].hash
230
237
  end
231
238
 
232
239
  # build the object from hash
@@ -3,7 +3,7 @@ Titan API
3
3
 
4
4
  The ultimate, language agnostic, container based job processing framework.
5
5
 
6
- OpenAPI spec version: 0.1.1
6
+ OpenAPI spec version: 0.2.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9