daytona_api_client 0.196.0 → 0.197.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e13d25e06515edcd44894d5a4cf279544af6bc7b5aeeed9d13630c2712cc7196
4
- data.tar.gz: '08811eac1491e7028349a6eff6740a32be4c73894ca9890fce98cbb16579b458'
3
+ metadata.gz: f8d97f16a45ab8510ec8d23cb589dd7b82decdd7fb987f66f6e3e6227b0c8e9e
4
+ data.tar.gz: bb22527457bb5d9f473a809398ebe374d23c2420fbf80f2c3bf4ca64efd224e6
5
5
  SHA512:
6
- metadata.gz: 71100c273a103c1067f864603c85d89bf392959a2f11896a5af89efdf2918f1021ab90bcf9345b16a048106855b18ba3711328e02f45968031fa1b6ed65ac441
7
- data.tar.gz: da2d69d5c965ff0a776b870bd04baa7ad1b7c9b61ce346929165ba47f28b1235c2ee011817660fb8168ba86918b867385bbe98c4354de2290fdc16cff8016abc
6
+ metadata.gz: 6c6430ecff1e1db19a0d721507e65f045dce668dc1800dbb5a6081c3c471aba835d573d5a5bc971087b01acd27c8a4fa34a6135dfe84176ef23377d91bf6d4cc
7
+ data.tar.gz: 03a8325b010560160b1e410bbfabccf19f83cad69d3e70d9d8dffd1ce786150747649c9310fd0bfd0a2bb28f62bb5c0defede01db6ba9ceb0ed73fabbe69f90b
@@ -35,6 +35,7 @@ lib/daytona_api_client/models/announcement.rb
35
35
  lib/daytona_api_client/models/api_key_list.rb
36
36
  lib/daytona_api_client/models/api_key_response.rb
37
37
  lib/daytona_api_client/models/audit_log.rb
38
+ lib/daytona_api_client/models/available_sandbox_class.rb
38
39
  lib/daytona_api_client/models/build_info.rb
39
40
  lib/daytona_api_client/models/command.rb
40
41
  lib/daytona_api_client/models/completion_context.rb
@@ -120,6 +121,7 @@ lib/daytona_api_client/models/mouse_scroll_response.rb
120
121
  lib/daytona_api_client/models/oidc_config.rb
121
122
  lib/daytona_api_client/models/organization.rb
122
123
  lib/daytona_api_client/models/organization_invitation.rb
124
+ lib/daytona_api_client/models/organization_preview_warning.rb
123
125
  lib/daytona_api_client/models/organization_role.rb
124
126
  lib/daytona_api_client/models/organization_sandbox_default_limited_network_egress.rb
125
127
  lib/daytona_api_client/models/organization_suspension.rb
@@ -136,6 +138,7 @@ lib/daytona_api_client/models/poll_jobs_response.rb
136
138
  lib/daytona_api_client/models/port_preview_url.rb
137
139
  lib/daytona_api_client/models/position.rb
138
140
  lib/daytona_api_client/models/posthog_config.rb
141
+ lib/daytona_api_client/models/preview_warning.rb
139
142
  lib/daytona_api_client/models/process_errors_response.rb
140
143
  lib/daytona_api_client/models/process_logs_response.rb
141
144
  lib/daytona_api_client/models/process_restart_response.rb
@@ -1407,6 +1407,76 @@ module DaytonaApiClient
1407
1407
  return data, status_code, headers
1408
1408
  end
1409
1409
 
1410
+ # Update organization preview warning
1411
+ # @param organization_id [String] Organization ID
1412
+ # @param organization_preview_warning [OrganizationPreviewWarning]
1413
+ # @param [Hash] opts the optional parameters
1414
+ # @return [nil]
1415
+ def admin_update_organization_preview_warning(organization_id, organization_preview_warning, opts = {})
1416
+ admin_update_organization_preview_warning_with_http_info(organization_id, organization_preview_warning, opts)
1417
+ nil
1418
+ end
1419
+
1420
+ # Update organization preview warning
1421
+ # @param organization_id [String] Organization ID
1422
+ # @param organization_preview_warning [OrganizationPreviewWarning]
1423
+ # @param [Hash] opts the optional parameters
1424
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1425
+ def admin_update_organization_preview_warning_with_http_info(organization_id, organization_preview_warning, opts = {})
1426
+ if @api_client.config.debugging
1427
+ @api_client.config.logger.debug 'Calling API: AdminApi.admin_update_organization_preview_warning ...'
1428
+ end
1429
+ # verify the required parameter 'organization_id' is set
1430
+ if @api_client.config.client_side_validation && organization_id.nil?
1431
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling AdminApi.admin_update_organization_preview_warning"
1432
+ end
1433
+ # verify the required parameter 'organization_preview_warning' is set
1434
+ if @api_client.config.client_side_validation && organization_preview_warning.nil?
1435
+ fail ArgumentError, "Missing the required parameter 'organization_preview_warning' when calling AdminApi.admin_update_organization_preview_warning"
1436
+ end
1437
+ # resource path
1438
+ local_var_path = '/admin/organizations/{organizationId}/preview-warning'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
1439
+
1440
+ # query parameters
1441
+ query_params = opts[:query_params] || {}
1442
+
1443
+ # header parameters
1444
+ header_params = opts[:header_params] || {}
1445
+ # HTTP header 'Content-Type'
1446
+ content_type = @api_client.select_header_content_type(['application/json'])
1447
+ if !content_type.nil?
1448
+ header_params['Content-Type'] = content_type
1449
+ end
1450
+
1451
+ # form parameters
1452
+ form_params = opts[:form_params] || {}
1453
+
1454
+ # http body (model)
1455
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(organization_preview_warning)
1456
+
1457
+ # return_type
1458
+ return_type = opts[:debug_return_type]
1459
+
1460
+ # auth_names
1461
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1462
+
1463
+ new_options = opts.merge(
1464
+ :operation => :"AdminApi.admin_update_organization_preview_warning",
1465
+ :header_params => header_params,
1466
+ :query_params => query_params,
1467
+ :form_params => form_params,
1468
+ :body => post_body,
1469
+ :auth_names => auth_names,
1470
+ :return_type => return_type
1471
+ )
1472
+
1473
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1474
+ if @api_client.config.debugging
1475
+ @api_client.config.logger.debug "API called: AdminApi#admin_update_organization_preview_warning\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1476
+ end
1477
+ return data, status_code, headers
1478
+ end
1479
+
1410
1480
  # Update organization region quota
