daytona_api_client 0.216.0 → 0.216.1

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