daytona_api_client 0.216.0 → 0.217.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.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +15 -16
  3. data/lib/daytona_api_client/api/organizations_api.rb +260 -484
  4. data/lib/daytona_api_client/api/sandbox_api.rb +14 -163
  5. data/lib/daytona_api_client/api/users_api.rb +82 -90
  6. data/lib/daytona_api_client/models/account_provider.rb +48 -19
  7. data/lib/daytona_api_client/models/api_key_list.rb +14 -4
  8. data/lib/daytona_api_client/models/create_runner.rb +37 -4
  9. data/lib/daytona_api_client/models/create_runner_sandbox_class.rb +42 -0
  10. data/lib/daytona_api_client/models/daytona_configuration.rb +45 -1
  11. data/lib/daytona_api_client/models/{organization_preview_warning.rb → generate_workos_admin_portal_link.rb} +42 -20
  12. data/lib/daytona_api_client/models/{send_webhook_dto.rb → gpu_capacity.rb} +77 -43
  13. data/lib/daytona_api_client/models/{organization_sso_enabled.rb → gpu_capacity_response.rb} +48 -20
  14. data/lib/daytona_api_client/models/gpu_type.rb +2 -1
  15. data/lib/daytona_api_client/models/oidc_config.rb +65 -4
  16. data/lib/daytona_api_client/models/organization.rb +38 -1
  17. data/lib/daytona_api_client/models/sandbox_created_webhook.rb +349 -0
  18. data/lib/daytona_api_client/models/{organization_sandbox_default_limited_network_egress.rb → sandbox_identity.rb} +47 -20
  19. data/lib/daytona_api_client/models/sandbox_state_updated_webhook.rb +349 -0
  20. data/lib/daytona_api_client/models/snapshot_created_webhook.rb +349 -0
  21. data/lib/daytona_api_client/models/{create_user.rb → snapshot_removed_webhook.rb} +119 -71
  22. data/lib/daytona_api_client/models/snapshot_state_updated_webhook.rb +376 -0
  23. data/lib/daytona_api_client/models/user.rb +11 -1
  24. data/lib/daytona_api_client/models/volume_created_webhook.rb +349 -0
  25. data/lib/daytona_api_client/models/volume_state_updated_webhook.rb +376 -0
  26. data/lib/daytona_api_client/models/workos_admin_portal_intent.rb +41 -0
  27. data/lib/daytona_api_client/models/{set_snapshot_general_status_dto.rb → workos_admin_portal_link.rb} +20 -20
  28. data/lib/daytona_api_client/models/{admin_create_runner.rb → workos_sso_connection.rb} +123 -120
  29. data/lib/daytona_api_client/version.rb +1 -1
  30. data/lib/daytona_api_client.rb +15 -16
  31. metadata +16 -17
  32. data/lib/daytona_api_client/api/admin_api.rb +0 -1618
  33. data/lib/daytona_api_client/models/admin_create_organization.rb +0 -219
  34. data/lib/daytona_api_client/models/admin_get_webhook_status200_response.rb +0 -147
  35. data/lib/daytona_api_client/models/create_organization_quota.rb +0 -238
  36. data/lib/daytona_api_client/models/create_organization_region_quota.rb +0 -386
  37. data/lib/daytona_api_client/models/organization_suspension.rb +0 -221
  38. data/lib/daytona_api_client/models/paginated_sandboxes_deprecated.rb +0 -244
  39. data/lib/daytona_api_client/models/update_organization_quota.rb +0 -333
  40. data/lib/daytona_api_client/models/update_organization_region_quota.rb +0 -313
