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,288 @@
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 WorkflowVersionTaskDesiredWorkerLabel
18
+ # The worker label key.
19
+ attr_accessor :key
20
+
21
+ # The string value of the label.
22
+ attr_accessor :str_value
23
+
24
+ # The integer value of the label.
25
+ attr_accessor :int_value
26
+
27
+ # Whether the label is required for scheduling.
28
+ attr_accessor :required
29
+
30
+ # The scheduling weight of the label.
31
+ attr_accessor :weight
32
+
33
+ # The comparator used when matching the label.
34
+ attr_accessor :comparator
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'key' => :'key',
40
+ :'str_value' => :'strValue',
41
+ :'int_value' => :'intValue',
42
+ :'required' => :'required',
43
+ :'weight' => :'weight',
44
+ :'comparator' => :'comparator'
45
+ }
46
+ end
47
+
48
+ # Returns attribute mapping this model knows about
49
+ def self.acceptable_attribute_map
50
+ attribute_map
51
+ end
52
+
53
+ # Returns all the JSON keys this model knows about
54
+ def self.acceptable_attributes
55
+ acceptable_attribute_map.values
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.openapi_types
60
+ {
61
+ :'key' => :'String',
62
+ :'str_value' => :'String',
63
+ :'int_value' => :'Integer',
64
+ :'required' => :'Boolean',
65
+ :'weight' => :'Integer',
66
+ :'comparator' => :'String'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `HatchetSdkRest::WorkflowVersionTaskDesiredWorkerLabel` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ acceptable_attribute_map = self.class.acceptable_attribute_map
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!acceptable_attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `HatchetSdkRest::WorkflowVersionTaskDesiredWorkerLabel`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'key')
93
+ self.key = attributes[:'key']
94
+ else
95
+ self.key = nil
96
+ end
97
+
98
+ if attributes.key?(:'str_value')
99
+ self.str_value = attributes[:'str_value']
100
+ end
101
+
102
+ if attributes.key?(:'int_value')
103
+ self.int_value = attributes[:'int_value']
104
+ end
105
+
106
+ if attributes.key?(:'required')
107
+ self.required = attributes[:'required']
108
+ end
109
+
110
+ if attributes.key?(:'weight')
111
+ self.weight = attributes[:'weight']
112
+ end
113
+
114
+ if attributes.key?(:'comparator')
115
+ self.comparator = attributes[:'comparator']
116
+ end
117
+ end
118
+
119
+ # Show invalid properties with the reasons. Usually used together with valid?
120
+ # @return Array for valid properties with the reasons
121
+ def list_invalid_properties
122
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
123
+ invalid_properties = Array.new
124
+ if @key.nil?
125
+ invalid_properties.push('invalid value for "key", key cannot be nil.')
126
+ end
127
+
128
+ invalid_properties
129
+ end
130
+
131
+ # Check to see if the all the properties in the model are valid
132
+ # @return true if the model is valid
133
+ def valid?
134
+ warn '[DEPRECATED] the `valid?` method is obsolete'
135
+ return false if @key.nil?
136
+ true
137
+ end
138
+
139
+ # Custom attribute writer method with validation
140
+ # @param [Object] key Value to be assigned
141
+ def key=(key)
142
+ if key.nil?
143
+ fail ArgumentError, 'key cannot be nil'
144
+ end
145
+
146
+ @key = key
147
+ end
148
+
149
+ # Checks equality by comparing each attribute.
150
+ # @param [Object] Object to be compared
151
+ def ==(o)
152
+ return true if self.equal?(o)
153
+ self.class == o.class &&
154
+ key == o.key &&
155
+ str_value == o.str_value &&
156
+ int_value == o.int_value &&
157
+ required == o.required &&
158
+ weight == o.weight &&
159
+ comparator == o.comparator
160
+ end
161
+
162
+ # @see the `==` method
163
+ # @param [Object] Object to be compared
164
+ def eql?(o)
165
+ self == o
166
+ end
167
+
168
+ # Calculates hash code according to all attributes.
169
+ # @return [Integer] Hash code
170
+ def hash
171
+ [key, str_value, int_value, required, weight, comparator].hash
172
+ end
173
+
174
+ # Builds the object from hash
175
+ # @param [Hash] attributes Model attributes in the form of hash
176
+ # @return [Object] Returns the model itself
177
+ def self.build_from_hash(attributes)
178
+ return nil unless attributes.is_a?(Hash)
179
+ attributes = attributes.transform_keys(&:to_sym)
180
+ transformed_hash = {}
181
+ openapi_types.each_pair do |key, type|
182
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
183
+ transformed_hash["#{key}"] = nil
184
+ elsif type =~ /\AArray<(.*)>/i
185
+ # check to ensure the input is an array given that the attribute
186
+ # is documented as an array but the input is not
187
+ if attributes[attribute_map[key]].is_a?(Array)
188
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
189
+ end
190
+ elsif !attributes[attribute_map[key]].nil?
191
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
192
+ end
193
+ end
194
+ new(transformed_hash)
195
+ end
196
+
197
+ # Deserializes the data based on type
198
+ # @param string type Data type
199
+ # @param string value Value to be deserialized
200
+ # @return [Object] Deserialized data
201
+ def self._deserialize(type, value)
202
+ case type.to_sym
203
+ when :Time
204
+ Time.parse(value)
205
+ when :Date
206
+ Date.parse(value)
207
+ when :String
208
+ value.to_s
209
+ when :Integer
210
+ value.to_i
211
+ when :Float
212
+ value.to_f
213
+ when :Boolean
214
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
215
+ true
216
+ else
217
+ false
218
+ end
219
+ when :Object
220
+ # generic object (usually a Hash), return directly
221
+ value
222
+ when /\AArray<(?<inner_type>.+)>\z/
223
+ inner_type = Regexp.last_match[:inner_type]
224
+ value.map { |v| _deserialize(inner_type, v) }
225
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
226
+ k_type = Regexp.last_match[:k_type]
227
+ v_type = Regexp.last_match[:v_type]
228
+ {}.tap do |hash|
229
+ value.each do |k, v|
230
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
231
+ end
232
+ end
233
+ else # model
234
+ # models (e.g. Pet) or oneOf
235
+ klass = HatchetSdkRest.const_get(type)
236
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
237
+ end
238
+ end
239
+
240
+ # Returns the string representation of the object
241
+ # @return [String] String presentation of the object
242
+ def to_s
243
+ to_hash.to_s
244
+ end
245
+
246
+ # to_body is an alias to to_hash (backward compatibility)
247
+ # @return [Hash] Returns the object in the form of hash
248
+ def to_body
249
+ to_hash
250
+ end
251
+
252
+ # Returns the object in the form of hash
253
+ # @return [Hash] Returns the object in the form of hash
254
+ def to_hash
255
+ hash = {}
256
+ self.class.attribute_map.each_pair do |attr, param|
257
+ value = self.send(attr)
258
+ if value.nil?
259
+ is_nullable = self.class.openapi_nullable.include?(attr)
260
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
261
+ end
262
+
263
+ hash[param] = _to_hash(value)
264
+ end
265
+ hash
266
+ end
267
+
268
+ # Outputs non-array value in the form of hash
269
+ # For object, use to_hash. Otherwise, just return the value
270
+ # @param [Object] value Any valid value
271
+ # @return [Hash] Returns the value in the form of hash
272
+ def _to_hash(value)
273
+ if value.is_a?(Array)
274
+ value.compact.map { |v| _to_hash(v) }
275
+ elsif value.is_a?(Hash)
276
+ {}.tap do |hash|
277
+ value.each { |k, v| hash[k] = _to_hash(v) }
278
+ end
279
+ elsif value.respond_to? :to_hash
280
+ value.to_hash
281
+ else
282
+ value
283
+ end
284
+ end
285
+
286
+ end
287
+
288
+ end
@@ -0,0 +1,271 @@
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 WorkflowVersionTaskRateLimit
18
+ # The static rate limit key.
19
+ attr_accessor :key
20
+
21
+ # A CEL expression that computes the rate limit key.
22
+ attr_accessor :key_expression
23
+
24
+ # The static number of units to consume.
25
+ attr_accessor :units
26
+
27
+ # A CEL expression that computes the number of units to consume.
28
+ attr_accessor :units_expression
29
+
30
+ # A CEL expression that computes a dynamic limit value.
31
+ attr_accessor :limit_expression
32
+
33
+ # The rate limit window duration.
34
+ attr_accessor :duration
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'key' => :'key',
40
+ :'key_expression' => :'keyExpression',
41
+ :'units' => :'units',
42
+ :'units_expression' => :'unitsExpression',
43
+ :'limit_expression' => :'limitExpression',
44
+ :'duration' => :'duration'
45
+ }
46
+ end
47
+
48
+ # Returns attribute mapping this model knows about
49
+ def self.acceptable_attribute_map
50
+ attribute_map
51
+ end
52
+
53
+ # Returns all the JSON keys this model knows about
54
+ def self.acceptable_attributes
55
+ acceptable_attribute_map.values
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.openapi_types
60
+ {
61
+ :'key' => :'String',
62
+ :'key_expression' => :'String',
63
+ :'units' => :'Integer',
64
+ :'units_expression' => :'String',
65
+ :'limit_expression' => :'String',
66
+ :'duration' => :'String'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `HatchetSdkRest::WorkflowVersionTaskRateLimit` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ acceptable_attribute_map = self.class.acceptable_attribute_map
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!acceptable_attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `HatchetSdkRest::WorkflowVersionTaskRateLimit`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'key')
93
+ self.key = attributes[:'key']
94
+ end
95
+
96
+ if attributes.key?(:'key_expression')
97
+ self.key_expression = attributes[:'key_expression']
98
+ end
99
+
100
+ if attributes.key?(:'units')
101
+ self.units = attributes[:'units']
102
+ end
103
+
104
+ if attributes.key?(:'units_expression')
105
+ self.units_expression = attributes[:'units_expression']
106
+ end
107
+
108
+ if attributes.key?(:'limit_expression')
109
+ self.limit_expression = attributes[:'limit_expression']
110
+ end
111
+
112
+ if attributes.key?(:'duration')
113
+ self.duration = attributes[:'duration']
114
+ end
115
+ end
116
+
117
+ # Show invalid properties with the reasons. Usually used together with valid?
118
+ # @return Array for valid properties with the reasons
119
+ def list_invalid_properties
120
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
121
+ invalid_properties = Array.new
122
+ invalid_properties
123
+ end
124
+
125
+ # Check to see if the all the properties in the model are valid
126
+ # @return true if the model is valid
127
+ def valid?
128
+ warn '[DEPRECATED] the `valid?` method is obsolete'
129
+ true
130
+ end
131
+
132
+ # Checks equality by comparing each attribute.
133
+ # @param [Object] Object to be compared
134
+ def ==(o)
135
+ return true if self.equal?(o)
136
+ self.class == o.class &&
137
+ key == o.key &&
138
+ key_expression == o.key_expression &&
139
+ units == o.units &&
140
+ units_expression == o.units_expression &&
141
+ limit_expression == o.limit_expression &&
142
+ duration == o.duration
143
+ end
144
+
145
+ # @see the `==` method
146
+ # @param [Object] Object to be compared
147
+ def eql?(o)
148
+ self == o
149
+ end
150
+
151
+ # Calculates hash code according to all attributes.
152
+ # @return [Integer] Hash code
153
+ def hash
154
+ [key, key_expression, units, units_expression, limit_expression, duration].hash
155
+ end
156
+
157
+ # Builds the object from hash
158
+ # @param [Hash] attributes Model attributes in the form of hash
159
+ # @return [Object] Returns the model itself
160
+ def self.build_from_hash(attributes)
161
+ return nil unless attributes.is_a?(Hash)
162
+ attributes = attributes.transform_keys(&:to_sym)
163
+ transformed_hash = {}
164
+ openapi_types.each_pair do |key, type|
165
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
166
+ transformed_hash["#{key}"] = nil
167
+ elsif type =~ /\AArray<(.*)>/i
168
+ # check to ensure the input is an array given that the attribute
169
+ # is documented as an array but the input is not
170
+ if attributes[attribute_map[key]].is_a?(Array)
171
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
172
+ end
173
+ elsif !attributes[attribute_map[key]].nil?
174
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
175
+ end
176
+ end
177
+ new(transformed_hash)
178
+ end
179
+
180
+ # Deserializes the data based on type
181
+ # @param string type Data type
182
+ # @param string value Value to be deserialized
183
+ # @return [Object] Deserialized data
184
+ def self._deserialize(type, value)
185
+ case type.to_sym
186
+ when :Time
187
+ Time.parse(value)
188
+ when :Date
189
+ Date.parse(value)
190
+ when :String
191
+ value.to_s
192
+ when :Integer
193
+ value.to_i
194
+ when :Float
195
+ value.to_f
196
+ when :Boolean
197
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
198
+ true
199
+ else
200
+ false
201
+ end
202
+ when :Object
203
+ # generic object (usually a Hash), return directly
204
+ value
205
+ when /\AArray<(?<inner_type>.+)>\z/
206
+ inner_type = Regexp.last_match[:inner_type]
207
+ value.map { |v| _deserialize(inner_type, v) }
208
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
209
+ k_type = Regexp.last_match[:k_type]
210
+ v_type = Regexp.last_match[:v_type]
211
+ {}.tap do |hash|
212
+ value.each do |k, v|
213
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
214
+ end
215
+ end
216
+ else # model
217
+ # models (e.g. Pet) or oneOf
218
+ klass = HatchetSdkRest.const_get(type)
219
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
220
+ end
221
+ end
222
+
223
+ # Returns the string representation of the object
224
+ # @return [String] String presentation of the object
225
+ def to_s
226
+ to_hash.to_s
227
+ end
228
+
229
+ # to_body is an alias to to_hash (backward compatibility)
230
+ # @return [Hash] Returns the object in the form of hash
231
+ def to_body
232
+ to_hash
233
+ end
234
+
235
+ # Returns the object in the form of hash
236
+ # @return [Hash] Returns the object in the form of hash
237
+ def to_hash
238
+ hash = {}
239
+ self.class.attribute_map.each_pair do |attr, param|
240
+ value = self.send(attr)
241
+ if value.nil?
242
+ is_nullable = self.class.openapi_nullable.include?(attr)
243
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
244
+ end
245
+
246
+ hash[param] = _to_hash(value)
247
+ end
248
+ hash
249
+ end
250
+
251
+ # Outputs non-array value in the form of hash
252
+ # For object, use to_hash. Otherwise, just return the value
253
+ # @param [Object] value Any valid value
254
+ # @return [Hash] Returns the value in the form of hash
255
+ def _to_hash(value)
256
+ if value.is_a?(Array)
257
+ value.compact.map { |v| _to_hash(v) }
258
+ elsif value.is_a?(Hash)
259
+ {}.tap do |hash|
260
+ value.each { |k, v| hash[k] = _to_hash(v) }
261
+ end
262
+ elsif value.respond_to? :to_hash
263
+ value.to_hash
264
+ else
265
+ value
266
+ end
267
+ end
268
+
269
+ end
270
+
271
+ end
@@ -54,6 +54,8 @@ HatchetSdkRest.autoload :EventOrderByField, 'hatchet-sdk-rest/models/event_order
54
54
  HatchetSdkRest.autoload :EventUpdateCancel200Response, 'hatchet-sdk-rest/models/event_update_cancel200_response'
