hatchet-sdk 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/lib/hatchet/clients/rest/.openapi-generator/FILES +24 -0
  4. data/lib/hatchet/clients/rest/README.md +31 -1
  5. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/durable_tasks_api.rb +113 -0
  6. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/feature_flags_api.rb +107 -0
  7. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/log_api.rb +156 -52
  8. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/observability_api.rb +114 -0
  9. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/rate_limits_api.rb +78 -0
  10. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/task_api.rb +71 -0
  11. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/tenant_api.rb +3 -0
  12. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/worker_api.rb +9 -0
  13. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/workflow_api.rb +170 -0
  14. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/workflow_runs_api.rb +94 -0
  15. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api_model_base.rb +88 -0
  16. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_meta.rb +44 -4
  17. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/feature_flag_evaluation_result.rb +238 -0
  18. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/feature_flag_id.rb +41 -0
  19. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/otel_span.rb +525 -0
  20. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/otel_span_kind.rb +44 -0
  21. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/otel_span_list.rb +242 -0
  22. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/otel_status_code.rb +41 -0
  23. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/task_status_stat.rb +13 -4
  24. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant.rb +24 -4
  25. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_member.rb +14 -4
  26. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/trigger_run_result.rb +256 -0
  27. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_additional_metadata_operator.rb +40 -0
  28. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_branch_durable_task_request.rb +310 -0
  29. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_branch_durable_task_response.rb +310 -0
  30. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_webhook_request_api_key.rb +14 -4
  31. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_webhook_request_base.rb +14 -4
  32. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_webhook_request_basic_auth.rb +14 -4
  33. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_webhook_request_hmac.rb +14 -4
  34. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_durable_event_log_entry.rb +470 -0
  35. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_durable_event_log_kind.rb +41 -0
  36. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_durable_wait_condition.rb +286 -0
  37. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_durable_wait_condition_kind.rb +41 -0
  38. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_log_line.rb +49 -1
  39. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_logs_point_metric.rb +341 -0
  40. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_logs_point_metrics.rb +222 -0
  41. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_restore_task_response.rb +237 -0
  42. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_running_detail_count.rb +265 -0
  43. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_running_filter.rb +41 -0
  44. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_event_type.rb +3 -1
  45. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_run_metric.rb +13 -4
  46. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb +34 -4
  47. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_timing.rb +11 -1
  48. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_trigger_workflow_run_request.rb +14 -4
  49. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_update_webhook_request.rb +14 -4
  50. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_wait_item.rb +280 -0
  51. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_webhook.rb +14 -4
  52. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker.rb +1 -13
  53. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_status.rb +41 -0
  54. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_idempotency.rb +265 -0
  55. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_task.rb +393 -0
  56. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_task_desired_worker_label.rb +288 -0
  57. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_task_rate_limit.rb +271 -0
  58. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest.rb +24 -0
  59. data/lib/hatchet/contracts/v1/workflows_pb.rb +3 -1
  60. data/lib/hatchet/idempotency.rb +35 -1
  61. data/lib/hatchet/version.rb +1 -1
  62. data/lib/hatchet/workflow.rb +2 -2
  63. data/sig/hatchet/idempotency.rbs +8 -0
  64. metadata +31 -2
