daytona_api_client 0.164.0 → 0.167.0.alpha.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ff2f08ae8ea99ff244492ca43aa553219d456d868fe77b7172250d71c9c5057
4
- data.tar.gz: 58b5beb1aeb3335c657f7cdb7946f04e5da0b9715558c4c019ea5b00c32bc2f8
3
+ metadata.gz: c24aec27f6ad389602ce82aad99d81a23180a8bd2b2446babdb8a93af78c2562
4
+ data.tar.gz: e8c099edc59c6b72165cfbd9beb3607e5fd2b2cc19737d9a27571e47548e59bc
5
5
  SHA512:
6
- metadata.gz: 1b20107ed8017486f372b59dad86ad444439c1a56789d89c53d99a134474dc17f34274492d148d60c97b7c96d1b88885a16194205547d1cfe7f90be1706179e9
7
- data.tar.gz: a62ec47f339978c12a341844baecbc789526c94642f55560fe8f6397aba9c1e78a51d356626cd011129aa1633838f3b8efba758ff6807748d5416118111e0eb4
6
+ metadata.gz: b4b1100a086b14d95aadc9882962d8d43a69e94824e018ae04bc083f4ad4828a1d02109829b65799e0f8a824cd0d01f1f4f04e2129077ada8ff21f2e0bd54b0d
7
+ data.tar.gz: 84e526306d2249782d9a6bfb7b4f19f0b0a493b440133ddbb208679ee922a14f06ba103dd737598b3b9c9b41fb44325bd24c4e0492684085a51689499d715611
@@ -55,6 +55,7 @@ lib/daytona_api_client/models/create_region_response.rb
55
55
  lib/daytona_api_client/models/create_runner.rb
56
56
  lib/daytona_api_client/models/create_runner_response.rb
57
57
  lib/daytona_api_client/models/create_sandbox.rb
58
+ lib/daytona_api_client/models/create_sandbox_snapshot.rb
58
59
  lib/daytona_api_client/models/create_session_request.rb
59
60
  lib/daytona_api_client/models/create_snapshot.rb
60
61
  lib/daytona_api_client/models/create_user.rb
@@ -68,6 +69,7 @@ lib/daytona_api_client/models/execute_request.rb
68
69
  lib/daytona_api_client/models/execute_response.rb
69
70
  lib/daytona_api_client/models/file_info.rb
70
71
  lib/daytona_api_client/models/file_status.rb
72
+ lib/daytona_api_client/models/fork_sandbox.rb
71
73
  lib/daytona_api_client/models/git_add_request.rb
72
74
  lib/daytona_api_client/models/git_branch_request.rb
73
75
  lib/daytona_api_client/models/git_checkout_request.rb
@@ -150,6 +152,7 @@ lib/daytona_api_client/models/replace_request.rb
150
152
  lib/daytona_api_client/models/replace_result.rb
151
153
  lib/daytona_api_client/models/resize_sandbox.rb
152
154
  lib/daytona_api_client/models/runner.rb
155
+ lib/daytona_api_client/models/runner_class.rb
153
156
  lib/daytona_api_client/models/runner_full.rb
154
157
  lib/daytona_api_client/models/runner_health_metrics.rb
155
158
  lib/daytona_api_client/models/runner_healthcheck.rb
@@ -850,6 +850,67 @@ module DaytonaApiClient
850
850
  return data, status_code, headers
851
851
  end
852
852
 
853
+ # Get organization OTEL config by organization ID
854
+ # @param organization_id [String] Organization ID
855
+ # @param [Hash] opts the optional parameters
856
+ # @return [OtelConfig]
857
+ def get_organization_otel_config(organization_id, opts = {})
858
+ data, _status_code, _headers = get_organization_otel_config_with_http_info(organization_id, opts)
859
+ data
860
+ end
861
+
862
+ # Get organization OTEL config by organization ID
863
+ # @param organization_id [String] Organization ID
864
+ # @param [Hash] opts the optional parameters
865
+ # @return [Array<(OtelConfig, Integer, Hash)>] OtelConfig data, response status code and response headers
866
+ def get_organization_otel_config_with_http_info(organization_id, opts = {})
867
+ if @api_client.config.debugging
868
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.get_organization_otel_config ...'
869
+ end
870
+ # verify the required parameter 'organization_id' is set
871
+ if @api_client.config.client_side_validation && organization_id.nil?
872
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.get_organization_otel_config"
873
+ end
874
+ # resource path
875
+ local_var_path = '/organizations/{organizationId}/otel-config'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
876
+
877
+ # query parameters
878
+ query_params = opts[:query_params] || {}
879
+
880
+ # header parameters
881
+ header_params = opts[:header_params] || {}
882
+ # HTTP header 'Accept' (if needed)
883
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
884
+
885
+ # form parameters
886
+ form_params = opts[:form_params] || {}
887
+
888
+ # http body (model)
889
+ post_body = opts[:debug_body]
890
+
891
+ # return_type
892
+ return_type = opts[:debug_return_type] || 'OtelConfig'
893
+
894
+ # auth_names
895
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
896
+
897
+ new_options = opts.merge(
898
+ :operation => :"OrganizationsApi.get_organization_otel_config",
899
+ :header_params => header_params,
900
+ :query_params => query_params,
901
+ :form_params => form_params,
902
+ :body => post_body,
903
+ :auth_names => auth_names,
904
+ :return_type => return_type
905
+ )
906
+
907
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
908
+ if @api_client.config.debugging
909
+ @api_client.config.logger.debug "API called: OrganizationsApi#get_organization_otel_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
910
+ end
911
+ return data, status_code, headers
912
+ end
913
+
853
914
  # Get organization OTEL config by sandbox auth token
854
915
  # @param auth_token [String] Sandbox Auth Token