55
55
  HatchetSdkRest.autoload :EventWorkflowRunSummary, 'hatchet-sdk-rest/models/event_workflow_run_summary'
56
56
  HatchetSdkRest.autoload :Events, 'hatchet-sdk-rest/models/events'
57
+ HatchetSdkRest.autoload :FeatureFlagEvaluationResult, 'hatchet-sdk-rest/models/feature_flag_evaluation_result'
58
+ HatchetSdkRest.autoload :FeatureFlagId, 'hatchet-sdk-rest/models/feature_flag_id'
57
59
  HatchetSdkRest.autoload :GetStepRunDiffResponse, 'hatchet-sdk-rest/models/get_step_run_diff_response'
58
60
  HatchetSdkRest.autoload :InfoGetVersion200Response, 'hatchet-sdk-rest/models/info_get_version200_response'
59
61
  HatchetSdkRest.autoload :Job, 'hatchet-sdk-rest/models/job'
@@ -68,6 +70,10 @@ HatchetSdkRest.autoload :LogLineLevel, 'hatchet-sdk-rest/models/log_line_level'
68
70
  HatchetSdkRest.autoload :LogLineList, 'hatchet-sdk-rest/models/log_line_list'
69
71
  HatchetSdkRest.autoload :LogLineOrderByDirection, 'hatchet-sdk-rest/models/log_line_order_by_direction'
