daytona_api_client 0.182.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 +2 -2
- data/lib/daytona_api_client/api/api_keys_api.rb +2 -2
- data/lib/daytona_api_client/api/audit_api.rb +140 -10
- 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 +155 -1075
- data/lib/daytona_api_client/api/preview_api.rb +8 -77
- data/lib/daytona_api_client/api/runners_api.rb +22 -412
- data/lib/daytona_api_client/api/sandbox_api.rb +307 -1729
- data/lib/daytona_api_client/api/snapshots_api.rb +113 -39
- data/lib/daytona_api_client/api/toolbox_api.rb +741 -741
- data/lib/daytona_api_client/api/users_api.rb +239 -2
- 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 +74 -3
- data/lib/daytona_api_client/models/announcement.rb +74 -3
- data/lib/daytona_api_client/models/api_key_list.rb +74 -3
- 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/command.rb +74 -3
- data/lib/daytona_api_client/models/completion_context.rb +74 -3
- data/lib/daytona_api_client/models/completion_item.rb +74 -3
- data/lib/daytona_api_client/models/completion_list.rb +74 -3
- data/lib/daytona_api_client/models/compressed_screenshot_response.rb +74 -3
- data/lib/daytona_api_client/models/computer_use_start_response.rb +74 -3
- data/lib/daytona_api_client/models/computer_use_status_response.rb +76 -5
- data/lib/daytona_api_client/models/computer_use_stop_response.rb +74 -3
- 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 +74 -3
- data/lib/daytona_api_client/models/create_organization_role.rb +74 -3
- data/lib/daytona_api_client/models/create_runner.rb +386 -43
- data/lib/daytona_api_client/models/create_sandbox.rb +77 -16
- data/lib/daytona_api_client/models/create_session_request.rb +74 -3
- data/lib/daytona_api_client/models/create_snapshot.rb +88 -17
- data/lib/daytona_api_client/models/create_user.rb +77 -15
- 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 -54
- data/lib/daytona_api_client/models/display_info_response.rb +74 -3
- data/lib/daytona_api_client/models/docker_registry.rb +76 -5
- data/lib/daytona_api_client/models/download_files.rb +74 -3
- data/lib/daytona_api_client/models/execute_request.rb +74 -3
- data/lib/daytona_api_client/models/execute_response.rb +74 -3
- data/lib/daytona_api_client/models/file_info.rb +74 -3
- data/lib/daytona_api_client/models/file_status.rb +74 -3
- data/lib/daytona_api_client/models/git_add_request.rb +74 -3
- data/lib/daytona_api_client/models/git_branch_request.rb +74 -3
- data/lib/daytona_api_client/models/git_checkout_request.rb +74 -3
- data/lib/daytona_api_client/models/git_clone_request.rb +74 -3
- data/lib/daytona_api_client/models/git_commit_info.rb +74 -3
- data/lib/daytona_api_client/models/git_commit_request.rb +74 -3
- data/lib/daytona_api_client/models/git_commit_response.rb +74 -3
- data/lib/daytona_api_client/models/git_delete_branch_request.rb +74 -3
- data/lib/daytona_api_client/models/git_repo_request.rb +74 -3
- data/lib/daytona_api_client/models/git_status.rb +74 -3
- 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/keyboard_hotkey_request.rb +74 -3
- data/lib/daytona_api_client/models/keyboard_press_request.rb +74 -3
- data/lib/daytona_api_client/models/keyboard_type_request.rb +74 -3
- data/lib/daytona_api_client/models/list_branch_response.rb +74 -3
- data/lib/daytona_api_client/models/lsp_completion_params.rb +74 -3
- data/lib/daytona_api_client/models/lsp_document_request.rb +74 -3
- data/lib/daytona_api_client/models/lsp_location.rb +74 -3
- data/lib/daytona_api_client/models/lsp_server_request.rb +74 -3
- data/lib/daytona_api_client/models/lsp_symbol.rb +74 -3
- data/lib/daytona_api_client/models/match.rb +74 -3
- data/lib/daytona_api_client/models/mouse_click_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_click_response.rb +74 -3
- data/lib/daytona_api_client/models/mouse_drag_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_drag_response.rb +74 -3
- data/lib/daytona_api_client/models/mouse_move_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_move_response.rb +74 -3
- data/lib/daytona_api_client/models/mouse_position.rb +74 -3
- data/lib/daytona_api_client/models/mouse_scroll_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_scroll_response.rb +74 -3
- data/lib/daytona_api_client/models/oidc_config.rb +74 -3
- data/lib/daytona_api_client/models/organization.rb +159 -162
- 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 +74 -3
- data/lib/daytona_api_client/models/organization_suspension.rb +79 -10
- 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 +78 -17
- data/lib/daytona_api_client/models/{paginated_sandboxes_deprecated.rb → paginated_sandboxes.rb} +76 -5
- data/lib/daytona_api_client/models/paginated_snapshots.rb +74 -3
- data/lib/daytona_api_client/models/{paginated_jobs.rb → paginated_snapshots_dto.rb} +77 -6
- data/lib/daytona_api_client/models/port_preview_url.rb +88 -34
- data/lib/daytona_api_client/models/position.rb +74 -3
- data/lib/daytona_api_client/models/posthog_config.rb +74 -3
- data/lib/daytona_api_client/models/process_errors_response.rb +74 -3
- data/lib/daytona_api_client/models/process_logs_response.rb +74 -3
- data/lib/daytona_api_client/models/process_restart_response.rb +74 -3
- data/lib/daytona_api_client/models/process_status_response.rb +74 -3
- data/lib/daytona_api_client/models/project_dir_response.rb +74 -3
- data/lib/daytona_api_client/models/pty_create_request.rb +74 -3
- data/lib/daytona_api_client/models/pty_create_response.rb +74 -3
- data/lib/daytona_api_client/models/pty_list_response.rb +74 -3
- data/lib/daytona_api_client/models/pty_resize_request.rb +74 -3
- data/lib/daytona_api_client/models/pty_session_info.rb +74 -3
- data/lib/daytona_api_client/models/range.rb +74 -3
- data/lib/daytona_api_client/models/region.rb +78 -181
- data/lib/daytona_api_client/models/region_screenshot_response.rb +74 -3
- data/lib/daytona_api_client/models/registry_push_access_dto.rb +74 -3
- data/lib/daytona_api_client/models/replace_request.rb +74 -3
- data/lib/daytona_api_client/models/replace_result.rb +74 -3
- data/lib/daytona_api_client/models/runner.rb +191 -138
- 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 +92 -95
- data/lib/daytona_api_client/models/sandbox_class.rb +3 -4
- data/lib/daytona_api_client/models/sandbox_desired_state.rb +3 -4
- data/lib/daytona_api_client/models/{create_region.rb → sandbox_info.rb} +113 -38
- data/lib/daytona_api_client/models/sandbox_labels.rb +74 -3
- data/lib/daytona_api_client/models/sandbox_state.rb +3 -7
- data/lib/daytona_api_client/models/sandbox_volume.rb +78 -17
- data/lib/daytona_api_client/models/screenshot_response.rb +74 -3
- data/lib/daytona_api_client/models/search_files_response.rb +74 -3
- data/lib/daytona_api_client/models/send_webhook_dto.rb +75 -26
- data/lib/daytona_api_client/models/session.rb +74 -3
- data/lib/daytona_api_client/models/session_execute_request.rb +74 -3
- data/lib/daytona_api_client/models/session_execute_response.rb +74 -3
- data/lib/daytona_api_client/models/set_snapshot_general_status_dto.rb +74 -3
- data/lib/daytona_api_client/models/snapshot_dto.rb +78 -39
- data/lib/daytona_api_client/models/snapshot_state.rb +6 -4
- 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 +74 -3
- 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 +115 -93
- 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 +74 -3
- data/lib/daytona_api_client/models/user_home_dir_response.rb +74 -3
- 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/{admin_get_webhook_status200_response.rb → webhook_controller_get_status200_response.rb} +76 -5
- data/lib/daytona_api_client/models/webhook_initialization_status.rb +74 -3
- data/lib/daytona_api_client/models/windows_response.rb +74 -3
- data/lib/daytona_api_client/models/work_dir_response.rb +74 -3
- data/lib/daytona_api_client/models/{sandbox_list_item.rb → workspace.rb} +344 -170
- data/lib/daytona_api_client/version.rb +2 -2
- data/lib/daytona_api_client.rb +8 -53
- data/project.json +11 -42
- metadata +11 -60
- data/.gitignore +0 -39
- data/.openapi-generator/FILES +0 -210
- 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/admin_api.rb +0 -1151
- 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_model_base.rb +0 -88
- data/lib/daytona_api_client/models/admin_create_runner.rb +0 -326
- data/lib/daytona_api_client/models/create_region_response.rb +0 -209
- data/lib/daytona_api_client/models/create_runner_response.rb +0 -192
- data/lib/daytona_api_client/models/create_sandbox_snapshot.rb +0 -165
- data/lib/daytona_api_client/models/fork_sandbox.rb +0 -148
- 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 -53
- data/lib/daytona_api_client/models/list_sandboxes_response.rb +0 -180
- data/lib/daytona_api_client/models/log_entry.rb +0 -334
- data/lib/daytona_api_client/models/metric_data_point.rb +0 -192
- 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 -178
- data/lib/daytona_api_client/models/paginated_logs.rb +0 -248
- data/lib/daytona_api_client/models/paginated_traces.rb +0 -248
- data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -167
- data/lib/daytona_api_client/models/rate_limit_config.rb +0 -178
- data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -158
- data/lib/daytona_api_client/models/regenerate_api_key_response.rb +0 -165
- data/lib/daytona_api_client/models/region_quota.rb +0 -378
- data/lib/daytona_api_client/models/region_type.rb +0 -42
- data/lib/daytona_api_client/models/region_usage_overview.rb +0 -456
- data/lib/daytona_api_client/models/resize_sandbox.rb +0 -225
- data/lib/daytona_api_client/models/runner_class.rb +0 -41
- data/lib/daytona_api_client/models/runner_full.rb +0 -764
- data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -482
- data/lib/daytona_api_client/models/runner_healthcheck.rb +0 -217
- data/lib/daytona_api_client/models/runner_service_health.rb +0 -202
- 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/signed_port_preview_url.rb +0 -246
- data/lib/daytona_api_client/models/snapshot_manager_credentials.rb +0 -192
- data/lib/daytona_api_client/models/toolbox_proxy_url.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_job_status.rb +0 -207
- data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -165
- data/lib/daytona_api_client/models/update_organization_region_quota.rb +0 -256
- data/lib/daytona_api_client/models/update_region.rb +0 -171
- data/lib/daytona_api_client/models/update_sandbox_network_settings.rb +0 -158
- data/lib/daytona_api_client/models/url.rb +0 -165
- data/lib/daytona_api_client/models/webhook_event.rb +0 -46
|
@@ -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,46 +14,37 @@ 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
|
|
56
38
|
|
|
39
|
+
# Whether to block all network access for the sandbox
|
|
40
|
+
attr_accessor :network_block_all
|
|
41
|
+
|
|
42
|
+
# Comma-separated list of allowed CIDR network addresses for the sandbox
|
|
43
|
+
attr_accessor :network_allow_list
|
|
44
|
+
|
|
45
|
+
# The target environment for the sandbox
|
|
46
|
+
attr_accessor :target
|
|
47
|
+
|
|
57
48
|
# The CPU quota for the sandbox
|
|
58
49
|
attr_accessor :cpu
|
|
59
50
|
|
|
@@ -66,12 +57,21 @@ module DaytonaApiClient
|
|
|
66
57
|
# The disk quota for the sandbox
|
|
67
58
|
attr_accessor :disk
|
|
68
59
|
|
|
69
|
-
#
|
|
70
|
-
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
|
|
71
68
|
|
|
72
69
|
# The state of the backup
|
|
73
70
|
attr_accessor :backup_state
|
|
74
71
|
|
|
72
|
+
# The creation timestamp of the last backup
|
|
73
|
+
attr_accessor :backup_created_at
|
|
74
|
+
|
|
75
75
|
# Auto-stop interval in minutes (0 means disabled)
|
|
76
76
|
attr_accessor :auto_stop_interval
|
|
77
77
|
|
|
@@ -81,20 +81,41 @@ module DaytonaApiClient
|
|
|
81
81
|
# Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
82
82
|
attr_accessor :auto_delete_interval
|
|
83
83
|
|
|
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
|
|
89
|
+
|
|
90
|
+
# Build information for the sandbox
|
|
91
|
+
attr_accessor :build_info
|
|
92
|
+
|
|
84
93
|
# The creation timestamp of the sandbox
|
|
85
94
|
attr_accessor :created_at
|
|
86
95
|
|
|
87
96
|
# The last update timestamp of the sandbox
|
|
88
97
|
attr_accessor :updated_at
|
|
89
98
|
|
|
90
|
-
# The
|
|
91
|
-
attr_accessor :
|
|
99
|
+
# The class of the sandbox
|
|
100
|
+
attr_accessor :_class
|
|
92
101
|
|
|
93
102
|
# The version of the daemon running in the sandbox
|
|
94
103
|
attr_accessor :daemon_version
|
|
95
104
|
|
|
96
|
-
# The
|
|
97
|
-
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
|
|
113
|
+
|
|
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
|
|
98
119
|
|
|
99
120
|
class EnumAttributeValidator
|
|
100
121
|
attr_reader :datatype
|
|
@@ -123,31 +144,38 @@ module DaytonaApiClient
|
|
|
123
144
|
{
|
|
124
145
|
:'id' => :'id',
|
|
125
146
|
:'organization_id' => :'organizationId',
|
|
126
|
-
:'name' => :'name',
|
|
127
|
-
:'target' => :'target',
|
|
128
|
-
:'runner_id' => :'runnerId',
|
|
129
|
-
:'sandbox_class' => :'sandboxClass',
|
|
130
|
-
:'state' => :'state',
|
|
131
|
-
:'desired_state' => :'desiredState',
|
|
132
147
|
:'snapshot' => :'snapshot',
|
|
133
148
|
:'user' => :'user',
|
|
134
|
-
:'
|
|
135
|
-
:'
|
|
149
|
+
:'env' => :'env',
|
|
150
|
+
:'labels' => :'labels',
|
|
136
151
|
:'public' => :'public',
|
|
152
|
+
:'network_block_all' => :'networkBlockAll',
|
|
153
|
+
:'network_allow_list' => :'networkAllowList',
|
|
154
|
+
:'target' => :'target',
|
|
137
155
|
:'cpu' => :'cpu',
|
|
138
156
|
:'gpu' => :'gpu',
|
|
139
157
|
:'memory' => :'memory',
|
|
140
158
|
:'disk' => :'disk',
|
|
141
|
-
:'
|
|
159
|
+
:'state' => :'state',
|
|
160
|
+
:'desired_state' => :'desiredState',
|
|
161
|
+
:'error_reason' => :'errorReason',
|
|
142
162
|
:'backup_state' => :'backupState',
|
|
163
|
+
:'backup_created_at' => :'backupCreatedAt',
|
|
143
164
|
:'auto_stop_interval' => :'autoStopInterval',
|
|
144
165
|
:'auto_archive_interval' => :'autoArchiveInterval',
|
|
145
166
|
:'auto_delete_interval' => :'autoDeleteInterval',
|
|
167
|
+
:'runner_domain' => :'runnerDomain',
|
|
168
|
+
:'volumes' => :'volumes',
|
|
169
|
+
:'build_info' => :'buildInfo',
|
|
146
170
|
:'created_at' => :'createdAt',
|
|
147
171
|
:'updated_at' => :'updatedAt',
|
|
148
|
-
:'
|
|
172
|
+
:'_class' => :'class',
|
|
149
173
|
:'daemon_version' => :'daemonVersion',
|
|
150
|
-
:'
|
|
174
|
+
:'name' => :'name',
|
|
175
|
+
:'image' => :'image',
|
|
176
|
+
:'snapshot_state' => :'snapshotState',
|
|
177
|
+
:'snapshot_created_at' => :'snapshotCreatedAt',
|
|
178
|
+
:'info' => :'info'
|
|
151
179
|
}
|
|
152
180
|
end
|
|
153
181
|
|
|
@@ -166,31 +194,38 @@ module DaytonaApiClient
|
|
|
166
194
|
{
|
|
167
195
|
:'id' => :'String',
|
|
168
196
|
:'organization_id' => :'String',
|
|
169
|
-
:'name' => :'String',
|
|
170
|
-
:'target' => :'String',
|
|
171
|
-
:'runner_id' => :'String',
|
|
172
|
-
:'sandbox_class' => :'String',
|
|
173
|
-
:'state' => :'SandboxState',
|
|
174
|
-
:'desired_state' => :'SandboxDesiredState',
|
|
175
197
|
:'snapshot' => :'String',
|
|
176
198
|
:'user' => :'String',
|
|
177
|
-
:'
|
|
178
|
-
:'
|
|
199
|
+
:'env' => :'Hash<String, String>',
|
|
200
|
+
:'labels' => :'Hash<String, String>',
|
|
179
201
|
:'public' => :'Boolean',
|
|
202
|
+
:'network_block_all' => :'Boolean',
|
|
203
|
+
:'network_allow_list' => :'String',
|
|
204
|
+
:'target' => :'String',
|
|
180
205
|
:'cpu' => :'Float',
|
|
181
206
|
:'gpu' => :'Float',
|
|
182
207
|
:'memory' => :'Float',
|
|
183
208
|
:'disk' => :'Float',
|
|
184
|
-
:'
|
|
209
|
+
:'state' => :'SandboxState',
|
|
210
|
+
:'desired_state' => :'SandboxDesiredState',
|
|
211
|
+
:'error_reason' => :'String',
|
|
185
212
|
:'backup_state' => :'String',
|
|
213
|
+
:'backup_created_at' => :'String',
|
|
186
214
|
:'auto_stop_interval' => :'Float',
|
|
187
215
|
:'auto_archive_interval' => :'Float',
|
|
188
216
|
:'auto_delete_interval' => :'Float',
|
|
217
|
+
:'runner_domain' => :'String',
|
|
218
|
+
:'volumes' => :'Array<SandboxVolume>',
|
|
219
|
+
:'build_info' => :'BuildInfo',
|
|
189
220
|
:'created_at' => :'String',
|
|
190
221
|
:'updated_at' => :'String',
|
|
191
|
-
:'
|
|
222
|
+
:'_class' => :'String',
|
|
192
223
|
:'daemon_version' => :'String',
|
|
193
|
-
:'
|
|
224
|
+
:'name' => :'String',
|
|
225
|
+
:'image' => :'String',
|
|
226
|
+
:'snapshot_state' => :'String',
|
|
227
|
+
:'snapshot_created_at' => :'String',
|
|
228
|
+
:'info' => :'SandboxInfo'
|
|
194
229
|
}
|
|
195
230
|
end
|
|
196
231
|
|
|
@@ -204,14 +239,14 @@ module DaytonaApiClient
|
|
|
204
239
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
205
240
|
def initialize(attributes = {})
|
|
206
241
|
if (!attributes.is_a?(Hash))
|
|
207
|
-
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"
|
|
208
243
|
end
|
|
209
244
|
|
|
210
245
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
211
246
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
212
247
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
213
248
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
214
|
-
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
|
|
215
250
|
end
|
|
216
251
|
h[k.to_sym] = v
|
|
217
252
|
}
|
|
@@ -228,34 +263,6 @@ module DaytonaApiClient
|
|
|
228
263
|
self.organization_id = nil
|
|
229
264
|
end
|
|
230
265
|
|
|
231
|
-
if attributes.key?(:'name')
|
|
232
|
-
self.name = attributes[:'name']
|
|
233
|
-
else
|
|
234
|
-
self.name = nil
|
|
235
|
-
end
|
|
236
|
-
|
|
237
|
-
if attributes.key?(:'target')
|
|
238
|
-
self.target = attributes[:'target']
|
|
239
|
-
else
|
|
240
|
-
self.target = nil
|
|
241
|
-
end
|
|
242
|
-
|
|
243
|
-
if attributes.key?(:'runner_id')
|
|
244
|
-
self.runner_id = attributes[:'runner_id']
|
|
245
|
-
end
|
|
246
|
-
|
|
247
|
-
if attributes.key?(:'sandbox_class')
|
|
248
|
-
self.sandbox_class = attributes[:'sandbox_class']
|
|
249
|
-
end
|
|
250
|
-
|
|
251
|
-
if attributes.key?(:'state')
|
|
252
|
-
self.state = attributes[:'state']
|
|
253
|
-
end
|
|
254
|
-
|
|
255
|
-
if attributes.key?(:'desired_state')
|
|
256
|
-
self.desired_state = attributes[:'desired_state']
|
|
257
|
-
end
|
|
258
|
-
|
|
259
266
|
if attributes.key?(:'snapshot')
|
|
260
267
|
self.snapshot = attributes[:'snapshot']
|
|
261
268
|
end
|
|
@@ -266,12 +273,20 @@ module DaytonaApiClient
|
|
|
266
273
|
self.user = nil
|
|
267
274
|
end
|
|
268
275
|
|
|
269
|
-
if attributes.key?(:'
|
|
270
|
-
|
|
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
|
|
271
282
|
end
|
|
272
283
|
|
|
273
|
-
if attributes.key?(:'
|
|
274
|
-
|
|
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
|
|
275
290
|
end
|
|
276
291
|
|
|
277
292
|
if attributes.key?(:'public')
|
|
@@ -280,6 +295,22 @@ module DaytonaApiClient
|
|
|
280
295
|
self.public = nil
|
|
281
296
|
end
|
|
282
297
|
|
|
298
|
+
if attributes.key?(:'network_block_all')
|
|
299
|
+
self.network_block_all = attributes[:'network_block_all']
|
|
300
|
+
else
|
|
301
|
+
self.network_block_all = nil
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
if attributes.key?(:'network_allow_list')
|
|
305
|
+
self.network_allow_list = attributes[:'network_allow_list']
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
if attributes.key?(:'target')
|
|
309
|
+
self.target = attributes[:'target']
|
|
310
|
+
else
|
|
311
|
+
self.target = nil
|
|
312
|
+
end
|
|
313
|
+
|
|
283
314
|
if attributes.key?(:'cpu')
|
|
284
315
|
self.cpu = attributes[:'cpu']
|
|
285
316
|
else
|
|
@@ -304,18 +335,26 @@ module DaytonaApiClient
|
|
|
304
335
|
self.disk = nil
|
|
305
336
|
end
|
|
306
337
|
|
|
307
|
-
if attributes.key?(:'
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
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']
|
|
313
348
|
end
|
|
314
349
|
|
|
315
350
|
if attributes.key?(:'backup_state')
|
|
316
351
|
self.backup_state = attributes[:'backup_state']
|
|
317
352
|
end
|
|
318
353
|
|
|
354
|
+
if attributes.key?(:'backup_created_at')
|
|
355
|
+
self.backup_created_at = attributes[:'backup_created_at']
|
|
356
|
+
end
|
|
357
|
+
|
|
319
358
|
if attributes.key?(:'auto_stop_interval')
|
|
320
359
|
self.auto_stop_interval = attributes[:'auto_stop_interval']
|
|
321
360
|
end
|
|
@@ -328,6 +367,20 @@ module DaytonaApiClient
|
|
|
328
367
|
self.auto_delete_interval = attributes[:'auto_delete_interval']
|
|
329
368
|
end
|
|
330
369
|
|
|
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
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
if attributes.key?(:'build_info')
|
|
381
|
+
self.build_info = attributes[:'build_info']
|
|
382
|
+
end
|
|
383
|
+
|
|
331
384
|
if attributes.key?(:'created_at')
|
|
332
385
|
self.created_at = attributes[:'created_at']
|
|
333
386
|
end
|
|
@@ -336,18 +389,34 @@ module DaytonaApiClient
|
|
|
336
389
|
self.updated_at = attributes[:'updated_at']
|
|
337
390
|
end
|
|
338
391
|
|
|
339
|
-
if attributes.key?(:'
|
|
340
|
-
self.
|
|
392
|
+
if attributes.key?(:'_class')
|
|
393
|
+
self._class = attributes[:'_class']
|
|
341
394
|
end
|
|
342
395
|
|
|
343
396
|
if attributes.key?(:'daemon_version')
|
|
344
397
|
self.daemon_version = attributes[:'daemon_version']
|
|
345
398
|
end
|
|
346
399
|
|
|
347
|
-
if attributes.key?(:'
|
|
348
|
-
self.
|
|
400
|
+
if attributes.key?(:'name')
|
|
401
|
+
self.name = attributes[:'name']
|
|
349
402
|
else
|
|
350
|
-
self.
|
|
403
|
+
self.name = ''
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
if attributes.key?(:'image')
|
|
407
|
+
self.image = attributes[:'image']
|
|
408
|
+
end
|
|
409
|
+
|
|
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']
|
|
351
420
|
end
|
|
352
421
|
end
|
|
353
422
|
|
|
@@ -364,22 +433,30 @@ module DaytonaApiClient
|
|
|
364
433
|
invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
|
|
365
434
|
end
|
|
366
435
|
|
|
367
|
-
if @
|
|
368
|
-
invalid_properties.push('invalid value for "
|
|
436
|
+
if @user.nil?
|
|
437
|
+
invalid_properties.push('invalid value for "user", user cannot be nil.')
|
|
369
438
|
end
|
|
370
439
|
|
|
371
|
-
if @
|
|
372
|
-
invalid_properties.push('invalid value for "
|
|
440
|
+
if @env.nil?
|
|
441
|
+
invalid_properties.push('invalid value for "env", env cannot be nil.')
|
|
373
442
|
end
|
|
374
443
|
|
|
375
|
-
if @
|
|
376
|
-
invalid_properties.push('invalid value for "
|
|
444
|
+
if @labels.nil?
|
|
445
|
+
invalid_properties.push('invalid value for "labels", labels cannot be nil.')
|
|
377
446
|
end
|
|
378
447
|
|
|
379
448
|
if @public.nil?
|
|
380
449
|
invalid_properties.push('invalid value for "public", public cannot be nil.')
|
|
381
450
|
end
|
|
382
451
|
|
|
452
|
+
if @network_block_all.nil?
|
|
453
|
+
invalid_properties.push('invalid value for "network_block_all", network_block_all cannot be nil.')
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
if @target.nil?
|
|
457
|
+
invalid_properties.push('invalid value for "target", target cannot be nil.')
|
|
458
|
+
end
|
|
459
|
+
|
|
383
460
|
if @cpu.nil?
|
|
384
461
|
invalid_properties.push('invalid value for "cpu", cpu cannot be nil.')
|
|
385
462
|
end
|
|
@@ -396,12 +473,8 @@ module DaytonaApiClient
|
|
|
396
473
|
invalid_properties.push('invalid value for "disk", disk cannot be nil.')
|
|
397
474
|
end
|
|
398
475
|
|
|
399
|
-
if @
|
|
400
|
-
invalid_properties.push('invalid value for "
|
|
401
|
-
end
|
|
402
|
-
|
|
403
|
-
if @toolbox_proxy_url.nil?
|
|
404
|
-
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.')
|
|
405
478
|
end
|
|
406
479
|
|
|
407
480
|
invalid_properties
|
|
@@ -413,20 +486,23 @@ module DaytonaApiClient
|
|
|
413
486
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
414
487
|
return false if @id.nil?
|
|
415
488
|
return false if @organization_id.nil?
|
|
416
|
-
return false if @name.nil?
|
|
417
|
-
return false if @target.nil?
|
|
418
|
-
sandbox_class_validator = EnumAttributeValidator.new('String', ["small", "medium", "large", "unknown_default_open_api"])
|
|
419
|
-
return false unless sandbox_class_validator.valid?(@sandbox_class)
|
|
420
489
|
return false if @user.nil?
|
|
490
|
+
return false if @env.nil?
|
|
491
|
+
return false if @labels.nil?
|
|
421
492
|
return false if @public.nil?
|
|
493
|
+
return false if @network_block_all.nil?
|
|
494
|
+
return false if @target.nil?
|
|
422
495
|
return false if @cpu.nil?
|
|
423
496
|
return false if @gpu.nil?
|
|
424
497
|
return false if @memory.nil?
|
|
425
498
|
return false if @disk.nil?
|
|
426
|
-
|
|
427
|
-
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"])
|
|
428
500
|
return false unless backup_state_validator.valid?(@backup_state)
|
|
429
|
-
|
|
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)
|
|
430
506
|
true
|
|
431
507
|
end
|
|
432
508
|
|
|
@@ -451,43 +527,33 @@ module DaytonaApiClient
|
|
|
451
527
|
end
|
|
452
528
|
|
|
453
529
|
# Custom attribute writer method with validation
|
|
454
|
-
# @param [Object]
|
|
455
|
-
def
|
|
456
|
-
if
|
|
457
|
-
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'
|
|
458
534
|
end
|
|
459
535
|
|
|
460
|
-
@
|
|
536
|
+
@user = user
|
|
461
537
|
end
|
|
462
538
|
|
|
463
539
|
# Custom attribute writer method with validation
|
|
464
|
-
# @param [Object]
|
|
465
|
-
def
|
|
466
|
-
if
|
|
467
|
-
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'
|
|
468
544
|
end
|
|
469
545
|
|
|
470
|
-
@
|
|
471
|
-
end
|
|
472
|
-
|
|
473
|
-
# Custom attribute writer method checking allowed values (enum).
|
|
474
|
-
# @param [Object] sandbox_class Object to be assigned
|
|
475
|
-
def sandbox_class=(sandbox_class)
|
|
476
|
-
validator = EnumAttributeValidator.new('String', ["small", "medium", "large", "unknown_default_open_api"])
|
|
477
|
-
unless validator.valid?(sandbox_class)
|
|
478
|
-
fail ArgumentError, "invalid value for \"sandbox_class\", must be one of #{validator.allowable_values}."
|
|
479
|
-
end
|
|
480
|
-
@sandbox_class = sandbox_class
|
|
546
|
+
@env = env
|
|
481
547
|
end
|
|
482
548
|
|
|
483
549
|
# Custom attribute writer method with validation
|
|
484
|
-
# @param [Object]
|
|
485
|
-
def
|
|
486
|
-
if
|
|
487
|
-
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'
|
|
488
554
|
end
|
|
489
555
|
|
|
490
|
-
@
|
|
556
|
+
@labels = labels
|
|
491
557
|
end
|
|
492
558
|
|
|
493
559
|
# Custom attribute writer method with validation
|
|
@@ -500,6 +566,26 @@ module DaytonaApiClient
|
|
|
500
566
|
@public = public
|
|
501
567
|
end
|
|
502
568
|
|
|
569
|
+
# Custom attribute writer method with validation
|
|
570
|
+
# @param [Object] network_block_all Value to be assigned
|
|
571
|
+
def network_block_all=(network_block_all)
|
|
572
|
+
if network_block_all.nil?
|
|
573
|
+
fail ArgumentError, 'network_block_all cannot be nil'
|
|
574
|
+
end
|
|
575
|
+
|
|
576
|
+
@network_block_all = network_block_all
|
|
577
|
+
end
|
|
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
|
+
|
|
503
589
|
# Custom attribute writer method with validation
|
|
504
590
|
# @param [Object] cpu Value to be assigned
|
|
505
591
|
def cpu=(cpu)
|
|
@@ -540,34 +626,44 @@ module DaytonaApiClient
|
|
|
540
626
|
@disk = disk
|
|
541
627
|
end
|
|
542
628
|
|
|
543
|
-
# Custom attribute writer method with validation
|
|
544
|
-
# @param [Object] labels Value to be assigned
|
|
545
|
-
def labels=(labels)
|
|
546
|
-
if labels.nil?
|
|
547
|
-
fail ArgumentError, 'labels cannot be nil'
|
|
548
|
-
end
|
|
549
|
-
|
|
550
|
-
@labels = labels
|
|
551
|
-
end
|
|
552
|
-
|
|
553
629
|
# Custom attribute writer method checking allowed values (enum).
|
|
554
630
|
# @param [Object] backup_state Object to be assigned
|
|
555
631
|
def backup_state=(backup_state)
|
|
556
|
-
validator = EnumAttributeValidator.new('String', ["None", "Pending", "InProgress", "Completed", "Error"
|
|
632
|
+
validator = EnumAttributeValidator.new('String', ["None", "Pending", "InProgress", "Completed", "Error"])
|
|
557
633
|
unless validator.valid?(backup_state)
|
|
558
634
|
fail ArgumentError, "invalid value for \"backup_state\", must be one of #{validator.allowable_values}."
|
|
559
635
|
end
|
|
560
636
|
@backup_state = backup_state
|
|
561
637
|
end
|
|
562
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
|
+
|
|
563
649
|
# Custom attribute writer method with validation
|
|
564
|
-
# @param [Object]
|
|
565
|
-
def
|
|
566
|
-
if
|
|
567
|
-
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'
|
|
568
654
|
end
|
|
569
655
|
|
|
570
|
-
@
|
|
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
|
|
571
667
|
end
|
|
572
668
|
|
|
573
669
|
# Checks equality by comparing each attribute.
|
|
@@ -577,31 +673,38 @@ module DaytonaApiClient
|
|
|
577
673
|
self.class == o.class &&
|
|
578
674
|
id == o.id &&
|
|
579
675
|
organization_id == o.organization_id &&
|
|
580
|
-
name == o.name &&
|
|
581
|
-
target == o.target &&
|
|
582
|
-
runner_id == o.runner_id &&
|
|
583
|
-
sandbox_class == o.sandbox_class &&
|
|
584
|
-
state == o.state &&
|
|
585
|
-
desired_state == o.desired_state &&
|
|
586
676
|
snapshot == o.snapshot &&
|
|
587
677
|
user == o.user &&
|
|
588
|
-
|
|
589
|
-
|
|
678
|
+
env == o.env &&
|
|
679
|
+
labels == o.labels &&
|
|
590
680
|
public == o.public &&
|
|
681
|
+
network_block_all == o.network_block_all &&
|
|
682
|
+
network_allow_list == o.network_allow_list &&
|
|
683
|
+
target == o.target &&
|
|
591
684
|
cpu == o.cpu &&
|
|
592
685
|
gpu == o.gpu &&
|
|
593
686
|
memory == o.memory &&
|
|
594
687
|
disk == o.disk &&
|
|
595
|
-
|
|
688
|
+
state == o.state &&
|
|
689
|
+
desired_state == o.desired_state &&
|
|
690
|
+
error_reason == o.error_reason &&
|
|
596
691
|
backup_state == o.backup_state &&
|
|
692
|
+
backup_created_at == o.backup_created_at &&
|
|
597
693
|
auto_stop_interval == o.auto_stop_interval &&
|
|
598
694
|
auto_archive_interval == o.auto_archive_interval &&
|
|
599
695
|
auto_delete_interval == o.auto_delete_interval &&
|
|
696
|
+
runner_domain == o.runner_domain &&
|
|
697
|
+
volumes == o.volumes &&
|
|
698
|
+
build_info == o.build_info &&
|
|
600
699
|
created_at == o.created_at &&
|
|
601
700
|
updated_at == o.updated_at &&
|
|
602
|
-
|
|
701
|
+
_class == o._class &&
|
|
603
702
|
daemon_version == o.daemon_version &&
|
|
604
|
-
|
|
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
|
|
605
708
|
end
|
|
606
709
|
|
|
607
710
|
# @see the `==` method
|
|
@@ -613,7 +716,7 @@ module DaytonaApiClient
|
|
|
613
716
|
# Calculates hash code according to all attributes.
|
|
614
717
|
# @return [Integer] Hash code
|
|
615
718
|
def hash
|
|
616
|
-
[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
|
|
617
720
|
end
|
|
618
721
|
|
|
619
722
|
# Builds the object from hash
|
|
@@ -639,6 +742,61 @@ module DaytonaApiClient
|
|
|
639
742
|
new(transformed_hash)
|
|
640
743
|
end
|
|
641
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
|
+
|
|
642
800
|
# Returns the object in the form of hash
|
|
643
801
|
# @return [Hash] Returns the object in the form of hash
|
|
644
802
|
def to_hash
|
|
@@ -655,6 +813,22 @@ module DaytonaApiClient
|
|
|
655
813
|
hash
|
|
656
814
|
end
|
|
657
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
|
|
658
833
|
end
|
|
659
|
-
|
|
660
834
|
end
|