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