lib/iron_titan/models/job.rb in iron_titan-0.0.1 vs lib/iron_titan/models/job.rb in iron_titan-0.0.2

- old
+ new

@@ -1,11 +1,11 @@ =begin Titan API The ultimate, language agnostic, container based job processing framework. -OpenAPI spec version: 0.0.1 +OpenAPI spec version: 0.0.2 Generated by: https://github.com/swagger-api/swagger-codegen.git =end @@ -39,10 +39,13 @@ attr_accessor :started_at # Unique identifier representing a specific job. attr_accessor :id + # Сorresponding error message, only when status=='error'. + attr_accessor :error + # Maximum runtime in seconds. If job runs for longer, it will be killed. Default 60 seconds. attr_accessor :timeout # Status of job. One of: [pending, running, success, error, timeout] attr_accessor :status @@ -67,10 +70,12 @@ :'started_at' => :'started_at', :'id' => :'id', + :'error' => :'error', + :'timeout' => :'timeout', :'status' => :'status' } @@ -80,17 +85,18 @@ def self.swagger_types { :'image' => :'String', :'retries' => :'Integer', :'completed_at' => :'DateTime', - :'delay' => :'Float', + :'delay' => :'Integer', :'payload' => :'String', :'name' => :'String', :'created_at' => :'DateTime', :'started_at' => :'DateTime', :'id' => :'String', - :'timeout' => :'Float', + :'error' => :'String', + :'timeout' => :'Integer', :'status' => :'String' } end @@ -113,10 +119,12 @@ self.completed_at = attributes[:'completed_at'] end if attributes[:'delay'] self.delay = attributes[:'delay'] + else + self.delay = 0 end if attributes[:'payload'] self.payload = attributes[:'payload'] end @@ -135,10 +143,14 @@ if attributes[:'id'] self.id = attributes[:'id'] end + if attributes[:'error'] + self.error = attributes[:'error'] + end + if attributes[:'timeout'] self.timeout = attributes[:'timeout'] end if attributes[:'status'] @@ -158,10 +170,11 @@ payload == o.payload && name == o.name && created_at == o.created_at && started_at == o.started_at && id == o.id && + error == o.error && timeout == o.timeout && status == o.status end # @see the `==` method @@ -169,11 +182,11 @@ self == o end # Calculate hash code according to all attributes. def hash - [image, retries, completed_at, delay, payload, name, created_at, started_at, id, timeout, status].hash + [image, retries, completed_at, delay, payload, name, created_at, started_at, id, error, timeout, status].hash end # build the object from hash def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) @@ -205,10 +218,10 @@ when :Integer value.to_i when :Float value.to_f when :BOOLEAN - if value =~ /^(true|t|yes|y|1)$/i + if value.to_s =~ /^(true|t|yes|y|1)$/i true else false end when /\AArray<(?<inner_type>.+)>\z/