Class: HatchetSdkRest::StepRunArchive
- Inherits:
-
Object
- Object
- HatchetSdkRest::StepRunArchive
- Defined in:
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb
Instance Attribute Summary collapse
-
#cancelled_at ⇒ Object
Returns the value of attribute cancelled_at.
-
#cancelled_at_epoch ⇒ Object
Returns the value of attribute cancelled_at_epoch.
-
#cancelled_error ⇒ Object
Returns the value of attribute cancelled_error.
-
#cancelled_reason ⇒ Object
Returns the value of attribute cancelled_reason.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#error ⇒ Object
Returns the value of attribute error.
-
#finished_at ⇒ Object
Returns the value of attribute finished_at.
-
#finished_at_epoch ⇒ Object
Returns the value of attribute finished_at_epoch.
-
#input ⇒ Object
Returns the value of attribute input.
-
#order ⇒ Object
Returns the value of attribute order.
-
#output ⇒ Object
Returns the value of attribute output.
-
#retry_count ⇒ Object
Returns the value of attribute retry_count.
-
#started_at ⇒ Object
Returns the value of attribute started_at.
-
#started_at_epoch ⇒ Object
Returns the value of attribute started_at_epoch.
-
#step_run_id ⇒ Object
Returns the value of attribute step_run_id.
-
#timeout_at ⇒ Object
Returns the value of attribute timeout_at.
-
#timeout_at_epoch ⇒ Object
Returns the value of attribute timeout_at_epoch.
Class Method Summary collapse
-
._deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ StepRunArchive
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ StepRunArchive
Initializes the object
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 116 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `HatchetSdkRest::StepRunArchive` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `HatchetSdkRest::StepRunArchive`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'step_run_id') self.step_run_id = attributes[:'step_run_id'] else self.step_run_id = nil end if attributes.key?(:'order') self.order = attributes[:'order'] else self.order = nil end if attributes.key?(:'retry_count') self.retry_count = attributes[:'retry_count'] else self.retry_count = nil end if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] else self.created_at = nil end if attributes.key?(:'input') self.input = attributes[:'input'] end if attributes.key?(:'output') self.output = attributes[:'output'] end if attributes.key?(:'started_at') self.started_at = attributes[:'started_at'] end if attributes.key?(:'error') self.error = attributes[:'error'] end if attributes.key?(:'started_at_epoch') self.started_at_epoch = attributes[:'started_at_epoch'] end if attributes.key?(:'finished_at') self.finished_at = attributes[:'finished_at'] end if attributes.key?(:'finished_at_epoch') self.finished_at_epoch = attributes[:'finished_at_epoch'] end if attributes.key?(:'timeout_at') self.timeout_at = attributes[:'timeout_at'] end if attributes.key?(:'timeout_at_epoch') self.timeout_at_epoch = attributes[:'timeout_at_epoch'] end if attributes.key?(:'cancelled_at') self.cancelled_at = attributes[:'cancelled_at'] end if attributes.key?(:'cancelled_at_epoch') self.cancelled_at_epoch = attributes[:'cancelled_at_epoch'] end if attributes.key?(:'cancelled_reason') self.cancelled_reason = attributes[:'cancelled_reason'] end if attributes.key?(:'cancelled_error') self.cancelled_error = attributes[:'cancelled_error'] end end |
Instance Attribute Details
#cancelled_at ⇒ Object
Returns the value of attribute cancelled_at.
44 45 46 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 44 def cancelled_at @cancelled_at end |
#cancelled_at_epoch ⇒ Object
Returns the value of attribute cancelled_at_epoch.
46 47 48 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 46 def cancelled_at_epoch @cancelled_at_epoch end |
#cancelled_error ⇒ Object
Returns the value of attribute cancelled_error.
50 51 52 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 50 def cancelled_error @cancelled_error end |
#cancelled_reason ⇒ Object
Returns the value of attribute cancelled_reason.
48 49 50 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 48 def cancelled_reason @cancelled_reason end |
#created_at ⇒ Object
Returns the value of attribute created_at.
24 25 26 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 24 def created_at @created_at end |
#error ⇒ Object
Returns the value of attribute error.
32 33 34 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 32 def error @error end |
#finished_at ⇒ Object
Returns the value of attribute finished_at.
36 37 38 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 36 def finished_at @finished_at end |
#finished_at_epoch ⇒ Object
Returns the value of attribute finished_at_epoch.
38 39 40 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 38 def finished_at_epoch @finished_at_epoch end |
#input ⇒ Object
Returns the value of attribute input.
26 27 28 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 26 def input @input end |
#order ⇒ Object
Returns the value of attribute order.
20 21 22 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 20 def order @order end |
#output ⇒ Object
Returns the value of attribute output.
28 29 30 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 28 def output @output end |
#retry_count ⇒ Object
Returns the value of attribute retry_count.
22 23 24 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 22 def retry_count @retry_count end |
#started_at ⇒ Object
Returns the value of attribute started_at.
30 31 32 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 30 def started_at @started_at end |
#started_at_epoch ⇒ Object
Returns the value of attribute started_at_epoch.
34 35 36 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 34 def started_at_epoch @started_at_epoch end |
#step_run_id ⇒ Object
Returns the value of attribute step_run_id.
18 19 20 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 18 def step_run_id @step_run_id end |
#timeout_at ⇒ Object
Returns the value of attribute timeout_at.
40 41 42 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 40 def timeout_at @timeout_at end |
#timeout_at_epoch ⇒ Object
Returns the value of attribute timeout_at_epoch.
42 43 44 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 42 def timeout_at_epoch @timeout_at_epoch end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 345 def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = HatchetSdkRest.const_get(type) klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
76 77 78 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 76 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
81 82 83 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 81 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 53 def self.attribute_map { :'step_run_id' => :'stepRunId', :'order' => :'order', :'retry_count' => :'retryCount', :'created_at' => :'createdAt', :'input' => :'input', :'output' => :'output', :'started_at' => :'startedAt', :'error' => :'error', :'started_at_epoch' => :'startedAtEpoch', :'finished_at' => :'finishedAt', :'finished_at_epoch' => :'finishedAtEpoch', :'timeout_at' => :'timeoutAt', :'timeout_at_epoch' => :'timeoutAtEpoch', :'cancelled_at' => :'cancelledAt', :'cancelled_at_epoch' => :'cancelledAtEpoch', :'cancelled_reason' => :'cancelledReason', :'cancelled_error' => :'cancelledError' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 321 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
109 110 111 112 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 109 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 86 def self.openapi_types { :'step_run_id' => :'String', :'order' => :'Integer', :'retry_count' => :'Integer', :'created_at' => :'Time', :'input' => :'String', :'output' => :'String', :'started_at' => :'Time', :'error' => :'String', :'started_at_epoch' => :'Integer', :'finished_at' => :'Time', :'finished_at_epoch' => :'Integer', :'timeout_at' => :'Time', :'timeout_at_epoch' => :'Integer', :'cancelled_at' => :'Time', :'cancelled_at_epoch' => :'Integer', :'cancelled_reason' => :'String', :'cancelled_error' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 284 def ==(o) return true if self.equal?(o) self.class == o.class && step_run_id == o.step_run_id && order == o.order && retry_count == o.retry_count && created_at == o.created_at && input == o.input && output == o.output && started_at == o.started_at && error == o.error && started_at_epoch == o.started_at_epoch && finished_at == o.finished_at && finished_at_epoch == o.finished_at_epoch && timeout_at == o.timeout_at && timeout_at_epoch == o.timeout_at_epoch && cancelled_at == o.cancelled_at && cancelled_at_epoch == o.cancelled_at_epoch && cancelled_reason == o.cancelled_reason && cancelled_error == o.cancelled_error end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
416 417 418 419 420 421 422 423 424 425 426 427 428 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 416 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#eql?(o) ⇒ Boolean
308 309 310 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 308 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
314 315 316 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 314 def hash [step_run_id, order, retry_count, created_at, input, output, started_at, error, started_at_epoch, finished_at, finished_at_epoch, timeout_at, timeout_at_epoch, cancelled_at, cancelled_at_epoch, cancelled_reason, cancelled_error].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 209 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @step_run_id.nil? invalid_properties.push('invalid value for "step_run_id", step_run_id cannot be nil.') end if @order.nil? invalid_properties.push('invalid value for "order", order cannot be nil.') end if @retry_count.nil? invalid_properties.push('invalid value for "retry_count", retry_count cannot be nil.') end if @created_at.nil? invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
392 393 394 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 392 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
398 399 400 401 402 403 404 405 406 407 408 409 410 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 398 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
386 387 388 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 386 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
233 234 235 236 237 238 239 240 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb', line 233 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @step_run_id.nil? return false if @order.nil? return false if @retry_count.nil? return false if @created_at.nil? true end |