@@ -0,0 +1,376 @@
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 VolumeStateUpdatedWebhook < ApiModelBase
18
+ # Event type identifier
19
+ attr_accessor :event
20
+
21
+ # Timestamp when the event occurred
22
+ attr_accessor :timestamp
23
+
24
+ # Volume ID
25
+ attr_accessor :id
26
+
27
+ # Volume name
28
+ attr_accessor :name
29
+
30
+ # Organization ID
31
+ attr_accessor :organization_id
32
+
33
+ # Previous state
34
+ attr_accessor :old_state
35
+
36
+ # New state
37
+ attr_accessor :new_state
38
+
39
+ # When the volume was last updated
40
+ attr_accessor :updated_at
41
+
42
+ class EnumAttributeValidator
43
+ attr_reader :datatype
44
+ attr_reader :allowable_values
45
+
46
+ def initialize(datatype, allowable_values)
47
+ @allowable_values = allowable_values.map do |value|
48
+ case datatype.to_s
49
+ when /Integer/i
50
+ value.to_i
51
+ when /Float/i
52
+ value.to_f
53
+ else
54
+ value
55
+ end
56
+ end
57
+ end
58
+
59
+ def valid?(value)
60
+ !value || allowable_values.include?(value)
61
+ end
62
+ end
63
+
64
+ # Attribute mapping from ruby-style variable name to JSON key.
65
+ def self.attribute_map
66
+ {
67
+ :'event' => :'event',
68
+ :'timestamp' => :'timestamp',
69
+ :'id' => :'id',
70
+ :'name' => :'name',
71
+ :'organization_id' => :'organizationId',
72
+ :'old_state' => :'oldState',
73
+ :'new_state' => :'newState',
74
+ :'updated_at' => :'updatedAt'
75
+ }
76
+ end
77
+
78
+ # Returns attribute mapping this model knows about
79
+ def self.acceptable_attribute_map
80
+ attribute_map
81
+ end
82
+
83
+ # Returns all the JSON keys this model knows about
84
+ def self.acceptable_attributes
85
+ acceptable_attribute_map.values
86
+ end
87
+
88
+ # Attribute type mapping.
89
+ def self.openapi_types
90
+ {
91
+ :'event' => :'WebhookEvent',
92
+ :'timestamp' => :'Time',
93
+ :'id' => :'String',
94
+ :'name' => :'String',
95
+ :'organization_id' => :'String',
96
+ :'old_state' => :'VolumeState',
97
+ :'new_state' => :'VolumeState',
98
+ :'updated_at' => :'Time'
99
+ }
100
+ end
101
+
102
+ # List of attributes with nullable: true
103
+ def self.openapi_nullable
104
+ Set.new([
105
+ ])
106
+ end
107
+
108
+ # Initializes the object
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ def initialize(attributes = {})
111
+ if (!attributes.is_a?(Hash))
112
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::VolumeStateUpdatedWebhook` initialize method"
113
+ end
114
+
115
+ # check to see if the attribute exists and convert string to symbol for hash key
116
+ acceptable_attribute_map = self.class.acceptable_attribute_map
117
+ attributes = attributes.each_with_object({}) { |(k, v), h|
118
+ if (!acceptable_attribute_map.key?(k.to_sym))
119
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::VolumeStateUpdatedWebhook`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
120
+ end
121
+ h[k.to_sym] = v
122
+ }
123
+
124
+ if attributes.key?(:'event')
125
+ self.event = attributes[:'event']
126
+ else
127
+ self.event = nil
128
+ end
129
+
130
+ if attributes.key?(:'timestamp')
131
+ self.timestamp = attributes[:'timestamp']
132
+ else
133
+ self.timestamp = nil
134
+ end
135
+
136
+ if attributes.key?(:'id')
137
+ self.id = attributes[:'id']
138
+ else
139
+ self.id = nil
140
+ end
141
+
142
+ if attributes.key?(:'name')
143
+ self.name = attributes[:'name']
144
+ else
145
+ self.name = nil
146
+ end
147
+
148
+ if attributes.key?(:'organization_id')
149
+ self.organization_id = attributes[:'organization_id']
150
+ else
151
+ self.organization_id = nil
152
+ end
153
+
154
+ if attributes.key?(:'old_state')
155
+ self.old_state = attributes[:'old_state']
156
+ else
157
+ self.old_state = nil
158
+ end
159
+
160
+ if attributes.key?(:'new_state')
161
+ self.new_state = attributes[:'new_state']
162
+ else
163
+ self.new_state = nil
164
+ end
165
+
166
+ if attributes.key?(:'updated_at')
167
+ self.updated_at = attributes[:'updated_at']
168
+ else
169
+ self.updated_at = nil
170
+ end
171
+ end
172
+
173
+ # Show invalid properties with the reasons. Usually used together with valid?
174
+ # @return Array for valid properties with the reasons
175
+ def list_invalid_properties
176
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
177
+ invalid_properties = Array.new
178
+ if @event.nil?
179
+ invalid_properties.push('invalid value for "event", event cannot be nil.')
180
+ end
181
+
182
+ if @timestamp.nil?
183
+ invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
184
+ end
185
+
186
+ if @id.nil?
187
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
188
+ end
189
+
190
+ if @name.nil?
191
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
192
+ end
193
+
194
+ if @organization_id.nil?
195
+ invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
196
+ end
197
+
198
+ if @old_state.nil?
199
+ invalid_properties.push('invalid value for "old_state", old_state cannot be nil.')
200
+ end
201
+
202
+ if @new_state.nil?
203
+ invalid_properties.push('invalid value for "new_state", new_state cannot be nil.')
204
+ end
205
+
206
+ if @updated_at.nil?
207
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
208
+ end
209
+
210
+ invalid_properties
211
+ end
212
+
213
+ # Check to see if the all the properties in the model are valid
214
+ # @return true if the model is valid
215
+ def valid?
216
+ warn '[DEPRECATED] the `valid?` method is obsolete'
217
+ return false if @event.nil?
218
+ return false if @timestamp.nil?
219
+ return false if @id.nil?
220
+ return false if @name.nil?
221
+ return false if @organization_id.nil?
222
+ return false if @old_state.nil?
223
+ return false if @new_state.nil?
224
+ return false if @updated_at.nil?
225
+ true
226
+ end
227
+
228
+ # Custom attribute writer method with validation
229
+ # @param [Object] event Value to be assigned
230
+ def event=(event)
231
+ if event.nil?
232
+ fail ArgumentError, 'event cannot be nil'
233
+ end
234
+
235
+ @event = event
236
+ end
237
+
238
+ # Custom attribute writer method with validation
239
+ # @param [Object] timestamp Value to be assigned
240
+ def timestamp=(timestamp)
241
+ if timestamp.nil?
242
+ fail ArgumentError, 'timestamp cannot be nil'
243
+ end
244
+
245
+ @timestamp = timestamp
246
+ end
247
+
248
+ # Custom attribute writer method with validation
249
+ # @param [Object] id Value to be assigned
250
+ def id=(id)
251
+ if id.nil?
252
+ fail ArgumentError, 'id cannot be nil'
253
+ end
254
+
255
+ @id = id
256
+ end
257
+
258
+ # Custom attribute writer method with validation
259
+ # @param [Object] name Value to be assigned
260
+ def name=(name)
261
+ if name.nil?
262
+ fail ArgumentError, 'name cannot be nil'
263
+ end
264
+
265
+ @name = name
266
+ end
267
+
268
+ # Custom attribute writer method with validation
269
+ # @param [Object] organization_id Value to be assigned
270
+ def organization_id=(organization_id)
271
+ if organization_id.nil?
272
+ fail ArgumentError, 'organization_id cannot be nil'
273
+ end
274
+
275
+ @organization_id = organization_id
276
+ end
277
+
278
+ # Custom attribute writer method with validation
279
+ # @param [Object] old_state Value to be assigned
280
+ def old_state=(old_state)
281
+ if old_state.nil?
282
+ fail ArgumentError, 'old_state cannot be nil'
283
+ end
284
+
285
+ @old_state = old_state
286
+ end
287
+
288
+ # Custom attribute writer method with validation
289
+ # @param [Object] new_state Value to be assigned
290
+ def new_state=(new_state)
291
+ if new_state.nil?
292
+ fail ArgumentError, 'new_state cannot be nil'
293
+ end
294
+
295
+ @new_state = new_state
296
+ end
297
+
298
+ # Custom attribute writer method with validation
299
+ # @param [Object] updated_at Value to be assigned
300
+ def updated_at=(updated_at)
301
+ if updated_at.nil?
302
+ fail ArgumentError, 'updated_at cannot be nil'
303
+ end
304
+
305
+ @updated_at = updated_at
306
+ end
307
+
308
+ # Checks equality by comparing each attribute.
309
+ # @param [Object] Object to be compared
310
+ def ==(o)
311
+ return true if self.equal?(o)
312
+ self.class == o.class &&
313
+ event == o.event &&
314
+ timestamp == o.timestamp &&
315
+ id == o.id &&
316
+ name == o.name &&
317
+ organization_id == o.organization_id &&
318
+ old_state == o.old_state &&
319
+ new_state == o.new_state &&
320
+ updated_at == o.updated_at
321
+ end
322
+
323
+ # @see the `==` method
324
+ # @param [Object] Object to be compared
325
+ def eql?(o)
326
+ self == o
327
+ end
328
+
329
+ # Calculates hash code according to all attributes.
330
+ # @return [Integer] Hash code
331
+ def hash
332
+ [event, timestamp, id, name, organization_id, old_state, new_state, updated_at].hash
333
+ end
334
+
335
+ # Builds the object from hash
336
+ # @param [Hash] attributes Model attributes in the form of hash
337
+ # @return [Object] Returns the model itself
338
+ def self.build_from_hash(attributes)
339
+ return nil unless attributes.is_a?(Hash)
340
+ attributes = attributes.transform_keys(&:to_sym)
341
+ transformed_hash = {}
342
+ openapi_types.each_pair do |key, type|
343
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
344
+ transformed_hash["#{key}"] = nil
345
+ elsif type =~ /\AArray<(.*)>/i
346
+ # check to ensure the input is an array given that the attribute
347
+ # is documented as an array but the input is not
348
+ if attributes[attribute_map[key]].is_a?(Array)
349
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
350
+ end
351
+ elsif !attributes[attribute_map[key]].nil?
352
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
353
+ end
354
+ end
355
+ new(transformed_hash)
356
+ end
357
+
358
+ # Returns the object in the form of hash
359
+ # @return [Hash] Returns the object in the form of hash
360
+ def to_hash
361
+ hash = {}
362
+ self.class.attribute_map.each_pair do |attr, param|
363
+ value = self.send(attr)
364
+ if value.nil?
365
+ is_nullable = self.class.openapi_nullable.include?(attr)
366
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
367
+ end
368
+
369
+ hash[param] = _to_hash(value)
370
+ end
371
+ hash
372
+ end
373
+
374
+ end
375
+
376
+ end
@@ -0,0 +1,41 @@
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 WorkosAdminPortalIntent
18
+ SSO = "sso".freeze
19
+ DSYNC = "dsync".freeze
20
+ UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze
21
+
22
+ def self.all_vars
23
+ @all_vars ||= [SSO, DSYNC, UNKNOWN_DEFAULT_OPEN_API].freeze
24
+ end
25
+
26
+ # Builds the enum from string
27
+ # @param [String] The enum value in the form of the string
28
+ # @return [String] The enum value
29
+ def self.build_from_hash(value)
30
+ new.build_from_hash(value)
31
+ end
32
+
33
+ # Builds the enum from string
34
+ # @param [String] The enum value in the form of the string
35
+ # @return [String] The enum value
36
+ def build_from_hash(value)
37
+ return value if WorkosAdminPortalIntent.all_vars.include?(value)
38
+ UNKNOWN_DEFAULT_OPEN_API
39
+ end
40
+ end
41
+ end
@@ -14,14 +14,14 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module DaytonaApiClient
17
- class SetSnapshotGeneralStatusDto < ApiModelBase
18
- # Whether the snapshot is general
19
- attr_accessor :general
17
+ class WorkosAdminPortalLink < ApiModelBase
18
+ # Single-purpose WorkOS Admin Portal URL. Expires five minutes after issuance; open it immediately.
19
+ attr_accessor :link
20
20
 