@@ -0,0 +1,470 @@
1
+ =begin
2
+ #Hatchet API
3
+
4
+ #The Hatchet API
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.14.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module HatchetSdkRest
17
+ class V1DurableEventLogEntry
18
+ # The monotonically increasing node id in the event log.
19
+ attr_accessor :node_id
20
+
21
+ # The branch id when this entry was first seen.
22
+ attr_accessor :branch_id
23
+
24
+ attr_accessor :kind
25
+
26
+ # Whether this entry has been satisfied.
27
+ attr_accessor :is_satisfied
28
+
29
+ # When this entry was inserted.
30
+ attr_accessor :inserted_at
31
+
32
+ # The external id of the durable task this event log entry is associated with.
33
+ attr_accessor :task_external_id
34
+
35
+ # The display name of the durable task this event log entry is associated with.
36
+ attr_accessor :task_display_name
37
+
38
+ attr_accessor :wait_data
39
+
40
+ # When this entry was satisfied, if it has been satisfied.
41
+ attr_accessor :satisfied_at
42
+
43
+ # A user-provided message or label, sent when establishing a durable wait.
44
+ attr_accessor :user_message
45
+
46
+ class EnumAttributeValidator
47
+ attr_reader :datatype
48
+ attr_reader :allowable_values
49
+
50
+ def initialize(datatype, allowable_values)
51
+ @allowable_values = allowable_values.map do |value|
52
+ case datatype.to_s
53
+ when /Integer/i
54
+ value.to_i
55
+ when /Float/i
56
+ value.to_f
57
+ else
58
+ value
59
+ end
60
+ end
61
+ end
62
+
63
+ def valid?(value)
64
+ !value || allowable_values.include?(value)
65
+ end
66
+ end
67
+
68
+ # Attribute mapping from ruby-style variable name to JSON key.
69
+ def self.attribute_map
70
+ {
71
+ :'node_id' => :'nodeId',
72
+ :'branch_id' => :'branchId',
73
+ :'kind' => :'kind',
74
+ :'is_satisfied' => :'isSatisfied',
75
+ :'inserted_at' => :'insertedAt',
76
+ :'task_external_id' => :'taskExternalId',
77
+ :'task_display_name' => :'taskDisplayName',
78
+ :'wait_data' => :'waitData',
79
+ :'satisfied_at' => :'satisfiedAt',
80
+ :'user_message' => :'userMessage'
81
+ }
82
+ end
83
+
84
+ # Returns attribute mapping this model knows about
85
+ def self.acceptable_attribute_map
86
+ attribute_map
87
+ end
88
+
89
+ # Returns all the JSON keys this model knows about
90
+ def self.acceptable_attributes
91
+ acceptable_attribute_map.values
92
+ end
93
+
94
+ # Attribute type mapping.
95
+ def self.openapi_types
96
+ {
97
+ :'node_id' => :'Integer',
98
+ :'branch_id' => :'Integer',
99
+ :'kind' => :'V1DurableEventLogKind',
100
+ :'is_satisfied' => :'Boolean',
101
+ :'inserted_at' => :'Time',
102
+ :'task_external_id' => :'String',
103
+ :'task_display_name' => :'String',
104
+ :'wait_data' => :'Array<V1WaitItem>',
105
+ :'satisfied_at' => :'Time',
106
+ :'user_message' => :'String'
107
+ }
108
+ end
109
+
110
+ # List of attributes with nullable: true
111
+ def self.openapi_nullable
112
+ Set.new([
113
+ ])
114
+ end
115
+
116
+ # Initializes the object
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ def initialize(attributes = {})
119
+ if (!attributes.is_a?(Hash))
120
+ fail ArgumentError, "The input argument (attributes) must be a hash in `HatchetSdkRest::V1DurableEventLogEntry` initialize method"
121
+ end
122
+
123
+ # check to see if the attribute exists and convert string to symbol for hash key
124
+ acceptable_attribute_map = self.class.acceptable_attribute_map
125
+ attributes = attributes.each_with_object({}) { |(k, v), h|
126
+ if (!acceptable_attribute_map.key?(k.to_sym))
127
+ fail ArgumentError, "`#{k}` is not a valid attribute in `HatchetSdkRest::V1DurableEventLogEntry`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
128
+ end
129
+ h[k.to_sym] = v
130
+ }
131
+
132
+ if attributes.key?(:'node_id')
133
+ self.node_id = attributes[:'node_id']
134
+ else
135
+ self.node_id = nil
136
+ end
137
+
138
+ if attributes.key?(:'branch_id')
139
+ self.branch_id = attributes[:'branch_id']
140
+ else
141
+ self.branch_id = nil
142
+ end
143
+
144
+ if attributes.key?(:'kind')
145
+ self.kind = attributes[:'kind']
146
+ else
147
+ self.kind = nil
148
+ end
149
+
150
+ if attributes.key?(:'is_satisfied')
151
+ self.is_satisfied = attributes[:'is_satisfied']
152
+ else
153
+ self.is_satisfied = nil
154
+ end
155
+
156
+ if attributes.key?(:'inserted_at')
157
+ self.inserted_at = attributes[:'inserted_at']
158
+ else
159
+ self.inserted_at = nil
160
+ end
161
+
162
+ if attributes.key?(:'task_external_id')
163
+ self.task_external_id = attributes[:'task_external_id']
164
+ else
165
+ self.task_external_id = nil
166
+ end
167
+
168
+ if attributes.key?(:'task_display_name')
169
+ self.task_display_name = attributes[:'task_display_name']
170
+ else
171
+ self.task_display_name = nil
172
+ end
173
+
174
+ if attributes.key?(:'wait_data')
175
+ if (value = attributes[:'wait_data']).is_a?(Array)
176
+ self.wait_data = value
177
+ end
178
+ end
179
+
180
+ if attributes.key?(:'satisfied_at')
181
+ self.satisfied_at = attributes[:'satisfied_at']
182
+ end
183
+
184
+ if attributes.key?(:'user_message')
185
+ self.user_message = attributes[:'user_message']
186
+ end
187
+ end
188
+
189
+ # Show invalid properties with the reasons. Usually used together with valid?
190
+ # @return Array for valid properties with the reasons
191
+ def list_invalid_properties
192
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
193
+ invalid_properties = Array.new
194
+ if @node_id.nil?
195
+ invalid_properties.push('invalid value for "node_id", node_id cannot be nil.')
196
+ end
197
+
198
+ if @branch_id.nil?
199
+ invalid_properties.push('invalid value for "branch_id", branch_id cannot be nil.')
200
+ end
201
+
202
+ if @kind.nil?
203
+ invalid_properties.push('invalid value for "kind", kind cannot be nil.')
204
+ end
205
+
206
+ if @is_satisfied.nil?
207
+ invalid_properties.push('invalid value for "is_satisfied", is_satisfied cannot be nil.')
208
+ end
209
+
210
+ if @inserted_at.nil?
211
+ invalid_properties.push('invalid value for "inserted_at", inserted_at cannot be nil.')
212
+ end
213
+
214
+ if @task_external_id.nil?
215
+ invalid_properties.push('invalid value for "task_external_id", task_external_id cannot be nil.')
216
+ end
217
+
218
+ if @task_external_id.to_s.length > 36
219
+ invalid_properties.push('invalid value for "task_external_id", the character length must be smaller than or equal to 36.')
220
+ end
221
+
222
+ if @task_external_id.to_s.length < 36
223
+ invalid_properties.push('invalid value for "task_external_id", the character length must be greater than or equal to 36.')
224
+ end
225
+
226
+ if @task_display_name.nil?
227
+ invalid_properties.push('invalid value for "task_display_name", task_display_name cannot be nil.')
228
+ end
229
+
230
+ invalid_properties
231
+ end
232
+
233
+ # Check to see if the all the properties in the model are valid
234
+ # @return true if the model is valid
235
+ def valid?
236
+ warn '[DEPRECATED] the `valid?` method is obsolete'
237
+ return false if @node_id.nil?
238
+ return false if @branch_id.nil?
239
+ return false if @kind.nil?
240
+ return false if @is_satisfied.nil?
241
+ return false if @inserted_at.nil?
242
+ return false if @task_external_id.nil?
243
+ return false if @task_external_id.to_s.length > 36
244
+ return false if @task_external_id.to_s.length < 36
245
+ return false if @task_display_name.nil?
246
+ true
247
+ end
248
+
249
+ # Custom attribute writer method with validation
250
+ # @param [Object] node_id Value to be assigned
251
+ def node_id=(node_id)
252
+ if node_id.nil?
253
+ fail ArgumentError, 'node_id cannot be nil'
254
+ end
255
+
256
+ @node_id = node_id
257
+ end
258
+
259
+ # Custom attribute writer method with validation
260
+ # @param [Object] branch_id Value to be assigned
261
+ def branch_id=(branch_id)
262
+ if branch_id.nil?
263
+ fail ArgumentError, 'branch_id cannot be nil'
264
+ end
265
+
266
+ @branch_id = branch_id
267
+ end
268
+
269
+ # Custom attribute writer method with validation
270
+ # @param [Object] kind Value to be assigned
271
+ def kind=(kind)
272
+ if kind.nil?
273
+ fail ArgumentError, 'kind cannot be nil'
274
+ end
275
+
276
+ @kind = kind
277
+ end
278
+
279
+ # Custom attribute writer method with validation
280
+ # @param [Object] is_satisfied Value to be assigned
281
+ def is_satisfied=(is_satisfied)
282
+ if is_satisfied.nil?
283
+ fail ArgumentError, 'is_satisfied cannot be nil'
284
+ end
285
+
286
+ @is_satisfied = is_satisfied
287
+ end
288
+
289
+ # Custom attribute writer method with validation
290
+ # @param [Object] inserted_at Value to be assigned
291
+ def inserted_at=(inserted_at)
292
+ if inserted_at.nil?
293
+ fail ArgumentError, 'inserted_at cannot be nil'
294
+ end
295
+
296
+ @inserted_at = inserted_at
297
+ end
298
+
299
+ # Custom attribute writer method with validation
300
+ # @param [Object] task_external_id Value to be assigned
301
+ def task_external_id=(task_external_id)
302
+ if task_external_id.nil?
303
+ fail ArgumentError, 'task_external_id cannot be nil'
304
+ end
305
+
306
+ if task_external_id.to_s.length > 36
307
+ fail ArgumentError, 'invalid value for "task_external_id", the character length must be smaller than or equal to 36.'
308
+ end
309
+
310
+ if task_external_id.to_s.length < 36
311
+ fail ArgumentError, 'invalid value for "task_external_id", the character length must be greater than or equal to 36.'
312
+ end
313
+
314
+ @task_external_id = task_external_id
315
+ end
316
+
317
+ # Custom attribute writer method with validation
318
+ # @param [Object] task_display_name Value to be assigned
319
+ def task_display_name=(task_display_name)
320
+ if task_display_name.nil?
321
+ fail ArgumentError, 'task_display_name cannot be nil'
322
+ end
323
+
324
+ @task_display_name = task_display_name
325
+ end
326
+
327
+ # Checks equality by comparing each attribute.
328
+ # @param [Object] Object to be compared
329
+ def ==(o)
330
+ return true if self.equal?(o)
331
+ self.class == o.class &&
332
+ node_id == o.node_id &&
333
+ branch_id == o.branch_id &&
334
+ kind == o.kind &&
335
+ is_satisfied == o.is_satisfied &&
336
+ inserted_at == o.inserted_at &&
337
+ task_external_id == o.task_external_id &&
338
+ task_display_name == o.task_display_name &&
339
+ wait_data == o.wait_data &&
340
+ satisfied_at == o.satisfied_at &&
341
+ user_message == o.user_message
342
+ end
343
+
344
+ # @see the `==` method
345
+ # @param [Object] Object to be compared
346
+ def eql?(o)
347
+ self == o
348
+ end
349
+
350
+ # Calculates hash code according to all attributes.
351
+ # @return [Integer] Hash code
352
+ def hash
353
+ [node_id, branch_id, kind, is_satisfied, inserted_at, task_external_id, task_display_name, wait_data, satisfied_at, user_message].hash
354
+ end
355
+
356
+ # Builds the object from hash
357
+ # @param [Hash] attributes Model attributes in the form of hash
358
+ # @return [Object] Returns the model itself
359
+ def self.build_from_hash(attributes)
360
+ return nil unless attributes.is_a?(Hash)
361
+ attributes = attributes.transform_keys(&:to_sym)
362
+ transformed_hash = {}
363
+ openapi_types.each_pair do |key, type|
364
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
365
+ transformed_hash["#{key}"] = nil
366
+ elsif type =~ /\AArray<(.*)>/i
367
+ # check to ensure the input is an array given that the attribute
368
+ # is documented as an array but the input is not
369
+ if attributes[attribute_map[key]].is_a?(Array)
370
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
371
+ end
372
+ elsif !attributes[attribute_map[key]].nil?
373
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
374
+ end
375
+ end
376
+ new(transformed_hash)
377
+ end
378
+
379
+ # Deserializes the data based on type
380
+ # @param string type Data type
381
+ # @param string value Value to be deserialized
382
+ # @return [Object] Deserialized data
383
+ def self._deserialize(type, value)
384
+ case type.to_sym
385
+ when :Time
386
+ Time.parse(value)
387
+ when :Date
388
+ Date.parse(value)
389
+ when :String
390
+ value.to_s
391
+ when :Integer
392
+ value.to_i
393
+ when :Float
394
+ value.to_f
395
+ when :Boolean
396
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
397
+ true
398
+ else
399
+ false
400
+ end
401
+ when :Object
402
+ # generic object (usually a Hash), return directly
403
+ value
404
+ when /\AArray<(?<inner_type>.+)>\z/
405
+ inner_type = Regexp.last_match[:inner_type]
406
+ value.map { |v| _deserialize(inner_type, v) }
407
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
408
+ k_type = Regexp.last_match[:k_type]
409
+ v_type = Regexp.last_match[:v_type]
410
+ {}.tap do |hash|
411
+ value.each do |k, v|
412
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
413
+ end
414
+ end
415
+ else # model
416
+ # models (e.g. Pet) or oneOf
417
+ klass = HatchetSdkRest.const_get(type)
418
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
419
+ end
420
+ end
421
+
422
+ # Returns the string representation of the object
423
+ # @return [String] String presentation of the object
424
+ def to_s
425
+ to_hash.to_s
426
+ end
427
+
428
+ # to_body is an alias to to_hash (backward compatibility)
429
+ # @return [Hash] Returns the object in the form of hash
430
+ def to_body
431
+ to_hash
432
+ end
433
+
434
+ # Returns the object in the form of hash
435
+ # @return [Hash] Returns the object in the form of hash
436
+ def to_hash
437
+ hash = {}
438
+ self.class.attribute_map.each_pair do |attr, param|
439
+ value = self.send(attr)
440
+ if value.nil?
441
+ is_nullable = self.class.openapi_nullable.include?(attr)
442
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
443
+ end
444
+
445
+ hash[param] = _to_hash(value)
446
+ end
447
+ hash
448
+ end
449
+
450
+ # Outputs non-array value in the form of hash
451
+ # For object, use to_hash. Otherwise, just return the value
452
+ # @param [Object] value Any valid value
453
+ # @return [Hash] Returns the value in the form of hash
454
+ def _to_hash(value)
455
+ if value.is_a?(Array)
456
+ value.compact.map { |v| _to_hash(v) }
457
+ elsif value.is_a?(Hash)
458
+ {}.tap do |hash|
459
+ value.each { |k, v| hash[k] = _to_hash(v) }
460
+ end
461
+ elsif value.respond_to? :to_hash
462
+ value.to_hash
463
+ else
464
+ value
465
+ end
466
+ end
467
+
468
+ end
469
+
470
+ end
@@ -0,0 +1,41 @@
1
+ =begin
2
+ #Hatchet API
3
+
4
+ #The Hatchet API
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.14.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module HatchetSdkRest
17
+ class V1DurableEventLogKind
18
+ RUN = "RUN".freeze
19
+ WAIT_FOR = "WAIT_FOR".freeze
20
+ MEMO = "MEMO".freeze
21
+
22
+ def self.all_vars
23
+ @all_vars ||= [RUN, WAIT_FOR, MEMO].freeze
24
+ end
25
+
26
+ # Builds the enum from string
27
+ # @param [String] The enum value in the form of the string
28
+ # @return [String] The enum value
29
+ def self.build_from_hash(value)
30
+ new.build_from_hash(value)
31
+ end
32
+
33
+ # Builds the enum from string
34
+ # @param [String] The enum value in the form of the string
35
+ # @return [String] The enum value
36
+ def build_from_hash(value)
37
+ return value if V1DurableEventLogKind.all_vars.include?(value)
38
+ raise "Invalid ENUM value #{value} for class #V1DurableEventLogKind"
39
+ end
40
+ end
41
+ end