70
72
  HatchetSdkRest.autoload :LogLineOrderByField, 'hatchet-sdk-rest/models/log_line_order_by_field'
73
+ HatchetSdkRest.autoload :OtelSpan, 'hatchet-sdk-rest/models/otel_span'
74
+ HatchetSdkRest.autoload :OtelSpanKind, 'hatchet-sdk-rest/models/otel_span_kind'
75
+ HatchetSdkRest.autoload :OtelSpanList, 'hatchet-sdk-rest/models/otel_span_list'
76
+ HatchetSdkRest.autoload :OtelStatusCode, 'hatchet-sdk-rest/models/otel_status_code'
71
77
  HatchetSdkRest.autoload :PaginationResponse, 'hatchet-sdk-rest/models/pagination_response'
72
78
  HatchetSdkRest.autoload :PullRequest, 'hatchet-sdk-rest/models/pull_request'
73
79
  HatchetSdkRest.autoload :PullRequestState, 'hatchet-sdk-rest/models/pull_request_state'
@@ -128,6 +134,7 @@ HatchetSdkRest.autoload :TenantResourceLimit, 'hatchet-sdk-rest/models/tenant_re
128
134
  HatchetSdkRest.autoload :TenantResourcePolicy, 'hatchet-sdk-rest/models/tenant_resource_policy'
