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