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