129
135
  HatchetSdkRest.autoload :TenantStepRunQueueMetrics, 'hatchet-sdk-rest/models/tenant_step_run_queue_metrics'
130
136
  HatchetSdkRest.autoload :TenantVersion, 'hatchet-sdk-rest/models/tenant_version'
137
+ HatchetSdkRest.autoload :TriggerRunResult, 'hatchet-sdk-rest/models/trigger_run_result'
131
138
  HatchetSdkRest.autoload :TriggerWorkflowRunRequest, 'hatchet-sdk-rest/models/trigger_workflow_run_request'
132
139
  HatchetSdkRest.autoload :UpdateCronWorkflowTriggerRequest, 'hatchet-sdk-rest/models/update_cron_workflow_trigger_request'
133
140
  HatchetSdkRest.autoload :UpdateScheduledWorkflowRunRequest, 'hatchet-sdk-rest/models/update_scheduled_workflow_run_request'
@@ -142,6 +149,9 @@ HatchetSdkRest.autoload :UserLoginRequest, 'hatchet-sdk-rest/models/user_login_r
142
149
  HatchetSdkRest.autoload :UserRegisterRequest, 'hatchet-sdk-rest/models/user_register_request'
143
150
  HatchetSdkRest.autoload :UserTenantMembershipsList, 'hatchet-sdk-rest/models/user_tenant_memberships_list'
