hatchet-sdk 0.11.2 → 0.12.1

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 (35) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/README.md +1 -0
  4. data/lib/hatchet/clients/rest/.openapi-generator/FILES +13 -0
  5. data/lib/hatchet/clients/rest/README.md +15 -0
  6. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/concurrency_api.rb +188 -0
  7. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/serverless_api.rb +77 -0
  8. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_token.rb +28 -1
  9. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_api_token_request.rb +11 -1
  10. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/feature_flag_id.rb +2 -1
  11. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_entitlements.rb +30 -4
  12. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_key.rb +326 -0
  13. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_key_list.rb +275 -0
  14. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_limit_strategy.rb +44 -0
  15. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_scope.rb +41 -0
  16. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_strategy.rb +676 -0
  17. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_strategy_list.rb +239 -0
  18. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_strategy_usage.rb +307 -0
  19. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_serverless_endpoint_request.rb +1 -1
  20. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_serverless_endpoint_check_stage.rb +42 -0
  21. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_serverless_endpoint_event.rb +363 -0
  22. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_serverless_endpoint_event_details.rb +358 -0
  23. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_serverless_endpoint_event_kind.rb +44 -0
  24. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_serverless_endpoint_event_list.rb +239 -0
  25. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_serverless_endpoint_kind.rb +2 -1
  26. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_stream_topic.rb +31 -4
  27. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest.rb +13 -0
  28. data/lib/hatchet/contracts/v1/streams_pb.rb +28 -0
  29. data/lib/hatchet/contracts/v1/streams_services_pb.rb +26 -0
  30. data/lib/hatchet/features/streams.rb +498 -0
  31. data/lib/hatchet/version.rb +1 -1
  32. data/lib/hatchet-sdk.rb +11 -0
  33. data/sig/hatchet/features/streams.rbs +39 -0
  34. data/sig/hatchet-sdk.rbs +1 -0
  35. metadata +19 -2
