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
data/lib/daytona_api_client/models/{available_sandbox_class.rb → computer_use_status_response.rb}
RENAMED
|
@@ -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,14 +14,9 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
attr_accessor :sandbox_class
|
|
21
|
-
|
|
22
|
-
attr_accessor :gpu_available
|
|
23
|
-
|
|
24
|
-
attr_accessor :allowed_gpu_types
|
|
17
|
+
class ComputerUseStatusResponse
|
|
18
|
+
# Status of computer use services (active, partial, inactive, error)
|
|
19
|
+
attr_accessor :status
|
|
25
20
|
|
|
26
21
|
class EnumAttributeValidator
|
|
27
22
|
attr_reader :datatype
|
|
@@ -48,10 +43,7 @@ module DaytonaApiClient
|
|
|
48
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
49
44
|
def self.attribute_map
|
|
50
45
|
{
|
|
51
|
-
:'
|
|
52
|
-
:'sandbox_class' => :'sandboxClass',
|
|
53
|
-
:'gpu_available' => :'gpuAvailable',
|
|
54
|
-
:'allowed_gpu_types' => :'allowedGpuTypes'
|
|
46
|
+
:'status' => :'status'
|
|
55
47
|
}
|
|
56
48
|
end
|
|
57
49
|
|
|
@@ -68,10 +60,7 @@ module DaytonaApiClient
|
|
|
68
60
|
# Attribute type mapping.
|
|
69
61
|
def self.openapi_types
|
|
70
62
|
{
|
|
71
|
-
:'
|
|
72
|
-
:'sandbox_class' => :'SandboxClass',
|
|
73
|
-
:'gpu_available' => :'Boolean',
|
|
74
|
-
:'allowed_gpu_types' => :'Array<GpuType>'
|
|
63
|
+
:'status' => :'String'
|
|
75
64
|
}
|
|
76
65
|
end
|
|
77
66
|
|
|
@@ -85,40 +74,22 @@ module DaytonaApiClient
|
|
|
85
74
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
86
75
|
def initialize(attributes = {})
|
|
87
76
|
if (!attributes.is_a?(Hash))
|
|
88
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::
|
|
77
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::ComputerUseStatusResponse` initialize method"
|
|
89
78
|
end
|
|
90
79
|
|
|
91
80
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
92
81
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
93
82
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
94
83
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
95
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::
|
|
84
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::ComputerUseStatusResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
96
85
|
end
|
|
97
86
|
h[k.to_sym] = v
|
|
98
87
|
}
|
|
99
88
|
|
|
100
|
-
if attributes.key?(:'
|
|
101
|
-
self.
|
|
102
|
-
else
|
|
103
|
-
self.region_id = nil
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
if attributes.key?(:'sandbox_class')
|
|
107
|
-
self.sandbox_class = attributes[:'sandbox_class']
|
|
89
|
+
if attributes.key?(:'status')
|
|
90
|
+
self.status = attributes[:'status']
|
|
108
91
|
else
|
|
109
|
-
self.
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
if attributes.key?(:'gpu_available')
|
|
113
|
-
self.gpu_available = attributes[:'gpu_available']
|
|
114
|
-
else
|
|
115
|
-
self.gpu_available = nil
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
if attributes.key?(:'allowed_gpu_types')
|
|
119
|
-
if (value = attributes[:'allowed_gpu_types']).is_a?(Array)
|
|
120
|
-
self.allowed_gpu_types = value
|
|
121
|
-
end
|
|
92
|
+
self.status = nil
|
|
122
93
|
end
|
|
123
94
|
end
|
|
124
95
|
|
|
@@ -127,16 +98,8 @@ module DaytonaApiClient
|
|
|
127
98
|
def list_invalid_properties
|
|
128
99
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
129
100
|
invalid_properties = Array.new
|
|
130
|
-
if @
|
|
131
|
-
invalid_properties.push('invalid value for "
|
|
132
|
-
end
|
|
133
|
-
|
|
134
|
-
if @sandbox_class.nil?
|
|
135
|
-
invalid_properties.push('invalid value for "sandbox_class", sandbox_class cannot be nil.')
|
|
136
|
-
end
|
|
137
|
-
|
|
138
|
-
if @gpu_available.nil?
|
|
139
|
-
invalid_properties.push('invalid value for "gpu_available", gpu_available cannot be nil.')
|
|
101
|
+
if @status.nil?
|
|
102
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
140
103
|
end
|
|
141
104
|
|
|
142
105
|
invalid_properties
|
|
@@ -146,40 +109,20 @@ module DaytonaApiClient
|
|
|
146
109
|
# @return true if the model is valid
|
|
147
110
|
def valid?
|
|
148
111
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
149
|
-
return false if @
|
|
150
|
-
|
|
151
|
-
return false
|
|
112
|
+
return false if @status.nil?
|
|
113
|
+
status_validator = EnumAttributeValidator.new('String', ["active", "partial", "inactive", "error"])
|
|
114
|
+
return false unless status_validator.valid?(@status)
|
|
152
115
|
true
|
|
153
116
|
end
|
|
154
117
|
|
|
155
|
-
# Custom attribute writer method
|
|
156
|
-
# @param [Object]
|
|
157
|
-
def
|
|
158
|
-
|
|
159
|
-
|
|
118
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
119
|
+
# @param [Object] status Object to be assigned
|
|
120
|
+
def status=(status)
|
|
121
|
+
validator = EnumAttributeValidator.new('String', ["active", "partial", "inactive", "error"])
|
|
122
|
+
unless validator.valid?(status)
|
|
123
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
160
124
|
end
|
|
161
|
-
|
|
162
|
-
@region_id = region_id
|
|
163
|
-
end
|
|
164
|
-
|
|
165
|
-
# Custom attribute writer method with validation
|
|
166
|
-
# @param [Object] sandbox_class Value to be assigned
|
|
167
|
-
def sandbox_class=(sandbox_class)
|
|
168
|
-
if sandbox_class.nil?
|
|
169
|
-
fail ArgumentError, 'sandbox_class cannot be nil'
|
|
170
|
-
end
|
|
171
|
-
|
|
172
|
-
@sandbox_class = sandbox_class
|
|
173
|
-
end
|
|
174
|
-
|
|
175
|
-
# Custom attribute writer method with validation
|
|
176
|
-
# @param [Object] gpu_available Value to be assigned
|
|
177
|
-
def gpu_available=(gpu_available)
|
|
178
|
-
if gpu_available.nil?
|
|
179
|
-
fail ArgumentError, 'gpu_available cannot be nil'
|
|
180
|
-
end
|
|
181
|
-
|
|
182
|
-
@gpu_available = gpu_available
|
|
125
|
+
@status = status
|
|
183
126
|
end
|
|
184
127
|
|
|
185
128
|
# Checks equality by comparing each attribute.
|
|
@@ -187,10 +130,7 @@ module DaytonaApiClient
|
|
|
187
130
|
def ==(o)
|
|
188
131
|
return true if self.equal?(o)
|
|
189
132
|
self.class == o.class &&
|
|
190
|
-
|
|
191
|
-
sandbox_class == o.sandbox_class &&
|
|
192
|
-
gpu_available == o.gpu_available &&
|
|
193
|
-
allowed_gpu_types == o.allowed_gpu_types
|
|
133
|
+
status == o.status
|
|
194
134
|
end
|
|
195
135
|
|
|
196
136
|
# @see the `==` method
|
|
@@ -202,7 +142,7 @@ module DaytonaApiClient
|
|
|
202
142
|
# Calculates hash code according to all attributes.
|
|
203
143
|
# @return [Integer] Hash code
|
|
204
144
|
def hash
|
|
205
|
-
[
|
|
145
|
+
[status].hash
|
|
206
146
|
end
|
|
207
147
|
|
|
208
148
|
# Builds the object from hash
|
|
@@ -228,6 +168,61 @@ module DaytonaApiClient
|
|
|
228
168
|
new(transformed_hash)
|
|
229
169
|
end
|
|
230
170
|
|
|
171
|
+
# Deserializes the data based on type
|
|
172
|
+
# @param string type Data type
|
|
173
|
+
# @param string value Value to be deserialized
|
|
174
|
+
# @return [Object] Deserialized data
|
|
175
|
+
def self._deserialize(type, value)
|
|
176
|
+
case type.to_sym
|
|
177
|
+
when :Time
|
|
178
|
+
Time.parse(value)
|
|
179
|
+
when :Date
|
|
180
|
+
Date.parse(value)
|
|
181
|
+
when :String
|
|
182
|
+
value.to_s
|
|
183
|
+
when :Integer
|
|
184
|
+
value.to_i
|
|
185
|
+
when :Float
|
|
186
|
+
value.to_f
|
|
187
|
+
when :Boolean
|
|
188
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
189
|
+
true
|
|
190
|
+
else
|
|
191
|
+
false
|
|
192
|
+
end
|
|
193
|
+
when :Object
|
|
194
|
+
# generic object (usually a Hash), return directly
|
|
195
|
+
value
|
|
196
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
197
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
198
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
199
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
200
|
+
k_type = Regexp.last_match[:k_type]
|
|
201
|
+
v_type = Regexp.last_match[:v_type]
|
|
202
|
+
{}.tap do |hash|
|
|
203
|
+
value.each do |k, v|
|
|
204
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
else # model
|
|
208
|
+
# models (e.g. Pet) or oneOf
|
|
209
|
+
klass = DaytonaApiClient.const_get(type)
|
|
210
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Returns the string representation of the object
|
|
215
|
+
# @return [String] String presentation of the object
|
|
216
|
+
def to_s
|
|
217
|
+
to_hash.to_s
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
221
|
+
# @return [Hash] Returns the object in the form of hash
|
|
222
|
+
def to_body
|
|
223
|
+
to_hash
|
|
224
|
+
end
|
|
225
|
+
|
|
231
226
|
# Returns the object in the form of hash
|
|
232
227
|
# @return [Hash] Returns the object in the form of hash
|
|
233
228
|
def to_hash
|
|
@@ -244,6 +239,22 @@ module DaytonaApiClient
|
|
|
244
239
|
hash
|
|
245
240
|
end
|
|
246
241
|
|
|
242
|
+
# Outputs non-array value in the form of hash
|
|
243
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
244
|
+
# @param [Object] value Any valid value
|
|
245
|
+
# @return [Hash] Returns the value in the form of hash
|
|
246
|
+
def _to_hash(value)
|
|
247
|
+
if value.is_a?(Array)
|
|
248
|
+
value.compact.map { |v| _to_hash(v) }
|
|
249
|
+
elsif value.is_a?(Hash)
|
|
250
|
+
{}.tap do |hash|
|
|
251
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
252
|
+
end
|
|
253
|
+
elsif value.respond_to? :to_hash
|
|
254
|
+
value.to_hash
|
|
255
|
+
else
|
|
256
|
+
value
|
|
257
|
+
end
|
|
258
|
+
end
|
|
247
259
|
end
|
|
248
|
-
|
|
249
260
|
end
|
|
@@ -0,0 +1,263 @@
|
|
|
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 ComputerUseStopResponse
|
|
18
|
+
# A message indicating the result of stopping computer use processes
|
|
19
|
+
attr_accessor :message
|
|
20
|
+
|
|
21
|
+
# Status information about all VNC desktop processes after stopping
|
|
22
|
+
attr_accessor :status
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'message' => :'message',
|
|
28
|
+
:'status' => :'status'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
acceptable_attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'message' => :'String',
|
|
46
|
+
:'status' => :'Object'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::ComputerUseStopResponse` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::ComputerUseStopResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
|
+
end
|
|
69
|
+
h[k.to_sym] = v
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'message')
|
|
73
|
+
self.message = attributes[:'message']
|
|
74
|
+
else
|
|
75
|
+
self.message = nil
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'status')
|
|
79
|
+
self.status = attributes[:'status']
|
|
80
|
+
else
|
|
81
|
+
self.status = nil
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
+
# @return Array for valid properties with the reasons
|
|
87
|
+
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
if @message.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "message", message cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if @status.nil?
|
|
95
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
invalid_properties
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Check to see if the all the properties in the model are valid
|
|
102
|
+
# @return true if the model is valid
|
|
103
|
+
def valid?
|
|
104
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
105
|
+
return false if @message.nil?
|
|
106
|
+
return false if @status.nil?
|
|
107
|
+
true
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Custom attribute writer method with validation
|
|
111
|
+
# @param [Object] message Value to be assigned
|
|
112
|
+
def message=(message)
|
|
113
|
+
if message.nil?
|
|
114
|
+
fail ArgumentError, 'message cannot be nil'
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
@message = message
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Custom attribute writer method with validation
|
|
121
|
+
# @param [Object] status Value to be assigned
|
|
122
|
+
def status=(status)
|
|
123
|
+
if status.nil?
|
|
124
|
+
fail ArgumentError, 'status cannot be nil'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
@status = status
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Checks equality by comparing each attribute.
|
|
131
|
+
# @param [Object] Object to be compared
|
|
132
|
+
def ==(o)
|
|
133
|
+
return true if self.equal?(o)
|
|
134
|
+
self.class == o.class &&
|
|
135
|
+
message == o.message &&
|
|
136
|
+
status == o.status
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# @see the `==` method
|
|
140
|
+
# @param [Object] Object to be compared
|
|
141
|
+
def eql?(o)
|
|
142
|
+
self == o
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Calculates hash code according to all attributes.
|
|
146
|
+
# @return [Integer] Hash code
|
|
147
|
+
def hash
|
|
148
|
+
[message, status].hash
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Builds the object from hash
|
|
152
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
153
|
+
# @return [Object] Returns the model itself
|
|
154
|
+
def self.build_from_hash(attributes)
|
|
155
|
+
return nil unless attributes.is_a?(Hash)
|
|
156
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
157
|
+
transformed_hash = {}
|
|
158
|
+
openapi_types.each_pair do |key, type|
|
|
159
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
160
|
+
transformed_hash["#{key}"] = nil
|
|
161
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
162
|
+
# check to ensure the input is an array given that the attribute
|
|
163
|
+
# is documented as an array but the input is not
|
|
164
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
165
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
166
|
+
end
|
|
167
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
168
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
new(transformed_hash)
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Deserializes the data based on type
|
|
175
|
+
# @param string type Data type
|
|
176
|
+
# @param string value Value to be deserialized
|
|
177
|
+
# @return [Object] Deserialized data
|
|
178
|
+
def self._deserialize(type, value)
|
|
179
|
+
case type.to_sym
|
|
180
|
+
when :Time
|
|
181
|
+
Time.parse(value)
|
|
182
|
+
when :Date
|
|
183
|
+
Date.parse(value)
|
|
184
|
+
when :String
|
|
185
|
+
value.to_s
|
|
186
|
+
when :Integer
|
|
187
|
+
value.to_i
|
|
188
|
+
when :Float
|
|
189
|
+
value.to_f
|
|
190
|
+
when :Boolean
|
|
191
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
192
|
+
true
|
|
193
|
+
else
|
|
194
|
+
false
|
|
195
|
+
end
|
|
196
|
+
when :Object
|
|
197
|
+
# generic object (usually a Hash), return directly
|
|
198
|
+
value
|
|
199
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
200
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
201
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
202
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
203
|
+
k_type = Regexp.last_match[:k_type]
|
|
204
|
+
v_type = Regexp.last_match[:v_type]
|
|
205
|
+
{}.tap do |hash|
|
|
206
|
+
value.each do |k, v|
|
|
207
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
else # model
|
|
211
|
+
# models (e.g. Pet) or oneOf
|
|
212
|
+
klass = DaytonaApiClient.const_get(type)
|
|
213
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Returns the string representation of the object
|
|
218
|
+
# @return [String] String presentation of the object
|
|
219
|
+
def to_s
|
|
220
|
+
to_hash.to_s
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
224
|
+
# @return [Hash] Returns the object in the form of hash
|
|
225
|
+
def to_body
|
|
226
|
+
to_hash
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Returns the object in the form of hash
|
|
230
|
+
# @return [Hash] Returns the object in the form of hash
|
|
231
|
+
def to_hash
|
|
232
|
+
hash = {}
|
|
233
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
234
|
+
value = self.send(attr)
|
|
235
|
+
if value.nil?
|
|
236
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
237
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
hash[param] = _to_hash(value)
|
|
241
|
+
end
|
|
242
|
+
hash
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Outputs non-array value in the form of hash
|
|
246
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
247
|
+
# @param [Object] value Any valid value
|
|
248
|
+
# @return [Hash] Returns the value in the form of hash
|
|
249
|
+
def _to_hash(value)
|
|
250
|
+
if value.is_a?(Array)
|
|
251
|
+
value.compact.map { |v| _to_hash(v) }
|
|
252
|
+
elsif value.is_a?(Hash)
|
|
253
|
+
{}.tap do |hash|
|
|
254
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
255
|
+
end
|
|
256
|
+
elsif value.respond_to? :to_hash
|
|
257
|
+
value.to_hash
|
|
258
|
+
else
|
|
259
|
+
value
|
|
260
|
+
end
|
|
261
|
+
end
|
|
262
|
+
end
|
|
263
|
+
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,11 +14,11 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class CreateApiKey
|
|
17
|
+
class CreateApiKey
|
|
18
18
|
# The name of the API key
|
|
19
19
|
attr_accessor :name
|
|
20
20
|
|
|
21
|
-
# The list of organization resource permissions
|
|
21
|
+
# The list of organization resource permissions assigned to the API key
|
|
22
22
|
attr_accessor :permissions
|
|
23
23
|
|
|
24
24
|
# When the API key expires
|
|
@@ -196,6 +196,61 @@ module DaytonaApiClient
|
|
|
196
196
|
new(transformed_hash)
|
|
197
197
|
end
|
|
198
198
|
|
|
199
|
+
# Deserializes the data based on type
|
|
200
|
+
# @param string type Data type
|
|
201
|
+
# @param string value Value to be deserialized
|
|
202
|
+
# @return [Object] Deserialized data
|
|
203
|
+
def self._deserialize(type, value)
|
|
204
|
+
case type.to_sym
|
|
205
|
+
when :Time
|
|
206
|
+
Time.parse(value)
|
|
207
|
+
when :Date
|
|
208
|
+
Date.parse(value)
|
|
209
|
+
when :String
|
|
210
|
+
value.to_s
|
|
211
|
+
when :Integer
|
|
212
|
+
value.to_i
|
|
213
|
+
when :Float
|
|
214
|
+
value.to_f
|
|
215
|
+
when :Boolean
|
|
216
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
217
|
+
true
|
|
218
|
+
else
|
|
219
|
+
false
|
|
220
|
+
end
|
|
221
|
+
when :Object
|
|
222
|
+
# generic object (usually a Hash), return directly
|
|
223
|
+
value
|
|
224
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
225
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
226
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
227
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
228
|
+
k_type = Regexp.last_match[:k_type]
|
|
229
|
+
v_type = Regexp.last_match[:v_type]
|
|
230
|
+
{}.tap do |hash|
|
|
231
|
+
value.each do |k, v|
|
|
232
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
233
|
+
end
|
|
234
|
+
end
|
|
235
|
+
else # model
|
|
236
|
+
# models (e.g. Pet) or oneOf
|
|
237
|
+
klass = DaytonaApiClient.const_get(type)
|
|
238
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# Returns the string representation of the object
|
|
243
|
+
# @return [String] String presentation of the object
|
|
244
|
+
def to_s
|
|
245
|
+
to_hash.to_s
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
249
|
+
# @return [Hash] Returns the object in the form of hash
|
|
250
|
+
def to_body
|
|
251
|
+
to_hash
|
|
252
|
+
end
|
|
253
|
+
|
|
199
254
|
# Returns the object in the form of hash
|
|
200
255
|
# @return [Hash] Returns the object in the form of hash
|
|
201
256
|
def to_hash
|
|
@@ -212,6 +267,22 @@ module DaytonaApiClient
|
|
|
212
267
|
hash
|
|
213
268
|
end
|
|
214
269
|
|
|
270
|
+
# Outputs non-array value in the form of hash
|
|
271
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
272
|
+
# @param [Object] value Any valid value
|
|
273
|
+
# @return [Hash] Returns the value in the form of hash
|
|
274
|
+
def _to_hash(value)
|
|
275
|
+
if value.is_a?(Array)
|
|
276
|
+
value.compact.map { |v| _to_hash(v) }
|
|
277
|
+
elsif value.is_a?(Hash)
|
|
278
|
+
{}.tap do |hash|
|
|
279
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
280
|
+
end
|
|
281
|
+
elsif value.respond_to? :to_hash
|
|
282
|
+
value.to_hash
|
|
283
|
+
else
|
|
284
|
+
value
|
|
285
|
+
end
|
|
286
|
+
end
|
|
215
287
|
end
|
|
216
|
-
|
|
217
288
|
end
|