1411
1481
  # @param organization_id [String] Organization ID
1412
1482
  # @param region_id [String] Region ID
@@ -1273,6 +1273,67 @@ module DaytonaApiClient
1273
1273
  return data, status_code, headers
1274
1274
  end
1275
1275
 
1276
+ # List available sandbox classes for organization
1277
+ # @param organization_id [String] Organization ID
1278
+ # @param [Hash] opts the optional parameters
1279
+ # @return [Array<AvailableSandboxClass>]
1280
+ def list_available_sandbox_classes(organization_id, opts = {})
1281
+ data, _status_code, _headers = list_available_sandbox_classes_with_http_info(organization_id, opts)
1282
+ data
1283
+ end
1284
+
1285
+ # List available sandbox classes for organization
1286
+ # @param organization_id [String] Organization ID
1287
+ # @param [Hash] opts the optional parameters
1288
+ # @return [Array<(Array<AvailableSandboxClass>, Integer, Hash)>] Array<AvailableSandboxClass> data, response status code and response headers
1289
+ def list_available_sandbox_classes_with_http_info(organization_id, opts = {})
1290
+ if @api_client.config.debugging
1291
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.list_available_sandbox_classes ...'
1292
+ end
1293
+ # verify the required parameter 'organization_id' is set
1294
+ if @api_client.config.client_side_validation && organization_id.nil?
1295
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.list_available_sandbox_classes"
1296
+ end
1297
+ # resource path
1298
+ local_var_path = '/organizations/{organizationId}/available-sandbox-classes'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
1299
+
1300
+ # query parameters
1301
+ query_params = opts[:query_params] || {}
1302
+
1303
+ # header parameters
1304
+ header_params = opts[:header_params] || {}
1305
+ # HTTP header 'Accept' (if needed)
1306
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1307
+
1308
+ # form parameters
1309
+ form_params = opts[:form_params] || {}
1310
+
1311
+ # http body (model)
1312
+ post_body = opts[:debug_body]
1313
+
1314
+ # return_type
1315
+ return_type = opts[:debug_return_type] || 'Array<AvailableSandboxClass>'
1316
+
1317
+ # auth_names
1318
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1319
+
1320
+ new_options = opts.merge(
1321
+ :operation => :"OrganizationsApi.list_available_sandbox_classes",
1322
+ :header_params => header_params,
1323
+ :query_params => query_params,
1324
+ :form_params => form_params,
1325
+ :body => post_body,
1326
+ :auth_names => auth_names,
1327
+ :return_type => return_type
1328
+ )
1329
+
1330
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1331
+ if @api_client.config.debugging
1332
+ @api_client.config.logger.debug "API called: OrganizationsApi#list_available_sandbox_classes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1333
+ end
1334
+ return data, status_code, headers
1335
+ end
1336
+
1276
1337
  # List pending organization invitations
1277
1338
  # @param organization_id [String] Organization ID
1278
1339
  # @param [Hash] opts the optional parameters
@@ -2245,6 +2306,76 @@ module DaytonaApiClient
2245
2306
  return data, status_code, headers
2246
2307
  end
2247
2308
 
2309
+ # Update organization preview warning
2310
+ # @param organization_id [String] Organization ID
2311
+ # @param organization_preview_warning [OrganizationPreviewWarning]
2312
+ # @param [Hash] opts the optional parameters
2313
+ # @return [nil]
2314
+ def update_organization_preview_warning(organization_id, organization_preview_warning, opts = {})
2315
+ update_organization_preview_warning_with_http_info(organization_id, organization_preview_warning, opts)
2316
+ nil
2317
+ end
2318
+
2319
+ # Update organization preview warning
2320
+ # @param organization_id [String] Organization ID
2321
+ # @param organization_preview_warning [OrganizationPreviewWarning]
2322
+ # @param [Hash] opts the optional parameters
2323
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2324
+ def update_organization_preview_warning_with_http_info(organization_id, organization_preview_warning, opts = {})
2325
+ if @api_client.config.debugging
2326
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_organization_preview_warning ...'
2327
+ end
2328
+ # verify the required parameter 'organization_id' is set
2329
+ if @api_client.config.client_side_validation && organization_id.nil?
2330
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.update_organization_preview_warning"
2331
+ end
2332
+ # verify the required parameter 'organization_preview_warning' is set
2333
+ if @api_client.config.client_side_validation && organization_preview_warning.nil?
2334
+ fail ArgumentError, "Missing the required parameter 'organization_preview_warning' when calling OrganizationsApi.update_organization_preview_warning"
2335
+ end
2336
+ # resource path
2337
+ local_var_path = '/organizations/{organizationId}/preview-warning'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
2338
+
2339
+ # query parameters
2340
+ query_params = opts[:query_params] || {}
2341
+
2342
+ # header parameters
2343
+ header_params = opts[:header_params] || {}
2344
+ # HTTP header 'Content-Type'
2345
+ content_type = @api_client.select_header_content_type(['application/json'])
2346
+ if !content_type.nil?
2347
+ header_params['Content-Type'] = content_type
2348
+ end
2349
+
2350
+ # form parameters
2351
+ form_params = opts[:form_params] || {}
2352
+
2353
+ # http body (model)
2354
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(organization_preview_warning)
2355
+
2356
+ # return_type
2357
+ return_type = opts[:debug_return_type]
2358
+
2359
+ # auth_names
2360
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2361
+
2362
+ new_options = opts.merge(
2363
+ :operation => :"OrganizationsApi.update_organization_preview_warning",
2364
+ :header_params => header_params,
2365
+ :query_params => query_params,
2366
+ :form_params => form_params,
2367
+ :body => post_body,
2368
+ :auth_names => auth_names,
2369
+ :return_type => return_type
2370
+ )
2371
+
2372
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2373
+ if @api_client.config.debugging
2374
+ @api_client.config.logger.debug "API called: OrganizationsApi#update_organization_preview_warning\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2375
+ end
2376
+ return data, status_code, headers
2377
+ end
2378
+
2248
2379
  # Update organization quota
2249
2380
  # @param organization_id [String] Organization ID
2250
2381
  # @param update_organization_quota [UpdateOrganizationQuota]
@@ -147,6 +147,70 @@ module DaytonaApiClient
147
147
  return data, status_code, headers
