daytona_api_client 0.190.1 → 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,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
@@ -42,6 +42,9 @@ module DaytonaApiClient
42
42
  # Time in minutes before an unused snapshot is deactivated
43
43
  attr_accessor :snapshot_deactivation_timeout_minutes
44
44
 
45
+ # Maximum number of snapshots an organization can process (building or pulling) concurrently. Excess are queued. <= 0 means unlimited.
46
+ attr_accessor :max_concurrent_snapshot_processing
47
+
45
48
  # Attribute mapping from ruby-style variable name to JSON key.
46
49
  def self.attribute_map
47
50
  {
@@ -57,7 +60,8 @@ module DaytonaApiClient
57
60
  :'authenticated_rate_limit_ttl_seconds' => :'authenticatedRateLimitTtlSeconds',
58
61
  :'sandbox_create_rate_limit_ttl_seconds' => :'sandboxCreateRateLimitTtlSeconds',
59
62
  :'sandbox_lifecycle_rate_limit_ttl_seconds' => :'sandboxLifecycleRateLimitTtlSeconds',
60
- :'snapshot_deactivation_timeout_minutes' => :'snapshotDeactivationTimeoutMinutes'
63
+ :'snapshot_deactivation_timeout_minutes' => :'snapshotDeactivationTimeoutMinutes',
64
+ :'max_concurrent_snapshot_processing' => :'maxConcurrentSnapshotProcessing'
61
65
  }
62
66
  end
63
67
 
@@ -86,7 +90,8 @@ module DaytonaApiClient
86
90
  :'authenticated_rate_limit_ttl_seconds' => :'Float',
87
91
  :'sandbox_create_rate_limit_ttl_seconds' => :'Float',
88
92
  :'sandbox_lifecycle_rate_limit_ttl_seconds' => :'Float',
89
- :'snapshot_deactivation_timeout_minutes' => :'Float'
93
+ :'snapshot_deactivation_timeout_minutes' => :'Float',
94
+ :'max_concurrent_snapshot_processing' => :'Float'
90
95
  }
91
96
  end
92
97
 
@@ -105,7 +110,8 @@ module DaytonaApiClient
105
110
  :'authenticated_rate_limit_ttl_seconds',
106
111
  :'sandbox_create_rate_limit_ttl_seconds',
107
112
  :'sandbox_lifecycle_rate_limit_ttl_seconds',
108
- :'snapshot_deactivation_timeout_minutes'
113
+ :'snapshot_deactivation_timeout_minutes',
114
+ :'max_concurrent_snapshot_processing'
109
115
  ])
110
116
  end
111
117
 
@@ -202,6 +208,12 @@ module DaytonaApiClient
202
208
  else
203
209
  self.snapshot_deactivation_timeout_minutes = nil
204
210
  end
211
+
212
+ if attributes.key?(:'max_concurrent_snapshot_processing')
213
+ self.max_concurrent_snapshot_processing = attributes[:'max_concurrent_snapshot_processing']
214
+ else
215
+ self.max_concurrent_snapshot_processing = nil
216
+ end
205
217
  end
206
218
 
207
219
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -236,7 +248,8 @@ module DaytonaApiClient
236
248
  authenticated_rate_limit_ttl_seconds == o.authenticated_rate_limit_ttl_seconds &&
237
249
  sandbox_create_rate_limit_ttl_seconds == o.sandbox_create_rate_limit_ttl_seconds &&
238
250
  sandbox_lifecycle_rate_limit_ttl_seconds == o.sandbox_lifecycle_rate_limit_ttl_seconds &&
239
- snapshot_deactivation_timeout_minutes == o.snapshot_deactivation_timeout_minutes
251
+ snapshot_deactivation_timeout_minutes == o.snapshot_deactivation_timeout_minutes &&
252
+ max_concurrent_snapshot_processing == o.max_concurrent_snapshot_processing
240
253
  end
241
254
 
242
255
  # @see the `==` method
@@ -248,7 +261,7 @@ module DaytonaApiClient
248
261
  # Calculates hash code according to all attributes.
249
262
  # @return [Integer] Hash code
250
263
  def hash
251
- [max_cpu_per_sandbox, max_memory_per_sandbox, max_disk_per_sandbox, snapshot_quota, max_snapshot_size, volume_quota, authenticated_rate_limit, sandbox_create_rate_limit, sandbox_lifecycle_rate_limit, authenticated_rate_limit_ttl_seconds, sandbox_create_rate_limit_ttl_seconds, sandbox_lifecycle_rate_limit_ttl_seconds, snapshot_deactivation_timeout_minutes].hash
264
+ [max_cpu_per_sandbox, max_memory_per_sandbox, max_disk_per_sandbox, snapshot_quota, max_snapshot_size, volume_quota, authenticated_rate_limit, sandbox_create_rate_limit, sandbox_lifecycle_rate_limit, authenticated_rate_limit_ttl_seconds, sandbox_create_rate_limit_ttl_seconds, sandbox_lifecycle_rate_limit_ttl_seconds, snapshot_deactivation_timeout_minutes, max_concurrent_snapshot_processing].hash
252
265
  end
253
266
 
254
267
  # Builds the object from hash