daytona_api_client 0.191.0 → 0.192.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.
@@ -0,0 +1,176 @@
1
+ =begin
2
+ #Daytona
3
+
4
+ #Daytona AI platform API Docs
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@daytona.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.21.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DaytonaApiClient
17
+ class ResolveSandboxSecrets200ResponseInner < ApiModelBase
18
+ attr_accessor :env
19
+
20
+ attr_accessor :placeholder
21
+
22
+ attr_accessor :value
23
+
24
+ attr_accessor :hosts
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'env' => :'env',
30
+ :'placeholder' => :'placeholder',
31
+ :'value' => :'value',
32
+ :'hosts' => :'hosts'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'env' => :'String',
50
+ :'placeholder' => :'String',
51
+ :'value' => :'String',
52
+ :'hosts' => :'Array<String>'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::ResolveSandboxSecrets200ResponseInner` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::ResolveSandboxSecrets200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'env')
79
+ self.env = attributes[:'env']
80
+ end
81
+
82
+ if attributes.key?(:'placeholder')
83
+ self.placeholder = attributes[:'placeholder']
84
+ end
85
+
86
+ if attributes.key?(:'value')
87
+ self.value = attributes[:'value']
88
+ end
89
+
90
+ if attributes.key?(:'hosts')
91
+ if (value = attributes[:'hosts']).is_a?(Array)
92
+ self.hosts = value
93
+ end
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
+ invalid_properties = Array.new
102
+ invalid_properties
103
+ end
104
+
105
+ # Check to see if the all the properties in the model are valid
106
+ # @return true if the model is valid
107
+ def valid?
108
+ warn '[DEPRECATED] the `valid?` method is obsolete'
109
+ true
110
+ end
111
+
112
+ # Checks equality by comparing each attribute.
113
+ # @param [Object] Object to be compared
114
+ def ==(o)
115
+ return true if self.equal?(o)
116
+ self.class == o.class &&
117
+ env == o.env &&
118
+ placeholder == o.placeholder &&
119
+ value == o.value &&
120
+ hosts == o.hosts
121
+ end
122
+
123
+ # @see the `==` method
124
+ # @param [Object] Object to be compared
125
+ def eql?(o)
126
+ self == o
127
+ end
128
+
129
+ # Calculates hash code according to all attributes.
130
+ # @return [Integer] Hash code
131
+ def hash
132
+ [env, placeholder, value, hosts].hash
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def self.build_from_hash(attributes)
139
+ return nil unless attributes.is_a?(Hash)
140
+ attributes = attributes.transform_keys(&:to_sym)
141
+ transformed_hash = {}
142
+ openapi_types.each_pair do |key, type|
143
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = nil
145
+ elsif type =~ /\AArray<(.*)>/i
146
+ # check to ensure the input is an array given that the attribute
147
+ # is documented as an array but the input is not
148
+ if attributes[attribute_map[key]].is_a?(Array)
149
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
150
+ end
151
+ elsif !attributes[attribute_map[key]].nil?
152
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
153
+ end
154
+ end
155
+ new(transformed_hash)
156
+ end
157
+
158
+ # Returns the object in the form of hash
159
+ # @return [Hash] Returns the object in the form of hash
160
+ def to_hash
161
+ hash = {}
162
+ self.class.attribute_map.each_pair do |attr, param|
163
+ value = self.send(attr)
164
+ if value.nil?
165
+ is_nullable = self.class.openapi_nullable.include?(attr)
166
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
167
+ end
168
+
169
+ hash[param] = _to_hash(value)
170
+ end
171
+ hash
172
+ end
173
+
174
+ end
175
+
176
+ end
@@ -0,0 +1,312 @@
1
+ =begin
2
+ #Daytona
3
+
4
+ #Daytona AI platform API Docs
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@daytona.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.21.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DaytonaApiClient
17
+ class Secret < ApiModelBase
18
+ # Secret ID
19
+ attr_accessor :id
20
+
21
+ # Secret name
22
+ attr_accessor :name
23
+
24
+ # Optional description of the secret
25
+ attr_accessor :description
26
+
27
+ # Creation timestamp
28
+ attr_accessor :created_at
29
+
30
+ # Opaque placeholder token injected as env var value in sandboxes
31
+ attr_accessor :placeholder
32
+
33
+ # Allowed hosts this secret may be sent to
34
+ attr_accessor :hosts
35
+
36
+ # Last update timestamp
37
+ attr_accessor :updated_at
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'id' => :'id',
43
+ :'name' => :'name',
44
+ :'description' => :'description',
45
+ :'created_at' => :'createdAt',
46
+ :'placeholder' => :'placeholder',
47
+ :'hosts' => :'hosts',
48
+ :'updated_at' => :'updatedAt'
49
+ }
50
+ end
51
+
52
+ # Returns attribute mapping this model knows about
53
+ def self.acceptable_attribute_map
54
+ attribute_map
55
+ end
56
+
57
+ # Returns all the JSON keys this model knows about
58
+ def self.acceptable_attributes
59
+ acceptable_attribute_map.values
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.openapi_types
64
+ {
65
+ :'id' => :'String',
66
+ :'name' => :'String',
67
+ :'description' => :'String',
68
+ :'created_at' => :'Time',
69
+ :'placeholder' => :'String',
70
+ :'hosts' => :'Array<String>',
71
+ :'updated_at' => :'Time'
72
+ }
73
+ end
74
+
75
+ # List of attributes with nullable: true
76
+ def self.openapi_nullable
77
+ Set.new([
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::Secret` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ acceptable_attribute_map = self.class.acceptable_attribute_map
90
+ attributes = attributes.each_with_object({}) { |(k, v), h|
91
+ if (!acceptable_attribute_map.key?(k.to_sym))
92
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::Secret`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
93
+ end
94
+ h[k.to_sym] = v
95
+ }
96
+
97
+ if attributes.key?(:'id')
98
+ self.id = attributes[:'id']
99
+ else
100
+ self.id = nil
101
+ end
102
+
103
+ if attributes.key?(:'name')
104
+ self.name = attributes[:'name']
105
+ else
106
+ self.name = nil
107
+ end
108
+
109
+ if attributes.key?(:'description')
110
+ self.description = attributes[:'description']
111
+ end
112
+
113
+ if attributes.key?(:'created_at')
114
+ self.created_at = attributes[:'created_at']
115
+ else
116
+ self.created_at = nil
117
+ end
118
+
119
+ if attributes.key?(:'placeholder')
120
+ self.placeholder = attributes[:'placeholder']
121
+ else
122
+ self.placeholder = nil
123
+ end
124
+
125
+ if attributes.key?(:'hosts')
126
+ if (value = attributes[:'hosts']).is_a?(Array)
127
+ self.hosts = value
128
+ end
129
+ else
130
+ self.hosts = nil
131
+ end
132
+
133
+ if attributes.key?(:'updated_at')
134
+ self.updated_at = attributes[:'updated_at']
135
+ else
136
+ self.updated_at = nil
137
+ end
138
+ end
139
+
140
+ # Show invalid properties with the reasons. Usually used together with valid?
141
+ # @return Array for valid properties with the reasons
142
+ def list_invalid_properties
143
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
144
+ invalid_properties = Array.new
145
+ if @id.nil?
146
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
147
+ end
148
+
149
+ if @name.nil?
150
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
151
+ end
152
+
153
+ if @created_at.nil?
154
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
155
+ end
156
+
157
+ if @placeholder.nil?
158
+ invalid_properties.push('invalid value for "placeholder", placeholder cannot be nil.')
159
+ end
160
+
161
+ if @hosts.nil?
162
+ invalid_properties.push('invalid value for "hosts", hosts cannot be nil.')
163
+ end
164
+
165
+ if @updated_at.nil?
166
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
167
+ end
168
+
169
+ invalid_properties
170
+ end
171
+
172
+ # Check to see if the all the properties in the model are valid
173
+ # @return true if the model is valid
174
+ def valid?
175
+ warn '[DEPRECATED] the `valid?` method is obsolete'
176
+ return false if @id.nil?
177
+ return false if @name.nil?
178
+ return false if @created_at.nil?
179
+ return false if @placeholder.nil?
180
+ return false if @hosts.nil?
181
+ return false if @updated_at.nil?
182
+ true
183
+ end
184
+
185
+ # Custom attribute writer method with validation
186
+ # @param [Object] id Value to be assigned
187
+ def id=(id)
188
+ if id.nil?
189
+ fail ArgumentError, 'id cannot be nil'
190
+ end
191
+
192
+ @id = id
193
+ end
194
+
195
+ # Custom attribute writer method with validation
196
+ # @param [Object] name Value to be assigned
197
+ def name=(name)
198
+ if name.nil?
199
+ fail ArgumentError, 'name cannot be nil'
200
+ end
201
+
202
+ @name = name
203
+ end
204
+
205
+ # Custom attribute writer method with validation
206
+ # @param [Object] created_at Value to be assigned
207
+ def created_at=(created_at)
208
+ if created_at.nil?
209
+ fail ArgumentError, 'created_at cannot be nil'
210
+ end
211
+
212
+ @created_at = created_at
213
+ end
214
+
215
+ # Custom attribute writer method with validation
216
+ # @param [Object] placeholder Value to be assigned
217
+ def placeholder=(placeholder)
218
+ if placeholder.nil?
219
+ fail ArgumentError, 'placeholder cannot be nil'
220
+ end
221
+
222
+ @placeholder = placeholder
223
+ end
224
+
225
+ # Custom attribute writer method with validation
226
+ # @param [Object] hosts Value to be assigned
227
+ def hosts=(hosts)
228
+ if hosts.nil?
229
+ fail ArgumentError, 'hosts cannot be nil'
230
+ end
231
+
232
+ @hosts = hosts
233
+ end
234
+
235
+ # Custom attribute writer method with validation
236
+ # @param [Object] updated_at Value to be assigned
237
+ def updated_at=(updated_at)
238
+ if updated_at.nil?
239
+ fail ArgumentError, 'updated_at cannot be nil'
240
+ end
241
+
242
+ @updated_at = updated_at
243
+ end
244
+
245
+ # Checks equality by comparing each attribute.
246
+ # @param [Object] Object to be compared
247
+ def ==(o)
248
+ return true if self.equal?(o)
249
+ self.class == o.class &&
250
+ id == o.id &&
251
+ name == o.name &&
252
+ description == o.description &&
253
+ created_at == o.created_at &&
254
+ placeholder == o.placeholder &&
255
+ hosts == o.hosts &&
256
+ updated_at == o.updated_at
257
+ end
258
+
259
+ # @see the `==` method
260
+ # @param [Object] Object to be compared
261
+ def eql?(o)
262
+ self == o
263
+ end
264
+
265
+ # Calculates hash code according to all attributes.
266
+ # @return [Integer] Hash code
267
+ def hash
268
+ [id, name, description, created_at, placeholder, hosts, updated_at].hash
269
+ end
270
+
271
+ # Builds the object from hash
272
+ # @param [Hash] attributes Model attributes in the form of hash
273
+ # @return [Object] Returns the model itself
274
+ def self.build_from_hash(attributes)
275
+ return nil unless attributes.is_a?(Hash)
276
+ attributes = attributes.transform_keys(&:to_sym)
277
+ transformed_hash = {}
278
+ openapi_types.each_pair do |key, type|
279
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
280
+ transformed_hash["#{key}"] = nil
281
+ elsif type =~ /\AArray<(.*)>/i
282
+ # check to ensure the input is an array given that the attribute
283
+ # is documented as an array but the input is not
284
+ if attributes[attribute_map[key]].is_a?(Array)
285
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
286
+ end
287
+ elsif !attributes[attribute_map[key]].nil?
288
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
289
+ end
290
+ end
291
+ new(transformed_hash)
292
+ end
293
+
294
+ # Returns the object in the form of hash
295
+ # @return [Hash] Returns the object in the form of hash
296
+ def to_hash
297
+ hash = {}
298
+ self.class.attribute_map.each_pair do |attr, param|
299
+ value = self.send(attr)
300
+ if value.nil?
301
+ is_nullable = self.class.openapi_nullable.include?(attr)
302
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
303
+ end
304
+
305
+ hash[param] = _to_hash(value)
306
+ end
307
+ hash
308
+ end
309
+
310
+ end
311
+
312
+ end
@@ -0,0 +1,182 @@
1
+ =begin
2
+ #Daytona
3
+
4
+ #Daytona AI platform API Docs
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@daytona.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.21.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DaytonaApiClient
17
+ class StringFilter < ApiModelBase
18
+ # Match values equal to this value.
19
+ attr_accessor :eq
20
+
21
+ # Match values not equal to this value.
22
+ attr_accessor :_not
23
+
24
+ # Match values present in this list. Accepts comma-separated values or repeated query parameters. Maximum 100 entries.
25
+ attr_accessor :_in
26
+
27
+ # Match values not present in this list. Accepts comma-separated values or repeated query parameters. Maximum 100 entries.
28
+ attr_accessor :not_in
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'eq' => :'eq',
34
+ :'_not' => :'not',
35
+ :'_in' => :'in',
36
+ :'not_in' => :'notIn'
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
+ :'eq' => :'String',
54
+ :'_not' => :'String',
55
+ :'_in' => :'Array<String>',
56
+ :'not_in' => :'Array<String>'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::StringFilter` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ acceptable_attribute_map = self.class.acceptable_attribute_map
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!acceptable_attribute_map.key?(k.to_sym))
77
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::StringFilter`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
78
+ end
79
+ h[k.to_sym] = v
80
+ }
81
+
82
+ if attributes.key?(:'eq')
83
+ self.eq = attributes[:'eq']
84
+ end
85
+
86
+ if attributes.key?(:'_not')
87
+ self._not = attributes[:'_not']
88
+ end
89
+
90
+ if attributes.key?(:'_in')
91
+ if (value = attributes[:'_in']).is_a?(Array)
92
+ self._in = value
93
+ end
94
+ end
95
+
96
+ if attributes.key?(:'not_in')
97
+ if (value = attributes[:'not_in']).is_a?(Array)
98
+ self.not_in = value
99
+ end
100
+ end
101
+ end
102
+
103
+ # Show invalid properties with the reasons. Usually used together with valid?
104
+ # @return Array for valid properties with the reasons
105
+ def list_invalid_properties
106
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
107
+ invalid_properties = Array.new
108
+ invalid_properties
109
+ end
110
+
111
+ # Check to see if the all the properties in the model are valid
112
+ # @return true if the model is valid
113
+ def valid?
114
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
+ true
116
+ end
117
+
118
+ # Checks equality by comparing each attribute.
119
+ # @param [Object] Object to be compared
120
+ def ==(o)
121
+ return true if self.equal?(o)
122
+ self.class == o.class &&
123
+ eq == o.eq &&
124
+ _not == o._not &&
125
+ _in == o._in &&
126
+ not_in == o.not_in
127
+ end
128
+
129
+ # @see the `==` method
130
+ # @param [Object] Object to be compared
131
+ def eql?(o)
132
+ self == o
133
+ end
134
+
135
+ # Calculates hash code according to all attributes.
136
+ # @return [Integer] Hash code
137
+ def hash
138
+ [eq, _not, _in, not_in].hash
139
+ end
140
+
141
+ # Builds the object from hash
142
+ # @param [Hash] attributes Model attributes in the form of hash
143
+ # @return [Object] Returns the model itself
144
+ def self.build_from_hash(attributes)
145
+ return nil unless attributes.is_a?(Hash)
146
+ attributes = attributes.transform_keys(&:to_sym)
147
+ transformed_hash = {}
148
+ openapi_types.each_pair do |key, type|
149
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
150
+ transformed_hash["#{key}"] = nil
151
+ elsif type =~ /\AArray<(.*)>/i
152
+ # check to ensure the input is an array given that the attribute
153
+ # is documented as an array but the input is not
154
+ if attributes[attribute_map[key]].is_a?(Array)
155
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
156
+ end
157
+ elsif !attributes[attribute_map[key]].nil?
158
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
159
+ end
160
+ end
161
+ new(transformed_hash)
162
+ end
163
+
164
+ # Returns the object in the form of hash
165
+ # @return [Hash] Returns the object in the form of hash
166
+ def to_hash
167
+ hash = {}
168
+ self.class.attribute_map.each_pair do |attr, param|
169
+ value = self.send(attr)
170
+ if value.nil?
171
+ is_nullable = self.class.openapi_nullable.include?(attr)
172
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
173
+ end
174
+
175
+ hash[param] = _to_hash(value)
176
+ end
177
+ hash
178
+ end
179
+
180
+ end
181
+
182
+ end