148
148
  end
149
149
 
150
+ # Check if the preview warning page is enabled for the sandbox
151
+ # @param sandbox_id [String] ID of the sandbox, or a signed preview URL token (requires the port query param)
152
+ # @param [Hash] opts the optional parameters
153
+ # @option opts [Float] :port Port the signed preview URL token was issued for. Required when sandboxId is a signed token.
154
+ # @return [PreviewWarning]
155
+ def is_preview_warning_enabled(sandbox_id, opts = {})
156
+ data, _status_code, _headers = is_preview_warning_enabled_with_http_info(sandbox_id, opts)
157
+ data
158
+ end
159
+
160
+ # Check if the preview warning page is enabled for the sandbox
161
+ # @param sandbox_id [String] ID of the sandbox, or a signed preview URL token (requires the port query param)
162
+ # @param [Hash] opts the optional parameters
163
+ # @option opts [Float] :port Port the signed preview URL token was issued for. Required when sandboxId is a signed token.
164
+ # @return [Array<(PreviewWarning, Integer, Hash)>] PreviewWarning data, response status code and response headers
165
+ def is_preview_warning_enabled_with_http_info(sandbox_id, opts = {})
166
+ if @api_client.config.debugging
167
+ @api_client.config.logger.debug 'Calling API: PreviewApi.is_preview_warning_enabled ...'
168
+ end
169
+ # verify the required parameter 'sandbox_id' is set
170
+ if @api_client.config.client_side_validation && sandbox_id.nil?
171
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling PreviewApi.is_preview_warning_enabled"
172
+ end
173
+ # resource path
174
+ local_var_path = '/preview/{sandboxId}/preview-warning'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
175
+
176
+ # query parameters
177
+ query_params = opts[:query_params] || {}
178
+ query_params[:'port'] = opts[:'port'] if !opts[:'port'].nil?
179
+
180
+ # header parameters
181
+ header_params = opts[:header_params] || {}
182
+ # HTTP header 'Accept' (if needed)
183
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
184
+
185
+ # form parameters
186
+ form_params = opts[:form_params] || {}
187
+
188
+ # http body (model)
189
+ post_body = opts[:debug_body]
190
+
191
+ # return_type
192
+ return_type = opts[:debug_return_type] || 'PreviewWarning'
193
+
194
+ # auth_names
195
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
196
+
197
+ new_options = opts.merge(
198
+ :operation => :"PreviewApi.is_preview_warning_enabled",
199
+ :header_params => header_params,
200
+ :query_params => query_params,
201
+ :form_params => form_params,
202
+ :body => post_body,
203
+ :auth_names => auth_names,
204
+ :return_type => return_type
205
+ )
206
+
207
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
208
+ if @api_client.config.debugging
209
+ @api_client.config.logger.debug "API called: PreviewApi#is_preview_warning_enabled\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
210
+ end
211
+ return data, status_code, headers
212
+ end
213
+
150
214
  # Check if sandbox is public
151
215
  # @param sandbox_id [String] ID of the sandbox
152
216
  # @param [Hash] opts the optional parameters
@@ -2575,6 +2575,76 @@ module DaytonaApiClient
2575
2575
  return data, status_code, headers
2576
2576
  end
2577
2577
 
2578
+ # Set sandbox auto-pause interval
2579
+ # @param sandbox_id_or_name [String] ID or name of the sandbox
2580
+ # @param interval [Float] Auto-pause interval in minutes (0 to disable)
2581
+ # @param [Hash] opts the optional parameters
2582
+ # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2583
+ # @return [Sandbox]
2584
+ def set_auto_pause_interval(sandbox_id_or_name, interval, opts = {})
2585
+ data, _status_code, _headers = set_auto_pause_interval_with_http_info(sandbox_id_or_name, interval, opts)
2586
+ data
2587
+ end
2588
+
2589
+ # Set sandbox auto-pause interval
2590
+ # @param sandbox_id_or_name [String] ID or name of the sandbox
2591
+ # @param interval [Float] Auto-pause interval in minutes (0 to disable)
2592
+ # @param [Hash] opts the optional parameters
2593
+ # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2594
+ # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2595
+ def set_auto_pause_interval_with_http_info(sandbox_id_or_name, interval, opts = {})
2596
+ if @api_client.config.debugging
2597
+ @api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_pause_interval ...'
2598
+ end
2599
+ # verify the required parameter 'sandbox_id_or_name' is set
2600
+ if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2601
+ fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.set_auto_pause_interval"
2602
+ end
2603
+ # verify the required parameter 'interval' is set
2604
+ if @api_client.config.client_side_validation && interval.nil?
2605
+ fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_pause_interval"
2606
+ end
2607
+ # resource path
2608
+ local_var_path = '/sandbox/{sandboxIdOrName}/autopause/{interval}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.to_s))
2609
+
2610
+ # query parameters
2611
+ query_params = opts[:query_params] || {}
2612
+
2613
+ # header parameters
2614
+ header_params = opts[:header_params] || {}
2615
+ # HTTP header 'Accept' (if needed)
2616
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2617
+ header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2618
+
2619
+ # form parameters
2620
+ form_params = opts[:form_params] || {}
2621
+
2622
+ # http body (model)
2623
+ post_body = opts[:debug_body]
2624
+
2625
+ # return_type
2626
+ return_type = opts[:debug_return_type] || 'Sandbox'
2627
+
2628
+ # auth_names
2629
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2630
+
2631
+ new_options = opts.merge(
2632
+ :operation => :"SandboxApi.set_auto_pause_interval",
2633
+ :header_params => header_params,
2634
+ :query_params => query_params,
2635
+ :form_params => form_params,
2636
+ :body => post_body,
2637
+ :auth_names => auth_names,
2638
+ :return_type => return_type
2639
+ )
2640
+
2641
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2642
+ if @api_client.config.debugging
2643
+ @api_client.config.logger.debug "API called: SandboxApi#set_auto_pause_interval\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2644
+ end
2645
+ return data, status_code, headers
2646
+ end
2647
+
2578
2648
  # Set sandbox auto-stop interval
2579
2649
  # @param sandbox_id_or_name [String] ID or name of the sandbox
2580
2650
  # @param interval [Float] Auto-stop interval in minutes (0 to disable)
