Class: HatchetSdkRest::V1TaskSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ V1TaskSummary

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 205

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `HatchetSdkRest::V1TaskSummary` 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::V1TaskSummary`. 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?(:'metadata')
    self. = attributes[:'metadata']
  else
    self. = nil
  end

  if attributes.key?(:'created_at')
    self.created_at = attributes[:'created_at']
  else
    self.created_at = nil
  end

  if attributes.key?(:'display_name')
    self.display_name = attributes[:'display_name']
  else
    self.display_name = nil
  end

  if attributes.key?(:'input')
    self.input = attributes[:'input']
  else
    self.input = nil
  end

  if attributes.key?(:'num_spawned_children')
    self.num_spawned_children = attributes[:'num_spawned_children']
  else
    self.num_spawned_children = nil
  end

  if attributes.key?(:'output')
    self.output = attributes[:'output']
  else
    self.output = nil
  end

  if attributes.key?(:'status')
    self.status = attributes[:'status']
  else
    self.status = nil
  end

  if attributes.key?(:'task_external_id')
    self.task_external_id = attributes[:'task_external_id']
  else
    self.task_external_id = nil
  end

  if attributes.key?(:'task_id')
    self.task_id = attributes[:'task_id']
  else
    self.task_id = nil
  end

  if attributes.key?(:'task_inserted_at')
    self.task_inserted_at = attributes[:'task_inserted_at']
  else
    self.task_inserted_at = nil
  end

  if attributes.key?(:'tenant_id')
    self.tenant_id = attributes[:'tenant_id']
  else
    self.tenant_id = nil
  end

  if attributes.key?(:'type')
    self.type = attributes[:'type']
  else
    self.type = nil
  end

  if attributes.key?(:'workflow_id')
    self.workflow_id = attributes[:'workflow_id']
  else
    self.workflow_id = nil
  end

  if attributes.key?(:'workflow_run_external_id')
    self.workflow_run_external_id = attributes[:'workflow_run_external_id']
  else
    self.workflow_run_external_id = nil
  end

  if attributes.key?(:'action_id')
    self.action_id = attributes[:'action_id']
  end

  if attributes.key?(:'retry_count')
    self.retry_count = attributes[:'retry_count']
  end

  if attributes.key?(:'attempt')
    self.attempt = attributes[:'attempt']
  end

  if attributes.key?(:'additional_metadata')
    self. = attributes[:'additional_metadata']
  end

  if attributes.key?(:'children')
    if (value = attributes[:'children']).is_a?(Array)
      self.children = value
    end
  end

  if attributes.key?(:'duration')
    self.duration = attributes[:'duration']
  end

  if attributes.key?(:'error_message')
    self.error_message = attributes[:'error_message']
  end

  if attributes.key?(:'finished_at')
    self.finished_at = attributes[:'finished_at']
  end

  if attributes.key?(:'started_at')
    self.started_at = attributes[:'started_at']
  end

  if attributes.key?(:'step_id')
    self.step_id = attributes[:'step_id']
  end

  if attributes.key?(:'workflow_name')
    self.workflow_name = attributes[:'workflow_name']
  end

  if attributes.key?(:'workflow_version_id')
    self.workflow_version_id = attributes[:'workflow_version_id']
  end

  if attributes.key?(:'workflow_config')
    self.workflow_config = attributes[:'workflow_config']
  end

  if attributes.key?(:'parent_task_external_id')
    self.parent_task_external_id = attributes[:'parent_task_external_id']
  end
end

Instance Attribute Details

#action_idObject

The action ID of the task.



58
59
60
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 58

def action_id
  @action_id
end

#additional_metadataObject

Additional metadata for the task run.



67
68
69
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 67

def 
  @additional_metadata
end

#attemptObject

The attempt number of the task.



64
65
66
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 64

def attempt
  @attempt
end

#childrenObject

The list of children tasks



70
71
72
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 70

def children
  @children
end

#created_atObject

The timestamp the task was created.



21
22
23
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 21

def created_at
  @created_at
end

#display_nameObject

The display name of the task run.



24
25
26
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 24

def display_name
  @display_name
end

#durationObject

The duration of the task run, in milliseconds.



73
74
75
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 73

def duration
  @duration
end

#error_messageObject

The error message of the task run (for the latest run)



76
77
78
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 76

def error_message
  @error_message
end

#finished_atObject

The timestamp the task run finished.



79
80
81
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 79

def finished_at
  @finished_at
end

#inputObject

The input of the task run.



27
28
29
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 27

def input
  @input
end

#metadataObject

Returns the value of attribute metadata.



18
19
20
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 18

def 
  @metadata
end

#num_spawned_childrenObject

The number of spawned children tasks



30
31
32
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 30

def num_spawned_children
  @num_spawned_children
end

#outputObject

The output of the task run (for the latest run)



33
34
35
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 33

def output
  @output
end

#parent_task_external_idObject

The external ID of the parent task.



95
96
97
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 95

def parent_task_external_id
  @parent_task_external_id
end

#retry_countObject

The number of retries of the task.



61
62
63
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 61

def retry_count
  @retry_count
end

#started_atObject

The timestamp the task run started.



82
83
84
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 82

def started_at
  @started_at
end

#statusObject

Returns the value of attribute status.



35
36
37
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 35

def status
  @status
end

#step_idObject

The step ID of the task.



85
86
87
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 85

def step_id
  @step_id
end

#task_external_idObject

The external ID of the task.



38
39
40
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 38

def task_external_id
  @task_external_id
end

#task_idObject

The ID of the task.



41
42
43
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 41

def task_id
  @task_id
end

#task_inserted_atObject

The timestamp the task was inserted.



44
45
46
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 44

def task_inserted_at
  @task_inserted_at
end

#tenant_idObject

The ID of the tenant.



47
48
49
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 47

def tenant_id
  @tenant_id
end

#typeObject

The type of the workflow (whether it’s a DAG or a task)



50
51
52
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 50

def type
  @type
end

#workflow_configObject

Returns the value of attribute workflow_config.



92
93
94
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 92

def workflow_config
  @workflow_config
end

#workflow_idObject

Returns the value of attribute workflow_id.



52
53
54
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 52

def workflow_id
  @workflow_id
end

#workflow_nameObject

Returns the value of attribute workflow_name.



87
88
89
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 87

def workflow_name
  @workflow_name
end

#workflow_run_external_idObject

The external ID of the workflow run



55
56
57
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 55

def workflow_run_external_id
  @workflow_run_external_id
end

#workflow_version_idObject

The version ID of the workflow



90
91
92
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 90

def workflow_version_id
  @workflow_version_id
end

Class Method Details

._deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 725

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_mapObject

Returns attribute mapping this model knows about



154
155
156
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 154

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



159
160
161
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 159

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



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
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 120

def self.attribute_map
  {
    :'metadata' => :'metadata',
    :'created_at' => :'createdAt',
    :'display_name' => :'displayName',
    :'input' => :'input',
    :'num_spawned_children' => :'numSpawnedChildren',
    :'output' => :'output',
    :'status' => :'status',
    :'task_external_id' => :'taskExternalId',
    :'task_id' => :'taskId',
    :'task_inserted_at' => :'taskInsertedAt',
    :'tenant_id' => :'tenantId',
    :'type' => :'type',
    :'workflow_id' => :'workflowId',
    :'workflow_run_external_id' => :'workflowRunExternalId',
    :'action_id' => :'actionId',
    :'retry_count' => :'retryCount',
    :'attempt' => :'attempt',
    :'additional_metadata' => :'additionalMetadata',
    :'children' => :'children',
    :'duration' => :'duration',
    :'error_message' => :'errorMessage',
    :'finished_at' => :'finishedAt',
    :'started_at' => :'startedAt',
    :'step_id' => :'stepId',
    :'workflow_name' => :'workflowName',
    :'workflow_version_id' => :'workflowVersionId',
    :'workflow_config' => :'workflowConfig',
    :'parent_task_external_id' => :'parentTaskExternalId'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 701

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_nullableObject

List of attributes with nullable: true



198
199
200
201
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 198

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 164

def self.openapi_types
  {
    :'metadata' => :'APIResourceMeta',
    :'created_at' => :'Time',
    :'display_name' => :'String',
    :'input' => :'Object',
    :'num_spawned_children' => :'Integer',
    :'output' => :'Object',
    :'status' => :'V1TaskStatus',
    :'task_external_id' => :'String',
    :'task_id' => :'Integer',
    :'task_inserted_at' => :'Time',
    :'tenant_id' => :'String',
    :'type' => :'V1WorkflowType',
    :'workflow_id' => :'String',
    :'workflow_run_external_id' => :'String',
    :'action_id' => :'String',
    :'retry_count' => :'Integer',
    :'attempt' => :'Integer',
    :'additional_metadata' => :'Object',
    :'children' => :'Array<V1TaskSummary>',
    :'duration' => :'Integer',
    :'error_message' => :'String',
    :'finished_at' => :'Time',
    :'started_at' => :'Time',
    :'step_id' => :'String',
    :'workflow_name' => :'String',
    :'workflow_version_id' => :'String',
    :'workflow_config' => :'Object',
    :'parent_task_external_id' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 653

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
       == o. &&
      created_at == o.created_at &&
      display_name == o.display_name &&
      input == o.input &&
      num_spawned_children == o.num_spawned_children &&
      output == o.output &&
      status == o.status &&
      task_external_id == o.task_external_id &&
      task_id == o.task_id &&
      task_inserted_at == o.task_inserted_at &&
      tenant_id == o.tenant_id &&
      type == o.type &&
      workflow_id == o.workflow_id &&
      workflow_run_external_id == o.workflow_run_external_id &&
      action_id == o.action_id &&
      retry_count == o.retry_count &&
      attempt == o.attempt &&
       == o. &&
      children == o.children &&
      duration == o.duration &&
      error_message == o.error_message &&
      finished_at == o.finished_at &&
      started_at == o.started_at &&
      step_id == o.step_id &&
      workflow_name == o.workflow_name &&
      workflow_version_id == o.workflow_version_id &&
      workflow_config == o.workflow_config &&
      parent_task_external_id == o.parent_task_external_id
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



796
797
798
799
800
801
802
803
804
805
806
807
808
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 796

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

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


688
689
690
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 688

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



694
695
696
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 694

def hash
  [, created_at, display_name, input, num_spawned_children, output, status, task_external_id, task_id, task_inserted_at, tenant_id, type, workflow_id, workflow_run_external_id, action_id, retry_count, attempt, , children, duration, error_message, finished_at, started_at, step_id, workflow_name, workflow_version_id, workflow_config, parent_task_external_id].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 364

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  if @metadata.nil?
    invalid_properties.push('invalid value for "metadata", metadata cannot be nil.')
  end

  if @created_at.nil?
    invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
  end

  if @display_name.nil?
    invalid_properties.push('invalid value for "display_name", display_name cannot be nil.')
  end

  if @input.nil?
    invalid_properties.push('invalid value for "input", input cannot be nil.')
  end

  if @num_spawned_children.nil?
    invalid_properties.push('invalid value for "num_spawned_children", num_spawned_children cannot be nil.')
  end

  if @output.nil?
    invalid_properties.push('invalid value for "output", output cannot be nil.')
  end

  if @status.nil?
    invalid_properties.push('invalid value for "status", status cannot be nil.')
  end

  if @task_external_id.nil?
    invalid_properties.push('invalid value for "task_external_id", task_external_id cannot be nil.')
  end

  if @task_external_id.to_s.length > 36
    invalid_properties.push('invalid value for "task_external_id", the character length must be smaller than or equal to 36.')
  end

  if @task_external_id.to_s.length < 36
    invalid_properties.push('invalid value for "task_external_id", the character length must be greater than or equal to 36.')
  end

  if @task_id.nil?
    invalid_properties.push('invalid value for "task_id", task_id cannot be nil.')
  end

  if @task_inserted_at.nil?
    invalid_properties.push('invalid value for "task_inserted_at", task_inserted_at cannot be nil.')
  end

  if @tenant_id.nil?
    invalid_properties.push('invalid value for "tenant_id", tenant_id cannot be nil.')
  end

  if @tenant_id.to_s.length > 36
    invalid_properties.push('invalid value for "tenant_id", the character length must be smaller than or equal to 36.')
  end

  if @tenant_id.to_s.length < 36
    invalid_properties.push('invalid value for "tenant_id", the character length must be greater than or equal to 36.')
  end

  if @type.nil?
    invalid_properties.push('invalid value for "type", type cannot be nil.')
  end

  if @workflow_id.nil?
    invalid_properties.push('invalid value for "workflow_id", workflow_id cannot be nil.')
  end

  if @workflow_run_external_id.nil?
    invalid_properties.push('invalid value for "workflow_run_external_id", workflow_run_external_id cannot be nil.')
  end

  if !@step_id.nil? && @step_id.to_s.length > 36
    invalid_properties.push('invalid value for "step_id", the character length must be smaller than or equal to 36.')
  end

  if !@step_id.nil? && @step_id.to_s.length < 36
    invalid_properties.push('invalid value for "step_id", the character length must be greater than or equal to 36.')
  end

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



772
773
774
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 772

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



778
779
780
781
782
783
784
785
786
787
788
789
790
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 778

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



766
767
768
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 766

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb', line 452

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if @metadata.nil?
  return false if @created_at.nil?
  return false if @display_name.nil?
  return false if @input.nil?
  return false if @num_spawned_children.nil?
  return false if @output.nil?
  return false if @status.nil?
  return false if @task_external_id.nil?
  return false if @task_external_id.to_s.length > 36
  return false if @task_external_id.to_s.length < 36
  return false if @task_id.nil?
  return false if @task_inserted_at.nil?
  return false if @tenant_id.nil?
  return false if @tenant_id.to_s.length > 36
  return false if @tenant_id.to_s.length < 36
  return false if @type.nil?
  return false if @workflow_id.nil?
  return false if @workflow_run_external_id.nil?
  return false if !@step_id.nil? && @step_id.to_s.length > 36
  return false if !@step_id.nil? && @step_id.to_s.length < 36
  true
end