daytona_api_client 0.222.0 → 1.0.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 +4 -4
- data/Gemfile +9 -0
- data/Gemfile.lock +101 -0
- data/daytona_api_client.gemspec +4 -4
- data/lib/daytona_api_client/api/api_keys_api.rb +2 -2
- data/lib/daytona_api_client/api/audit_api.rb +102 -59
- data/lib/daytona_api_client/api/config_api.rb +1 -1
- data/lib/daytona_api_client/api/docker_registry_api.rb +67 -6
- data/lib/daytona_api_client/api/health_api.rb +3 -54
- data/lib/daytona_api_client/api/object_storage_api.rb +1 -1
- data/lib/daytona_api_client/api/organizations_api.rb +270 -1652
- data/lib/daytona_api_client/api/preview_api.rb +8 -202
- data/lib/daytona_api_client/api/runners_api.rb +22 -470
- data/lib/daytona_api_client/api/sandbox_api.rb +429 -2200
- data/lib/daytona_api_client/api/snapshots_api.rb +117 -46
- data/lib/daytona_api_client/api/toolbox_api.rb +5108 -0
- data/lib/daytona_api_client/api/users_api.rb +172 -100
- data/lib/daytona_api_client/api/volumes_api.rb +2 -2
- data/lib/daytona_api_client/api/webhooks_api.rb +164 -27
- data/lib/daytona_api_client/api/workspace_api.rb +955 -0
- data/lib/daytona_api_client/api_client.rb +4 -8
- data/lib/daytona_api_client/api_error.rb +1 -1
- data/lib/daytona_api_client/configuration.rb +2 -5
- data/lib/daytona_api_client/models/account_provider.rb +93 -51
- data/lib/daytona_api_client/models/announcement.rb +74 -3
- data/lib/daytona_api_client/models/api_key_list.rb +78 -17
- data/lib/daytona_api_client/models/api_key_response.rb +74 -3
- data/lib/daytona_api_client/models/audit_log.rb +75 -22
- data/lib/daytona_api_client/models/build_info.rb +78 -34
- data/lib/daytona_api_client/models/{create_runner_response.rb → command.rb} +104 -23
- data/lib/daytona_api_client/models/completion_context.rb +244 -0
- data/lib/daytona_api_client/models/completion_item.rb +289 -0
- data/lib/daytona_api_client/models/completion_list.rb +263 -0
- data/lib/daytona_api_client/models/compressed_screenshot_response.rb +256 -0
- data/lib/daytona_api_client/models/computer_use_start_response.rb +263 -0
- data/lib/daytona_api_client/models/{audit_target_scenario.rb → computer_use_status_response.rb} +96 -44
- data/lib/daytona_api_client/models/computer_use_stop_response.rb +263 -0
- data/lib/daytona_api_client/models/create_api_key.rb +75 -4
- data/lib/daytona_api_client/models/create_audit_log.rb +350 -0
- data/lib/daytona_api_client/models/create_build_info.rb +74 -3
- data/lib/daytona_api_client/models/create_docker_registry.rb +139 -7
- data/lib/daytona_api_client/models/create_linked_account.rb +74 -3
- data/lib/daytona_api_client/models/create_organization.rb +78 -34
- data/lib/daytona_api_client/models/create_organization_invitation.rb +76 -5
- data/lib/daytona_api_client/models/create_organization_quota.rb +290 -0
- data/lib/daytona_api_client/models/create_organization_role.rb +74 -3
- data/lib/daytona_api_client/models/create_runner.rb +361 -51
- data/lib/daytona_api_client/models/create_sandbox.rb +117 -130
- data/lib/daytona_api_client/models/{signed_port_preview_url.rb → create_session_request.rb} +93 -103
- data/lib/daytona_api_client/models/create_snapshot.rb +88 -61
- data/lib/daytona_api_client/models/{volume_created_webhook.rb → create_user.rb} +113 -131
- data/lib/daytona_api_client/models/create_volume.rb +74 -3
- data/lib/daytona_api_client/models/create_workspace.rb +411 -0
- data/lib/daytona_api_client/models/daytona_configuration.rb +78 -140
- data/lib/daytona_api_client/models/{runner_service_health.rb → display_info_response.rb} +95 -59
- data/lib/daytona_api_client/models/docker_registry.rb +76 -5
- data/lib/daytona_api_client/models/{paginated_jobs.rb → download_files.rb} +94 -100
- data/lib/daytona_api_client/models/{create_warm_pool.rb → execute_request.rb} +106 -62
- data/lib/daytona_api_client/models/{metric_data_point.rb → execute_response.rb} +109 -38
- data/lib/daytona_api_client/models/file_info.rb +417 -0
- data/lib/daytona_api_client/models/{snapshot_removed_webhook.rb → file_status.rb} +133 -142
- data/lib/daytona_api_client/models/git_add_request.rb +264 -0
- data/lib/daytona_api_client/models/{create_secret.rb → git_branch_request.rb} +106 -59
- data/lib/daytona_api_client/models/git_checkout_request.rb +261 -0
- data/lib/daytona_api_client/models/{toolbox_proxy_url.rb → git_clone_request.rb} +142 -10
- data/lib/daytona_api_client/models/{snapshot_created_webhook.rb → git_commit_info.rb} +151 -161
- data/lib/daytona_api_client/models/git_commit_request.rb +325 -0
- data/lib/daytona_api_client/models/{runner_healthcheck.rb → git_commit_response.rb} +92 -74
- data/lib/daytona_api_client/models/{create_region.rb → git_delete_branch_request.rb} +106 -54
- data/lib/daytona_api_client/models/{snapshot_manager_credentials.rb → git_repo_request.rb} +96 -35
- data/lib/daytona_api_client/models/git_status.rb +290 -0
- data/lib/daytona_api_client/models/health_controller_check200_response.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check200_response_info_value.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check503_response.rb +74 -3
- data/lib/daytona_api_client/models/{oidc_id_p_config_response.rb → keyboard_hotkey_request.rb} +93 -59
- data/lib/daytona_api_client/models/{create_region_response.rb → keyboard_press_request.rb} +102 -63
- data/lib/daytona_api_client/models/keyboard_type_request.rb +246 -0
- data/lib/daytona_api_client/models/list_branch_response.rb +237 -0
- data/lib/daytona_api_client/models/lsp_completion_params.rb +325 -0
- data/lib/daytona_api_client/models/lsp_document_request.rb +290 -0
- data/lib/daytona_api_client/models/lsp_location.rb +261 -0
- data/lib/daytona_api_client/models/{gpu_capacity.rb → lsp_server_request.rb} +109 -104
- data/lib/daytona_api_client/models/{secret.rb → lsp_symbol.rb} +121 -146
- data/lib/daytona_api_client/models/match.rb +287 -0
- data/lib/daytona_api_client/models/mouse_click_request.rb +283 -0
- data/lib/daytona_api_client/models/mouse_click_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_drag_request.rb +327 -0
- data/lib/daytona_api_client/models/mouse_drag_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_move_request.rb +263 -0
- data/lib/daytona_api_client/models/mouse_move_response.rb +263 -0
- data/lib/daytona_api_client/models/{available_sandbox_class.rb → mouse_position.rb} +109 -95
- data/lib/daytona_api_client/models/mouse_scroll_request.rb +300 -0
- data/lib/daytona_api_client/models/{test_identity_provider_connection_response.rb → mouse_scroll_response.rb} +81 -30
- data/lib/daytona_api_client/models/oidc_config.rb +78 -78
- data/lib/daytona_api_client/models/organization.rb +159 -372
- data/lib/daytona_api_client/models/organization_invitation.rb +78 -7
- data/lib/daytona_api_client/models/organization_role.rb +74 -3
- data/lib/daytona_api_client/models/organization_sandbox_default_limited_network_egress.rb +236 -0
- data/lib/daytona_api_client/models/organization_suspension.rb +290 -0
- data/lib/daytona_api_client/models/organization_usage_overview.rb +220 -21
- data/lib/daytona_api_client/models/organization_user.rb +76 -5
- data/lib/daytona_api_client/models/paginated_audit_logs.rb +80 -19
- data/lib/daytona_api_client/models/{paginated_traces.rb → paginated_sandboxes.rb} +80 -13
- data/lib/daytona_api_client/models/paginated_snapshots.rb +77 -6
- data/lib/daytona_api_client/models/{paginated_logs.rb → paginated_snapshots_dto.rb} +80 -13
- data/lib/daytona_api_client/models/port_preview_url.rb +88 -34
- data/lib/daytona_api_client/models/position.rb +261 -0
- data/lib/daytona_api_client/models/posthog_config.rb +74 -3
- data/lib/daytona_api_client/models/process_errors_response.rb +263 -0
- data/lib/daytona_api_client/models/process_logs_response.rb +263 -0
- data/lib/daytona_api_client/models/process_restart_response.rb +263 -0
- data/lib/daytona_api_client/models/process_status_response.rb +263 -0
- data/lib/daytona_api_client/models/{update_last_activity.rb → project_dir_response.rb} +83 -13
- data/lib/daytona_api_client/models/{pending_sso_link.rb → pty_create_request.rb} +114 -109
- data/lib/daytona_api_client/models/pty_create_response.rb +236 -0
- data/lib/daytona_api_client/models/{sandbox_identity.rb → pty_list_response.rb} +95 -49
- data/lib/daytona_api_client/models/pty_resize_request.rb +263 -0
- data/lib/daytona_api_client/models/pty_session_info.rb +425 -0
- data/lib/daytona_api_client/models/range.rb +261 -0
- data/lib/daytona_api_client/models/region.rb +78 -192
- data/lib/daytona_api_client/models/{regenerate_api_key_response.rb → region_screenshot_response.rb} +113 -22
- data/lib/daytona_api_client/models/registry_push_access_dto.rb +74 -3
- data/lib/daytona_api_client/models/replace_request.rb +289 -0
- data/lib/daytona_api_client/models/{oidc_id_p_config.rb → replace_result.rb} +95 -88
- data/lib/daytona_api_client/models/runner.rb +215 -155
- data/lib/daytona_api_client/models/runner_snapshot_dto.rb +91 -3
- data/lib/daytona_api_client/models/runner_state.rb +3 -4
- data/lib/daytona_api_client/models/sandbox.rb +105 -258
- data/lib/daytona_api_client/models/sandbox_class.rb +6 -7
- data/lib/daytona_api_client/models/sandbox_desired_state.rb +3 -5
- data/lib/daytona_api_client/models/{create_sandbox_snapshot.rb → sandbox_info.rb} +113 -17
- data/lib/daytona_api_client/models/sandbox_labels.rb +74 -3
- data/lib/daytona_api_client/models/sandbox_state.rb +3 -10
- data/lib/daytona_api_client/models/sandbox_volume.rb +79 -18
- data/lib/daytona_api_client/models/screenshot_response.rb +256 -0
- data/lib/daytona_api_client/models/{gpu_capacity_response.rb → search_files_response.rb} +93 -49
- data/lib/daytona_api_client/models/send_webhook_dto.rb +273 -0
- data/lib/daytona_api_client/models/session.rb +251 -0
- data/lib/daytona_api_client/models/{list_sandboxes_response.rb → session_execute_request.rb} +110 -34
- data/lib/daytona_api_client/models/session_execute_response.rb +239 -0
- data/lib/daytona_api_client/models/{generate_workos_admin_portal_link.rb → set_snapshot_general_status_dto.rb} +93 -44
- data/lib/daytona_api_client/models/snapshot_dto.rb +78 -84
- data/lib/daytona_api_client/models/snapshot_state.rb +6 -5
- data/lib/daytona_api_client/models/ssh_access_dto.rb +78 -34
- data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +98 -7
- data/lib/daytona_api_client/models/storage_access_dto.rb +78 -34
- data/lib/daytona_api_client/models/update_docker_registry.rb +74 -3
- data/lib/daytona_api_client/models/update_organization_invitation.rb +76 -5
- data/lib/daytona_api_client/models/update_organization_member_access.rb +76 -5
- data/lib/daytona_api_client/models/update_organization_quota.rb +317 -0
- data/lib/daytona_api_client/models/update_organization_role.rb +74 -3
- data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +80 -29
- data/lib/daytona_api_client/models/user.rb +75 -51
- data/lib/daytona_api_client/models/{list_secrets_response.rb → user_home_dir_response.rb} +83 -72
- data/lib/daytona_api_client/models/user_public_key.rb +74 -3
- data/lib/daytona_api_client/models/volume_dto.rb +74 -3
- data/lib/daytona_api_client/models/volume_state.rb +3 -4
- data/lib/daytona_api_client/models/webhook_app_portal_access.rb +75 -31
- data/lib/daytona_api_client/models/{preview_warning.rb → webhook_controller_get_status200_response.rb} +76 -23
- data/lib/daytona_api_client/models/webhook_initialization_status.rb +74 -3
- data/lib/daytona_api_client/models/windows_response.rb +265 -0
- data/lib/daytona_api_client/models/{update_job_status.rb → work_dir_response.rb} +83 -72
- data/lib/daytona_api_client/models/{sandbox_list_item.rb → workspace.rb} +300 -244
- data/lib/daytona_api_client/version.rb +2 -2
- data/lib/daytona_api_client.rb +83 -96
- data/project.json +13 -38
- metadata +88 -105
- data/.gitignore +0 -39
- data/.openapi-generator/FILES +0 -178
- data/.openapi-generator/VERSION +0 -1
- data/.openapi-generator-ignore +0 -31
- data/.rspec +0 -2
- data/.rubocop.yml +0 -148
- data/fix-gemspec.sh +0 -11
- data/lib/daytona_api_client/api/jobs_api.rb +0 -299
- data/lib/daytona_api_client/api/regions_api.rb +0 -77
- data/lib/daytona_api_client/api/secret_api.rb +0 -441
- data/lib/daytona_api_client/api/warm_pools_api.rb +0 -286
- data/lib/daytona_api_client/api_model_base.rb +0 -88
- data/lib/daytona_api_client/models/audit_scenarios.rb +0 -167
- data/lib/daytona_api_client/models/cli_oidc_config.rb +0 -192
- data/lib/daytona_api_client/models/create_identity_provider.rb +0 -269
- data/lib/daytona_api_client/models/create_runner_sandbox_class.rb +0 -42
- data/lib/daytona_api_client/models/date_filter.rb +0 -178
- data/lib/daytona_api_client/models/directory_sync_status.rb +0 -42
- data/lib/daytona_api_client/models/fork_sandbox.rb +0 -148
- data/lib/daytona_api_client/models/gpu_type.rb +0 -46
- data/lib/daytona_api_client/models/identity_provider.rb +0 -439
- data/lib/daytona_api_client/models/int_filter.rb +0 -222
- data/lib/daytona_api_client/models/job.rb +0 -366
- data/lib/daytona_api_client/models/job_status.rb +0 -43
- data/lib/daytona_api_client/models/job_type.rb +0 -55
- data/lib/daytona_api_client/models/log_entry.rb +0 -334
- data/lib/daytona_api_client/models/metric_series.rb +0 -194
- data/lib/daytona_api_client/models/metrics_response.rb +0 -167
- data/lib/daytona_api_client/models/otel_config.rb +0 -188
- data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -167
- data/lib/daytona_api_client/models/rate_limit_config.rb +0 -188
- data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -158
- data/lib/daytona_api_client/models/region_quota.rb +0 -453
- data/lib/daytona_api_client/models/region_type.rb +0 -42
- data/lib/daytona_api_client/models/region_usage_overview.rb +0 -518
- data/lib/daytona_api_client/models/resize_sandbox.rb +0 -225
- data/lib/daytona_api_client/models/resolve_sandbox_secrets200_response_inner.rb +0 -176
- data/lib/daytona_api_client/models/runner_class.rb +0 -40
- data/lib/daytona_api_client/models/runner_full.rb +0 -757
- data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -482
- data/lib/daytona_api_client/models/sandbox_created_webhook.rb +0 -349
- data/lib/daytona_api_client/models/sandbox_list_sort_direction.rb +0 -41
- data/lib/daytona_api_client/models/sandbox_list_sort_field.rb +0 -45
- data/lib/daytona_api_client/models/sandbox_state_updated_webhook.rb +0 -349
- data/lib/daytona_api_client/models/snapshot_state_updated_webhook.rb +0 -376
- data/lib/daytona_api_client/models/sso_oidc_config.rb +0 -192
- data/lib/daytona_api_client/models/string_filter.rb +0 -182
- data/lib/daytona_api_client/models/test_identity_provider_connection.rb +0 -165
- data/lib/daytona_api_client/models/trace_span.rb +0 -332
- data/lib/daytona_api_client/models/trace_summary.rb +0 -310
- data/lib/daytona_api_client/models/update_identity_provider.rb +0 -212
- data/lib/daytona_api_client/models/update_oidc_id_p_config.rb +0 -178
- data/lib/daytona_api_client/models/update_organization_default_queue_timeout.rb +0 -151
- data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -165
- data/lib/daytona_api_client/models/update_region.rb +0 -182
- data/lib/daytona_api_client/models/update_sandbox_network_settings.rb +0 -168
- data/lib/daytona_api_client/models/update_sandbox_secrets.rb +0 -167
- data/lib/daytona_api_client/models/update_secret.rb +0 -170
- data/lib/daytona_api_client/models/update_warm_pool.rb +0 -174
- data/lib/daytona_api_client/models/url.rb +0 -165
- data/lib/daytona_api_client/models/volume_state_updated_webhook.rb +0 -376
- data/lib/daytona_api_client/models/warm_pool.rb +0 -490
- data/lib/daytona_api_client/models/webhook_event.rb +0 -46
- data/lib/daytona_api_client/models/workos_admin_portal_intent.rb +0 -41
- data/lib/daytona_api_client/models/workos_admin_portal_link.rb +0 -165
- data/lib/daytona_api_client/models/workos_sso_connection.rb +0 -329
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
|
7
7
|
Contact: support@daytona.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.12.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,42 +14,24 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class
|
|
17
|
+
class Workspace
|
|
18
18
|
# The ID of the sandbox
|
|
19
19
|
attr_accessor :id
|
|
20
20
|
|
|
21
21
|
# The organization ID of the sandbox
|
|
22
22
|
attr_accessor :organization_id
|
|
23
23
|
|
|
24
|
-
# The name of the sandbox
|
|
25
|
-
attr_accessor :name
|
|
26
|
-
|
|
27
|
-
# The target environment for the sandbox
|
|
28
|
-
attr_accessor :target
|
|
29
|
-
|
|
30
|
-
# The runner ID of the sandbox
|
|
31
|
-
attr_accessor :runner_id
|
|
32
|
-
|
|
33
|
-
# The class of the sandbox
|
|
34
|
-
attr_accessor :sandbox_class
|
|
35
|
-
|
|
36
|
-
# The state of the sandbox
|
|
37
|
-
attr_accessor :state
|
|
38
|
-
|
|
39
|
-
# The desired state of the sandbox
|
|
40
|
-
attr_accessor :desired_state
|
|
41
|
-
|
|
42
24
|
# The snapshot used for the sandbox
|
|
43
25
|
attr_accessor :snapshot
|
|
44
26
|
|
|
45
27
|
# The user associated with the project
|
|
46
28
|
attr_accessor :user
|
|
47
29
|
|
|
48
|
-
#
|
|
49
|
-
attr_accessor :
|
|
30
|
+
# Environment variables for the sandbox
|
|
31
|
+
attr_accessor :env
|
|
50
32
|
|
|
51
|
-
#
|
|
52
|
-
attr_accessor :
|
|
33
|
+
# Labels for the sandbox
|
|
34
|
+
attr_accessor :labels
|
|
53
35
|
|
|
54
36
|
# Whether the sandbox http preview is public
|
|
55
37
|
attr_accessor :public
|
|
@@ -60,8 +42,8 @@ module DaytonaApiClient
|
|
|
60
42
|
# Comma-separated list of allowed CIDR network addresses for the sandbox
|
|
61
43
|
attr_accessor :network_allow_list
|
|
62
44
|
|
|
63
|
-
#
|
|
64
|
-
attr_accessor :
|
|
45
|
+
# The target environment for the sandbox
|
|
46
|
+
attr_accessor :target
|
|
65
47
|
|
|
66
48
|
# The CPU quota for the sandbox
|
|
67
49
|
attr_accessor :cpu
|
|
@@ -69,47 +51,44 @@ module DaytonaApiClient
|
|
|
69
51
|
# The GPU quota for the sandbox
|
|
70
52
|
attr_accessor :gpu
|
|
71
53
|
|
|
72
|
-
# Whether this is a spot GPU sandbox. Spot sandboxes may be instantly terminated to free capacity for on-demand GPU sandboxes. Absent on APIs that predate this field; treat as false.
|
|
73
|
-
attr_accessor :spot
|
|
74
|
-
|
|
75
|
-
# When this sandbox was evicted by spot preemption. Set as soon as the sandbox is marked for eviction, so it is already present while the sandbox is still winding down.
|
|
76
|
-
attr_accessor :spot_evicted_at
|
|
77
|
-
|
|
78
|
-
# When this sandbox was destroyed because it waited too long for a runner. Set only for queue-timeout sandboxes, which stay retrievable by ID for 24 hours after the timeout.
|
|
79
|
-
attr_accessor :queue_timed_out_at
|
|
80
|
-
|
|
81
|
-
# The GPU type assigned to the sandbox
|
|
82
|
-
attr_accessor :gpu_type
|
|
83
|
-
|
|
84
54
|
# The memory quota for the sandbox
|
|
85
55
|
attr_accessor :memory
|
|
86
56
|
|
|
87
57
|
# The disk quota for the sandbox
|
|
88
58
|
attr_accessor :disk
|
|
89
59
|
|
|
90
|
-
#
|
|
91
|
-
attr_accessor :
|
|
60
|
+
# The state of the sandbox
|
|
61
|
+
attr_accessor :state
|
|
62
|
+
|
|
63
|
+
# The desired state of the sandbox
|
|
64
|
+
attr_accessor :desired_state
|
|
65
|
+
|
|
66
|
+
# The error reason of the sandbox
|
|
67
|
+
attr_accessor :error_reason
|
|
92
68
|
|
|
93
69
|
# The state of the backup
|
|
94
70
|
attr_accessor :backup_state
|
|
95
71
|
|
|
72
|
+
# The creation timestamp of the last backup
|
|
73
|
+
attr_accessor :backup_created_at
|
|
74
|
+
|
|
96
75
|
# Auto-stop interval in minutes (0 means disabled)
|
|
97
76
|
attr_accessor :auto_stop_interval
|
|
98
77
|
|
|
99
|
-
# Auto-pause interval in minutes (0 means disabled)
|
|
100
|
-
attr_accessor :auto_pause_interval
|
|
101
|
-
|
|
102
78
|
# Auto-archive interval in minutes
|
|
103
79
|
attr_accessor :auto_archive_interval
|
|
104
80
|
|
|
105
81
|
# Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
106
82
|
attr_accessor :auto_delete_interval
|
|
107
83
|
|
|
108
|
-
#
|
|
109
|
-
attr_accessor :
|
|
84
|
+
# The domain name of the runner
|
|
85
|
+
attr_accessor :runner_domain
|
|
86
|
+
|
|
87
|
+
# Array of volumes attached to the sandbox
|
|
88
|
+
attr_accessor :volumes
|
|
110
89
|
|
|
111
|
-
#
|
|
112
|
-
attr_accessor :
|
|
90
|
+
# Build information for the sandbox
|
|
91
|
+
attr_accessor :build_info
|
|
113
92
|
|
|
114
93
|
# The creation timestamp of the sandbox
|
|
115
94
|
attr_accessor :created_at
|
|
@@ -117,17 +96,26 @@ module DaytonaApiClient
|
|
|
117
96
|
# The last update timestamp of the sandbox
|
|
118
97
|
attr_accessor :updated_at
|
|
119
98
|
|
|
120
|
-
# The
|
|
121
|
-
attr_accessor :
|
|
99
|
+
# The class of the sandbox
|
|
100
|
+
attr_accessor :_class
|
|
122
101
|
|
|
123
102
|
# The version of the daemon running in the sandbox
|
|
124
103
|
attr_accessor :daemon_version
|
|
125
104
|
|
|
126
|
-
#
|
|
127
|
-
attr_accessor :
|
|
105
|
+
# The name of the workspace
|
|
106
|
+
attr_accessor :name
|
|
107
|
+
|
|
108
|
+
# The image used for the workspace
|
|
109
|
+
attr_accessor :image
|
|
110
|
+
|
|
111
|
+
# The state of the snapshot
|
|
112
|
+
attr_accessor :snapshot_state
|
|
128
113
|
|
|
129
|
-
# The
|
|
130
|
-
attr_accessor :
|
|
114
|
+
# The creation timestamp of the last snapshot
|
|
115
|
+
attr_accessor :snapshot_created_at
|
|
116
|
+
|
|
117
|
+
# Additional information about the sandbox
|
|
118
|
+
attr_accessor :info
|
|
131
119
|
|
|
132
120
|
class EnumAttributeValidator
|
|
133
121
|
attr_reader :datatype
|
|
@@ -156,42 +144,38 @@ module DaytonaApiClient
|
|
|
156
144
|
{
|
|
157
145
|
:'id' => :'id',
|
|
158
146
|
:'organization_id' => :'organizationId',
|
|
159
|
-
:'name' => :'name',
|
|
160
|
-
:'target' => :'target',
|
|
161
|
-
:'runner_id' => :'runnerId',
|
|
162
|
-
:'sandbox_class' => :'sandboxClass',
|
|
163
|
-
:'state' => :'state',
|
|
164
|
-
:'desired_state' => :'desiredState',
|
|
165
147
|
:'snapshot' => :'snapshot',
|
|
166
148
|
:'user' => :'user',
|
|
167
|
-
:'
|
|
168
|
-
:'
|
|
149
|
+
:'env' => :'env',
|
|
150
|
+
:'labels' => :'labels',
|
|
169
151
|
:'public' => :'public',
|
|
170
152
|
:'network_block_all' => :'networkBlockAll',
|
|
171
153
|
:'network_allow_list' => :'networkAllowList',
|
|
172
|
-
:'
|
|
154
|
+
:'target' => :'target',
|
|
173
155
|
:'cpu' => :'cpu',
|
|
174
156
|
:'gpu' => :'gpu',
|
|
175
|
-
:'spot' => :'spot',
|
|
176
|
-
:'spot_evicted_at' => :'spotEvictedAt',
|
|
177
|
-
:'queue_timed_out_at' => :'queueTimedOutAt',
|
|
178
|
-
:'gpu_type' => :'gpuType',
|
|
179
157
|
:'memory' => :'memory',
|
|
180
158
|
:'disk' => :'disk',
|
|
181
|
-
:'
|
|
159
|
+
:'state' => :'state',
|
|
160
|
+
:'desired_state' => :'desiredState',
|
|
161
|
+
:'error_reason' => :'errorReason',
|
|
182
162
|
:'backup_state' => :'backupState',
|
|
163
|
+
:'backup_created_at' => :'backupCreatedAt',
|
|
183
164
|
:'auto_stop_interval' => :'autoStopInterval',
|
|
184
|
-
:'auto_pause_interval' => :'autoPauseInterval',
|
|
185
165
|
:'auto_archive_interval' => :'autoArchiveInterval',
|
|
186
166
|
:'auto_delete_interval' => :'autoDeleteInterval',
|
|
187
|
-
:'
|
|
188
|
-
:'
|
|
167
|
+
:'runner_domain' => :'runnerDomain',
|
|
168
|
+
:'volumes' => :'volumes',
|
|
169
|
+
:'build_info' => :'buildInfo',
|
|
189
170
|
:'created_at' => :'createdAt',
|
|
190
171
|
:'updated_at' => :'updatedAt',
|
|
191
|
-
:'
|
|
172
|
+
:'_class' => :'class',
|
|
192
173
|
:'daemon_version' => :'daemonVersion',
|
|
193
|
-
:'
|
|
194
|
-
:'
|
|
174
|
+
:'name' => :'name',
|
|
175
|
+
:'image' => :'image',
|
|
176
|
+
:'snapshot_state' => :'snapshotState',
|
|
177
|
+
:'snapshot_created_at' => :'snapshotCreatedAt',
|
|
178
|
+
:'info' => :'info'
|
|
195
179
|
}
|
|
196
180
|
end
|
|
197
181
|
|
|
@@ -210,49 +194,44 @@ module DaytonaApiClient
|
|
|
210
194
|
{
|
|
211
195
|
:'id' => :'String',
|
|
212
196
|
:'organization_id' => :'String',
|
|
213
|
-
:'name' => :'String',
|
|
214
|
-
:'target' => :'String',
|
|
215
|
-
:'runner_id' => :'String',
|
|
216
|
-
:'sandbox_class' => :'SandboxClass',
|
|
217
|
-
:'state' => :'SandboxState',
|
|
218
|
-
:'desired_state' => :'SandboxDesiredState',
|
|
219
197
|
:'snapshot' => :'String',
|
|
220
198
|
:'user' => :'String',
|
|
221
|
-
:'
|
|
222
|
-
:'
|
|
199
|
+
:'env' => :'Hash<String, String>',
|
|
200
|
+
:'labels' => :'Hash<String, String>',
|
|
223
201
|
:'public' => :'Boolean',
|
|
224
202
|
:'network_block_all' => :'Boolean',
|
|
225
203
|
:'network_allow_list' => :'String',
|
|
226
|
-
:'
|
|
227
|
-
:'cpu' => :'
|
|
228
|
-
:'gpu' => :'
|
|
229
|
-
:'
|
|
230
|
-
:'
|
|
231
|
-
:'
|
|
232
|
-
:'
|
|
233
|
-
:'
|
|
234
|
-
:'disk' => :'Integer',
|
|
235
|
-
:'labels' => :'Hash<String, String>',
|
|
204
|
+
:'target' => :'String',
|
|
205
|
+
:'cpu' => :'Float',
|
|
206
|
+
:'gpu' => :'Float',
|
|
207
|
+
:'memory' => :'Float',
|
|
208
|
+
:'disk' => :'Float',
|
|
209
|
+
:'state' => :'SandboxState',
|
|
210
|
+
:'desired_state' => :'SandboxDesiredState',
|
|
211
|
+
:'error_reason' => :'String',
|
|
236
212
|
:'backup_state' => :'String',
|
|
213
|
+
:'backup_created_at' => :'String',
|
|
237
214
|
:'auto_stop_interval' => :'Float',
|
|
238
|
-
:'auto_pause_interval' => :'Float',
|
|
239
215
|
:'auto_archive_interval' => :'Float',
|
|
240
216
|
:'auto_delete_interval' => :'Float',
|
|
241
|
-
:'
|
|
242
|
-
:'
|
|
217
|
+
:'runner_domain' => :'String',
|
|
218
|
+
:'volumes' => :'Array<SandboxVolume>',
|
|
219
|
+
:'build_info' => :'BuildInfo',
|
|
243
220
|
:'created_at' => :'String',
|
|
244
221
|
:'updated_at' => :'String',
|
|
245
|
-
:'
|
|
222
|
+
:'_class' => :'String',
|
|
246
223
|
:'daemon_version' => :'String',
|
|
247
|
-
:'
|
|
248
|
-
:'
|
|
224
|
+
:'name' => :'String',
|
|
225
|
+
:'image' => :'String',
|
|
226
|
+
:'snapshot_state' => :'String',
|
|
227
|
+
:'snapshot_created_at' => :'String',
|
|
228
|
+
:'info' => :'SandboxInfo'
|
|
249
229
|
}
|
|
250
230
|
end
|
|
251
231
|
|
|
252
232
|
# List of attributes with nullable: true
|
|
253
233
|
def self.openapi_nullable
|
|
254
234
|
Set.new([
|
|
255
|
-
:'queue_timeout',
|
|
256
235
|
])
|
|
257
236
|
end
|
|
258
237
|
|
|
@@ -260,14 +239,14 @@ module DaytonaApiClient
|
|
|
260
239
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
261
240
|
def initialize(attributes = {})
|
|
262
241
|
if (!attributes.is_a?(Hash))
|
|
263
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::
|
|
242
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::Workspace` initialize method"
|
|
264
243
|
end
|
|
265
244
|
|
|
266
245
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
267
246
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
268
247
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
269
248
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
270
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::
|
|
249
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::Workspace`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
271
250
|
end
|
|
272
251
|
h[k.to_sym] = v
|
|
273
252
|
}
|
|
@@ -284,34 +263,6 @@ module DaytonaApiClient
|
|
|
284
263
|
self.organization_id = nil
|
|
285
264
|
end
|
|
286
265
|
|
|
287
|
-
if attributes.key?(:'name')
|
|
288
|
-
self.name = attributes[:'name']
|
|
289
|
-
else
|
|
290
|
-
self.name = nil
|
|
291
|
-
end
|
|
292
|
-
|
|
293
|
-
if attributes.key?(:'target')
|
|
294
|
-
self.target = attributes[:'target']
|
|
295
|
-
else
|
|
296
|
-
self.target = nil
|
|
297
|
-
end
|
|
298
|
-
|
|
299
|
-
if attributes.key?(:'runner_id')
|
|
300
|
-
self.runner_id = attributes[:'runner_id']
|
|
301
|
-
end
|
|
302
|
-
|
|
303
|
-
if attributes.key?(:'sandbox_class')
|
|
304
|
-
self.sandbox_class = attributes[:'sandbox_class']
|
|
305
|
-
end
|
|
306
|
-
|
|
307
|
-
if attributes.key?(:'state')
|
|
308
|
-
self.state = attributes[:'state']
|
|
309
|
-
end
|
|
310
|
-
|
|
311
|
-
if attributes.key?(:'desired_state')
|
|
312
|
-
self.desired_state = attributes[:'desired_state']
|
|
313
|
-
end
|
|
314
|
-
|
|
315
266
|
if attributes.key?(:'snapshot')
|
|
316
267
|
self.snapshot = attributes[:'snapshot']
|
|
317
268
|
end
|
|
@@ -322,12 +273,20 @@ module DaytonaApiClient
|
|
|
322
273
|
self.user = nil
|
|
323
274
|
end
|
|
324
275
|
|
|
325
|
-
if attributes.key?(:'
|
|
326
|
-
|
|
276
|
+
if attributes.key?(:'env')
|
|
277
|
+
if (value = attributes[:'env']).is_a?(Hash)
|
|
278
|
+
self.env = value
|
|
279
|
+
end
|
|
280
|
+
else
|
|
281
|
+
self.env = nil
|
|
327
282
|
end
|
|
328
283
|
|
|
329
|
-
if attributes.key?(:'
|
|
330
|
-
|
|
284
|
+
if attributes.key?(:'labels')
|
|
285
|
+
if (value = attributes[:'labels']).is_a?(Hash)
|
|
286
|
+
self.labels = value
|
|
287
|
+
end
|
|
288
|
+
else
|
|
289
|
+
self.labels = nil
|
|
331
290
|
end
|
|
332
291
|
|
|
333
292
|
if attributes.key?(:'public')
|
|
@@ -346,8 +305,10 @@ module DaytonaApiClient
|
|
|
346
305
|
self.network_allow_list = attributes[:'network_allow_list']
|
|
347
306
|
end
|
|
348
307
|
|
|
349
|
-
if attributes.key?(:'
|
|
350
|
-
self.
|
|
308
|
+
if attributes.key?(:'target')
|
|
309
|
+
self.target = attributes[:'target']
|
|
310
|
+
else
|
|
311
|
+
self.target = nil
|
|
351
312
|
end
|
|
352
313
|
|
|
353
314
|
if attributes.key?(:'cpu')
|
|
@@ -362,24 +323,6 @@ module DaytonaApiClient
|
|
|
362
323
|
self.gpu = nil
|
|
363
324
|
end
|
|
364
325
|
|
|
365
|
-
if attributes.key?(:'spot')
|
|
366
|
-
self.spot = attributes[:'spot']
|
|
367
|
-
else
|
|
368
|
-
self.spot = false
|
|
369
|
-
end
|
|
370
|
-
|
|
371
|
-
if attributes.key?(:'spot_evicted_at')
|
|
372
|
-
self.spot_evicted_at = attributes[:'spot_evicted_at']
|
|
373
|
-
end
|
|
374
|
-
|
|
375
|
-
if attributes.key?(:'queue_timed_out_at')
|
|
376
|
-
self.queue_timed_out_at = attributes[:'queue_timed_out_at']
|
|
377
|
-
end
|
|
378
|
-
|
|
379
|
-
if attributes.key?(:'gpu_type')
|
|
380
|
-
self.gpu_type = attributes[:'gpu_type']
|
|
381
|
-
end
|
|
382
|
-
|
|
383
326
|
if attributes.key?(:'memory')
|
|
384
327
|
self.memory = attributes[:'memory']
|
|
385
328
|
else
|
|
@@ -392,24 +335,28 @@ module DaytonaApiClient
|
|
|
392
335
|
self.disk = nil
|
|
393
336
|
end
|
|
394
337
|
|
|
395
|
-
if attributes.key?(:'
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
self.
|
|
338
|
+
if attributes.key?(:'state')
|
|
339
|
+
self.state = attributes[:'state']
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
if attributes.key?(:'desired_state')
|
|
343
|
+
self.desired_state = attributes[:'desired_state']
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
if attributes.key?(:'error_reason')
|
|
347
|
+
self.error_reason = attributes[:'error_reason']
|
|
401
348
|
end
|
|
402
349
|
|
|
403
350
|
if attributes.key?(:'backup_state')
|
|
404
351
|
self.backup_state = attributes[:'backup_state']
|
|
405
352
|
end
|
|
406
353
|
|
|
407
|
-
if attributes.key?(:'
|
|
408
|
-
self.
|
|
354
|
+
if attributes.key?(:'backup_created_at')
|
|
355
|
+
self.backup_created_at = attributes[:'backup_created_at']
|
|
409
356
|
end
|
|
410
357
|
|
|
411
|
-
if attributes.key?(:'
|
|
412
|
-
self.
|
|
358
|
+
if attributes.key?(:'auto_stop_interval')
|
|
359
|
+
self.auto_stop_interval = attributes[:'auto_stop_interval']
|
|
413
360
|
end
|
|
414
361
|
|
|
415
362
|
if attributes.key?(:'auto_archive_interval')
|
|
@@ -420,12 +367,18 @@ module DaytonaApiClient
|
|
|
420
367
|
self.auto_delete_interval = attributes[:'auto_delete_interval']
|
|
421
368
|
end
|
|
422
369
|
|
|
423
|
-
if attributes.key?(:'
|
|
424
|
-
self.
|
|
370
|
+
if attributes.key?(:'runner_domain')
|
|
371
|
+
self.runner_domain = attributes[:'runner_domain']
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
if attributes.key?(:'volumes')
|
|
375
|
+
if (value = attributes[:'volumes']).is_a?(Array)
|
|
376
|
+
self.volumes = value
|
|
377
|
+
end
|
|
425
378
|
end
|
|
426
379
|
|
|
427
|
-
if attributes.key?(:'
|
|
428
|
-
self.
|
|
380
|
+
if attributes.key?(:'build_info')
|
|
381
|
+
self.build_info = attributes[:'build_info']
|
|
429
382
|
end
|
|
430
383
|
|
|
431
384
|
if attributes.key?(:'created_at')
|
|
@@ -436,22 +389,34 @@ module DaytonaApiClient
|
|
|
436
389
|
self.updated_at = attributes[:'updated_at']
|
|
437
390
|
end
|
|
438
391
|
|
|
439
|
-
if attributes.key?(:'
|
|
440
|
-
self.
|
|
392
|
+
if attributes.key?(:'_class')
|
|
393
|
+
self._class = attributes[:'_class']
|
|
441
394
|
end
|
|
442
395
|
|
|
443
396
|
if attributes.key?(:'daemon_version')
|
|
444
397
|
self.daemon_version = attributes[:'daemon_version']
|
|
445
398
|
end
|
|
446
399
|
|
|
447
|
-
if attributes.key?(:'
|
|
448
|
-
self.
|
|
400
|
+
if attributes.key?(:'name')
|
|
401
|
+
self.name = attributes[:'name']
|
|
402
|
+
else
|
|
403
|
+
self.name = ''
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
if attributes.key?(:'image')
|
|
407
|
+
self.image = attributes[:'image']
|
|
449
408
|
end
|
|
450
409
|
|
|
451
|
-
if attributes.key?(:'
|
|
452
|
-
self.
|
|
453
|
-
|
|
454
|
-
|
|
410
|
+
if attributes.key?(:'snapshot_state')
|
|
411
|
+
self.snapshot_state = attributes[:'snapshot_state']
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
if attributes.key?(:'snapshot_created_at')
|
|
415
|
+
self.snapshot_created_at = attributes[:'snapshot_created_at']
|
|
416
|
+
end
|
|
417
|
+
|
|
418
|
+
if attributes.key?(:'info')
|
|
419
|
+
self.info = attributes[:'info']
|
|
455
420
|
end
|
|
456
421
|
end
|
|
457
422
|
|
|
@@ -468,16 +433,16 @@ module DaytonaApiClient
|
|
|
468
433
|
invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
|
|
469
434
|
end
|
|
470
435
|
|
|
471
|
-
if @
|
|
472
|
-
invalid_properties.push('invalid value for "
|
|
436
|
+
if @user.nil?
|
|
437
|
+
invalid_properties.push('invalid value for "user", user cannot be nil.')
|
|
473
438
|
end
|
|
474
439
|
|
|
475
|
-
if @
|
|
476
|
-
invalid_properties.push('invalid value for "
|
|
440
|
+
if @env.nil?
|
|
441
|
+
invalid_properties.push('invalid value for "env", env cannot be nil.')
|
|
477
442
|
end
|
|
478
443
|
|
|
479
|
-
if @
|
|
480
|
-
invalid_properties.push('invalid value for "
|
|
444
|
+
if @labels.nil?
|
|
445
|
+
invalid_properties.push('invalid value for "labels", labels cannot be nil.')
|
|
481
446
|
end
|
|
482
447
|
|
|
483
448
|
if @public.nil?
|
|
@@ -488,6 +453,10 @@ module DaytonaApiClient
|
|
|
488
453
|
invalid_properties.push('invalid value for "network_block_all", network_block_all cannot be nil.')
|
|
489
454
|
end
|
|
490
455
|
|
|
456
|
+
if @target.nil?
|
|
457
|
+
invalid_properties.push('invalid value for "target", target cannot be nil.')
|
|
458
|
+
end
|
|
459
|
+
|
|
491
460
|
if @cpu.nil?
|
|
492
461
|
invalid_properties.push('invalid value for "cpu", cpu cannot be nil.')
|
|
493
462
|
end
|
|
@@ -504,12 +473,8 @@ module DaytonaApiClient
|
|
|
504
473
|
invalid_properties.push('invalid value for "disk", disk cannot be nil.')
|
|
505
474
|
end
|
|
506
475
|
|
|
507
|
-
if @
|
|
508
|
-
invalid_properties.push('invalid value for "
|
|
509
|
-
end
|
|
510
|
-
|
|
511
|
-
if @toolbox_proxy_url.nil?
|
|
512
|
-
invalid_properties.push('invalid value for "toolbox_proxy_url", toolbox_proxy_url cannot be nil.')
|
|
476
|
+
if @name.nil?
|
|
477
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
513
478
|
end
|
|
514
479
|
|
|
515
480
|
invalid_properties
|
|
@@ -521,19 +486,23 @@ module DaytonaApiClient
|
|
|
521
486
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
522
487
|
return false if @id.nil?
|
|
523
488
|
return false if @organization_id.nil?
|
|
524
|
-
return false if @name.nil?
|
|
525
|
-
return false if @target.nil?
|
|
526
489
|
return false if @user.nil?
|
|
490
|
+
return false if @env.nil?
|
|
491
|
+
return false if @labels.nil?
|
|
527
492
|
return false if @public.nil?
|
|
528
493
|
return false if @network_block_all.nil?
|
|
494
|
+
return false if @target.nil?
|
|
529
495
|
return false if @cpu.nil?
|
|
530
496
|
return false if @gpu.nil?
|
|
531
497
|
return false if @memory.nil?
|
|
532
498
|
return false if @disk.nil?
|
|
533
|
-
|
|
534
|
-
backup_state_validator = EnumAttributeValidator.new('String', ["None", "Pending", "InProgress", "Completed", "Error", "unknown_default_open_api"])
|
|
499
|
+
backup_state_validator = EnumAttributeValidator.new('String', ["None", "Pending", "InProgress", "Completed", "Error"])
|
|
535
500
|
return false unless backup_state_validator.valid?(@backup_state)
|
|
536
|
-
|
|
501
|
+
_class_validator = EnumAttributeValidator.new('String', ["small", "medium", "large"])
|
|
502
|
+
return false unless _class_validator.valid?(@_class)
|
|
503
|
+
return false if @name.nil?
|
|
504
|
+
snapshot_state_validator = EnumAttributeValidator.new('String', ["None", "Pending", "InProgress", "Completed", "Error"])
|
|
505
|
+
return false unless snapshot_state_validator.valid?(@snapshot_state)
|
|
537
506
|
true
|
|
538
507
|
end
|
|
539
508
|
|
|
@@ -558,33 +527,33 @@ module DaytonaApiClient
|
|
|
558
527
|
end
|
|
559
528
|
|
|
560
529
|
# Custom attribute writer method with validation
|
|
561
|
-
# @param [Object]
|
|
562
|
-
def
|
|
563
|
-
if
|
|
564
|
-
fail ArgumentError, '
|
|
530
|
+
# @param [Object] user Value to be assigned
|
|
531
|
+
def user=(user)
|
|
532
|
+
if user.nil?
|
|
533
|
+
fail ArgumentError, 'user cannot be nil'
|
|
565
534
|
end
|
|
566
535
|
|
|
567
|
-
@
|
|
536
|
+
@user = user
|
|
568
537
|
end
|
|
569
538
|
|
|
570
539
|
# Custom attribute writer method with validation
|
|
571
|
-
# @param [Object]
|
|
572
|
-
def
|
|
573
|
-
if
|
|
574
|
-
fail ArgumentError, '
|
|
540
|
+
# @param [Object] env Value to be assigned
|
|
541
|
+
def env=(env)
|
|
542
|
+
if env.nil?
|
|
543
|
+
fail ArgumentError, 'env cannot be nil'
|
|
575
544
|
end
|
|
576
545
|
|
|
577
|
-
@
|
|
546
|
+
@env = env
|
|
578
547
|
end
|
|
579
548
|
|
|
580
549
|
# Custom attribute writer method with validation
|
|
581
|
-
# @param [Object]
|
|
582
|
-
def
|
|
583
|
-
if
|
|
584
|
-
fail ArgumentError, '
|
|
550
|
+
# @param [Object] labels Value to be assigned
|
|
551
|
+
def labels=(labels)
|
|
552
|
+
if labels.nil?
|
|
553
|
+
fail ArgumentError, 'labels cannot be nil'
|
|
585
554
|
end
|
|
586
555
|
|
|
587
|
-
@
|
|
556
|
+
@labels = labels
|
|
588
557
|
end
|
|
589
558
|
|
|
590
559
|
# Custom attribute writer method with validation
|
|
@@ -607,6 +576,16 @@ module DaytonaApiClient
|
|
|
607
576
|
@network_block_all = network_block_all
|
|
608
577
|
end
|
|
609
578
|
|
|
579
|
+
# Custom attribute writer method with validation
|
|
580
|
+
# @param [Object] target Value to be assigned
|
|
581
|
+
def target=(target)
|
|
582
|
+
if target.nil?
|
|
583
|
+
fail ArgumentError, 'target cannot be nil'
|
|
584
|
+
end
|
|
585
|
+
|
|
586
|
+
@target = target
|
|
587
|
+
end
|
|
588
|
+
|
|
610
589
|
# Custom attribute writer method with validation
|
|
611
590
|
# @param [Object] cpu Value to be assigned
|
|
612
591
|
def cpu=(cpu)
|
|
@@ -647,34 +626,44 @@ module DaytonaApiClient
|
|
|
647
626
|
@disk = disk
|
|
648
627
|
end
|
|
649
628
|
|
|
650
|
-
# Custom attribute writer method with validation
|
|
651
|
-
# @param [Object] labels Value to be assigned
|
|
652
|
-
def labels=(labels)
|
|
653
|
-
if labels.nil?
|
|
654
|
-
fail ArgumentError, 'labels cannot be nil'
|
|
655
|
-
end
|
|
656
|
-
|
|
657
|
-
@labels = labels
|
|
658
|
-
end
|
|
659
|
-
|
|
660
629
|
# Custom attribute writer method checking allowed values (enum).
|
|
661
630
|
# @param [Object] backup_state Object to be assigned
|
|
662
631
|
def backup_state=(backup_state)
|
|
663
|
-
validator = EnumAttributeValidator.new('String', ["None", "Pending", "InProgress", "Completed", "Error"
|
|
632
|
+
validator = EnumAttributeValidator.new('String', ["None", "Pending", "InProgress", "Completed", "Error"])
|
|
664
633
|
unless validator.valid?(backup_state)
|
|
665
634
|
fail ArgumentError, "invalid value for \"backup_state\", must be one of #{validator.allowable_values}."
|
|
666
635
|
end
|
|
667
636
|
@backup_state = backup_state
|
|
668
637
|
end
|
|
669
638
|
|
|
639
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
640
|
+
# @param [Object] _class Object to be assigned
|
|
641
|
+
def _class=(_class)
|
|
642
|
+
validator = EnumAttributeValidator.new('String', ["small", "medium", "large"])
|
|
643
|
+
unless validator.valid?(_class)
|
|
644
|
+
fail ArgumentError, "invalid value for \"_class\", must be one of #{validator.allowable_values}."
|
|
645
|
+
end
|
|
646
|
+
@_class = _class
|
|
647
|
+
end
|
|
648
|
+
|
|
670
649
|
# Custom attribute writer method with validation
|
|
671
|
-
# @param [Object]
|
|
672
|
-
def
|
|
673
|
-
if
|
|
674
|
-
fail ArgumentError, '
|
|
650
|
+
# @param [Object] name Value to be assigned
|
|
651
|
+
def name=(name)
|
|
652
|
+
if name.nil?
|
|
653
|
+
fail ArgumentError, 'name cannot be nil'
|
|
675
654
|
end
|
|
676
655
|
|
|
677
|
-
@
|
|
656
|
+
@name = name
|
|
657
|
+
end
|
|
658
|
+
|
|
659
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
660
|
+
# @param [Object] snapshot_state Object to be assigned
|
|
661
|
+
def snapshot_state=(snapshot_state)
|
|
662
|
+
validator = EnumAttributeValidator.new('String', ["None", "Pending", "InProgress", "Completed", "Error"])
|
|
663
|
+
unless validator.valid?(snapshot_state)
|
|
664
|
+
fail ArgumentError, "invalid value for \"snapshot_state\", must be one of #{validator.allowable_values}."
|
|
665
|
+
end
|
|
666
|
+
@snapshot_state = snapshot_state
|
|
678
667
|
end
|
|
679
668
|
|
|
680
669
|
# Checks equality by comparing each attribute.
|
|
@@ -684,42 +673,38 @@ module DaytonaApiClient
|
|
|
684
673
|
self.class == o.class &&
|
|
685
674
|
id == o.id &&
|
|
686
675
|
organization_id == o.organization_id &&
|
|
687
|
-
name == o.name &&
|
|
688
|
-
target == o.target &&
|
|
689
|
-
runner_id == o.runner_id &&
|
|
690
|
-
sandbox_class == o.sandbox_class &&
|
|
691
|
-
state == o.state &&
|
|
692
|
-
desired_state == o.desired_state &&
|
|
693
676
|
snapshot == o.snapshot &&
|
|
694
677
|
user == o.user &&
|
|
695
|
-
|
|
696
|
-
|
|
678
|
+
env == o.env &&
|
|
679
|
+
labels == o.labels &&
|
|
697
680
|
public == o.public &&
|
|
698
681
|
network_block_all == o.network_block_all &&
|
|
699
682
|
network_allow_list == o.network_allow_list &&
|
|
700
|
-
|
|
683
|
+
target == o.target &&
|
|
701
684
|
cpu == o.cpu &&
|
|
702
685
|
gpu == o.gpu &&
|
|
703
|
-
spot == o.spot &&
|
|
704
|
-
spot_evicted_at == o.spot_evicted_at &&
|
|
705
|
-
queue_timed_out_at == o.queue_timed_out_at &&
|
|
706
|
-
gpu_type == o.gpu_type &&
|
|
707
686
|
memory == o.memory &&
|
|
708
687
|
disk == o.disk &&
|
|
709
|
-
|
|
688
|
+
state == o.state &&
|
|
689
|
+
desired_state == o.desired_state &&
|
|
690
|
+
error_reason == o.error_reason &&
|
|
710
691
|
backup_state == o.backup_state &&
|
|
692
|
+
backup_created_at == o.backup_created_at &&
|
|
711
693
|
auto_stop_interval == o.auto_stop_interval &&
|
|
712
|
-
auto_pause_interval == o.auto_pause_interval &&
|
|
713
694
|
auto_archive_interval == o.auto_archive_interval &&
|
|
714
695
|
auto_delete_interval == o.auto_delete_interval &&
|
|
715
|
-
|
|
716
|
-
|
|
696
|
+
runner_domain == o.runner_domain &&
|
|
697
|
+
volumes == o.volumes &&
|
|
698
|
+
build_info == o.build_info &&
|
|
717
699
|
created_at == o.created_at &&
|
|
718
700
|
updated_at == o.updated_at &&
|
|
719
|
-
|
|
701
|
+
_class == o._class &&
|
|
720
702
|
daemon_version == o.daemon_version &&
|
|
721
|
-
|
|
722
|
-
|
|
703
|
+
name == o.name &&
|
|
704
|
+
image == o.image &&
|
|
705
|
+
snapshot_state == o.snapshot_state &&
|
|
706
|
+
snapshot_created_at == o.snapshot_created_at &&
|
|
707
|
+
info == o.info
|
|
723
708
|
end
|
|
724
709
|
|
|
725
710
|
# @see the `==` method
|
|
@@ -731,7 +716,7 @@ module DaytonaApiClient
|
|
|
731
716
|
# Calculates hash code according to all attributes.
|
|
732
717
|
# @return [Integer] Hash code
|
|
733
718
|
def hash
|
|
734
|
-
[id, organization_id,
|
|
719
|
+
[id, organization_id, snapshot, user, env, labels, public, network_block_all, network_allow_list, target, cpu, gpu, memory, disk, state, desired_state, error_reason, backup_state, backup_created_at, auto_stop_interval, auto_archive_interval, auto_delete_interval, runner_domain, volumes, build_info, created_at, updated_at, _class, daemon_version, name, image, snapshot_state, snapshot_created_at, info].hash
|
|
735
720
|
end
|
|
736
721
|
|
|
737
722
|
# Builds the object from hash
|
|
@@ -757,6 +742,61 @@ module DaytonaApiClient
|
|
|
757
742
|
new(transformed_hash)
|
|
758
743
|
end
|
|
759
744
|
|
|
745
|
+
# Deserializes the data based on type
|
|
746
|
+
# @param string type Data type
|
|
747
|
+
# @param string value Value to be deserialized
|
|
748
|
+
# @return [Object] Deserialized data
|
|
749
|
+
def self._deserialize(type, value)
|
|
750
|
+
case type.to_sym
|
|
751
|
+
when :Time
|
|
752
|
+
Time.parse(value)
|
|
753
|
+
when :Date
|
|
754
|
+
Date.parse(value)
|
|
755
|
+
when :String
|
|
756
|
+
value.to_s
|
|
757
|
+
when :Integer
|
|
758
|
+
value.to_i
|
|
759
|
+
when :Float
|
|
760
|
+
value.to_f
|
|
761
|
+
when :Boolean
|
|
762
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
763
|
+
true
|
|
764
|
+
else
|
|
765
|
+
false
|
|
766
|
+
end
|
|
767
|
+
when :Object
|
|
768
|
+
# generic object (usually a Hash), return directly
|
|
769
|
+
value
|
|
770
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
771
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
772
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
773
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
774
|
+
k_type = Regexp.last_match[:k_type]
|
|
775
|
+
v_type = Regexp.last_match[:v_type]
|
|
776
|
+
{}.tap do |hash|
|
|
777
|
+
value.each do |k, v|
|
|
778
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
779
|
+
end
|
|
780
|
+
end
|
|
781
|
+
else # model
|
|
782
|
+
# models (e.g. Pet) or oneOf
|
|
783
|
+
klass = DaytonaApiClient.const_get(type)
|
|
784
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
785
|
+
end
|
|
786
|
+
end
|
|
787
|
+
|
|
788
|
+
# Returns the string representation of the object
|
|
789
|
+
# @return [String] String presentation of the object
|
|
790
|
+
def to_s
|
|
791
|
+
to_hash.to_s
|
|
792
|
+
end
|
|
793
|
+
|
|
794
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
795
|
+
# @return [Hash] Returns the object in the form of hash
|
|
796
|
+
def to_body
|
|
797
|
+
to_hash
|
|
798
|
+
end
|
|
799
|
+
|
|
760
800
|
# Returns the object in the form of hash
|
|
761
801
|
# @return [Hash] Returns the object in the form of hash
|
|
762
802
|
def to_hash
|
|
@@ -773,6 +813,22 @@ module DaytonaApiClient
|
|
|
773
813
|
hash
|
|
774
814
|
end
|
|
775
815
|
|
|
816
|
+
# Outputs non-array value in the form of hash
|
|
817
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
818
|
+
# @param [Object] value Any valid value
|
|
819
|
+
# @return [Hash] Returns the value in the form of hash
|
|
820
|
+
def _to_hash(value)
|
|
821
|
+
if value.is_a?(Array)
|
|
822
|
+
value.compact.map { |v| _to_hash(v) }
|
|
823
|
+
elsif value.is_a?(Hash)
|
|
824
|
+
{}.tap do |hash|
|
|
825
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
826
|
+
end
|
|
827
|
+
elsif value.respond_to? :to_hash
|
|
828
|
+
value.to_hash
|
|
829
|
+
else
|
|
830
|
+
value
|
|
831
|
+
end
|
|
832
|
+
end
|
|
776
833
|
end
|
|
777
|
-
|
|
778
834
|
end
|