855
916
  # @param [Hash] opts the optional parameters
@@ -216,6 +216,81 @@ module DaytonaApiClient
216
216
  return data, status_code, headers
217
217
  end
218
218
 
219
+ # Create a snapshot from a sandbox
220
+ # @param sandbox_id_or_name [String]
221
+ # @param create_sandbox_snapshot [CreateSandboxSnapshot]
222
+ # @param [Hash] opts the optional parameters
223
+ # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
224
+ # @return [Sandbox]
225
+ def create_sandbox_snapshot(sandbox_id_or_name, create_sandbox_snapshot, opts = {})
226
+ data, _status_code, _headers = create_sandbox_snapshot_with_http_info(sandbox_id_or_name, create_sandbox_snapshot, opts)
227
+ data
228
+ end
229
+
230
+ # Create a snapshot from a sandbox
231
+ # @param sandbox_id_or_name [String]
232
+ # @param create_sandbox_snapshot [CreateSandboxSnapshot]
233
+ # @param [Hash] opts the optional parameters
234
+ # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
235
+ # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
236
+ def create_sandbox_snapshot_with_http_info(sandbox_id_or_name, create_sandbox_snapshot, opts = {})
237
+ if @api_client.config.debugging
238
+ @api_client.config.logger.debug 'Calling API: SandboxApi.create_sandbox_snapshot ...'
239
+ end
240
+ # verify the required parameter 'sandbox_id_or_name' is set
241
+ if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
242
+ fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.create_sandbox_snapshot"
243
+ end
244
+ # verify the required parameter 'create_sandbox_snapshot' is set
245
+ if @api_client.config.client_side_validation && create_sandbox_snapshot.nil?
246
+ fail ArgumentError, "Missing the required parameter 'create_sandbox_snapshot' when calling SandboxApi.create_sandbox_snapshot"
247
+ end
248
+ # resource path
249
+ local_var_path = '/sandbox/{sandboxIdOrName}/snapshot'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
250
+
251
+ # query parameters
252
+ query_params = opts[:query_params] || {}
253
+
254
+ # header parameters
255
+ header_params = opts[:header_params] || {}
256
+ # HTTP header 'Accept' (if needed)
257
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
258
+ # HTTP header 'Content-Type'
259
+ content_type = @api_client.select_header_content_type(['application/json'])
260
+ if !content_type.nil?
261
+ header_params['Content-Type'] = content_type
262
+ end
263
+ header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
264
+
265
+ # form parameters
266
+ form_params = opts[:form_params] || {}
267
+
268
+ # http body (model)
269
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_sandbox_snapshot)
270
+
271
+ # return_type
272
+ return_type = opts[:debug_return_type] || 'Sandbox'
273
+
274
+ # auth_names
275
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
276
+
277
+ new_options = opts.merge(
278
+ :operation => :"SandboxApi.create_sandbox_snapshot",
279
+ :header_params => header_params,
280
+ :query_params => query_params,
281
+ :form_params => form_params,
282
+ :body => post_body,
283
+ :auth_names => auth_names,
284
+ :return_type => return_type
285
+ )
286
+
287
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
288
+ if @api_client.config.debugging
289
+ @api_client.config.logger.debug "API called: SandboxApi#create_sandbox_snapshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
290
+ end
291
+ return data, status_code, headers
292
+ end
293
+
219
294
  # Create SSH access for sandbox
220
295
  # @param sandbox_id_or_name [String] ID or name of the sandbox
221
296
  # @param [Hash] opts the optional parameters
@@ -421,6 +496,81 @@ module DaytonaApiClient
421
496
  return data, status_code, headers
422
497
  end
423
498
 
499
+ # Fork a sandbox
500
+ # @param sandbox_id_or_name [String]
501
+ # @param fork_sandbox [ForkSandbox]
502
+ # @param [Hash] opts the optional parameters
503
+ # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
504
+ # @return [Sandbox]
505
+ def fork_sandbox(sandbox_id_or_name, fork_sandbox, opts = {})
506
+ data, _status_code, _headers = fork_sandbox_with_http_info(sandbox_id_or_name, fork_sandbox, opts)
507
+ data
508
+ end
509
+
510
+ # Fork a sandbox
511
+ # @param sandbox_id_or_name [String]
512
+ # @param fork_sandbox [ForkSandbox]
513
+ # @param [Hash] opts the optional parameters
514
+ # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
515
+ # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
516
+ def fork_sandbox_with_http_info(sandbox_id_or_name, fork_sandbox, opts = {})
517
+ if @api_client.config.debugging
518
+ @api_client.config.logger.debug 'Calling API: SandboxApi.fork_sandbox ...'
519
+ end
520
+ # verify the required parameter 'sandbox_id_or_name' is set
521
+ if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
522
+ fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.fork_sandbox"
523
+ end
524
+ # verify the required parameter 'fork_sandbox' is set
525
+ if @api_client.config.client_side_validation && fork_sandbox.nil?
526
+ fail ArgumentError, "Missing the required parameter 'fork_sandbox' when calling SandboxApi.fork_sandbox"
527
+ end
528
+ # resource path
529
+ local_var_path = '/sandbox/{sandboxIdOrName}/fork'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
530
+
531
+ # query parameters
532
+ query_params = opts[:query_params] || {}
533
+
534
+ # header parameters
535
+ header_params = opts[:header_params] || {}
536
+ # HTTP header 'Accept' (if needed)
537
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
538
+ # HTTP header 'Content-Type'
539
+ content_type = @api_client.select_header_content_type(['application/json'])
540
+ if !content_type.nil?
541
+ header_params['Content-Type'] = content_type
542
+ end
543
+ header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
544
+
545
+ # form parameters
546
+ form_params = opts[:form_params] || {}
547
+
548
+ # http body (model)
549
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(fork_sandbox)
550
+
551
+ # return_type
552
+ return_type = opts[:debug_return_type] || 'Sandbox'
553
+
554
+ # auth_names
555
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
556
+
557
+ new_options = opts.merge(
558
+ :operation => :"SandboxApi.fork_sandbox",
559
+ :header_params => header_params,
560
+ :query_params => query_params,
561
+ :form_params => form_params,
562
+ :body => post_body,
563
+ :auth_names => auth_names,
564
+ :return_type => return_type
565
+ )
566
+
567
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
568
+ if @api_client.config.debugging
569
+ @api_client.config.logger.debug "API called: SandboxApi#fork_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
570
+ end
571
+ return data, status_code, headers
572
+ end
573
+
424
574
  # Get build logs