21
21
  # Attribute mapping from ruby-style variable name to JSON key.
22
22
  def self.attribute_map
23
23
  {
24
- :'general' => :'general'
24
+ :'link' => :'link'
25
25
  }
26
26
  end
27
27
 
@@ -38,7 +38,7 @@ module DaytonaApiClient
38
38
  # Attribute type mapping.
39
39
  def self.openapi_types
40
40
  {
41
- :'general' => :'Boolean'
41
+ :'link' => :'String'
42
42
  }
43
43
  end
44
44
 
@@ -52,22 +52,22 @@ module DaytonaApiClient
52
52
  # @param [Hash] attributes Model attributes in the form of hash
53
53
  def initialize(attributes = {})
54
54
  if (!attributes.is_a?(Hash))
55
- fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::SetSnapshotGeneralStatusDto` initialize method"
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::WorkosAdminPortalLink` initialize method"
56
56
  end
57
57
 
58
58
  # check to see if the attribute exists and convert string to symbol for hash key
59
59
  acceptable_attribute_map = self.class.acceptable_attribute_map
60
60
  attributes = attributes.each_with_object({}) { |(k, v), h|
61
61
  if (!acceptable_attribute_map.key?(k.to_sym))
62
- fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::SetSnapshotGeneralStatusDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::WorkosAdminPortalLink`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
63
  end
64
64
  h[k.to_sym] = v
65
65
  }
66
66
 
67
- if attributes.key?(:'general')
68
- self.general = attributes[:'general']
67
+ if attributes.key?(:'link')
68
+ self.link = attributes[:'link']
69
69
  else
70
- self.general = nil
70
+ self.link = nil
71
71
  end
72
72
  end
73
73
 
@@ -76,8 +76,8 @@ module DaytonaApiClient
76
76
  def list_invalid_properties
77
77
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
78
  invalid_properties = Array.new
79
- if @general.nil?
80
- invalid_properties.push('invalid value for "general", general cannot be nil.')
79
+ if @link.nil?
80
+ invalid_properties.push('invalid value for "link", link cannot be nil.')
81
81
  end
82
82
 
83
83
  invalid_properties
@@ -87,18 +87,18 @@ module DaytonaApiClient
87
87
  # @return true if the model is valid
88
88
  def valid?
89
89
  warn '[DEPRECATED] the `valid?` method is obsolete'
90
- return false if @general.nil?
90
+ return false if @link.nil?
91
91
  true
92
92
  end
93
93
 
94
94
  # Custom attribute writer method with validation
95
- # @param [Object] general Value to be assigned
96
- def general=(general)
97
- if general.nil?
98
- fail ArgumentError, 'general cannot be nil'
95
+ # @param [Object] link Value to be assigned
96
+ def link=(link)
97
+ if link.nil?
98
+ fail ArgumentError, 'link cannot be nil'
99
99
  end
100
100
 
101
- @general = general
101
+ @link = link
102
102
  end
103
103
 
104
104
  # Checks equality by comparing each attribute.
@@ -106,7 +106,7 @@ module DaytonaApiClient
106
106
  def ==(o)
107
107
  return true if self.equal?(o)
108
108
  self.class == o.class &&
109
- general == o.general
109
+ link == o.link
110
110
  end
111
111
 
112
112
  # @see the `==` method
@@ -118,7 +118,7 @@ module DaytonaApiClient
118
118
  # Calculates hash code according to all attributes.
119
119
  # @return [Integer] Hash code
120
120
  def hash
121
- [general].hash
121
+ [link].hash
122
122
  end
123
123
 
124
124
  # Builds the object from hash