@@ -0,0 +1,249 @@
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 AvailableSandboxClass < ApiModelBase
18
+ attr_accessor :region_id
19
+
20
+ attr_accessor :sandbox_class
21
+
22
+ attr_accessor :gpu_available
23
+
24
+ attr_accessor :allowed_gpu_types
25
+
26
+ class EnumAttributeValidator
27
+ attr_reader :datatype
28
+ attr_reader :allowable_values
29
+
30
+ def initialize(datatype, allowable_values)
31
+ @allowable_values = allowable_values.map do |value|
32
+ case datatype.to_s
33
+ when /Integer/i
34
+ value.to_i
35
+ when /Float/i
36
+ value.to_f
37
+ else
38
+ value
39
+ end
40
+ end
41
+ end
42
+
43
+ def valid?(value)
44
+ !value || allowable_values.include?(value)
45
+ end
46
+ end
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'region_id' => :'regionId',
52
+ :'sandbox_class' => :'sandboxClass',
53
+ :'gpu_available' => :'gpuAvailable',
54
+ :'allowed_gpu_types' => :'allowedGpuTypes'
55
+ }
56
+ end
57
+
58
+ # Returns attribute mapping this model knows about
59
+ def self.acceptable_attribute_map
60
+ attribute_map
61
+ end
62
+
63
+ # Returns all the JSON keys this model knows about
64
+ def self.acceptable_attributes
65
+ acceptable_attribute_map.values
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'region_id' => :'String',
72
+ :'sandbox_class' => :'SandboxClass',
73
+ :'gpu_available' => :'Boolean',
74
+ :'allowed_gpu_types' => :'Array<GpuType>'
75
+ }
76
+ end
77
+
78
+ # List of attributes with nullable: true
79
+ def self.openapi_nullable
80
+ Set.new([
81
+ ])
82
+ end
83
+
84
+ # Initializes the object
85
+ # @param [Hash] attributes Model attributes in the form of hash
86
+ def initialize(attributes = {})
87
+ if (!attributes.is_a?(Hash))
88
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::AvailableSandboxClass` initialize method"
89
+ end
90
+
91
+ # check to see if the attribute exists and convert string to symbol for hash key
92
+ acceptable_attribute_map = self.class.acceptable_attribute_map
93
+ attributes = attributes.each_with_object({}) { |(k, v), h|
94
+ if (!acceptable_attribute_map.key?(k.to_sym))
95
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::AvailableSandboxClass`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
96
+ end
97
+ h[k.to_sym] = v
98
+ }
99
+
100
+ if attributes.key?(:'region_id')
101
+ self.region_id = attributes[:'region_id']
102
+ else
103
+ self.region_id = nil
104
+ end
105
+
106
+ if attributes.key?(:'sandbox_class')
107
+ self.sandbox_class = attributes[:'sandbox_class']
108
+ else
109
+ self.sandbox_class = nil
110
+ end
111
+
112
+ if attributes.key?(:'gpu_available')
113
+ self.gpu_available = attributes[:'gpu_available']
114
+ else
115
+ self.gpu_available = nil
116
+ end
117
+
118
+ if attributes.key?(:'allowed_gpu_types')
119
+ if (value = attributes[:'allowed_gpu_types']).is_a?(Array)
120
+ self.allowed_gpu_types = value
121
+ end
122
+ end
123
+ end
124
+
125
+ # Show invalid properties with the reasons. Usually used together with valid?
126
+ # @return Array for valid properties with the reasons
127
+ def list_invalid_properties
128
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
129
+ invalid_properties = Array.new
130
+ if @region_id.nil?
131
+ invalid_properties.push('invalid value for "region_id", region_id cannot be nil.')
132
+ end
133
+
134
+ if @sandbox_class.nil?
135
+ invalid_properties.push('invalid value for "sandbox_class", sandbox_class cannot be nil.')
136
+ end
137
+
138
+ if @gpu_available.nil?
139
+ invalid_properties.push('invalid value for "gpu_available", gpu_available cannot be nil.')
140
+ end
141
+
142
+ invalid_properties
143
+ end
144
+
145
+ # Check to see if the all the properties in the model are valid
146
+ # @return true if the model is valid
147
+ def valid?
148
+ warn '[DEPRECATED] the `valid?` method is obsolete'
149
+ return false if @region_id.nil?
150
+ return false if @sandbox_class.nil?
151
+ return false if @gpu_available.nil?
152
+ true
153
+ end
154
+
155
+ # Custom attribute writer method with validation
156
+ # @param [Object] region_id Value to be assigned
157
+ def region_id=(region_id)
158
+ if region_id.nil?
159
+ fail ArgumentError, 'region_id cannot be nil'
160
+ end
161
+
162
+ @region_id = region_id
163
+ end
164
+
165
+ # Custom attribute writer method with validation
166
+ # @param [Object] sandbox_class Value to be assigned
167
+ def sandbox_class=(sandbox_class)
168
+ if sandbox_class.nil?
169
+ fail ArgumentError, 'sandbox_class cannot be nil'
170
+ end
171
+
172
+ @sandbox_class = sandbox_class
173
+ end
174
+
175
+ # Custom attribute writer method with validation
176
+ # @param [Object] gpu_available Value to be assigned
177
+ def gpu_available=(gpu_available)
178
+ if gpu_available.nil?
179
+ fail ArgumentError, 'gpu_available cannot be nil'
180
+ end
181
+
182
+ @gpu_available = gpu_available
183
+ end
184
+
185
+ # Checks equality by comparing each attribute.
186
+ # @param [Object] Object to be compared
187
+ def ==(o)
188
+ return true if self.equal?(o)
189
+ self.class == o.class &&
190
+ region_id == o.region_id &&
191
+ sandbox_class == o.sandbox_class &&
192
+ gpu_available == o.gpu_available &&
193
+ allowed_gpu_types == o.allowed_gpu_types
194
+ end
195
+
196
+ # @see the `==` method
197
+ # @param [Object] Object to be compared
198
+ def eql?(o)
199
+ self == o
200
+ end
201
+
202
+ # Calculates hash code according to all attributes.
203
+ # @return [Integer] Hash code
204
+ def hash
205
+ [region_id, sandbox_class, gpu_available, allowed_gpu_types].hash
206
+ end
207
+
208
+ # Builds the object from hash
209
+ # @param [Hash] attributes Model attributes in the form of hash
210
+ # @return [Object] Returns the model itself
211
+ def self.build_from_hash(attributes)
212
+ return nil unless attributes.is_a?(Hash)
213
+ attributes = attributes.transform_keys(&:to_sym)
214
+ transformed_hash = {}
215
+ openapi_types.each_pair do |key, type|
216
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
217
+ transformed_hash["#{key}"] = nil
218
+ elsif type =~ /\AArray<(.*)>/i
219
+ # check to ensure the input is an array given that the attribute
220
+ # is documented as an array but the input is not
221
+ if attributes[attribute_map[key]].is_a?(Array)
222
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
223
+ end
224
+ elsif !attributes[attribute_map[key]].nil?
225
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
226
+ end
227
+ end
228
+ new(transformed_hash)
229
+ end
230
+
231
+ # Returns the object in the form of hash
232
+ # @return [Hash] Returns the object in the form of hash
233
+ def to_hash
234
+ hash = {}
235
+ self.class.attribute_map.each_pair do |attr, param|
236
+ value = self.send(attr)
237
+ if value.nil?
238
+ is_nullable = self.class.openapi_nullable.include?(attr)
239
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
240
+ end
241
+
242
+ hash[param] = _to_hash(value)
243
+ end
244
+ hash
245
+ end
246
+
247
+ end
248
+
249
+ end
@@ -63,6 +63,9 @@ module DaytonaApiClient
63
63
  # Auto-stop interval in minutes (0 means disabled)