425
575
  # This endpoint is deprecated. Use `getBuildLogsUrl` instead.
426
576
  # @param sandbox_id_or_name [String] ID or name of the sandbox
@@ -817,6 +967,137 @@ module DaytonaApiClient
817
967
  return data, status_code, headers
818
968
  end
819
969
 
970
+ # Get sandbox fork ancestor chain
971
+ # @param sandbox_id_or_name [String]
972
+ # @param [Hash] opts the optional parameters
973
+ # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
974
+ # @return [Array<Sandbox>]
975
+ def get_sandbox_ancestors(sandbox_id_or_name, opts = {})
976
+ data, _status_code, _headers = get_sandbox_ancestors_with_http_info(sandbox_id_or_name, opts)
977
+ data
978
+ end
979
+
980
+ # Get sandbox fork ancestor chain
981
+ # @param sandbox_id_or_name [String]
982
+ # @param [Hash] opts the optional parameters
983
+ # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
984
+ # @return [Array<(Array<Sandbox>, Integer, Hash)>] Array<Sandbox> data, response status code and response headers
985
+ def get_sandbox_ancestors_with_http_info(sandbox_id_or_name, opts = {})
986
+ if @api_client.config.debugging
987
+ @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_ancestors ...'
988
+ end
989
+ # verify the required parameter 'sandbox_id_or_name' is set
990
+ if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
991
+ fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_sandbox_ancestors"
992
+ end
993
+ # resource path
994
+ local_var_path = '/sandbox/{sandboxIdOrName}/ancestors'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
995
+
996
+ # query parameters
997
+ query_params = opts[:query_params] || {}
998
+
999
+ # header parameters
1000
+ header_params = opts[:header_params] || {}
1001
+ # HTTP header 'Accept' (if needed)
1002
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1003
+ header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1004
+
1005
+ # form parameters
1006
+ form_params = opts[:form_params] || {}
1007
+
1008
+ # http body (model)
1009
+ post_body = opts[:debug_body]
1010
+
1011
+ # return_type
1012
+ return_type = opts[:debug_return_type] || 'Array<Sandbox>'
1013
+
1014
+ # auth_names
1015
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1016
+
1017
+ new_options = opts.merge(
1018
+ :operation => :"SandboxApi.get_sandbox_ancestors",
1019
+ :header_params => header_params,
1020
+ :query_params => query_params,
1021
+ :form_params => form_params,
1022
+ :body => post_body,
1023
+ :auth_names => auth_names,
1024
+ :return_type => return_type
1025
+ )
1026
+
1027
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1028
+ if @api_client.config.debugging
1029
+ @api_client.config.logger.debug "API called: SandboxApi#get_sandbox_ancestors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1030
+ end
1031
+ return data, status_code, headers
1032
+ end
1033
+
1034
+ # Get sandbox fork children
1035
+ # @param sandbox_id_or_name [String]
1036
+ # @param [Hash] opts the optional parameters
1037
+ # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1038
+ # @option opts [Boolean] :include_destroyed
1039
+ # @return [Array<Sandbox>]
1040
+ def get_sandbox_forks(sandbox_id_or_name, opts = {})
1041
+ data, _status_code, _headers = get_sandbox_forks_with_http_info(sandbox_id_or_name, opts)
1042
+ data
1043
+ end
1044
+
1045
+ # Get sandbox fork children
1046
+ # @param sandbox_id_or_name [String]
1047
+ # @param [Hash] opts the optional parameters
1048
+ # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1049
+ # @option opts [Boolean] :include_destroyed
1050
+ # @return [Array<(Array<Sandbox>, Integer, Hash)>] Array<Sandbox> data, response status code and response headers
1051
+ def get_sandbox_forks_with_http_info(sandbox_id_or_name, opts = {})
1052
+ if @api_client.config.debugging
1053
+ @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_forks ...'
1054
+ end
1055
+ # verify the required parameter 'sandbox_id_or_name' is set
1056
+ if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
1057
+ fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_sandbox_forks"
1058
+ end
1059
+ # resource path
1060
+ local_var_path = '/sandbox/{sandboxIdOrName}/forks'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
1061
+
1062
+ # query parameters
1063
+ query_params = opts[:query_params] || {}
1064
+ query_params[:'includeDestroyed'] = opts[:'include_destroyed'] if !opts[:'include_destroyed'].nil?
1065
+
1066
+ # header parameters
1067
+ header_params = opts[:header_params] || {}
1068
+ # HTTP header 'Accept' (if needed)
1069
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1070
+ header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1071
+
1072
+ # form parameters
1073
+ form_params = opts[:form_params] || {}
1074
+
1075
+ # http body (model)
1076
+ post_body = opts[:debug_body]
1077
+
1078
+ # return_type
1079
+ return_type = opts[:debug_return_type] || 'Array<Sandbox>'
1080
+
1081
+ # auth_names
1082
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1083
+
1084
+ new_options = opts.merge(
1085
+ :operation => :"SandboxApi.get_sandbox_forks",
1086
+ :header_params => header_params,
1087
+ :query_params => query_params,
1088
+ :form_params => form_params,
1089
+ :body => post_body,
1090
+ :auth_names => auth_names,
1091
+ :return_type => return_type
1092
+ )
1093
+
1094
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1095
+ if @api_client.config.debugging
1096
+ @api_client.config.logger.debug "API called: SandboxApi#get_sandbox_forks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1097
+ end
1098
+ return data, status_code, headers
1099
+ end
1100
+
820
1101
  # Get sandbox logs