144
151
  HatchetSdkRest.autoload :UserTenantPublic, 'hatchet-sdk-rest/models/user_tenant_public'
152
+ HatchetSdkRest.autoload :V1AdditionalMetadataOperator, 'hatchet-sdk-rest/models/v1_additional_metadata_operator'
153
+ HatchetSdkRest.autoload :V1BranchDurableTaskRequest, 'hatchet-sdk-rest/models/v1_branch_durable_task_request'
154
+ HatchetSdkRest.autoload :V1BranchDurableTaskResponse, 'hatchet-sdk-rest/models/v1_branch_durable_task_response'
145
155
  HatchetSdkRest.autoload :V1CELDebugRequest, 'hatchet-sdk-rest/models/v1_cel_debug_request'
146
156
  HatchetSdkRest.autoload :V1CELDebugResponse, 'hatchet-sdk-rest/models/v1_cel_debug_response'
147
157
  HatchetSdkRest.autoload :V1CELDebugResponseStatus, 'hatchet-sdk-rest/models/v1_cel_debug_response_status'
@@ -154,6 +164,10 @@ HatchetSdkRest.autoload :V1CreateWebhookRequestBase, 'hatchet-sdk-rest/models/v1
154
164
  HatchetSdkRest.autoload :V1CreateWebhookRequestBasicAuth, 'hatchet-sdk-rest/models/v1_create_webhook_request_basic_auth'