64
64
  attr_accessor :auto_stop_interval
65
65
 
66
+ # Auto-pause interval in minutes (0 means disabled). Only supported for sandbox classes that support pausing. Not allowed for ephemeral sandboxes. At most one of autoStopInterval and autoPauseInterval may be non-zero. For non-ephemeral sandbox classes that support pausing, defaults to 60 minutes (with auto-stop disabled) when neither interval is provided.
67
+ attr_accessor :auto_pause_interval
68
+
66
69
  # Auto-archive interval in minutes (0 means the maximum interval will be used)
67
70
  attr_accessor :auto_archive_interval
68
71
 
@@ -100,6 +103,7 @@ module DaytonaApiClient
100
103
  :'memory' => :'memory',
101
104
  :'disk' => :'disk',
102
105
  :'auto_stop_interval' => :'autoStopInterval',
106
+ :'auto_pause_interval' => :'autoPauseInterval',
103
107
  :'auto_archive_interval' => :'autoArchiveInterval',
104
108
  :'auto_delete_interval' => :'autoDeleteInterval',
105
109
  :'volumes' => :'volumes',
@@ -138,6 +142,7 @@ module DaytonaApiClient
138
142
  :'memory' => :'Integer',
139
143
  :'disk' => :'Integer',
140
144
  :'auto_stop_interval' => :'Integer',
145
+ :'auto_pause_interval' => :'Integer',
141
146
  :'auto_archive_interval' => :'Integer',
142
147
  :'auto_delete_interval' => :'Integer',
143
148
  :'volumes' => :'Array<SandboxVolume>',
@@ -239,6 +244,10 @@ module DaytonaApiClient
239
244
  self.auto_stop_interval = attributes[:'auto_stop_interval']
240
245
  end
241
246
 
247
+ if attributes.key?(:'auto_pause_interval')
248
+ self.auto_pause_interval = attributes[:'auto_pause_interval']
249
+ end
250
+
242
251
  if attributes.key?(:'auto_archive_interval')
243
252
  self.auto_archive_interval = attributes[:'auto_archive_interval']
244
253
  end
@@ -304,6 +313,7 @@ module DaytonaApiClient
304
313
  memory == o.memory &&
305
314
  disk == o.disk &&
306
315
  auto_stop_interval == o.auto_stop_interval &&
316
+ auto_pause_interval == o.auto_pause_interval &&
307
317
  auto_archive_interval == o.auto_archive_interval &&
308
318
  auto_delete_interval == o.auto_delete_interval &&
309
319
  volumes == o.volumes &&
@@ -321,7 +331,7 @@ module DaytonaApiClient
321
331
  # Calculates hash code according to all attributes.
322
332
  # @return [Integer] Hash code
323
333
  def hash
324
- [name, snapshot, user, env, labels, public, network_block_all, network_allow_list, domain_allow_list, target, cpu, gpu, gpu_type, memory, disk, auto_stop_interval, auto_archive_interval, auto_delete_interval, volumes, build_info, linked_sandbox, secrets].hash
334
+ [name, snapshot, user, env, labels, public, network_block_all, network_allow_list, domain_allow_list, target, cpu, gpu, gpu_type, memory, disk, auto_stop_interval, auto_pause_interval, auto_archive_interval, auto_delete_interval, volumes, build_info, linked_sandbox, secrets].hash
325
335
  end
326
336
 
327
337
  # Builds the object from hash
@@ -69,6 +69,9 @@ module DaytonaApiClient
69
69
  # Sandbox default network block all
70
70
  attr_accessor :sandbox_limited_network_egress
71
71
 
72
+ # Whether the proxy shows the preview URL warning page for this organization
73
+ attr_accessor :preview_warning_enabled
74
+
72
75
  # Default region ID
73
76
  attr_accessor :default_region_id
74
77
 
@@ -117,6 +120,7 @@ module DaytonaApiClient
117
120
  :'max_secrets_per_sandbox' => :'maxSecretsPerSandbox',
118
121
  :'snapshot_deactivation_timeout_minutes' => :'snapshotDeactivationTimeoutMinutes',
119
122
  :'sandbox_limited_network_egress' => :'sandboxLimitedNetworkEgress',
123
+ :'preview_warning_enabled' => :'previewWarningEnabled',
120
124
  :'default_region_id' => :'defaultRegionId',
121
125
  :'authenticated_rate_limit' => :'authenticatedRateLimit',
122
126
  :'sandbox_create_rate_limit' => :'sandboxCreateRateLimit',
@@ -160,6 +164,7 @@ module DaytonaApiClient
160
164
  :'max_secrets_per_sandbox' => :'Float',
161
165
  :'snapshot_deactivation_timeout_minutes' => :'Float',
162
166
  :'sandbox_limited_network_egress' => :'Boolean',
167
+ :'preview_warning_enabled' => :'Boolean',
163
168
  :'default_region_id' => :'String',
164
169
  :'authenticated_rate_limit' => :'Float',
165
170
  :'sandbox_create_rate_limit' => :'Float',