821
1102
  # Retrieve OTEL logs for a sandbox within a time range
822
1103
  # @param sandbox_id [String] ID of the sandbox
@@ -992,6 +1273,70 @@ module DaytonaApiClient
992
1273
  return data, status_code, headers
993
1274
  end
994
1275
 
1276
+ # Get sandbox fork parent
1277
+ # @param sandbox_id_or_name [String]
1278
+ # @param [Hash] opts the optional parameters
1279
+ # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1280
+ # @return [Sandbox]
1281
+ def get_sandbox_parent(sandbox_id_or_name, opts = {})
1282
+ data, _status_code, _headers = get_sandbox_parent_with_http_info(sandbox_id_or_name, opts)
1283
+ data
1284
+ end
1285
+
1286
+ # Get sandbox fork parent
1287
+ # @param sandbox_id_or_name [String]
1288
+ # @param [Hash] opts the optional parameters
1289
+ # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1290
+ # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
1291
+ def get_sandbox_parent_with_http_info(sandbox_id_or_name, opts = {})
1292
+ if @api_client.config.debugging
1293
+ @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_parent ...'
1294
+ end
1295
+ # verify the required parameter 'sandbox_id_or_name' is set
1296
+ if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
1297
+ fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_sandbox_parent"
1298
+ end
1299
+ # resource path
1300
+ local_var_path = '/sandbox/{sandboxIdOrName}/parent'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
1301
+
1302
+ # query parameters
1303
+ query_params = opts[:query_params] || {}
1304
+
1305
+ # header parameters
1306
+ header_params = opts[:header_params] || {}
1307
+ # HTTP header 'Accept' (if needed)
1308
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1309
+ header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1310
+
1311
+ # form parameters
1312
+ form_params = opts[:form_params] || {}
1313
+
1314
+ # http body (model)
1315
+ post_body = opts[:debug_body]
1316
+
1317
+ # return_type
1318
+ return_type = opts[:debug_return_type] || 'Sandbox'
1319
+
1320
+ # auth_names
1321
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1322
+
1323
+ new_options = opts.merge(
1324
+ :operation => :"SandboxApi.get_sandbox_parent",
1325
+ :header_params => header_params,
1326
+ :query_params => query_params,
1327
+ :form_params => form_params,
1328
+ :body => post_body,
1329
+ :auth_names => auth_names,
1330
+ :return_type => return_type
1331
+ )
1332
+
1333
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1334
+ if @api_client.config.debugging
1335
+ @api_client.config.logger.debug "API called: SandboxApi#get_sandbox_parent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1336
+ end
1337
+ return data, status_code, headers
1338
+ end
1339
+
995
1340
  # Get trace spans
996
1341
  # Retrieve all spans for a specific trace
997
1342
  # @param sandbox_id [String] ID of the sandbox
@@ -1485,7 +1830,7 @@ module DaytonaApiClient
1485
1830
  fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
1486
1831
  end
1487
1832
 