155
165
  HatchetSdkRest.autoload :V1CreateWebhookRequestHMAC, 'hatchet-sdk-rest/models/v1_create_webhook_request_hmac'
156
166
  HatchetSdkRest.autoload :V1DagChildren, 'hatchet-sdk-rest/models/v1_dag_children'
167
+ HatchetSdkRest.autoload :V1DurableEventLogEntry, 'hatchet-sdk-rest/models/v1_durable_event_log_entry'
168
+ HatchetSdkRest.autoload :V1DurableEventLogKind, 'hatchet-sdk-rest/models/v1_durable_event_log_kind'
169
+ HatchetSdkRest.autoload :V1DurableWaitCondition, 'hatchet-sdk-rest/models/v1_durable_wait_condition'
170
+ HatchetSdkRest.autoload :V1DurableWaitConditionKind, 'hatchet-sdk-rest/models/v1_durable_wait_condition_kind'
157
171
  HatchetSdkRest.autoload :V1Event, 'hatchet-sdk-rest/models/v1_event'
158
172
  HatchetSdkRest.autoload :V1EventList, 'hatchet-sdk-rest/models/v1_event_list'
159
173
  HatchetSdkRest.autoload :V1EventTriggeredRun, 'hatchet-sdk-rest/models/v1_event_triggered_run'
@@ -164,8 +178,13 @@ HatchetSdkRest.autoload :V1LogLine, 'hatchet-sdk-rest/models/v1_log_line'
164
178
  HatchetSdkRest.autoload :V1LogLineLevel, 'hatchet-sdk-rest/models/v1_log_line_level'
165
179
  HatchetSdkRest.autoload :V1LogLineList, 'hatchet-sdk-rest/models/v1_log_line_list'
166
180
  HatchetSdkRest.autoload :V1LogLineOrderByDirection, 'hatchet-sdk-rest/models/v1_log_line_order_by_direction'
181
+ HatchetSdkRest.autoload :V1LogsPointMetric, 'hatchet-sdk-rest/models/v1_logs_point_metric'
182
+ HatchetSdkRest.autoload :V1LogsPointMetrics, 'hatchet-sdk-rest/models/v1_logs_point_metrics'
167
183
  HatchetSdkRest.autoload :V1ReplayTaskRequest, 'hatchet-sdk-rest/models/v1_replay_task_request'
168
184
  HatchetSdkRest.autoload :V1ReplayedTasks, 'hatchet-sdk-rest/models/v1_replayed_tasks'
185
+ HatchetSdkRest.autoload :V1RestoreTaskResponse, 'hatchet-sdk-rest/models/v1_restore_task_response'
186
+ HatchetSdkRest.autoload :V1RunningDetailCount, 'hatchet-sdk-rest/models/v1_running_detail_count'
187
+ HatchetSdkRest.autoload :V1RunningFilter, 'hatchet-sdk-rest/models/v1_running_filter'
169
188
  HatchetSdkRest.autoload :V1TaskEvent, 'hatchet-sdk-rest/models/v1_task_event'
170
189
  HatchetSdkRest.autoload :V1TaskEventList, 'hatchet-sdk-rest/models/v1_task_event_list'
171
190
  HatchetSdkRest.autoload :V1TaskEventType, 'hatchet-sdk-rest/models/v1_task_event_type'