@@ -309,6 +314,12 @@ module DaytonaApiClient
309
314
  self.sandbox_limited_network_egress = nil
310
315
  end
311
316
 
317
+ if attributes.key?(:'preview_warning_enabled')
318
+ self.preview_warning_enabled = attributes[:'preview_warning_enabled']
319
+ else
320
+ self.preview_warning_enabled = nil
321
+ end
322
+
312
323
  if attributes.key?(:'default_region_id')
313
324
  self.default_region_id = attributes[:'default_region_id']
314
325
  end
@@ -439,6 +450,10 @@ module DaytonaApiClient
439
450
  invalid_properties.push('invalid value for "sandbox_limited_network_egress", sandbox_limited_network_egress cannot be nil.')
440
451
  end
441
452
 
453
+ if @preview_warning_enabled.nil?
454
+ invalid_properties.push('invalid value for "preview_warning_enabled", preview_warning_enabled cannot be nil.')
455
+ end
456
+
442
457
  if @experimental_config.nil?
443
458
  invalid_properties.push('invalid value for "experimental_config", experimental_config cannot be nil.')
444
459
  end
@@ -468,6 +483,7 @@ module DaytonaApiClient
468
483
  return false if @max_secrets_per_sandbox.nil?
469
484
  return false if @snapshot_deactivation_timeout_minutes.nil?
470
485
  return false if @sandbox_limited_network_egress.nil?
486
+ return false if @preview_warning_enabled.nil?
471
487
  return false if @experimental_config.nil?
472
488
  true
473
489
  end
@@ -652,6 +668,16 @@ module DaytonaApiClient
652
668
  @sandbox_limited_network_egress = sandbox_limited_network_egress
653
669
  end
654
670
 
671
+ # Custom attribute writer method with validation
672
+ # @param [Object] preview_warning_enabled Value to be assigned
673
+ def preview_warning_enabled=(preview_warning_enabled)
674
+ if preview_warning_enabled.nil?
675
+ fail ArgumentError, 'preview_warning_enabled cannot be nil'
676
+ end
677
+
678
+ @preview_warning_enabled = preview_warning_enabled
679
+ end
680
+
655
681
  # Custom attribute writer method with validation
656
682
  # @param [Object] experimental_config Value to be assigned
657
683
  def experimental_config=(experimental_config)
@@ -685,6 +711,7 @@ module DaytonaApiClient
685
711
  max_secrets_per_sandbox == o.max_secrets_per_sandbox &&
686
712
  snapshot_deactivation_timeout_minutes == o.snapshot_deactivation_timeout_minutes &&
687
713
  sandbox_limited_network_egress == o.sandbox_limited_network_egress &&
714
+ preview_warning_enabled == o.preview_warning_enabled &&
688
715
  default_region_id == o.default_region_id &&
689
716
  authenticated_rate_limit == o.authenticated_rate_limit &&
690
717
  sandbox_create_rate_limit == o.sandbox_create_rate_limit &&
@@ -705,7 +732,7 @@ module DaytonaApiClient
705
732
  # Calculates hash code according to all attributes.
706
733
  # @return [Integer] Hash code
707
734
  def hash
708
- [id, name, created_by, personal, created_at, updated_at, suspended, suspended_at, suspension_reason, suspended_until, suspension_cleanup_grace_period_hours, max_cpu_per_sandbox, max_memory_per_sandbox, max_disk_per_sandbox, secret_quota, max_secrets_per_sandbox, snapshot_deactivation_timeout_minutes, sandbox_limited_network_egress, default_region_id, authenticated_rate_limit, sandbox_create_rate_limit, sandbox_lifecycle_rate_limit, experimental_config, otel_config, authenticated_rate_limit_ttl_seconds, sandbox_create_rate_limit_ttl_seconds, sandbox_lifecycle_rate_limit_ttl_seconds].hash
735
+ [id, name, created_by, personal, created_at, updated_at, suspended, suspended_at, suspension_reason, suspended_until, suspension_cleanup_grace_period_hours, max_cpu_per_sandbox, max_memory_per_sandbox, max_disk_per_sandbox, secret_quota, max_secrets_per_sandbox, snapshot_deactivation_timeout_minutes, sandbox_limited_network_egress, preview_warning_enabled, default_region_id, authenticated_rate_limit, sandbox_create_rate_limit, sandbox_lifecycle_rate_limit, experimental_config, otel_config, authenticated_rate_limit_ttl_seconds, sandbox_create_rate_limit_ttl_seconds, sandbox_lifecycle_rate_limit_ttl_seconds].hash
709
736
  end
710
737
 
711
738
  # Builds the object from hash
