daytona_api_client 0.202.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 +140 -40
- 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 +265 -1316
- data/lib/daytona_api_client/api/preview_api.rb +8 -202
- data/lib/daytona_api_client/api/runners_api.rb +22 -412
- data/lib/daytona_api_client/api/sandbox_api.rb +434 -2352
- data/lib/daytona_api_client/api/snapshots_api.rb +113 -39
- data/lib/daytona_api_client/api/toolbox_api.rb +5108 -0
- 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/{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/{paginated_traces.rb → completion_list.rb} +106 -91
- 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/{available_sandbox_class.rb → computer_use_status_response.rb} +97 -86
- 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 +78 -26
- 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 +117 -76
- 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/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 -64
- data/lib/daytona_api_client/models/display_info_response.rb +238 -0
- 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/execute_response.rb +263 -0
- data/lib/daytona_api_client/models/file_info.rb +417 -0
- data/lib/daytona_api_client/models/{secret.rb → file_status.rb} +122 -121
- data/lib/daytona_api_client/models/git_add_request.rb +264 -0
- data/lib/daytona_api_client/models/{admin_create_organization.rb → git_branch_request.rb} +95 -53
- 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/{trace_span.rb → git_commit_info.rb} +148 -141
- 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_secret.rb → git_delete_branch_request.rb} +106 -59
- 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/{create_sandbox_snapshot.rb → keyboard_hotkey_request.rb} +93 -34
- 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/lsp_server_request.rb +263 -0
- data/lib/daytona_api_client/models/lsp_symbol.rb +287 -0
- 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/mouse_position.rb +263 -0
- data/lib/daytona_api_client/models/mouse_scroll_request.rb +300 -0
- data/lib/daytona_api_client/models/mouse_scroll_response.rb +236 -0
- data/lib/daytona_api_client/models/oidc_config.rb +74 -3
- data/lib/daytona_api_client/models/organization.rb +159 -243
- 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_logs.rb → paginated_snapshots_dto.rb} +77 -10
- 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/pty_create_request.rb +288 -0
- data/lib/daytona_api_client/models/pty_create_response.rb +236 -0
- data/lib/daytona_api_client/models/{metric_data_point.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 -181
- 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/{resize_sandbox.rb → replace_result.rb} +95 -84
- 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 +101 -164
- data/lib/daytona_api_client/models/sandbox_class.rb +6 -8
- data/lib/daytona_api_client/models/sandbox_desired_state.rb +3 -5
- 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 -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/{runner_service_health.rb → search_files_response.rb} +94 -59
- data/lib/daytona_api_client/models/send_webhook_dto.rb +75 -26
- 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/set_snapshot_general_status_dto.rb +74 -3
- data/lib/daytona_api_client/models/snapshot_dto.rb +78 -71
- 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 +115 -131
- 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/{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} +339 -193
- data/lib/daytona_api_client/version.rb +2 -2
- data/lib/daytona_api_client.rb +76 -74
- data/project.json +13 -38
- metadata +81 -83
- data/.gitignore +0 -39
- data/.openapi-generator/FILES +0 -163
- 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 -1615
- 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/admin_create_runner.rb +0 -326
- data/lib/daytona_api_client/models/admin_get_webhook_status200_response.rb +0 -147
- data/lib/daytona_api_client/models/create_organization_region_quota.rb +0 -375
- data/lib/daytona_api_client/models/date_filter.rb +0 -178
- data/lib/daytona_api_client/models/fork_sandbox.rb +0 -148
- data/lib/daytona_api_client/models/gpu_type.rb +0 -44
- 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/organization_preview_warning.rb +0 -165
- 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 -440
- 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/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_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/string_filter.rb +0 -182
- data/lib/daytona_api_client/models/trace_summary.rb +0 -310
- 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 -302
- data/lib/daytona_api_client/models/update_region.rb +0 -171
- 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/warm_pool.rb +0 -490
- data/lib/daytona_api_client/models/webhook_event.rb +0 -46
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Daytona
|
|
3
|
+
|
|
4
|
+
#Daytona AI platform API Docs
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@daytona.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module DaytonaApiClient
|
|
17
|
+
class SessionExecuteResponse
|
|
18
|
+
# The ID of the executed command
|
|
19
|
+
attr_accessor :cmd_id
|
|
20
|
+
|
|
21
|
+
# The output of the executed command marked with stdout and stderr prefixes
|
|
22
|
+
attr_accessor :output
|
|
23
|
+
|
|
24
|
+
# The exit code of the executed command
|
|
25
|
+
attr_accessor :exit_code
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'cmd_id' => :'cmdId',
|
|
31
|
+
:'output' => :'output',
|
|
32
|
+
:'exit_code' => :'exitCode'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns attribute mapping this model knows about
|
|
37
|
+
def self.acceptable_attribute_map
|
|
38
|
+
attribute_map
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
acceptable_attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'cmd_id' => :'String',
|
|
50
|
+
:'output' => :'String',
|
|
51
|
+
:'exit_code' => :'Float'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# List of attributes with nullable: true
|
|
56
|
+
def self.openapi_nullable
|
|
57
|
+
Set.new([
|
|
58
|
+
])
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Initializes the object
|
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
63
|
+
def initialize(attributes = {})
|
|
64
|
+
if (!attributes.is_a?(Hash))
|
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::SessionExecuteResponse` initialize method"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
69
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
71
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::SessionExecuteResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
73
|
+
end
|
|
74
|
+
h[k.to_sym] = v
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'cmd_id')
|
|
78
|
+
self.cmd_id = attributes[:'cmd_id']
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'output')
|
|
82
|
+
self.output = attributes[:'output']
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'exit_code')
|
|
86
|
+
self.exit_code = attributes[:'exit_code']
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
91
|
+
# @return Array for valid properties with the reasons
|
|
92
|
+
def list_invalid_properties
|
|
93
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
94
|
+
invalid_properties = Array.new
|
|
95
|
+
invalid_properties
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Check to see if the all the properties in the model are valid
|
|
99
|
+
# @return true if the model is valid
|
|
100
|
+
def valid?
|
|
101
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
102
|
+
true
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Checks equality by comparing each attribute.
|
|
106
|
+
# @param [Object] Object to be compared
|
|
107
|
+
def ==(o)
|
|
108
|
+
return true if self.equal?(o)
|
|
109
|
+
self.class == o.class &&
|
|
110
|
+
cmd_id == o.cmd_id &&
|
|
111
|
+
output == o.output &&
|
|
112
|
+
exit_code == o.exit_code
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# @see the `==` method
|
|
116
|
+
# @param [Object] Object to be compared
|
|
117
|
+
def eql?(o)
|
|
118
|
+
self == o
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Calculates hash code according to all attributes.
|
|
122
|
+
# @return [Integer] Hash code
|
|
123
|
+
def hash
|
|
124
|
+
[cmd_id, output, exit_code].hash
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Builds the object from hash
|
|
128
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
129
|
+
# @return [Object] Returns the model itself
|
|
130
|
+
def self.build_from_hash(attributes)
|
|
131
|
+
return nil unless attributes.is_a?(Hash)
|
|
132
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
133
|
+
transformed_hash = {}
|
|
134
|
+
openapi_types.each_pair do |key, type|
|
|
135
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
136
|
+
transformed_hash["#{key}"] = nil
|
|
137
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
138
|
+
# check to ensure the input is an array given that the attribute
|
|
139
|
+
# is documented as an array but the input is not
|
|
140
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
141
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
142
|
+
end
|
|
143
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
144
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
new(transformed_hash)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Deserializes the data based on type
|
|
151
|
+
# @param string type Data type
|
|
152
|
+
# @param string value Value to be deserialized
|
|
153
|
+
# @return [Object] Deserialized data
|
|
154
|
+
def self._deserialize(type, value)
|
|
155
|
+
case type.to_sym
|
|
156
|
+
when :Time
|
|
157
|
+
Time.parse(value)
|
|
158
|
+
when :Date
|
|
159
|
+
Date.parse(value)
|
|
160
|
+
when :String
|
|
161
|
+
value.to_s
|
|
162
|
+
when :Integer
|
|
163
|
+
value.to_i
|
|
164
|
+
when :Float
|
|
165
|
+
value.to_f
|
|
166
|
+
when :Boolean
|
|
167
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
168
|
+
true
|
|
169
|
+
else
|
|
170
|
+
false
|
|
171
|
+
end
|
|
172
|
+
when :Object
|
|
173
|
+
# generic object (usually a Hash), return directly
|
|
174
|
+
value
|
|
175
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
176
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
177
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
178
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
179
|
+
k_type = Regexp.last_match[:k_type]
|
|
180
|
+
v_type = Regexp.last_match[:v_type]
|
|
181
|
+
{}.tap do |hash|
|
|
182
|
+
value.each do |k, v|
|
|
183
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
else # model
|
|
187
|
+
# models (e.g. Pet) or oneOf
|
|
188
|
+
klass = DaytonaApiClient.const_get(type)
|
|
189
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Returns the string representation of the object
|
|
194
|
+
# @return [String] String presentation of the object
|
|
195
|
+
def to_s
|
|
196
|
+
to_hash.to_s
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
200
|
+
# @return [Hash] Returns the object in the form of hash
|
|
201
|
+
def to_body
|
|
202
|
+
to_hash
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Returns the object in the form of hash
|
|
206
|
+
# @return [Hash] Returns the object in the form of hash
|
|
207
|
+
def to_hash
|
|
208
|
+
hash = {}
|
|
209
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
210
|
+
value = self.send(attr)
|
|
211
|
+
if value.nil?
|
|
212
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
213
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
hash[param] = _to_hash(value)
|
|
217
|
+
end
|
|
218
|
+
hash
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Outputs non-array value in the form of hash
|
|
222
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
223
|
+
# @param [Object] value Any valid value
|
|
224
|
+
# @return [Hash] Returns the value in the form of hash
|
|
225
|
+
def _to_hash(value)
|
|
226
|
+
if value.is_a?(Array)
|
|
227
|
+
value.compact.map { |v| _to_hash(v) }
|
|
228
|
+
elsif value.is_a?(Hash)
|
|
229
|
+
{}.tap do |hash|
|
|
230
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
231
|
+
end
|
|
232
|
+
elsif value.respond_to? :to_hash
|
|
233
|
+
value.to_hash
|
|
234
|
+
else
|
|
235
|
+
value
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
end
|
|
@@ -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,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class SetSnapshotGeneralStatusDto
|
|
17
|
+
class SetSnapshotGeneralStatusDto
|
|
18
18
|
# Whether the snapshot is general
|
|
19
19
|
attr_accessor :general
|
|
20
20
|
|
|
@@ -144,6 +144,61 @@ module DaytonaApiClient
|
|
|
144
144
|
new(transformed_hash)
|
|
145
145
|
end
|
|
146
146
|
|
|
147
|
+
# Deserializes the data based on type
|
|
148
|
+
# @param string type Data type
|
|
149
|
+
# @param string value Value to be deserialized
|
|
150
|
+
# @return [Object] Deserialized data
|
|
151
|
+
def self._deserialize(type, value)
|
|
152
|
+
case type.to_sym
|
|
153
|
+
when :Time
|
|
154
|
+
Time.parse(value)
|
|
155
|
+
when :Date
|
|
156
|
+
Date.parse(value)
|
|
157
|
+
when :String
|
|
158
|
+
value.to_s
|
|
159
|
+
when :Integer
|
|
160
|
+
value.to_i
|
|
161
|
+
when :Float
|
|
162
|
+
value.to_f
|
|
163
|
+
when :Boolean
|
|
164
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
165
|
+
true
|
|
166
|
+
else
|
|
167
|
+
false
|
|
168
|
+
end
|
|
169
|
+
when :Object
|
|
170
|
+
# generic object (usually a Hash), return directly
|
|
171
|
+
value
|
|
172
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
173
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
174
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
175
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
176
|
+
k_type = Regexp.last_match[:k_type]
|
|
177
|
+
v_type = Regexp.last_match[:v_type]
|
|
178
|
+
{}.tap do |hash|
|
|
179
|
+
value.each do |k, v|
|
|
180
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
else # model
|
|
184
|
+
# models (e.g. Pet) or oneOf
|
|
185
|
+
klass = DaytonaApiClient.const_get(type)
|
|
186
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Returns the string representation of the object
|
|
191
|
+
# @return [String] String presentation of the object
|
|
192
|
+
def to_s
|
|
193
|
+
to_hash.to_s
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
197
|
+
# @return [Hash] Returns the object in the form of hash
|
|
198
|
+
def to_body
|
|
199
|
+
to_hash
|
|
200
|
+
end
|
|
201
|
+
|
|
147
202
|
# Returns the object in the form of hash
|
|
148
203
|
# @return [Hash] Returns the object in the form of hash
|
|
149
204
|
def to_hash
|
|
@@ -160,6 +215,22 @@ module DaytonaApiClient
|
|
|
160
215
|
hash
|
|
161
216
|
end
|
|
162
217
|
|
|
218
|
+
# Outputs non-array value in the form of hash
|
|
219
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
220
|
+
# @param [Object] value Any valid value
|
|
221
|
+
# @return [Hash] Returns the value in the form of hash
|
|
222
|
+
def _to_hash(value)
|
|
223
|
+
if value.is_a?(Array)
|
|
224
|
+
value.compact.map { |v| _to_hash(v) }
|
|
225
|
+
elsif value.is_a?(Hash)
|
|
226
|
+
{}.tap do |hash|
|
|
227
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
228
|
+
end
|
|
229
|
+
elsif value.respond_to? :to_hash
|
|
230
|
+
value.to_hash
|
|
231
|
+
else
|
|
232
|
+
value
|
|
233
|
+
end
|
|
234
|
+
end
|
|
163
235
|
end
|
|
164
|
-
|
|
165
236
|
end
|
|
@@ -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,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class SnapshotDto
|
|
17
|
+
class SnapshotDto
|
|
18
18
|
attr_accessor :id
|
|
19
19
|
|
|
20
20
|
attr_accessor :organization_id
|
|
@@ -35,9 +35,6 @@ module DaytonaApiClient
|
|
|
35
35
|
|
|
36
36
|
attr_accessor :gpu
|
|
37
37
|
|
|
38
|
-
# The GPU type assigned to the snapshot
|
|
39
|
-
attr_accessor :gpu_type
|
|
40
|
-
|
|
41
38
|
attr_accessor :mem
|
|
42
39
|
|
|
43
40
|
attr_accessor :disk
|
|
@@ -53,18 +50,6 @@ module DaytonaApiClient
|
|
|
53
50
|
# Build information for the snapshot
|
|
54
51
|
attr_accessor :build_info
|
|
55
52
|
|
|
56
|
-
# IDs of regions where the snapshot is available
|
|
57
|
-
attr_accessor :region_ids
|
|
58
|
-
|
|
59
|
-
# The initial runner ID of the snapshot
|
|
60
|
-
attr_accessor :initial_runner_id
|
|
61
|
-
|
|
62
|
-
# The snapshot reference
|
|
63
|
-
attr_accessor :ref
|
|
64
|
-
|
|
65
|
-
# The sandbox class of the snapshot
|
|
66
|
-
attr_accessor :sandbox_class
|
|
67
|
-
|
|
68
53
|
class EnumAttributeValidator
|
|
69
54
|
attr_reader :datatype
|
|
70
55
|
attr_reader :allowable_values
|
|
@@ -100,18 +85,13 @@ module DaytonaApiClient
|
|
|
100
85
|
:'entrypoint' => :'entrypoint',
|
|
101
86
|
:'cpu' => :'cpu',
|
|
102
87
|
:'gpu' => :'gpu',
|
|
103
|
-
:'gpu_type' => :'gpuType',
|
|
104
88
|
:'mem' => :'mem',
|
|
105
89
|
:'disk' => :'disk',
|
|
106
90
|
:'error_reason' => :'errorReason',
|
|
107
91
|
:'created_at' => :'createdAt',
|
|
108
92
|
:'updated_at' => :'updatedAt',
|
|
109
93
|
:'last_used_at' => :'lastUsedAt',
|
|
110
|
-
:'build_info' => :'buildInfo'
|
|
111
|
-
:'region_ids' => :'regionIds',
|
|
112
|
-
:'initial_runner_id' => :'initialRunnerId',
|
|
113
|
-
:'ref' => :'ref',
|
|
114
|
-
:'sandbox_class' => :'sandboxClass'
|
|
94
|
+
:'build_info' => :'buildInfo'
|
|
115
95
|
}
|
|
116
96
|
end
|
|
117
97
|
|
|
@@ -138,18 +118,13 @@ module DaytonaApiClient
|
|
|
138
118
|
:'entrypoint' => :'Array<String>',
|
|
139
119
|
:'cpu' => :'Float',
|
|
140
120
|
:'gpu' => :'Float',
|
|
141
|
-
:'gpu_type' => :'GpuType',
|
|
142
121
|
:'mem' => :'Float',
|
|
143
122
|
:'disk' => :'Float',
|
|
144
123
|
:'error_reason' => :'String',
|
|
145
124
|
:'created_at' => :'Time',
|
|
146
125
|
:'updated_at' => :'Time',
|
|
147
126
|
:'last_used_at' => :'Time',
|
|
148
|
-
:'build_info' => :'BuildInfo'
|
|
149
|
-
:'region_ids' => :'Array<String>',
|
|
150
|
-
:'initial_runner_id' => :'String',
|
|
151
|
-
:'ref' => :'String',
|
|
152
|
-
:'sandbox_class' => :'String'
|
|
127
|
+
:'build_info' => :'BuildInfo'
|
|
153
128
|
}
|
|
154
129
|
end
|
|
155
130
|
|
|
@@ -237,10 +212,6 @@ module DaytonaApiClient
|
|
|
237
212
|
self.gpu = nil
|
|
238
213
|
end
|
|
239
214
|
|
|
240
|
-
if attributes.key?(:'gpu_type')
|
|
241
|
-
self.gpu_type = attributes[:'gpu_type']
|
|
242
|
-
end
|
|
243
|
-
|
|
244
215
|
if attributes.key?(:'mem')
|
|
245
216
|
self.mem = attributes[:'mem']
|
|
246
217
|
else
|
|
@@ -280,24 +251,6 @@ module DaytonaApiClient
|
|
|
280
251
|
if attributes.key?(:'build_info')
|
|
281
252
|
self.build_info = attributes[:'build_info']
|
|
282
253
|
end
|
|
283
|
-
|
|
284
|
-
if attributes.key?(:'region_ids')
|
|
285
|
-
if (value = attributes[:'region_ids']).is_a?(Array)
|
|
286
|
-
self.region_ids = value
|
|
287
|
-
end
|
|
288
|
-
end
|
|
289
|
-
|
|
290
|
-
if attributes.key?(:'initial_runner_id')
|
|
291
|
-
self.initial_runner_id = attributes[:'initial_runner_id']
|
|
292
|
-
end
|
|
293
|
-
|
|
294
|
-
if attributes.key?(:'ref')
|
|
295
|
-
self.ref = attributes[:'ref']
|
|
296
|
-
end
|
|
297
|
-
|
|
298
|
-
if attributes.key?(:'sandbox_class')
|
|
299
|
-
self.sandbox_class = attributes[:'sandbox_class']
|
|
300
|
-
end
|
|
301
254
|
end
|
|
302
255
|
|
|
303
256
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -362,8 +315,6 @@ module DaytonaApiClient
|
|
|
362
315
|
return false if @disk.nil?
|
|
363
316
|
return false if @created_at.nil?
|
|
364
317
|
return false if @updated_at.nil?
|
|
365
|
-
sandbox_class_validator = EnumAttributeValidator.new('String', ["linux-vm", "container", "android", "windows", "unknown_default_open_api"])
|
|
366
|
-
return false unless sandbox_class_validator.valid?(@sandbox_class)
|
|
367
318
|
true
|
|
368
319
|
end
|
|
369
320
|
|
|
@@ -467,16 +418,6 @@ module DaytonaApiClient
|
|
|
467
418
|
@updated_at = updated_at
|
|
468
419
|
end
|
|
469
420
|
|
|
470
|
-
# Custom attribute writer method checking allowed values (enum).
|
|
471
|
-
# @param [Object] sandbox_class Object to be assigned
|
|
472
|
-
def sandbox_class=(sandbox_class)
|
|
473
|
-
validator = EnumAttributeValidator.new('String', ["linux-vm", "container", "android", "windows", "unknown_default_open_api"])
|
|
474
|
-
unless validator.valid?(sandbox_class)
|
|
475
|
-
fail ArgumentError, "invalid value for \"sandbox_class\", must be one of #{validator.allowable_values}."
|
|
476
|
-
end
|
|
477
|
-
@sandbox_class = sandbox_class
|
|
478
|
-
end
|
|
479
|
-
|
|
480
421
|
# Checks equality by comparing each attribute.
|
|
481
422
|
# @param [Object] Object to be compared
|
|
482
423
|
def ==(o)
|
|
@@ -492,18 +433,13 @@ module DaytonaApiClient
|
|
|
492
433
|
entrypoint == o.entrypoint &&
|
|
493
434
|
cpu == o.cpu &&
|
|
494
435
|
gpu == o.gpu &&
|
|
495
|
-
gpu_type == o.gpu_type &&
|
|
496
436
|
mem == o.mem &&
|
|
497
437
|
disk == o.disk &&
|
|
498
438
|
error_reason == o.error_reason &&
|
|
499
439
|
created_at == o.created_at &&
|
|
500
440
|
updated_at == o.updated_at &&
|
|
501
441
|
last_used_at == o.last_used_at &&
|
|
502
|
-
build_info == o.build_info
|
|
503
|
-
region_ids == o.region_ids &&
|
|
504
|
-
initial_runner_id == o.initial_runner_id &&
|
|
505
|
-
ref == o.ref &&
|
|
506
|
-
sandbox_class == o.sandbox_class
|
|
442
|
+
build_info == o.build_info
|
|
507
443
|
end
|
|
508
444
|
|
|
509
445
|
# @see the `==` method
|
|
@@ -515,7 +451,7 @@ module DaytonaApiClient
|
|
|
515
451
|
# Calculates hash code according to all attributes.
|
|
516
452
|
# @return [Integer] Hash code
|
|
517
453
|
def hash
|
|
518
|
-
[id, organization_id, general, name, image_name, state, size, entrypoint, cpu, gpu,
|
|
454
|
+
[id, organization_id, general, name, image_name, state, size, entrypoint, cpu, gpu, mem, disk, error_reason, created_at, updated_at, last_used_at, build_info].hash
|
|
519
455
|
end
|
|
520
456
|
|
|
521
457
|
# Builds the object from hash
|
|
@@ -541,6 +477,61 @@ module DaytonaApiClient
|
|
|
541
477
|
new(transformed_hash)
|
|
542
478
|
end
|
|
543
479
|
|
|
480
|
+
# Deserializes the data based on type
|
|
481
|
+
# @param string type Data type
|
|
482
|
+
# @param string value Value to be deserialized
|
|
483
|
+
# @return [Object] Deserialized data
|
|
484
|
+
def self._deserialize(type, value)
|
|
485
|
+
case type.to_sym
|
|
486
|
+
when :Time
|
|
487
|
+
Time.parse(value)
|
|
488
|
+
when :Date
|
|
489
|
+
Date.parse(value)
|
|
490
|
+
when :String
|
|
491
|
+
value.to_s
|
|
492
|
+
when :Integer
|
|
493
|
+
value.to_i
|
|
494
|
+
when :Float
|
|
495
|
+
value.to_f
|
|
496
|
+
when :Boolean
|
|
497
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
498
|
+
true
|
|
499
|
+
else
|
|
500
|
+
false
|
|
501
|
+
end
|
|
502
|
+
when :Object
|
|
503
|
+
# generic object (usually a Hash), return directly
|
|
504
|
+
value
|
|
505
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
506
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
507
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
508
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
509
|
+
k_type = Regexp.last_match[:k_type]
|
|
510
|
+
v_type = Regexp.last_match[:v_type]
|
|
511
|
+
{}.tap do |hash|
|
|
512
|
+
value.each do |k, v|
|
|
513
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
514
|
+
end
|
|
515
|
+
end
|
|
516
|
+
else # model
|
|
517
|
+
# models (e.g. Pet) or oneOf
|
|
518
|
+
klass = DaytonaApiClient.const_get(type)
|
|
519
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
520
|
+
end
|
|
521
|
+
end
|
|
522
|
+
|
|
523
|
+
# Returns the string representation of the object
|
|
524
|
+
# @return [String] String presentation of the object
|
|
525
|
+
def to_s
|
|
526
|
+
to_hash.to_s
|
|
527
|
+
end
|
|
528
|
+
|
|
529
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
530
|
+
# @return [Hash] Returns the object in the form of hash
|
|
531
|
+
def to_body
|
|
532
|
+
to_hash
|
|
533
|
+
end
|
|
534
|
+
|
|
544
535
|
# Returns the object in the form of hash
|
|
545
536
|
# @return [Hash] Returns the object in the form of hash
|
|
546
537
|
def to_hash
|
|
@@ -557,6 +548,22 @@ module DaytonaApiClient
|
|
|
557
548
|
hash
|
|
558
549
|
end
|
|
559
550
|
|
|
551
|
+
# Outputs non-array value in the form of hash
|
|
552
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
553
|
+
# @param [Object] value Any valid value
|
|
554
|
+
# @return [Hash] Returns the value in the form of hash
|
|
555
|
+
def _to_hash(value)
|
|
556
|
+
if value.is_a?(Array)
|
|
557
|
+
value.compact.map { |v| _to_hash(v) }
|
|
558
|
+
elsif value.is_a?(Hash)
|
|
559
|
+
{}.tap do |hash|
|
|
560
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
561
|
+
end
|
|
562
|
+
elsif value.respond_to? :to_hash
|
|
563
|
+
value.to_hash
|
|
564
|
+
else
|
|
565
|
+
value
|
|
566
|
+
end
|
|
567
|
+
end
|
|
560
568
|
end
|
|
561
|
-
|
|
562
569
|
end
|
|
@@ -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
|
|
|
@@ -15,19 +15,20 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
17
|
class SnapshotState
|
|
18
|
+
BUILD_PENDING = "build_pending".freeze
|
|
18
19
|
BUILDING = "building".freeze
|
|
19
20
|
PENDING = "pending".freeze
|
|
20
21
|
PULLING = "pulling".freeze
|
|
21
|
-
|
|
22
|
+
PENDING_VALIDATION = "pending_validation".freeze
|
|
23
|
+
VALIDATING = "validating".freeze
|
|
22
24
|
ACTIVE = "active".freeze
|
|
23
25
|
INACTIVE = "inactive".freeze
|
|
24
26
|
ERROR = "error".freeze
|
|
25
27
|
BUILD_FAILED = "build_failed".freeze
|
|
26
28
|
REMOVING = "removing".freeze
|
|
27
|
-
UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze
|
|
28
29
|
|
|
29
30
|
def self.all_vars
|
|
30
|
-
@all_vars ||= [BUILDING, PENDING, PULLING,
|
|
31
|
+
@all_vars ||= [BUILD_PENDING, BUILDING, PENDING, PULLING, PENDING_VALIDATION, VALIDATING, ACTIVE, INACTIVE, ERROR, BUILD_FAILED, REMOVING].freeze
|
|
31
32
|
end
|
|
32
33
|
|
|
33
34
|
# Builds the enum from string
|
|
@@ -42,7 +43,7 @@ module DaytonaApiClient
|
|
|
42
43
|
# @return [String] The enum value
|
|
43
44
|
def build_from_hash(value)
|
|
44
45
|
return value if SnapshotState.all_vars.include?(value)
|
|
45
|
-
|
|
46
|
+
raise "Invalid ENUM value #{value} for class #SnapshotState"
|
|
46
47
|
end
|
|
47
48
|
end
|
|
48
49
|
end
|