daytona_toolbox_api_client 0.164.0 → 0.167.0.alpha.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.
@@ -0,0 +1,368 @@
1
+ =begin
2
+ #Daytona Toolbox API
3
+
4
+ #Daytona Toolbox API
5
+
6
+ The version of the OpenAPI document: v0.0.0-dev
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.12.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DaytonaToolboxApiClient
17
+ class ChartElement
18
+ attr_accessor :angle
19
+
20
+ attr_accessor :first_quartile
21
+
22
+ attr_accessor :group
23
+
24
+ attr_accessor :label
25
+
26
+ attr_accessor :max
27
+
28
+ attr_accessor :median
29
+
30
+ attr_accessor :min
31
+
32
+ attr_accessor :outliers
33
+
34
+ attr_accessor :png
35
+
36
+ attr_accessor :points
37
+
38
+ attr_accessor :radius
39
+
40
+ attr_accessor :third_quartile
41
+
42
+ attr_accessor :title
43
+
44
+ attr_accessor :type
45
+
46
+ attr_accessor :value
47
+
48
+ attr_accessor :x_label
49
+
50
+ attr_accessor :y_label
51
+
52
+ # Attribute mapping from ruby-style variable name to JSON key.
53
+ def self.attribute_map
54
+ {
55
+ :'angle' => :'angle',
56
+ :'first_quartile' => :'first_quartile',
57
+ :'group' => :'group',
58
+ :'label' => :'label',
59
+ :'max' => :'max',
60
+ :'median' => :'median',
61
+ :'min' => :'min',
62
+ :'outliers' => :'outliers',
63
+ :'png' => :'png',
64
+ :'points' => :'points',
65
+ :'radius' => :'radius',
66
+ :'third_quartile' => :'third_quartile',
67
+ :'title' => :'title',
68
+ :'type' => :'type',
69
+ :'value' => :'value',
70
+ :'x_label' => :'x_label',
71
+ :'y_label' => :'y_label'
72
+ }
73
+ end
74
+
75
+ # Returns attribute mapping this model knows about
76
+ def self.acceptable_attribute_map
77
+ attribute_map
78
+ end
79
+
80
+ # Returns all the JSON keys this model knows about
81
+ def self.acceptable_attributes
82
+ acceptable_attribute_map.values
83
+ end
84
+
85
+ # Attribute type mapping.
86
+ def self.openapi_types
87
+ {
88
+ :'angle' => :'Float',
89
+ :'first_quartile' => :'Float',
90
+ :'group' => :'String',
91
+ :'label' => :'String',
92
+ :'max' => :'Float',
93
+ :'median' => :'Float',
94
+ :'min' => :'Float',
95
+ :'outliers' => :'Array<Float>',
96
+ :'png' => :'String',
97
+ :'points' => :'Array<Array<Float>>',
98
+ :'radius' => :'Float',
99
+ :'third_quartile' => :'Float',
100
+ :'title' => :'String',
101
+ :'type' => :'String',
102
+ :'value' => :'String',
103
+ :'x_label' => :'String',
104
+ :'y_label' => :'String'
105
+ }
106
+ end
107
+
108
+ # List of attributes with nullable: true
109
+ def self.openapi_nullable
110
+ Set.new([
111
+ ])
112
+ end
113
+
114
+ # Initializes the object
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ def initialize(attributes = {})
117
+ if (!attributes.is_a?(Hash))
118
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaToolboxApiClient::ChartElement` initialize method"
119
+ end
120
+
121
+ # check to see if the attribute exists and convert string to symbol for hash key
122
+ acceptable_attribute_map = self.class.acceptable_attribute_map
123
+ attributes = attributes.each_with_object({}) { |(k, v), h|
124
+ if (!acceptable_attribute_map.key?(k.to_sym))
125
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaToolboxApiClient::ChartElement`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
126
+ end
127
+ h[k.to_sym] = v
128
+ }
129
+
130
+ if attributes.key?(:'angle')
131
+ self.angle = attributes[:'angle']
132
+ end
133
+
134
+ if attributes.key?(:'first_quartile')
135
+ self.first_quartile = attributes[:'first_quartile']
136
+ end
137
+
138
+ if attributes.key?(:'group')
139
+ self.group = attributes[:'group']
140
+ end
141
+
142
+ if attributes.key?(:'label')
143
+ self.label = attributes[:'label']
144
+ end
145
+
146
+ if attributes.key?(:'max')
147
+ self.max = attributes[:'max']
148
+ end
149
+
150
+ if attributes.key?(:'median')
151
+ self.median = attributes[:'median']
152
+ end
153
+
154
+ if attributes.key?(:'min')
155
+ self.min = attributes[:'min']
156
+ end
157
+
158
+ if attributes.key?(:'outliers')
159
+ if (value = attributes[:'outliers']).is_a?(Array)
160
+ self.outliers = value
161
+ end
162
+ end
163
+
164
+ if attributes.key?(:'png')
165
+ self.png = attributes[:'png']
166
+ end
167
+
168
+ if attributes.key?(:'points')
169
+ if (value = attributes[:'points']).is_a?(Array)
170
+ self.points = value
171
+ end
172
+ end
173
+
174
+ if attributes.key?(:'radius')
175
+ self.radius = attributes[:'radius']
176
+ end
177
+
178
+ if attributes.key?(:'third_quartile')
179
+ self.third_quartile = attributes[:'third_quartile']
180
+ end
181
+
182
+ if attributes.key?(:'title')
183
+ self.title = attributes[:'title']
184
+ end
185
+
186
+ if attributes.key?(:'type')
187
+ self.type = attributes[:'type']
188
+ end
189
+
190
+ if attributes.key?(:'value')
191
+ self.value = attributes[:'value']
192
+ end
193
+
194
+ if attributes.key?(:'x_label')
195
+ self.x_label = attributes[:'x_label']
196
+ end
197
+
198
+ if attributes.key?(:'y_label')
199
+ self.y_label = attributes[:'y_label']
200
+ end
201
+ end
202
+
203
+ # Show invalid properties with the reasons. Usually used together with valid?
204
+ # @return Array for valid properties with the reasons
205
+ def list_invalid_properties
206
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
207
+ invalid_properties = Array.new
208
+ invalid_properties
209
+ end
210
+
211
+ # Check to see if the all the properties in the model are valid
212
+ # @return true if the model is valid
213
+ def valid?
214
+ warn '[DEPRECATED] the `valid?` method is obsolete'
215
+ true
216
+ end
217
+
218
+ # Checks equality by comparing each attribute.
219
+ # @param [Object] Object to be compared
220
+ def ==(o)
221
+ return true if self.equal?(o)
222
+ self.class == o.class &&
223
+ angle == o.angle &&
224
+ first_quartile == o.first_quartile &&
225
+ group == o.group &&
226
+ label == o.label &&
227
+ max == o.max &&
228
+ median == o.median &&
229
+ min == o.min &&
230
+ outliers == o.outliers &&
231
+ png == o.png &&
232
+ points == o.points &&
233
+ radius == o.radius &&
234
+ third_quartile == o.third_quartile &&
235
+ title == o.title &&
236
+ type == o.type &&
237
+ value == o.value &&
238
+ x_label == o.x_label &&
239
+ y_label == o.y_label
240
+ end
241
+
242
+ # @see the `==` method
243
+ # @param [Object] Object to be compared
244
+ def eql?(o)
245
+ self == o
246
+ end
247
+
248
+ # Calculates hash code according to all attributes.
249
+ # @return [Integer] Hash code
250
+ def hash
251
+ [angle, first_quartile, group, label, max, median, min, outliers, png, points, radius, third_quartile, title, type, value, x_label, y_label].hash
252
+ end
253
+
254
+ # Builds the object from hash
255
+ # @param [Hash] attributes Model attributes in the form of hash
256
+ # @return [Object] Returns the model itself
257
+ def self.build_from_hash(attributes)
258
+ return nil unless attributes.is_a?(Hash)
259
+ attributes = attributes.transform_keys(&:to_sym)
260
+ transformed_hash = {}
261
+ openapi_types.each_pair do |key, type|
262
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
263
+ transformed_hash["#{key}"] = nil
264
+ elsif type =~ /\AArray<(.*)>/i
265
+ # check to ensure the input is an array given that the attribute
266
+ # is documented as an array but the input is not
267
+ if attributes[attribute_map[key]].is_a?(Array)
268
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
269
+ end
270
+ elsif !attributes[attribute_map[key]].nil?
271
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
272
+ end
273
+ end
274
+ new(transformed_hash)
275
+ end
276
+
277
+ # Deserializes the data based on type
278
+ # @param string type Data type
279
+ # @param string value Value to be deserialized
280
+ # @return [Object] Deserialized data
281
+ def self._deserialize(type, value)
282
+ case type.to_sym
283
+ when :Time
284
+ Time.parse(value)
285
+ when :Date
286
+ Date.parse(value)
287
+ when :String
288
+ value.to_s
289
+ when :Integer
290
+ value.to_i
291
+ when :Float
292
+ value.to_f
293
+ when :Boolean
294
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
295
+ true
296
+ else
297
+ false
298
+ end
299
+ when :Object
300
+ # generic object (usually a Hash), return directly
301
+ value
302
+ when /\AArray<(?<inner_type>.+)>\z/
303
+ inner_type = Regexp.last_match[:inner_type]
304
+ value.map { |v| _deserialize(inner_type, v) }
305
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
306
+ k_type = Regexp.last_match[:k_type]
307
+ v_type = Regexp.last_match[:v_type]
308
+ {}.tap do |hash|
309
+ value.each do |k, v|
310
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
311
+ end
312
+ end
313
+ else # model
314
+ # models (e.g. Pet) or oneOf
315
+ klass = DaytonaToolboxApiClient.const_get(type)
316
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
317
+ end
318
+ end
319
+
320
+ # Returns the string representation of the object
321
+ # @return [String] String presentation of the object
322
+ def to_s
323
+ to_hash.to_s
324
+ end
325
+
326
+ # to_body is an alias to to_hash (backward compatibility)
327
+ # @return [Hash] Returns the object in the form of hash
328
+ def to_body
329
+ to_hash
330
+ end
331
+
332
+ # Returns the object in the form of hash
333
+ # @return [Hash] Returns the object in the form of hash
334
+ def to_hash
335
+ hash = {}
336
+ self.class.attribute_map.each_pair do |attr, param|
337
+ value = self.send(attr)
338
+ if value.nil?
339
+ is_nullable = self.class.openapi_nullable.include?(attr)
340
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
341
+ end
342
+
343
+ hash[param] = _to_hash(value)
344
+ end
345
+ hash
346
+ end
347
+
348
+ # Outputs non-array value in the form of hash
349
+ # For object, use to_hash. Otherwise, just return the value
350
+ # @param [Object] value Any valid value
351
+ # @return [Hash] Returns the value in the form of hash
352
+ def _to_hash(value)
353
+ if value.is_a?(Array)
354
+ value.compact.map { |v| _to_hash(v) }
355
+ elsif value.is_a?(Hash)
356
+ {}.tap do |hash|
357
+ value.each { |k, v| hash[k] = _to_hash(v) }
358
+ end
359
+ elsif value.respond_to? :to_hash
360
+ value.to_hash
361
+ else
362
+ value
363
+ end
364
+ end
365
+
366
+ end
367
+
368
+ end
@@ -0,0 +1,222 @@
1
+ =begin
2
+ #Daytona Toolbox API
3
+
4
+ #Daytona Toolbox API
5
+
6
+ The version of the OpenAPI document: v0.0.0-dev
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.12.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DaytonaToolboxApiClient
17
+ class CodeRunArtifacts
18
+ attr_accessor :charts
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'charts' => :'charts'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'charts' => :'Array<Chart>'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaToolboxApiClient::CodeRunArtifacts` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaToolboxApiClient::CodeRunArtifacts`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'charts')
67
+ if (value = attributes[:'charts']).is_a?(Array)
68
+ self.charts = value
69
+ end
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ invalid_properties
79
+ end
80
+
81
+ # Check to see if the all the properties in the model are valid
82
+ # @return true if the model is valid
83
+ def valid?
84
+ warn '[DEPRECATED] the `valid?` method is obsolete'
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ charts == o.charts
94
+ end
95
+
96
+ # @see the `==` method
97
+ # @param [Object] Object to be compared
98
+ def eql?(o)
99
+ self == o
100
+ end
101
+
102
+ # Calculates hash code according to all attributes.
103
+ # @return [Integer] Hash code
104
+ def hash
105
+ [charts].hash
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def self.build_from_hash(attributes)
112
+ return nil unless attributes.is_a?(Hash)
113
+ attributes = attributes.transform_keys(&:to_sym)
114
+ transformed_hash = {}
115
+ openapi_types.each_pair do |key, type|
116
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
117
+ transformed_hash["#{key}"] = nil
118
+ elsif type =~ /\AArray<(.*)>/i
119
+ # check to ensure the input is an array given that the attribute
120
+ # is documented as an array but the input is not
121
+ if attributes[attribute_map[key]].is_a?(Array)
122
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
123
+ end
124
+ elsif !attributes[attribute_map[key]].nil?
125
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
126
+ end
127
+ end
128
+ new(transformed_hash)
129
+ end
130
+
131
+ # Deserializes the data based on type
132
+ # @param string type Data type
133
+ # @param string value Value to be deserialized
134
+ # @return [Object] Deserialized data
135
+ def self._deserialize(type, value)
136
+ case type.to_sym
137
+ when :Time
138
+ Time.parse(value)
139
+ when :Date
140
+ Date.parse(value)
141
+ when :String
142
+ value.to_s
143
+ when :Integer
144
+ value.to_i
145
+ when :Float
146
+ value.to_f
147
+ when :Boolean
148
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
149
+ true
150
+ else
151
+ false
152
+ end
153
+ when :Object
154
+ # generic object (usually a Hash), return directly
155
+ value
156
+ when /\AArray<(?<inner_type>.+)>\z/
157
+ inner_type = Regexp.last_match[:inner_type]
158
+ value.map { |v| _deserialize(inner_type, v) }
159
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
160
+ k_type = Regexp.last_match[:k_type]
161
+ v_type = Regexp.last_match[:v_type]
162
+ {}.tap do |hash|
163
+ value.each do |k, v|
164
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
165
+ end
166
+ end
167
+ else # model
168
+ # models (e.g. Pet) or oneOf
169
+ klass = DaytonaToolboxApiClient.const_get(type)
170
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
171
+ end
172
+ end
173
+
174
+ # Returns the string representation of the object
175
+ # @return [String] String presentation of the object
176
+ def to_s
177
+ to_hash.to_s
178
+ end
179
+
180
+ # to_body is an alias to to_hash (backward compatibility)
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_body
183
+ to_hash
184
+ end
185
+
186
+ # Returns the object in the form of hash
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_hash
189
+ hash = {}
190
+ self.class.attribute_map.each_pair do |attr, param|
191
+ value = self.send(attr)
192
+ if value.nil?
193
+ is_nullable = self.class.openapi_nullable.include?(attr)
194
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
195
+ end
196
+
197
+ hash[param] = _to_hash(value)
198
+ end
199
+ hash
200
+ end
201
+
202
+ # Outputs non-array value in the form of hash
203
+ # For object, use to_hash. Otherwise, just return the value
204
+ # @param [Object] value Any valid value
205
+ # @return [Hash] Returns the value in the form of hash
206
+ def _to_hash(value)
207
+ if value.is_a?(Array)
208
+ value.compact.map { |v| _to_hash(v) }
209
+ elsif value.is_a?(Hash)
210
+ {}.tap do |hash|
211
+ value.each { |k, v| hash[k] = _to_hash(v) }
212
+ end
213
+ elsif value.respond_to? :to_hash
214
+ value.to_hash
215
+ else
216
+ value
217
+ end
218
+ end
219
+
220
+ end
221
+
222
+ end