1488
- allowable_values = ["creating", "restoring", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving", "resizing"]
1833
+ allowable_values = ["creating", "restoring", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving", "resizing", "snapshotting", "forking"]
1489
1834
  if @api_client.config.client_side_validation && opts[:'states'] && !opts[:'states'].all? { |item| allowable_values.include?(item) }
1490
1835
  fail ArgumentError, "invalid value for \"states\", must include one of #{allowable_values}"
1491
1836
  end
@@ -0,0 +1,238 @@
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.12.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DaytonaApiClient
17
+ class CreateSandboxSnapshot
18
+ # Name for the new snapshot
19
+ attr_accessor :name
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'name' => :'name'
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
+ :'name' => :'String'
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::CreateSandboxSnapshot` 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::CreateSandboxSnapshot`. 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?(:'name')
68
+ self.name = attributes[:'name']
69
+ else
70
+ self.name = 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 @name.nil?
80
+ invalid_properties.push('invalid value for "name", name 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 @name.nil?
91
+ true
92
+ end
93
+
94
+ # Custom attribute writer method with validation
95
+ # @param [Object] name Value to be assigned
96
+ def name=(name)
97
+ if name.nil?
98
+ fail ArgumentError, 'name cannot be nil'
99
+ end
100
+
101
+ @name = name
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
+ name == o.name
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
+ [name].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
+ # Deserializes the data based on type
148
+ # @param string type Data type
149
+ # @param string value Value to be deserialized
150
+ # @return [Object] Deserialized data
151
+ def self._deserialize(type, value)
152
+ case type.to_sym
153
+ when :Time
154
+ Time.parse(value)
155
+ when :Date
156
+ Date.parse(value)
157
+ when :String
158
+ value.to_s
159
+ when :Integer
160
+ value.to_i
161
+ when :Float
162
+ value.to_f
163
+ when :Boolean
164
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
165
+ true
166
+ else
167
+ false
168
+ end
169
+ when :Object
170
+ # generic object (usually a Hash), return directly
171
+ value
172
+ when /\AArray<(?<inner_type>.+)>\z/
173
+ inner_type = Regexp.last_match[:inner_type]
174
+ value.map { |v| _deserialize(inner_type, v) }
175
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
176
+ k_type = Regexp.last_match[:k_type]
177
+ v_type = Regexp.last_match[:v_type]
178
+ {}.tap do |hash|
179
+ value.each do |k, v|
180
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
181
+ end
182
+ end
183
+ else # model
184
+ # models (e.g. Pet) or oneOf
185
+ klass = DaytonaApiClient.const_get(type)
186
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
187
+ end
188
+ end
189
+
190
+ # Returns the string representation of the object
191
+ # @return [String] String presentation of the object
192
+ def to_s
193
+ to_hash.to_s
194
+ end
195
+
196
+ # to_body is an alias to to_hash (backward compatibility)
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_body
199
+ to_hash
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ if value.nil?
209
+ is_nullable = self.class.openapi_nullable.include?(attr)
210
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
211
+ end
212
+
213
+ hash[param] = _to_hash(value)
214
+ end
215
+ hash
216
+ end
217
+
218
+ # Outputs non-array value in the form of hash
219
+ # For object, use to_hash. Otherwise, just return the value
220
+ # @param [Object] value Any valid value
221
+ # @return [Hash] Returns the value in the form of hash
222
+ def _to_hash(value)
223
+ if value.is_a?(Array)
224
+ value.compact.map { |v| _to_hash(v) }
225
+ elsif value.is_a?(Hash)
226
+ {}.tap do |hash|
227
+ value.each { |k, v| hash[k] = _to_hash(v) }
228
+ end
229
+ elsif value.respond_to? :to_hash
230
+ value.to_hash
231
+ else
232
+ value
233
+ end
234
+ end
235
+
236
+ end
237
+
238
+ end
@@ -0,0 +1,221 @@
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.12.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DaytonaApiClient
17
+ class ForkSandbox
18
+ # The name for the forked sandbox. If not provided, a unique name will be generated.
19
+ attr_accessor :name
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'name' => :'name'
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
+ :'name' => :'String'
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::ForkSandbox` 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::ForkSandbox`. 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?(:'name')
68
+ self.name = attributes[:'name']
69
+ end
70
+ end
71
+
72
+ # Show invalid properties with the reasons. Usually used together with valid?
73
+ # @return Array for valid properties with the reasons
74
+ def list_invalid_properties
75
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ warn '[DEPRECATED] the `valid?` method is obsolete'
84
+ true
85
+ end
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ name == o.name
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [name].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def self.build_from_hash(attributes)
111
+ return nil unless attributes.is_a?(Hash)
112
+ attributes = attributes.transform_keys(&:to_sym)
113
+ transformed_hash = {}
114
+ openapi_types.each_pair do |key, type|
115
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
116
+ transformed_hash["#{key}"] = nil
117
+ elsif type =~ /\AArray<(.*)>/i
118
+ # check to ensure the input is an array given that the attribute
119
+ # is documented as an array but the input is not
120
+ if attributes[attribute_map[key]].is_a?(Array)
121
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
122
+ end
123
+ elsif !attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
125
+ end
126
+ end
127
+ new(transformed_hash)
128
+ end
129
+
130
+ # Deserializes the data based on type
131
+ # @param string type Data type
132
+ # @param string value Value to be deserialized
133
+ # @return [Object] Deserialized data
134
+ def self._deserialize(type, value)
135
+ case type.to_sym
136
+ when :Time
137
+ Time.parse(value)
138
+ when :Date
139
+ Date.parse(value)
140
+ when :String
141
+ value.to_s
142
+ when :Integer
143
+ value.to_i
144
+ when :Float
145
+ value.to_f
146
+ when :Boolean
147
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
148
+ true
149
+ else
150
+ false
151
+ end
152
+ when :Object
153
+ # generic object (usually a Hash), return directly
154
+ value
155
+ when /\AArray<(?<inner_type>.+)>\z/
156
+ inner_type = Regexp.last_match[:inner_type]
157
+ value.map { |v| _deserialize(inner_type, v) }
158
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
159
+ k_type = Regexp.last_match[:k_type]
160
+ v_type = Regexp.last_match[:v_type]
161
+ {}.tap do |hash|
162
+ value.each do |k, v|
163
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
164
+ end
165
+ end
166
+ else # model
167
+ # models (e.g. Pet) or oneOf
168
+ klass = DaytonaApiClient.const_get(type)
169
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
170
+ end
171
+ end
172
+
173
+ # Returns the string representation of the object
174
+ # @return [String] String presentation of the object
175
+ def to_s
176
+ to_hash.to_s
177
+ end
178
+
179
+ # to_body is an alias to to_hash (backward compatibility)
180
+ # @return [Hash] Returns the object in the form of hash
181
+ def to_body
182
+ to_hash
183
+ end
184
+
185
+ # Returns the object in the form of hash
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_hash
188
+ hash = {}
189
+ self.class.attribute_map.each_pair do |attr, param|
190
+ value = self.send(attr)
191
+ if value.nil?
192
+ is_nullable = self.class.openapi_nullable.include?(attr)
193
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
194
+ end
195
+
196
+ hash[param] = _to_hash(value)
197
+ end
198
+ hash
199
+ end
200
+
201
+ # Outputs non-array value in the form of hash
202
+ # For object, use to_hash. Otherwise, just return the value
203
+ # @param [Object] value Any valid value
204
+ # @return [Hash] Returns the value in the form of hash
205
+ def _to_hash(value)
206
+ if value.is_a?(Array)
207
+ value.compact.map { |v| _to_hash(v) }
208
+ elsif value.is_a?(Hash)
209
+ {}.tap do |hash|
210
+ value.each { |k, v| hash[k] = _to_hash(v) }
211
+ end
212
+ elsif value.respond_to? :to_hash
213
+ value.to_hash
214
+ else
215
+ value
216
+ end
217
+ end
218
+
219
+ end
220
+
221
+ end
@@ -27,9 +27,11 @@ module DaytonaApiClient
27
27
  INSPECT_SNAPSHOT_IN_REGISTRY = "INSPECT_SNAPSHOT_IN_REGISTRY".freeze
28
28
  REMOVE_SNAPSHOT = "REMOVE_SNAPSHOT".freeze
29
29
  UPDATE_SANDBOX_NETWORK_SETTINGS = "UPDATE_SANDBOX_NETWORK_SETTINGS".freeze
30
+ SNAPSHOT_SANDBOX = "SNAPSHOT_SANDBOX".freeze
31
+ FORK_SANDBOX = "FORK_SANDBOX".freeze
30
32
 
31
33
  def self.all_vars
32
- @all_vars ||= [CREATE_SANDBOX, START_SANDBOX, STOP_SANDBOX, DESTROY_SANDBOX, RESIZE_SANDBOX, CREATE_BACKUP, BUILD_SNAPSHOT, PULL_SNAPSHOT, RECOVER_SANDBOX, INSPECT_SNAPSHOT_IN_REGISTRY, REMOVE_SNAPSHOT, UPDATE_SANDBOX_NETWORK_SETTINGS].freeze
34
+ @all_vars ||= [CREATE_SANDBOX, START_SANDBOX, STOP_SANDBOX, DESTROY_SANDBOX, RESIZE_SANDBOX, CREATE_BACKUP, BUILD_SNAPSHOT, PULL_SNAPSHOT, RECOVER_SANDBOX, INSPECT_SNAPSHOT_IN_REGISTRY, REMOVE_SNAPSHOT, UPDATE_SANDBOX_NETWORK_SETTINGS, SNAPSHOT_SANDBOX, FORK_SANDBOX].freeze
33
35
  end
34
36
 
35
37
  # Builds the enum from string
@@ -99,6 +99,9 @@ module DaytonaApiClient
99
99
  # The api version of the runner
100
100
  attr_accessor :api_version
101
101
 
102
+ # The class of the runner
103
+ attr_accessor :runner_class
104
+
102
105
  # The app version of the runner
103
106
  attr_accessor :app_version
104
107
 
@@ -155,6 +158,7 @@ module DaytonaApiClient
155
158
  :'updated_at' => :'updatedAt',
156
159
  :'version' => :'version',
157
160
  :'api_version' => :'apiVersion',
161
+ :'runner_class' => :'runnerClass',
158
162
  :'app_version' => :'appVersion'
159
163
  }
160
164
  end
@@ -200,6 +204,7 @@ module DaytonaApiClient
200
204
  :'updated_at' => :'String',
201
205
  :'version' => :'String',
202
206
  :'api_version' => :'String',
207
+ :'runner_class' => :'RunnerClass',
203
208
  :'app_version' => :'String'
204
209
  }
205
210
  end
@@ -364,6 +369,12 @@ module DaytonaApiClient
364
369
  self.api_version = nil
365
370
  end
366
371
 
372
+ if attributes.key?(:'runner_class')
373
+ self.runner_class = attributes[:'runner_class']
374
+ else
375
+ self.runner_class = nil
376
+ end
377
+
367
378
  if attributes.key?(:'app_version')
368
379
  self.app_version = attributes[:'app_version']
369
380
  end
@@ -426,6 +437,10 @@ module DaytonaApiClient
426
437
  invalid_properties.push('invalid value for "api_version", api_version cannot be nil.')
427
438
  end
428
439
 
440
+ if @runner_class.nil?
441
+ invalid_properties.push('invalid value for "runner_class", runner_class cannot be nil.')
442
+ end
443
+
429
444
  invalid_properties
430
445
  end
431
446
 
@@ -446,6 +461,7 @@ module DaytonaApiClient
446
461
  return false if @updated_at.nil?
447
462
  return false if @version.nil?
448
463
  return false if @api_version.nil?
464
+ return false if @runner_class.nil?
449
465
  true
450
466
  end
451
467
 
@@ -579,6 +595,16 @@ module DaytonaApiClient
579
595
  @api_version = api_version
580
596
  end
581
597
 
598
+ # Custom attribute writer method with validation
599
+ # @param [Object] runner_class Value to be assigned
600
+ def runner_class=(runner_class)
601
+ if runner_class.nil?
602
+ fail ArgumentError, 'runner_class cannot be nil'
603
+ end
604
+
605
+ @runner_class = runner_class
606
+ end
607
+
582
608
  # Checks equality by comparing each attribute.
583
609
  # @param [Object] Object to be compared
584
610
  def ==(o)
@@ -612,6 +638,7 @@ module DaytonaApiClient
612
638
  updated_at == o.updated_at &&
613
639
  version == o.version &&
614
640
  api_version == o.api_version &&
641
+ runner_class == o.runner_class &&
615
642
  app_version == o.app_version
616
643
  end
617
644
 
@@ -624,7 +651,7 @@ module DaytonaApiClient
624
651
  # Calculates hash code according to all attributes.
625
652
  # @return [Integer] Hash code
626
653
  def hash
627
- [id, domain, api_url, proxy_url, cpu, memory, disk, gpu, gpu_type, _class, current_cpu_usage_percentage, current_memory_usage_percentage, current_disk_usage_percentage, current_allocated_cpu, current_allocated_memory_gi_b, current_allocated_disk_gi_b, current_snapshot_count, current_started_sandboxes, availability_score, region, name, state, last_checked, unschedulable, created_at, updated_at, version, api_version, app_version].hash
654
+ [id, domain, api_url, proxy_url, cpu, memory, disk, gpu, gpu_type, _class, current_cpu_usage_percentage, current_memory_usage_percentage, current_disk_usage_percentage, current_allocated_cpu, current_allocated_memory_gi_b, current_allocated_disk_gi_b, current_snapshot_count, current_started_sandboxes, availability_score, region, name, state, last_checked, unschedulable, created_at, updated_at, version, api_version, runner_class, app_version].hash
628
655
  end
629
656
 
630
657
  # Builds the object from hash
@@ -0,0 +1,40 @@
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.12.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DaytonaApiClient
17
+ class RunnerClass
18
+ CONTAINER = "container".freeze
19
+ VM = "vm".freeze
20
+
21
+ def self.all_vars
22
+ @all_vars ||= [CONTAINER, VM].freeze
23
+ end
24
+
25
+ # Builds the enum from string
26
+ # @param [String] The enum value in the form of the string
27
+ # @return [String] The enum value
28
+ def self.build_from_hash(value)
29
+ new.build_from_hash(value)
30
+ end
31
+
32
+ # Builds the enum from string
33
+ # @param [String] The enum value in the form of the string
34
+ # @return [String] The enum value
35
+ def build_from_hash(value)
36
+ return value if RunnerClass.all_vars.include?(value)
37
+ raise "Invalid ENUM value #{value} for class #RunnerClass"
38
+ end
39
+ end
40
+ end
@@ -99,6 +99,9 @@ module DaytonaApiClient
99
99
  # The api version of the runner
100
100
  attr_accessor :api_version
101
101
 
102
+ # The class of the runner
103
+ attr_accessor :runner_class
104
+
102
105
  # The app version of the runner
103
106
  attr_accessor :app_version
104
107
 
@@ -161,6 +164,7 @@ module DaytonaApiClient
161
164
  :'updated_at' => :'updatedAt',
162
165
  :'version' => :'version',
163
166
  :'api_version' => :'apiVersion',
167
+ :'runner_class' => :'runnerClass',
164
168
  :'app_version' => :'appVersion',
165
169
  :'api_key' => :'apiKey',
166
170
  :'region_type' => :'regionType'
@@ -208,6 +212,7 @@ module DaytonaApiClient
208
212
  :'updated_at' => :'String',
209
213
  :'version' => :'String',
210
214
  :'api_version' => :'String',
215
+ :'runner_class' => :'RunnerClass',
211
216
  :'app_version' => :'String',
212
217
  :'api_key' => :'String',
213
218
  :'region_type' => :'RegionType'
@@ -374,6 +379,12 @@ module DaytonaApiClient
374
379
  self.api_version = nil
375
380
  end
376
381
 
382
+ if attributes.key?(:'runner_class')
383
+ self.runner_class = attributes[:'runner_class']
384
+ else
385
+ self.runner_class = nil
386
+ end
387
+
377
388
  if attributes.key?(:'app_version')
378
389
  self.app_version = attributes[:'app_version']
379
390
  end
@@ -446,6 +457,10 @@ module DaytonaApiClient
446
457
  invalid_properties.push('invalid value for "api_version", api_version cannot be nil.')
447
458
  end
448
459
 
460
+ if @runner_class.nil?
461
+ invalid_properties.push('invalid value for "runner_class", runner_class cannot be nil.')
462
+ end
463
+
449
464
  if @api_key.nil?
450
465
  invalid_properties.push('invalid value for "api_key", api_key cannot be nil.')
451
466
  end
@@ -470,6 +485,7 @@ module DaytonaApiClient
470
485
  return false if @updated_at.nil?
471
486
  return false if @version.nil?
472
487
  return false if @api_version.nil?
488
+ return false if @runner_class.nil?
473
489
  return false if @api_key.nil?
474
490
  true
475
491
  end
@@ -604,6 +620,16 @@ module DaytonaApiClient
604
620
  @api_version = api_version
605
621
  end
606
622
 
623
+ # Custom attribute writer method with validation
624
+ # @param [Object] runner_class Value to be assigned
625
+ def runner_class=(runner_class)
626
+ if runner_class.nil?
627
+ fail ArgumentError, 'runner_class cannot be nil'
628
+ end
629
+
630
+ @runner_class = runner_class
631
+ end
632
+
607
633
  # Custom attribute writer method with validation
608
634
  # @param [Object] api_key Value to be assigned
609
635
  def api_key=(api_key)
@@ -647,6 +673,7 @@ module DaytonaApiClient
647
673
  updated_at == o.updated_at &&
648
674
  version == o.version &&
649
675
  api_version == o.api_version &&
676
+ runner_class == o.runner_class &&
650
677
  app_version == o.app_version &&
651
678
  api_key == o.api_key &&
652
679
  region_type == o.region_type
@@ -661,7 +688,7 @@ module DaytonaApiClient
661
688
  # Calculates hash code according to all attributes.
662
689
  # @return [Integer] Hash code
663
690
  def hash
664
- [id, domain, api_url, proxy_url, cpu, memory, disk, gpu, gpu_type, _class, current_cpu_usage_percentage, current_memory_usage_percentage, current_disk_usage_percentage, current_allocated_cpu, current_allocated_memory_gi_b, current_allocated_disk_gi_b, current_snapshot_count, current_started_sandboxes, availability_score, region, name, state, last_checked, unschedulable, created_at, updated_at, version, api_version, app_version, api_key, region_type].hash
691
+ [id, domain, api_url, proxy_url, cpu, memory, disk, gpu, gpu_type, _class, current_cpu_usage_percentage, current_memory_usage_percentage, current_disk_usage_percentage, current_allocated_cpu, current_allocated_memory_gi_b, current_allocated_disk_gi_b, current_snapshot_count, current_started_sandboxes, availability_score, region, name, state, last_checked, unschedulable, created_at, updated_at, version, api_version, runner_class, app_version, api_key, region_type].hash
665
692
  end
666
693
 
667
694
  # Builds the object from hash
@@ -32,9 +32,11 @@ module DaytonaApiClient
32
32
  ARCHIVED = "archived".freeze
33
33
  ARCHIVING = "archiving".freeze
34
34
  RESIZING = "resizing".freeze
35
+ SNAPSHOTTING = "snapshotting".freeze
36
+ FORKING = "forking".freeze
35
37
 
36
38
  def self.all_vars
37
- @all_vars ||= [CREATING, RESTORING, DESTROYED, DESTROYING, STARTED, STOPPED, STARTING, STOPPING, ERROR, BUILD_FAILED, PENDING_BUILD, BUILDING_SNAPSHOT, UNKNOWN, PULLING_SNAPSHOT, ARCHIVED, ARCHIVING, RESIZING].freeze
39
+ @all_vars ||= [CREATING, RESTORING, DESTROYED, DESTROYING, STARTED, STOPPED, STARTING, STOPPING, ERROR, BUILD_FAILED, PENDING_BUILD, BUILDING_SNAPSHOT, UNKNOWN, PULLING_SNAPSHOT, ARCHIVED, ARCHIVING, RESIZING, SNAPSHOTTING, FORKING].freeze
38
40
  end
39
41
 
40
42
  # Builds the enum from string
@@ -128,7 +128,7 @@ module DaytonaApiClient
128
128
  def valid?
129
129
  warn '[DEPRECATED] the `valid?` method is obsolete'
130
130
  return false if @state.nil?
131
- state_validator = EnumAttributeValidator.new('String', ["creating", "restoring", "destroyed", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving", "resizing"])
131
+ state_validator = EnumAttributeValidator.new('String', ["creating", "restoring", "destroyed", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving", "resizing", "snapshotting", "forking"])
132
132
  return false unless state_validator.valid?(@state)
133
133
  true
134
134
  end
@@ -136,7 +136,7 @@ module DaytonaApiClient
136
136
  # Custom attribute writer method checking allowed values (enum).
137
137
  # @param [Object] state Object to be assigned
138
138
  def state=(state)
139
- validator = EnumAttributeValidator.new('String', ["creating", "restoring", "destroyed", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving", "resizing"])
139
+ validator = EnumAttributeValidator.new('String', ["creating", "restoring", "destroyed", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving", "resizing", "snapshotting", "forking"])
140
140
  unless validator.valid?(state)
141
141
  fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
142
142
  end
@@ -11,5 +11,5 @@ Generator version: 7.12.0
11
11
  =end
12
12
 
13
13
  module DaytonaApiClient
14
- VERSION = '0.164.0'
14
+ VERSION = '0.167.0.alpha.1'
15
15
  end
@@ -46,6 +46,7 @@ require 'daytona_api_client/models/create_region_response'
46
46
  require 'daytona_api_client/models/create_runner'
47
47
  require 'daytona_api_client/models/create_runner_response'
48
48
  require 'daytona_api_client/models/create_sandbox'
49
+ require 'daytona_api_client/models/create_sandbox_snapshot'
49
50
  require 'daytona_api_client/models/create_session_request'
50
51
  require 'daytona_api_client/models/create_snapshot'
51
52
  require 'daytona_api_client/models/create_user'
@@ -59,6 +60,7 @@ require 'daytona_api_client/models/execute_request'
59
60
  require 'daytona_api_client/models/execute_response'
60
61
  require 'daytona_api_client/models/file_info'
61
62
  require 'daytona_api_client/models/file_status'
63
+ require 'daytona_api_client/models/fork_sandbox'
62
64
  require 'daytona_api_client/models/git_add_request'
63
65
  require 'daytona_api_client/models/git_branch_request'
64
66
  require 'daytona_api_client/models/git_checkout_request'
@@ -141,6 +143,7 @@ require 'daytona_api_client/models/replace_request'
141
143
  require 'daytona_api_client/models/replace_result'
142
144
  require 'daytona_api_client/models/resize_sandbox'
143
145
  require 'daytona_api_client/models/runner'
146
+ require 'daytona_api_client/models/runner_class'
144
147
  require 'daytona_api_client/models/runner_full'
145
148
  require 'daytona_api_client/models/runner_health_metrics'
146
149
  require 'daytona_api_client/models/runner_healthcheck'
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.164.0
4
+ version: 0.167.0.alpha.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - daytonaio
@@ -117,6 +117,7 @@ files:
117
117
  - lib/daytona_api_client/models/create_runner.rb
118
118
  - lib/daytona_api_client/models/create_runner_response.rb
119
119
  - lib/daytona_api_client/models/create_sandbox.rb
120
+ - lib/daytona_api_client/models/create_sandbox_snapshot.rb
120
121
  - lib/daytona_api_client/models/create_session_request.rb
121
122
  - lib/daytona_api_client/models/create_snapshot.rb
122
123
  - lib/daytona_api_client/models/create_user.rb
@@ -130,6 +131,7 @@ files:
130
131
  - lib/daytona_api_client/models/execute_response.rb
131
132
  - lib/daytona_api_client/models/file_info.rb
132
133
  - lib/daytona_api_client/models/file_status.rb
134
+ - lib/daytona_api_client/models/fork_sandbox.rb
133
135
  - lib/daytona_api_client/models/git_add_request.rb
134
136
  - lib/daytona_api_client/models/git_branch_request.rb
135
137
  - lib/daytona_api_client/models/git_checkout_request.rb
@@ -212,6 +214,7 @@ files:
212
214
  - lib/daytona_api_client/models/replace_result.rb
213
215
  - lib/daytona_api_client/models/resize_sandbox.rb
214
216
  - lib/daytona_api_client/models/runner.rb
217
+ - lib/daytona_api_client/models/runner_class.rb
215
218
  - lib/daytona_api_client/models/runner_full.rb
216
219
  - lib/daytona_api_client/models/runner_health_metrics.rb
217
220
  - lib/daytona_api_client/models/runner_healthcheck.rb