@@ -0,0 +1,165 @@
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 OrganizationPreviewWarning < ApiModelBase
18
+ # Whether the proxy shows the preview URL warning page for this organization
19
+ attr_accessor :preview_warning_enabled
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'preview_warning_enabled' => :'previewWarningEnabled'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'preview_warning_enabled' => :'Boolean'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::OrganizationPreviewWarning` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ acceptable_attribute_map = self.class.acceptable_attribute_map
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!acceptable_attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::OrganizationPreviewWarning`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'preview_warning_enabled')
68
+ self.preview_warning_enabled = attributes[:'preview_warning_enabled']
69
+ else
70
+ self.preview_warning_enabled = nil
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
+ invalid_properties = Array.new
79
+ if @preview_warning_enabled.nil?
80
+ invalid_properties.push('invalid value for "preview_warning_enabled", preview_warning_enabled cannot be nil.')
81
+ end
82
+
83
+ invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ warn '[DEPRECATED] the `valid?` method is obsolete'
90
+ return false if @preview_warning_enabled.nil?
91
+ true
92
+ end
93
+
94
+ # Custom attribute writer method with validation
95
+ # @param [Object] preview_warning_enabled Value to be assigned
96
+ def preview_warning_enabled=(preview_warning_enabled)
97
+ if preview_warning_enabled.nil?
98
+ fail ArgumentError, 'preview_warning_enabled cannot be nil'
99
+ end
100
+
101
+ @preview_warning_enabled = preview_warning_enabled
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ preview_warning_enabled == o.preview_warning_enabled
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [preview_warning_enabled].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
134
+ elsif type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
+ end
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
+ end
143
+ end
144
+ new(transformed_hash)
145
+ end
146
+
147
+ # Returns the object in the form of hash
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_hash
150
+ hash = {}
151
+ self.class.attribute_map.each_pair do |attr, param|
152
+ value = self.send(attr)
153
+ if value.nil?
154
+ is_nullable = self.class.openapi_nullable.include?(attr)
155
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
156
+ end
157
+
158
+ hash[param] = _to_hash(value)
159
+ end
160
+ hash
161
+ end
162
+
163
+ end
164
+
165
+ end
@@ -0,0 +1,165 @@
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 PreviewWarning < ApiModelBase
18
+ # Whether the preview warning page is enabled for the sandbox
19
+ attr_accessor :enabled
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'enabled' => :'enabled'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'enabled' => :'Boolean'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::PreviewWarning` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ acceptable_attribute_map = self.class.acceptable_attribute_map
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!acceptable_attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::PreviewWarning`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'enabled')
68
+ self.enabled = attributes[:'enabled']
69
+ else
70
+ self.enabled = nil
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
+ invalid_properties = Array.new
79
+ if @enabled.nil?
80
+ invalid_properties.push('invalid value for "enabled", enabled cannot be nil.')
81
+ end
82
+
83
+ invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ warn '[DEPRECATED] the `valid?` method is obsolete'
90
+ return false if @enabled.nil?
91
+ true
92
+ end
93
+
94
+ # Custom attribute writer method with validation
95
+ # @param [Object] enabled Value to be assigned
96
+ def enabled=(enabled)
97
+ if enabled.nil?
98
+ fail ArgumentError, 'enabled cannot be nil'
99
+ end
100
+
101
+ @enabled = enabled
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ enabled == o.enabled
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [enabled].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
134
+ elsif type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
+ end
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
+ end
143
+ end
144
+ new(transformed_hash)
145
+ end
146
+
147
+ # Returns the object in the form of hash
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_hash
150
+ hash = {}
151
+ self.class.attribute_map.each_pair do |attr, param|
152
+ value = self.send(attr)
153
+ if value.nil?
154
+ is_nullable = self.class.openapi_nullable.include?(attr)
155
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
156
+ end
157
+
158
+ hash[param] = _to_hash(value)
159
+ end
160
+ hash
161
+ end
162
+
163
+ end
164
+
165
+ end
@@ -87,6 +87,9 @@ module DaytonaApiClient
87
87
  # Auto-stop interval in minutes (0 means disabled)
88
88
  attr_accessor :auto_stop_interval
89
89
 
90
+ # Auto-pause interval in minutes (0 means disabled)
91
+ attr_accessor :auto_pause_interval
92
+
90
93
  # Auto-archive interval in minutes
91
94
  attr_accessor :auto_archive_interval
92
95
 
@@ -172,6 +175,7 @@ module DaytonaApiClient
172
175
  :'backup_state' => :'backupState',
173
176
  :'backup_created_at' => :'backupCreatedAt',
174
177
  :'auto_stop_interval' => :'autoStopInterval',
178
+ :'auto_pause_interval' => :'autoPauseInterval',
175
179
  :'auto_archive_interval' => :'autoArchiveInterval',
176
180
  :'auto_delete_interval' => :'autoDeleteInterval',
177
181
  :'volumes' => :'volumes',
@@ -224,6 +228,7 @@ module DaytonaApiClient
224
228
  :'backup_state' => :'String',
225
229
  :'backup_created_at' => :'String',
226
230
  :'auto_stop_interval' => :'Float',
231
+ :'auto_pause_interval' => :'Float',
227
232
  :'auto_archive_interval' => :'Float',
228
233
  :'auto_delete_interval' => :'Float',
229
234
  :'volumes' => :'Array<SandboxVolume>',
@@ -387,6 +392,10 @@ module DaytonaApiClient
387
392
  self.auto_stop_interval = attributes[:'auto_stop_interval']
388
393
  end
389
394
 
395
+ if attributes.key?(:'auto_pause_interval')
396
+ self.auto_pause_interval = attributes[:'auto_pause_interval']
397
+ end
398
+
390
399
  if attributes.key?(:'auto_archive_interval')
391
400
  self.auto_archive_interval = attributes[:'auto_archive_interval']
392
401
  end
@@ -718,6 +727,7 @@ module DaytonaApiClient
718
727
  backup_state == o.backup_state &&
719
728
  backup_created_at == o.backup_created_at &&
720
729
  auto_stop_interval == o.auto_stop_interval &&
730
+ auto_pause_interval == o.auto_pause_interval &&
721
731
  auto_archive_interval == o.auto_archive_interval &&
722
732
  auto_delete_interval == o.auto_delete_interval &&
723
733
  volumes == o.volumes &&
@@ -741,7 +751,7 @@ module DaytonaApiClient
741
751
  # Calculates hash code according to all attributes.
742
752
  # @return [Integer] Hash code
743
753
  def hash
744
- [id, organization_id, name, snapshot, user, env, labels, public, network_block_all, network_allow_list, domain_allow_list, target, cpu, gpu, gpu_type, memory, disk, state, desired_state, error_reason, recoverable, backup_state, backup_created_at, auto_stop_interval, auto_archive_interval, auto_delete_interval, volumes, build_info, created_at, updated_at, last_activity_at, sandbox_class, daemon_version, runner_id, linked_sandbox_id, toolbox_proxy_url].hash
754
+ [id, organization_id, name, snapshot, user, env, labels, public, network_block_all, network_allow_list, domain_allow_list, target, cpu, gpu, gpu_type, memory, disk, state, desired_state, error_reason, recoverable, backup_state, backup_created_at, auto_stop_interval, auto_pause_interval, auto_archive_interval, auto_delete_interval, volumes, build_info, created_at, updated_at, last_activity_at, sandbox_class, daemon_version, runner_id, linked_sandbox_id, toolbox_proxy_url].hash
745
755
  end
746
756
 
747
757
  # Builds the object from hash
@@ -78,6 +78,9 @@ module DaytonaApiClient
78
78
  # Auto-stop interval in minutes (0 means disabled)
79
79
  attr_accessor :auto_stop_interval
80
80
 
81
+ # Auto-pause interval in minutes (0 means disabled)
82
+ attr_accessor :auto_pause_interval
83
+
81
84
  # Auto-archive interval in minutes
82
85
  attr_accessor :auto_archive_interval
83
86
 
@@ -145,6 +148,7 @@ module DaytonaApiClient
145
148
  :'labels' => :'labels',