@@ -0,0 +1,326 @@
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 V1ConcurrencyKey
18
+ attr_accessor :key
19
+
20
+ # The effective max runs for this key. With a max runs expression, this is the value evaluated for the key's most recent run.
21
+ attr_accessor :max_runs
22
+
23
+ attr_accessor :running_count
24
+
25
+ attr_accessor :queued_count
26
+
27
+ # When the longest-queued run on this key was created. Unset when nothing is queued.
28
+ attr_accessor :oldest_queued_at
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'key' => :'key',
34
+ :'max_runs' => :'maxRuns',
35
+ :'running_count' => :'runningCount',
36
+ :'queued_count' => :'queuedCount',
37
+ :'oldest_queued_at' => :'oldestQueuedAt'
38
+ }
39
+ end
40
+
41
+ # Returns attribute mapping this model knows about
42
+ def self.acceptable_attribute_map
43
+ attribute_map
44
+ end
45
+
46
+ # Returns all the JSON keys this model knows about
47
+ def self.acceptable_attributes
48
+ acceptable_attribute_map.values
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.openapi_types
53
+ {
54
+ :'key' => :'String',
55
+ :'max_runs' => :'Integer',
56
+ :'running_count' => :'Integer',
57
+ :'queued_count' => :'Integer',
58
+ :'oldest_queued_at' => :'Time'
59
+ }
60
+ end
61
+
62
+ # List of attributes with nullable: true
63
+ def self.openapi_nullable
64
+ Set.new([
65
+ ])
66
+ end
67
+
68
+ # Initializes the object
69
+ # @param [Hash] attributes Model attributes in the form of hash
70
+ def initialize(attributes = {})
71
+ if (!attributes.is_a?(Hash))
72
+ fail ArgumentError, "The input argument (attributes) must be a hash in `HatchetSdkRest::V1ConcurrencyKey` initialize method"
73
+ end
74
+
75
+ # check to see if the attribute exists and convert string to symbol for hash key
76
+ acceptable_attribute_map = self.class.acceptable_attribute_map
77
+ attributes = attributes.each_with_object({}) { |(k, v), h|
78
+ if (!acceptable_attribute_map.key?(k.to_sym))
79
+ fail ArgumentError, "`#{k}` is not a valid attribute in `HatchetSdkRest::V1ConcurrencyKey`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
80
+ end
81
+ h[k.to_sym] = v
82
+ }
83
+
84
+ if attributes.key?(:'key')
85
+ self.key = attributes[:'key']
86
+ else
87
+ self.key = nil
88
+ end
89
+
90
+ if attributes.key?(:'max_runs')
91
+ self.max_runs = attributes[:'max_runs']
92
+ else
93
+ self.max_runs = nil
94
+ end
95
+
96
+ if attributes.key?(:'running_count')
97
+ self.running_count = attributes[:'running_count']
98
+ else
99
+ self.running_count = nil
100
+ end
101
+
102
+ if attributes.key?(:'queued_count')
103
+ self.queued_count = attributes[:'queued_count']
104
+ else
105
+ self.queued_count = nil
106
+ end
107
+
108
+ if attributes.key?(:'oldest_queued_at')
109
+ self.oldest_queued_at = attributes[:'oldest_queued_at']
110
+ end
111
+ end
112
+
113
+ # Show invalid properties with the reasons. Usually used together with valid?
114
+ # @return Array for valid properties with the reasons
115
+ def list_invalid_properties
116
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
117
+ invalid_properties = Array.new
118
+ if @key.nil?
119
+ invalid_properties.push('invalid value for "key", key cannot be nil.')
120
+ end
121
+
122
+ if @max_runs.nil?
123
+ invalid_properties.push('invalid value for "max_runs", max_runs cannot be nil.')
124
+ end
125
+
126
+ if @running_count.nil?
127
+ invalid_properties.push('invalid value for "running_count", running_count cannot be nil.')
128
+ end
129
+
130
+ if @queued_count.nil?
131
+ invalid_properties.push('invalid value for "queued_count", queued_count cannot be nil.')
132
+ end
133
+
134
+ invalid_properties
135
+ end
136
+
137
+ # Check to see if the all the properties in the model are valid
138
+ # @return true if the model is valid
139
+ def valid?
140
+ warn '[DEPRECATED] the `valid?` method is obsolete'
141
+ return false if @key.nil?
142
+ return false if @max_runs.nil?
143
+ return false if @running_count.nil?
144
+ return false if @queued_count.nil?
145
+ true
146
+ end
147
+
148
+ # Custom attribute writer method with validation
149
+ # @param [Object] key Value to be assigned
150
+ def key=(key)
151
+ if key.nil?
152
+ fail ArgumentError, 'key cannot be nil'
153
+ end
154
+
155
+ @key = key
156
+ end
157
+
158
+ # Custom attribute writer method with validation
159
+ # @param [Object] max_runs Value to be assigned
160
+ def max_runs=(max_runs)
161
+ if max_runs.nil?
162
+ fail ArgumentError, 'max_runs cannot be nil'
163
+ end
164
+
165
+ @max_runs = max_runs
166
+ end
167
+
168
+ # Custom attribute writer method with validation
169
+ # @param [Object] running_count Value to be assigned
170
+ def running_count=(running_count)
171
+ if running_count.nil?
172
+ fail ArgumentError, 'running_count cannot be nil'
173
+ end
174
+
175
+ @running_count = running_count
176
+ end
177
+
178
+ # Custom attribute writer method with validation
179
+ # @param [Object] queued_count Value to be assigned
180
+ def queued_count=(queued_count)
181
+ if queued_count.nil?
182
+ fail ArgumentError, 'queued_count cannot be nil'
183
+ end
184
+
185
+ @queued_count = queued_count
186
+ end
187
+
188
+ # Checks equality by comparing each attribute.
189
+ # @param [Object] Object to be compared
190
+ def ==(o)
191
+ return true if self.equal?(o)
192
+ self.class == o.class &&
193
+ key == o.key &&
194
+ max_runs == o.max_runs &&
195
+ running_count == o.running_count &&
196
+ queued_count == o.queued_count &&
197
+ oldest_queued_at == o.oldest_queued_at
198
+ end
199
+
200
+ # @see the `==` method
201
+ # @param [Object] Object to be compared
202
+ def eql?(o)
203
+ self == o
204
+ end
205
+
206
+ # Calculates hash code according to all attributes.
207
+ # @return [Integer] Hash code
208
+ def hash
209
+ [key, max_runs, running_count, queued_count, oldest_queued_at].hash
210
+ end
211
+
212
+ # Builds the object from hash
213
+ # @param [Hash] attributes Model attributes in the form of hash
214
+ # @return [Object] Returns the model itself
215
+ def self.build_from_hash(attributes)
216
+ return nil unless attributes.is_a?(Hash)
217
+ attributes = attributes.transform_keys(&:to_sym)
218
+ transformed_hash = {}
219
+ openapi_types.each_pair do |key, type|
220
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
221
+ transformed_hash["#{key}"] = nil
222
+ elsif type =~ /\AArray<(.*)>/i
223
+ # check to ensure the input is an array given that the attribute
224
+ # is documented as an array but the input is not
225
+ if attributes[attribute_map[key]].is_a?(Array)
226
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
227
+ end
228
+ elsif !attributes[attribute_map[key]].nil?
229
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
230
+ end
231
+ end
232
+ new(transformed_hash)
233
+ end
234
+
235
+ # Deserializes the data based on type
236
+ # @param string type Data type
237
+ # @param string value Value to be deserialized
238
+ # @return [Object] Deserialized data
239
+ def self._deserialize(type, value)
240
+ case type.to_sym
241
+ when :Time
242
+ Time.parse(value)
243
+ when :Date
244
+ Date.parse(value)
245
+ when :String
246
+ value.to_s
247
+ when :Integer
248
+ value.to_i
249
+ when :Float
250
+ value.to_f
251
+ when :Boolean
252
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
253
+ true
254
+ else
255
+ false
256
+ end
257
+ when :Object
258
+ # generic object (usually a Hash), return directly
259
+ value
260
+ when /\AArray<(?<inner_type>.+)>\z/
261
+ inner_type = Regexp.last_match[:inner_type]
262
+ value.map { |v| _deserialize(inner_type, v) }
263
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
264
+ k_type = Regexp.last_match[:k_type]
265
+ v_type = Regexp.last_match[:v_type]
266
+ {}.tap do |hash|
267
+ value.each do |k, v|
268
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
269
+ end
270
+ end
271
+ else # model
272
+ # models (e.g. Pet) or oneOf
273
+ klass = HatchetSdkRest.const_get(type)
274
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
275
+ end
276
+ end
277
+
278
+ # Returns the string representation of the object
279
+ # @return [String] String presentation of the object
280
+ def to_s
281
+ to_hash.to_s
282
+ end
283
+
284
+ # to_body is an alias to to_hash (backward compatibility)
285
+ # @return [Hash] Returns the object in the form of hash
286
+ def to_body
287
+ to_hash
288
+ end
289
+
290
+ # Returns the object in the form of hash
291
+ # @return [Hash] Returns the object in the form of hash
292
+ def to_hash
293
+ hash = {}
294
+ self.class.attribute_map.each_pair do |attr, param|
295
+ value = self.send(attr)
296
+ if value.nil?
297
+ is_nullable = self.class.openapi_nullable.include?(attr)
298
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
299
+ end
300
+
301
+ hash[param] = _to_hash(value)
302
+ end
303
+ hash
304
+ end
305
+
306
+ # Outputs non-array value in the form of hash
307
+ # For object, use to_hash. Otherwise, just return the value
308
+ # @param [Object] value Any valid value
309
+ # @return [Hash] Returns the value in the form of hash
310
+ def _to_hash(value)
311
+ if value.is_a?(Array)
312
+ value.compact.map { |v| _to_hash(v) }
313
+ elsif value.is_a?(Hash)
314
+ {}.tap do |hash|
315
+ value.each { |k, v| hash[k] = _to_hash(v) }
316
+ end
317
+ elsif value.respond_to? :to_hash
318
+ value.to_hash
319
+ else
320
+ value
321
+ end
322
+ end
323
+
324
+ end
325
+
326
+ end
@@ -0,0 +1,275 @@
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 V1ConcurrencyKeyList
18
+ attr_accessor :rows
19
+
20
+ # The number of keys matching the filters, across all pages.
21
+ attr_accessor :total
22
+
23
+ attr_accessor :pagination
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'rows' => :'rows',
29
+ :'total' => :'total',
30
+ :'pagination' => :'pagination'
31
+ }
32
+ end
33
+
34
+ # Returns attribute mapping this model knows about
35
+ def self.acceptable_attribute_map
36
+ attribute_map
37
+ end
38
+
39
+ # Returns all the JSON keys this model knows about
40
+ def self.acceptable_attributes
41
+ acceptable_attribute_map.values
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.openapi_types
46
+ {
47
+ :'rows' => :'Array<V1ConcurrencyKey>',
48
+ :'total' => :'Integer',
49
+ :'pagination' => :'PaginationResponse'
50
+ }
51
+ end
52
+
53
+ # List of attributes with nullable: true
54
+ def self.openapi_nullable
55
+ Set.new([
56
+ ])
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param [Hash] attributes Model attributes in the form of hash
61
+ def initialize(attributes = {})
62
+ if (!attributes.is_a?(Hash))
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `HatchetSdkRest::V1ConcurrencyKeyList` initialize method"
64
+ end
65
+
66
+ # check to see if the attribute exists and convert string to symbol for hash key
67
+ acceptable_attribute_map = self.class.acceptable_attribute_map
68
+ attributes = attributes.each_with_object({}) { |(k, v), h|
69
+ if (!acceptable_attribute_map.key?(k.to_sym))
70
+ fail ArgumentError, "`#{k}` is not a valid attribute in `HatchetSdkRest::V1ConcurrencyKeyList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
71
+ end
72
+ h[k.to_sym] = v
73
+ }
74
+
75
+ if attributes.key?(:'rows')
76
+ if (value = attributes[:'rows']).is_a?(Array)
77
+ self.rows = value
78
+ end
79
+ else
80
+ self.rows = nil
81
+ end
82
+
83
+ if attributes.key?(:'total')
84
+ self.total = attributes[:'total']
85
+ else
86
+ self.total = nil
87
+ end
88
+
89
+ if attributes.key?(:'pagination')
90
+ self.pagination = attributes[:'pagination']
91
+ end
92
+ end
93
+
94
+ # Show invalid properties with the reasons. Usually used together with valid?
95
+ # @return Array for valid properties with the reasons
96
+ def list_invalid_properties
97
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
98
+ invalid_properties = Array.new
99
+ if @rows.nil?
100
+ invalid_properties.push('invalid value for "rows", rows cannot be nil.')
101
+ end
102
+
103
+ if @total.nil?
104
+ invalid_properties.push('invalid value for "total", total cannot be nil.')
105
+ end
106
+
107
+ invalid_properties
108
+ end
109
+
110
+ # Check to see if the all the properties in the model are valid
111
+ # @return true if the model is valid
112
+ def valid?
113
+ warn '[DEPRECATED] the `valid?` method is obsolete'
114
+ return false if @rows.nil?
115
+ return false if @total.nil?
116
+ true
117
+ end
118
+
119
+ # Custom attribute writer method with validation
120
+ # @param [Object] rows Value to be assigned
121
+ def rows=(rows)
122
+ if rows.nil?
123
+ fail ArgumentError, 'rows cannot be nil'
124
+ end
125
+
126
+ @rows = rows
127
+ end
128
+
129
+ # Custom attribute writer method with validation
130
+ # @param [Object] total Value to be assigned
131
+ def total=(total)
132
+ if total.nil?
133
+ fail ArgumentError, 'total cannot be nil'
134
+ end
135
+
136
+ @total = total
137
+ end
138
+
139
+ # Checks equality by comparing each attribute.
140
+ # @param [Object] Object to be compared
141
+ def ==(o)
142
+ return true if self.equal?(o)
143
+ self.class == o.class &&
144
+ rows == o.rows &&
145
+ total == o.total &&
146
+ pagination == o.pagination
147
+ end
148
+
149
+ # @see the `==` method
150
+ # @param [Object] Object to be compared
151
+ def eql?(o)
152
+ self == o
153
+ end
154
+
155
+ # Calculates hash code according to all attributes.
156
+ # @return [Integer] Hash code
157
+ def hash
158
+ [rows, total, pagination].hash
159
+ end
160
+
161
+ # Builds the object from hash
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ # @return [Object] Returns the model itself
164
+ def self.build_from_hash(attributes)
165
+ return nil unless attributes.is_a?(Hash)
166
+ attributes = attributes.transform_keys(&:to_sym)
167
+ transformed_hash = {}
168
+ openapi_types.each_pair do |key, type|
169
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
170
+ transformed_hash["#{key}"] = nil
171
+ elsif type =~ /\AArray<(.*)>/i
172
+ # check to ensure the input is an array given that the attribute
173
+ # is documented as an array but the input is not
174
+ if attributes[attribute_map[key]].is_a?(Array)
175
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
176
+ end
177
+ elsif !attributes[attribute_map[key]].nil?
178
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
179
+ end
180
+ end
181
+ new(transformed_hash)
182
+ end
183
+
184
+ # Deserializes the data based on type
185
+ # @param string type Data type
186
+ # @param string value Value to be deserialized
187
+ # @return [Object] Deserialized data
188
+ def self._deserialize(type, value)
189
+ case type.to_sym
190
+ when :Time
191
+ Time.parse(value)
192
+ when :Date
193
+ Date.parse(value)
194
+ when :String
195
+ value.to_s
196
+ when :Integer
197
+ value.to_i
198
+ when :Float
199
+ value.to_f
200
+ when :Boolean
201
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
202
+ true
203
+ else
204
+ false
205
+ end
206
+ when :Object
207
+ # generic object (usually a Hash), return directly
208
+ value
209
+ when /\AArray<(?<inner_type>.+)>\z/
210
+ inner_type = Regexp.last_match[:inner_type]
211
+ value.map { |v| _deserialize(inner_type, v) }
212
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
213
+ k_type = Regexp.last_match[:k_type]
214
+ v_type = Regexp.last_match[:v_type]
215
+ {}.tap do |hash|
216
+ value.each do |k, v|
217
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
218
+ end
219
+ end
220
+ else # model
221
+ # models (e.g. Pet) or oneOf
222
+ klass = HatchetSdkRest.const_get(type)
223
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
224
+ end
225
+ end
226
+
227
+ # Returns the string representation of the object
228
+ # @return [String] String presentation of the object
229
+ def to_s
230
+ to_hash.to_s
231
+ end
232
+
233
+ # to_body is an alias to to_hash (backward compatibility)
234
+ # @return [Hash] Returns the object in the form of hash
235
+ def to_body
236
+ to_hash
237
+ end
238
+
239
+ # Returns the object in the form of hash
240
+ # @return [Hash] Returns the object in the form of hash
241
+ def to_hash
242
+ hash = {}
243
+ self.class.attribute_map.each_pair do |attr, param|
244
+ value = self.send(attr)
245
+ if value.nil?
246
+ is_nullable = self.class.openapi_nullable.include?(attr)
247
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
248
+ end
249
+
250
+ hash[param] = _to_hash(value)
251
+ end
252
+ hash
253
+ end
254
+
255
+ # Outputs non-array value in the form of hash
256
+ # For object, use to_hash. Otherwise, just return the value
257
+ # @param [Object] value Any valid value
258
+ # @return [Hash] Returns the value in the form of hash
259
+ def _to_hash(value)
260
+ if value.is_a?(Array)
261
+ value.compact.map { |v| _to_hash(v) }
262
+ elsif value.is_a?(Hash)
263
+ {}.tap do |hash|
264
+ value.each { |k, v| hash[k] = _to_hash(v) }
265
+ end
266
+ elsif value.respond_to? :to_hash
267
+ value.to_hash
268
+ else
269
+ value
270
+ end
271
+ end
272
+
273
+ end
274
+
275
+ end
@@ -0,0 +1,44 @@
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 V1ConcurrencyLimitStrategy
18
+ V1ConcurrencyLimitStrategyNone = "NONE".freeze
19
+ V1ConcurrencyLimitStrategyGroupRoundRobin = "GROUP_ROUND_ROBIN".freeze
20
+ V1ConcurrencyLimitStrategyCancelInProgress = "CANCEL_IN_PROGRESS".freeze
21
+ V1ConcurrencyLimitStrategyCancelNewest = "CANCEL_NEWEST".freeze
22
+ V1ConcurrencyLimitStrategyCancelQueuedExceptNewest = "CANCEL_QUEUED_EXCEPT_NEWEST".freeze
23
+ V1ConcurrencyLimitStrategyCancelQueuedExceptOldest = "CANCEL_QUEUED_EXCEPT_OLDEST".freeze
24
+
25
+ def self.all_vars
26
+ @all_vars ||= [V1ConcurrencyLimitStrategyNone, V1ConcurrencyLimitStrategyGroupRoundRobin, V1ConcurrencyLimitStrategyCancelInProgress, V1ConcurrencyLimitStrategyCancelNewest, V1ConcurrencyLimitStrategyCancelQueuedExceptNewest, V1ConcurrencyLimitStrategyCancelQueuedExceptOldest].freeze
27
+ end
28
+
29
+ # Builds the enum from string
30
+ # @param [String] The enum value in the form of the string
31
+ # @return [String] The enum value
32
+ def self.build_from_hash(value)
33
+ new.build_from_hash(value)
34
+ end
35
+
36
+ # Builds the enum from string
37
+ # @param [String] The enum value in the form of the string
38
+ # @return [String] The enum value
39
+ def build_from_hash(value)
40
+ return value if V1ConcurrencyLimitStrategy.all_vars.include?(value)
41
+ raise "Invalid ENUM value #{value} for class #V1ConcurrencyLimitStrategy"
42
+ end
43
+ end
44
+ 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 V1ConcurrencyScope
18
+ V1ConcurrencyScopeShared = "SHARED".freeze
19
+ V1ConcurrencyScopeWorkflow = "WORKFLOW".freeze
20
+ V1ConcurrencyScopeTask = "TASK".freeze
21
+
22
+ def self.all_vars
23
+ @all_vars ||= [V1ConcurrencyScopeShared, V1ConcurrencyScopeWorkflow, V1ConcurrencyScopeTask].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 V1ConcurrencyScope.all_vars.include?(value)
38
+ raise "Invalid ENUM value #{value} for class #V1ConcurrencyScope"
39
+ end
40
+ end
41
+ end