@@ -182,6 +201,7 @@ HatchetSdkRest.autoload :V1TaskTimingList, 'hatchet-sdk-rest/models/v1_task_timi
182
201
  HatchetSdkRest.autoload :V1TriggerWorkflowRunRequest, 'hatchet-sdk-rest/models/v1_trigger_workflow_run_request'
183
202
  HatchetSdkRest.autoload :V1UpdateFilterRequest, 'hatchet-sdk-rest/models/v1_update_filter_request'
184
203
  HatchetSdkRest.autoload :V1UpdateWebhookRequest, 'hatchet-sdk-rest/models/v1_update_webhook_request'
204
+ HatchetSdkRest.autoload :V1WaitItem, 'hatchet-sdk-rest/models/v1_wait_item'
185
205
  HatchetSdkRest.autoload :V1Webhook, 'hatchet-sdk-rest/models/v1_webhook'
186
206
  HatchetSdkRest.autoload :V1WebhookAPIKeyAuth, 'hatchet-sdk-rest/models/v1_webhook_api_key_auth'
187
207
  HatchetSdkRest.autoload :V1WebhookAuthType, 'hatchet-sdk-rest/models/v1_webhook_auth_type'
@@ -211,6 +231,7 @@ HatchetSdkRest.autoload :WorkerList, 'hatchet-sdk-rest/models/worker_list'
211
231
  HatchetSdkRest.autoload :WorkerRuntimeInfo, 'hatchet-sdk-rest/models/worker_runtime_info'
212
232
  HatchetSdkRest.autoload :WorkerRuntimeSDKs, 'hatchet-sdk-rest/models/worker_runtime_sdks'
213
233
  HatchetSdkRest.autoload :WorkerSlotConfig, 'hatchet-sdk-rest/models/worker_slot_config'
234
+ HatchetSdkRest.autoload :WorkerStatus, 'hatchet-sdk-rest/models/worker_status'
214
235
  HatchetSdkRest.autoload :WorkerType, 'hatchet-sdk-rest/models/worker_type'
215
236
  HatchetSdkRest.autoload :Workflow, 'hatchet-sdk-rest/models/workflow'
216
237
  HatchetSdkRest.autoload :WorkflowConcurrency, 'hatchet-sdk-rest/models/workflow_concurrency'
@@ -242,12 +263,15 @@ HatchetSdkRest.autoload :WorkflowWorkersCount, 'hatchet-sdk-rest/models/workflow
242
263
  HatchetSdkRest.autoload :APITokenApi, 'hatchet-sdk-rest/api/api_token_api'
243
264
  HatchetSdkRest.autoload :CELApi, 'hatchet-sdk-rest/api/cel_api'
244
265
  HatchetSdkRest.autoload :DefaultApi, 'hatchet-sdk-rest/api/default_api'
266
+ HatchetSdkRest.autoload :DurableTasksApi, 'hatchet-sdk-rest/api/durable_tasks_api'
245
267
  HatchetSdkRest.autoload :EventApi, 'hatchet-sdk-rest/api/event_api'
268
+ HatchetSdkRest.autoload :FeatureFlagsApi, 'hatchet-sdk-rest/api/feature_flags_api'
246
269
  HatchetSdkRest.autoload :FilterApi, 'hatchet-sdk-rest/api/filter_api'
247
270
  HatchetSdkRest.autoload :GithubApi, 'hatchet-sdk-rest/api/github_api'
248
271
  HatchetSdkRest.autoload :HealthcheckApi, 'hatchet-sdk-rest/api/healthcheck_api'
249
272
  HatchetSdkRest.autoload :LogApi, 'hatchet-sdk-rest/api/log_api'
250
273
  HatchetSdkRest.autoload :MetadataApi, 'hatchet-sdk-rest/api/metadata_api'
274
+ HatchetSdkRest.autoload :ObservabilityApi, 'hatchet-sdk-rest/api/observability_api'
251
275
  HatchetSdkRest.autoload :RateLimitsApi, 'hatchet-sdk-rest/api/rate_limits_api'
252
276
  HatchetSdkRest.autoload :SNSApi, 'hatchet-sdk-rest/api/sns_api'
253
277
  HatchetSdkRest.autoload :SlackApi, 'hatchet-sdk-rest/api/slack_api'