146
149
  :'backup_state' => :'backupState',
147
150
  :'auto_stop_interval' => :'autoStopInterval',
151
+ :'auto_pause_interval' => :'autoPauseInterval',
148
152
  :'auto_archive_interval' => :'autoArchiveInterval',
149
153
  :'auto_delete_interval' => :'autoDeleteInterval',
150
154
  :'created_at' => :'createdAt',
@@ -189,6 +193,7 @@ module DaytonaApiClient
189
193
  :'labels' => :'Hash<String, String>',
190
194
  :'backup_state' => :'String',
191
195
  :'auto_stop_interval' => :'Float',
196
+ :'auto_pause_interval' => :'Float',
192
197
  :'auto_archive_interval' => :'Float',
193
198
  :'auto_delete_interval' => :'Float',
194
199
  :'created_at' => :'String',
@@ -329,6 +334,10 @@ module DaytonaApiClient
329
334
  self.auto_stop_interval = attributes[:'auto_stop_interval']
330
335
  end
331
336
 
337
+ if attributes.key?(:'auto_pause_interval')
338
+ self.auto_pause_interval = attributes[:'auto_pause_interval']
339
+ end
340
+
332
341
  if attributes.key?(:'auto_archive_interval')
333
342
  self.auto_archive_interval = attributes[:'auto_archive_interval']
334
343
  end
@@ -593,6 +602,7 @@ module DaytonaApiClient
593
602
  labels == o.labels &&
594
603
  backup_state == o.backup_state &&
595
604
  auto_stop_interval == o.auto_stop_interval &&
605
+ auto_pause_interval == o.auto_pause_interval &&
596
606
  auto_archive_interval == o.auto_archive_interval &&
597
607
  auto_delete_interval == o.auto_delete_interval &&
598
608
  created_at == o.created_at &&
@@ -611,7 +621,7 @@ module DaytonaApiClient
611
621
  # Calculates hash code according to all attributes.
612
622
  # @return [Integer] Hash code
613
623
  def hash
614
- [id, organization_id, name, target, runner_id, sandbox_class, state, desired_state, snapshot, user, error_reason, recoverable, public, cpu, gpu, gpu_type, memory, disk, labels, backup_state, auto_stop_interval, auto_archive_interval, auto_delete_interval, created_at, updated_at, last_activity_at, daemon_version, toolbox_proxy_url].hash
624
+ [id, organization_id, name, target, runner_id, sandbox_class, state, desired_state, snapshot, user, error_reason, recoverable, public, cpu, gpu, gpu_type, memory, disk, labels, backup_state, auto_stop_interval, auto_pause_interval, auto_archive_interval, auto_delete_interval, created_at, updated_at, last_activity_at, daemon_version, toolbox_proxy_url].hash
615
625
  end
616
626
 
617
627
  # Builds the object from hash
@@ -11,5 +11,5 @@ Generator version: 7.21.0
11
11
  =end
12
12
 
13
13
  module DaytonaApiClient
14
- VERSION = '0.196.0'
14
+ VERSION = '0.197.0'
15
15
  end
@@ -26,6 +26,7 @@ require 'daytona_api_client/models/announcement'
26
26
  require 'daytona_api_client/models/api_key_list'
27
27
  require 'daytona_api_client/models/api_key_response'
28
28
  require 'daytona_api_client/models/audit_log'
29
+ require 'daytona_api_client/models/available_sandbox_class'
29
30
  require 'daytona_api_client/models/build_info'
30
31
  require 'daytona_api_client/models/command'
31
32
  require 'daytona_api_client/models/completion_context'
@@ -111,6 +112,7 @@ require 'daytona_api_client/models/mouse_scroll_response'
111
112
  require 'daytona_api_client/models/oidc_config'
112
113
  require 'daytona_api_client/models/organization'
113
114
  require 'daytona_api_client/models/organization_invitation'
115
+ require 'daytona_api_client/models/organization_preview_warning'
114
116
  require 'daytona_api_client/models/organization_role'
115
117
  require 'daytona_api_client/models/organization_sandbox_default_limited_network_egress'
116
118
  require 'daytona_api_client/models/organization_suspension'
@@ -127,6 +129,7 @@ require 'daytona_api_client/models/poll_jobs_response'
127
129
  require 'daytona_api_client/models/port_preview_url'
128
130
  require 'daytona_api_client/models/position'
129
131
  require 'daytona_api_client/models/posthog_config'
132
+ require 'daytona_api_client/models/preview_warning'
130
133
  require 'daytona_api_client/models/process_errors_response'
131
134
  require 'daytona_api_client/models/process_logs_response'
132
135
  require 'daytona_api_client/models/process_restart_response'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daytona_api_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.196.0
4
+ version: 0.197.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - daytona
@@ -97,6 +97,7 @@ files:
97
97
  - lib/daytona_api_client/models/api_key_list.rb
98
98
  - lib/daytona_api_client/models/api_key_response.rb
99
99
  - lib/daytona_api_client/models/audit_log.rb
100
+ - lib/daytona_api_client/models/available_sandbox_class.rb
100
101
  - lib/daytona_api_client/models/build_info.rb
101
102
  - lib/daytona_api_client/models/command.rb
102
103
  - lib/daytona_api_client/models/completion_context.rb
@@ -182,6 +183,7 @@ files:
182
183
  - lib/daytona_api_client/models/oidc_config.rb
183
184
  - lib/daytona_api_client/models/organization.rb
184
185
  - lib/daytona_api_client/models/organization_invitation.rb
186
+ - lib/daytona_api_client/models/organization_preview_warning.rb
185
187
  - lib/daytona_api_client/models/organization_role.rb
186
188
  - lib/daytona_api_client/models/organization_sandbox_default_limited_network_egress.rb
187
189
  - lib/daytona_api_client/models/organization_suspension.rb
@@ -198,6 +200,7 @@ files:
198
200
  - lib/daytona_api_client/models/port_preview_url.rb
199
201
  - lib/daytona_api_client/models/position.rb
200
202
  - lib/daytona_api_client/models/posthog_config.rb
203
+ - lib/daytona_api_client/models/preview_warning.rb
201
204
  - lib/daytona_api_client/models/process_errors_response.rb
202
205
  - lib/daytona_api_client/models/process_logs_response.rb
203
206
  - lib/daytona_api_client/models/process_restart_response.rb