daytona_api_client 0.171.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +9 -0
- data/Gemfile.lock +101 -0
- data/daytona_api_client.gemspec +2 -2
- data/lib/daytona_api_client/api/api_keys_api.rb +2 -2
- data/lib/daytona_api_client/api/audit_api.rb +140 -10
- data/lib/daytona_api_client/api/config_api.rb +1 -1
- data/lib/daytona_api_client/api/docker_registry_api.rb +67 -6
- data/lib/daytona_api_client/api/health_api.rb +3 -54
- data/lib/daytona_api_client/api/object_storage_api.rb +1 -1
- data/lib/daytona_api_client/api/organizations_api.rb +163 -954
- data/lib/daytona_api_client/api/preview_api.rb +8 -77
- data/lib/daytona_api_client/api/runners_api.rb +22 -412
- data/lib/daytona_api_client/api/sandbox_api.rb +292 -1620
- data/lib/daytona_api_client/api/snapshots_api.rb +113 -39
- data/lib/daytona_api_client/api/toolbox_api.rb +741 -741
- data/lib/daytona_api_client/api/users_api.rb +239 -2
- data/lib/daytona_api_client/api/volumes_api.rb +2 -2
- data/lib/daytona_api_client/api/webhooks_api.rb +268 -5
- data/lib/daytona_api_client/api/workspace_api.rb +6 -6
- data/lib/daytona_api_client/api_client.rb +4 -8
- data/lib/daytona_api_client/api_error.rb +1 -1
- data/lib/daytona_api_client/configuration.rb +2 -5
- data/lib/daytona_api_client/models/account_provider.rb +74 -3
- data/lib/daytona_api_client/models/announcement.rb +74 -3
- data/lib/daytona_api_client/models/api_key_list.rb +74 -3
- data/lib/daytona_api_client/models/api_key_response.rb +74 -3
- data/lib/daytona_api_client/models/audit_log.rb +75 -22
- data/lib/daytona_api_client/models/build_info.rb +78 -34
- data/lib/daytona_api_client/models/command.rb +74 -3
- data/lib/daytona_api_client/models/completion_context.rb +74 -3
- data/lib/daytona_api_client/models/completion_item.rb +74 -3
- data/lib/daytona_api_client/models/completion_list.rb +74 -3
- data/lib/daytona_api_client/models/compressed_screenshot_response.rb +74 -3
- data/lib/daytona_api_client/models/computer_use_start_response.rb +74 -3
- data/lib/daytona_api_client/models/computer_use_status_response.rb +76 -5
- data/lib/daytona_api_client/models/computer_use_stop_response.rb +74 -3
- data/lib/daytona_api_client/models/create_api_key.rb +75 -4
- data/lib/daytona_api_client/models/create_audit_log.rb +350 -0
- data/lib/daytona_api_client/models/create_build_info.rb +74 -3
- data/lib/daytona_api_client/models/create_docker_registry.rb +139 -7
- data/lib/daytona_api_client/models/create_linked_account.rb +74 -3
- data/lib/daytona_api_client/models/create_organization.rb +78 -34
- data/lib/daytona_api_client/models/create_organization_invitation.rb +76 -5
- data/lib/daytona_api_client/models/create_organization_quota.rb +74 -3
- data/lib/daytona_api_client/models/create_organization_role.rb +74 -3
- data/lib/daytona_api_client/models/create_runner.rb +389 -34
- data/lib/daytona_api_client/models/create_sandbox.rb +77 -16
- data/lib/daytona_api_client/models/create_session_request.rb +74 -3
- data/lib/daytona_api_client/models/create_snapshot.rb +88 -17
- data/lib/daytona_api_client/models/create_user.rb +77 -15
- data/lib/daytona_api_client/models/create_volume.rb +74 -3
- data/lib/daytona_api_client/models/create_workspace.rb +78 -7
- data/lib/daytona_api_client/models/daytona_configuration.rb +78 -54
- data/lib/daytona_api_client/models/display_info_response.rb +74 -3
- data/lib/daytona_api_client/models/docker_registry.rb +76 -5
- data/lib/daytona_api_client/models/download_files.rb +74 -3
- data/lib/daytona_api_client/models/execute_request.rb +74 -3
- data/lib/daytona_api_client/models/execute_response.rb +74 -3
- data/lib/daytona_api_client/models/file_info.rb +74 -3
- data/lib/daytona_api_client/models/file_status.rb +74 -3
- data/lib/daytona_api_client/models/git_add_request.rb +74 -3
- data/lib/daytona_api_client/models/git_branch_request.rb +74 -3
- data/lib/daytona_api_client/models/git_checkout_request.rb +74 -3
- data/lib/daytona_api_client/models/git_clone_request.rb +74 -3
- data/lib/daytona_api_client/models/git_commit_info.rb +74 -3
- data/lib/daytona_api_client/models/git_commit_request.rb +74 -3
- data/lib/daytona_api_client/models/git_commit_response.rb +74 -3
- data/lib/daytona_api_client/models/git_delete_branch_request.rb +74 -3
- data/lib/daytona_api_client/models/git_repo_request.rb +74 -3
- data/lib/daytona_api_client/models/git_status.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check200_response.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check200_response_info_value.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check503_response.rb +74 -3
- data/lib/daytona_api_client/models/keyboard_hotkey_request.rb +74 -3
- data/lib/daytona_api_client/models/keyboard_press_request.rb +74 -3
- data/lib/daytona_api_client/models/keyboard_type_request.rb +74 -3
- data/lib/daytona_api_client/models/list_branch_response.rb +74 -3
- data/lib/daytona_api_client/models/lsp_completion_params.rb +74 -3
- data/lib/daytona_api_client/models/lsp_document_request.rb +74 -3
- data/lib/daytona_api_client/models/lsp_location.rb +74 -3
- data/lib/daytona_api_client/models/lsp_server_request.rb +74 -3
- data/lib/daytona_api_client/models/lsp_symbol.rb +74 -3
- data/lib/daytona_api_client/models/match.rb +74 -3
- data/lib/daytona_api_client/models/mouse_click_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_click_response.rb +74 -3
- data/lib/daytona_api_client/models/mouse_drag_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_drag_response.rb +74 -3
- data/lib/daytona_api_client/models/mouse_move_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_move_response.rb +74 -3
- data/lib/daytona_api_client/models/mouse_position.rb +74 -3
- data/lib/daytona_api_client/models/mouse_scroll_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_scroll_response.rb +74 -3
- data/lib/daytona_api_client/models/oidc_config.rb +74 -3
- data/lib/daytona_api_client/models/organization.rb +159 -149
- 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.rb +74 -3
- 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 +74 -3
- data/lib/daytona_api_client/models/posthog_config.rb +74 -3
- data/lib/daytona_api_client/models/process_errors_response.rb +74 -3
- data/lib/daytona_api_client/models/process_logs_response.rb +74 -3
- data/lib/daytona_api_client/models/process_restart_response.rb +74 -3
- data/lib/daytona_api_client/models/process_status_response.rb +74 -3
- data/lib/daytona_api_client/models/project_dir_response.rb +74 -3
- data/lib/daytona_api_client/models/pty_create_request.rb +74 -3
- data/lib/daytona_api_client/models/pty_create_response.rb +74 -3
- data/lib/daytona_api_client/models/pty_list_response.rb +74 -3
- data/lib/daytona_api_client/models/pty_resize_request.rb +74 -3
- data/lib/daytona_api_client/models/pty_session_info.rb +74 -3
- data/lib/daytona_api_client/models/range.rb +74 -3
- data/lib/daytona_api_client/models/region.rb +78 -181
- data/lib/daytona_api_client/models/region_screenshot_response.rb +74 -3
- data/lib/daytona_api_client/models/registry_push_access_dto.rb +74 -3
- data/lib/daytona_api_client/models/replace_request.rb +74 -3
- data/lib/daytona_api_client/models/replace_result.rb +74 -3
- data/lib/daytona_api_client/models/runner.rb +191 -109
- data/lib/daytona_api_client/models/runner_snapshot_dto.rb +91 -3
- data/lib/daytona_api_client/models/runner_state.rb +3 -4
- data/lib/daytona_api_client/models/sandbox.rb +92 -95
- data/lib/daytona_api_client/models/sandbox_class.rb +3 -4
- data/lib/daytona_api_client/models/sandbox_desired_state.rb +3 -4
- data/lib/daytona_api_client/models/sandbox_info.rb +74 -3
- data/lib/daytona_api_client/models/sandbox_labels.rb +74 -3
- data/lib/daytona_api_client/models/sandbox_state.rb +3 -7
- data/lib/daytona_api_client/models/sandbox_volume.rb +78 -17
- data/lib/daytona_api_client/models/screenshot_response.rb +74 -3
- data/lib/daytona_api_client/models/search_files_response.rb +74 -3
- data/lib/daytona_api_client/models/send_webhook_dto.rb +75 -26
- data/lib/daytona_api_client/models/session.rb +74 -3
- data/lib/daytona_api_client/models/session_execute_request.rb +74 -3
- data/lib/daytona_api_client/models/session_execute_response.rb +74 -3
- data/lib/daytona_api_client/models/set_snapshot_general_status_dto.rb +74 -3
- data/lib/daytona_api_client/models/snapshot_dto.rb +78 -39
- data/lib/daytona_api_client/models/snapshot_state.rb +6 -4
- data/lib/daytona_api_client/models/ssh_access_dto.rb +78 -34
- data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +98 -7
- data/lib/daytona_api_client/models/storage_access_dto.rb +74 -3
- data/lib/daytona_api_client/models/update_docker_registry.rb +74 -3
- data/lib/daytona_api_client/models/update_organization_invitation.rb +76 -5
- data/lib/daytona_api_client/models/update_organization_member_access.rb +76 -5
- data/lib/daytona_api_client/models/update_organization_quota.rb +115 -93
- data/lib/daytona_api_client/models/update_organization_role.rb +74 -3
- data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +80 -29
- data/lib/daytona_api_client/models/user.rb +74 -3
- data/lib/daytona_api_client/models/user_home_dir_response.rb +74 -3
- data/lib/daytona_api_client/models/user_public_key.rb +74 -3
- data/lib/daytona_api_client/models/volume_dto.rb +74 -3
- data/lib/daytona_api_client/models/volume_state.rb +3 -4
- data/lib/daytona_api_client/models/webhook_app_portal_access.rb +75 -31
- data/lib/daytona_api_client/models/{admin_get_webhook_status200_response.rb → webhook_controller_get_status200_response.rb} +76 -5
- data/lib/daytona_api_client/models/webhook_initialization_status.rb +74 -3
- data/lib/daytona_api_client/models/windows_response.rb +74 -3
- data/lib/daytona_api_client/models/work_dir_response.rb +74 -3
- data/lib/daytona_api_client/models/workspace.rb +107 -83
- data/lib/daytona_api_client/version.rb +2 -2
- data/lib/daytona_api_client.rb +3 -49
- data/project.json +11 -42
- metadata +6 -56
- data/.gitignore +0 -39
- data/.openapi-generator/FILES +0 -211
- data/.openapi-generator/VERSION +0 -1
- data/.openapi-generator-ignore +0 -31
- data/.rspec +0 -2
- data/.rubocop.yml +0 -148
- data/fix-gemspec.sh +0 -11
- data/lib/daytona_api_client/api/admin_api.rb +0 -1151
- data/lib/daytona_api_client/api/jobs_api.rb +0 -299
- data/lib/daytona_api_client/api/regions_api.rb +0 -77
- data/lib/daytona_api_client/api_model_base.rb +0 -88
- data/lib/daytona_api_client/models/admin_create_runner.rb +0 -314
- data/lib/daytona_api_client/models/create_region.rb +0 -198
- data/lib/daytona_api_client/models/create_region_response.rb +0 -209
- data/lib/daytona_api_client/models/create_runner_response.rb +0 -192
- data/lib/daytona_api_client/models/create_sandbox_snapshot.rb +0 -165
- data/lib/daytona_api_client/models/fork_sandbox.rb +0 -148
- data/lib/daytona_api_client/models/job.rb +0 -366
- data/lib/daytona_api_client/models/job_status.rb +0 -43
- data/lib/daytona_api_client/models/job_type.rb +0 -53
- data/lib/daytona_api_client/models/log_entry.rb +0 -334
- data/lib/daytona_api_client/models/metric_data_point.rb +0 -192
- data/lib/daytona_api_client/models/metric_series.rb +0 -194
- data/lib/daytona_api_client/models/metrics_response.rb +0 -167
- data/lib/daytona_api_client/models/otel_config.rb +0 -178
- data/lib/daytona_api_client/models/paginated_jobs.rb +0 -244
- data/lib/daytona_api_client/models/paginated_traces.rb +0 -248
- data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -167
- data/lib/daytona_api_client/models/rate_limit_config.rb +0 -178
- data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -158
- data/lib/daytona_api_client/models/regenerate_api_key_response.rb +0 -165
- data/lib/daytona_api_client/models/region_quota.rb +0 -316
- data/lib/daytona_api_client/models/region_type.rb +0 -42
- data/lib/daytona_api_client/models/region_usage_overview.rb +0 -368
- data/lib/daytona_api_client/models/resize_sandbox.rb +0 -225
- data/lib/daytona_api_client/models/runner_class.rb +0 -41
- data/lib/daytona_api_client/models/runner_full.rb +0 -735
- data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -462
- data/lib/daytona_api_client/models/runner_healthcheck.rb +0 -217
- data/lib/daytona_api_client/models/runner_service_health.rb +0 -202
- data/lib/daytona_api_client/models/signed_port_preview_url.rb +0 -246
- data/lib/daytona_api_client/models/snapshot_manager_credentials.rb +0 -192
- data/lib/daytona_api_client/models/toolbox_proxy_url.rb +0 -165
- data/lib/daytona_api_client/models/trace_span.rb +0 -332
- data/lib/daytona_api_client/models/trace_summary.rb +0 -310
- data/lib/daytona_api_client/models/update_job_status.rb +0 -207
- data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -165
- data/lib/daytona_api_client/models/update_organization_region_quota.rb +0 -214
- data/lib/daytona_api_client/models/update_region.rb +0 -171
- data/lib/daytona_api_client/models/update_sandbox_network_settings.rb +0 -158
- data/lib/daytona_api_client/models/url.rb +0 -165
- data/lib/daytona_api_client/models/webhook_event.rb +0 -46
- data/lib/daytona_api_client/models/workspace_port_preview_url.rb +0 -192
|
@@ -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,16 +14,13 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class Sandbox
|
|
17
|
+
class Sandbox
|
|
18
18
|
# The ID of the sandbox
|
|
19
19
|
attr_accessor :id
|
|
20
20
|
|
|
21
21
|
# The organization ID of the sandbox
|
|
22
22
|
attr_accessor :organization_id
|
|
23
23
|
|
|
24
|
-
# The name of the sandbox
|
|
25
|
-
attr_accessor :name
|
|
26
|
-
|
|
27
24
|
# The snapshot used for the sandbox
|
|
28
25
|
attr_accessor :snapshot
|
|
29
26
|
|
|
@@ -69,9 +66,6 @@ module DaytonaApiClient
|
|
|
69
66
|
# The error reason of the sandbox
|
|
70
67
|
attr_accessor :error_reason
|
|
71
68
|
|
|
72
|
-
# Whether the sandbox error is recoverable.
|
|
73
|
-
attr_accessor :recoverable
|
|
74
|
-
|
|
75
69
|
# The state of the backup
|
|
76
70
|
attr_accessor :backup_state
|
|
77
71
|
|
|
@@ -87,6 +81,9 @@ module DaytonaApiClient
|
|
|
87
81
|
# Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
88
82
|
attr_accessor :auto_delete_interval
|
|
89
83
|
|
|
84
|
+
# The domain name of the runner
|
|
85
|
+
attr_accessor :runner_domain
|
|
86
|
+
|
|
90
87
|
# Array of volumes attached to the sandbox
|
|
91
88
|
attr_accessor :volumes
|
|
92
89
|
|
|
@@ -99,21 +96,12 @@ module DaytonaApiClient
|
|
|
99
96
|
# The last update timestamp of the sandbox
|
|
100
97
|
attr_accessor :updated_at
|
|
101
98
|
|
|
102
|
-
# The last activity timestamp of the sandbox
|
|
103
|
-
attr_accessor :last_activity_at
|
|
104
|
-
|
|
105
99
|
# The class of the sandbox
|
|
106
100
|
attr_accessor :_class
|
|
107
101
|
|
|
108
102
|
# The version of the daemon running in the sandbox
|
|
109
103
|
attr_accessor :daemon_version
|
|
110
104
|
|
|
111
|
-
# The runner ID of the sandbox
|
|
112
|
-
attr_accessor :runner_id
|
|
113
|
-
|
|
114
|
-
# The toolbox proxy URL for the sandbox
|
|
115
|
-
attr_accessor :toolbox_proxy_url
|
|
116
|
-
|
|
117
105
|
class EnumAttributeValidator
|
|
118
106
|
attr_reader :datatype
|
|
119
107
|
attr_reader :allowable_values
|
|
@@ -141,7 +129,6 @@ module DaytonaApiClient
|
|
|
141
129
|
{
|
|
142
130
|
:'id' => :'id',
|
|
143
131
|
:'organization_id' => :'organizationId',
|
|
144
|
-
:'name' => :'name',
|
|
145
132
|
:'snapshot' => :'snapshot',
|
|
146
133
|
:'user' => :'user',
|
|
147
134
|
:'env' => :'env',
|
|
@@ -157,21 +144,18 @@ module DaytonaApiClient
|
|
|
157
144
|
:'state' => :'state',
|
|
158
145
|
:'desired_state' => :'desiredState',
|
|
159
146
|
:'error_reason' => :'errorReason',
|
|
160
|
-
:'recoverable' => :'recoverable',
|
|
161
147
|
:'backup_state' => :'backupState',
|
|
162
148
|
:'backup_created_at' => :'backupCreatedAt',
|
|
163
149
|
:'auto_stop_interval' => :'autoStopInterval',
|
|
164
150
|
:'auto_archive_interval' => :'autoArchiveInterval',
|
|
165
151
|
:'auto_delete_interval' => :'autoDeleteInterval',
|
|
152
|
+
:'runner_domain' => :'runnerDomain',
|
|
166
153
|
:'volumes' => :'volumes',
|
|
167
154
|
:'build_info' => :'buildInfo',
|
|
168
155
|
:'created_at' => :'createdAt',
|
|
169
156
|
:'updated_at' => :'updatedAt',
|
|
170
|
-
:'last_activity_at' => :'lastActivityAt',
|
|
171
157
|
:'_class' => :'class',
|
|
172
|
-
:'daemon_version' => :'daemonVersion'
|
|
173
|
-
:'runner_id' => :'runnerId',
|
|
174
|
-
:'toolbox_proxy_url' => :'toolboxProxyUrl'
|
|
158
|
+
:'daemon_version' => :'daemonVersion'
|
|
175
159
|
}
|
|
176
160
|
end
|
|
177
161
|
|
|
@@ -190,7 +174,6 @@ module DaytonaApiClient
|
|
|
190
174
|
{
|
|
191
175
|
:'id' => :'String',
|
|
192
176
|
:'organization_id' => :'String',
|
|
193
|
-
:'name' => :'String',
|
|
194
177
|
:'snapshot' => :'String',
|
|
195
178
|
:'user' => :'String',
|
|
196
179
|
:'env' => :'Hash<String, String>',
|
|
@@ -206,21 +189,18 @@ module DaytonaApiClient
|
|
|
206
189
|
:'state' => :'SandboxState',
|
|
207
190
|
:'desired_state' => :'SandboxDesiredState',
|
|
208
191
|
:'error_reason' => :'String',
|
|
209
|
-
:'recoverable' => :'Boolean',
|
|
210
192
|
:'backup_state' => :'String',
|
|
211
193
|
:'backup_created_at' => :'String',
|
|
212
194
|
:'auto_stop_interval' => :'Float',
|
|
213
195
|
:'auto_archive_interval' => :'Float',
|
|
214
196
|
:'auto_delete_interval' => :'Float',
|
|
197
|
+
:'runner_domain' => :'String',
|
|
215
198
|
:'volumes' => :'Array<SandboxVolume>',
|
|
216
199
|
:'build_info' => :'BuildInfo',
|
|
217
200
|
:'created_at' => :'String',
|
|
218
201
|
:'updated_at' => :'String',
|
|
219
|
-
:'last_activity_at' => :'String',
|
|
220
202
|
:'_class' => :'String',
|
|
221
|
-
:'daemon_version' => :'String'
|
|
222
|
-
:'runner_id' => :'String',
|
|
223
|
-
:'toolbox_proxy_url' => :'String'
|
|
203
|
+
:'daemon_version' => :'String'
|
|
224
204
|
}
|
|
225
205
|
end
|
|
226
206
|
|
|
@@ -258,12 +238,6 @@ module DaytonaApiClient
|
|
|
258
238
|
self.organization_id = nil
|
|
259
239
|
end
|
|
260
240
|
|
|
261
|
-
if attributes.key?(:'name')
|
|
262
|
-
self.name = attributes[:'name']
|
|
263
|
-
else
|
|
264
|
-
self.name = nil
|
|
265
|
-
end
|
|
266
|
-
|
|
267
241
|
if attributes.key?(:'snapshot')
|
|
268
242
|
self.snapshot = attributes[:'snapshot']
|
|
269
243
|
end
|
|
@@ -348,10 +322,6 @@ module DaytonaApiClient
|
|
|
348
322
|
self.error_reason = attributes[:'error_reason']
|
|
349
323
|
end
|
|
350
324
|
|
|
351
|
-
if attributes.key?(:'recoverable')
|
|
352
|
-
self.recoverable = attributes[:'recoverable']
|
|
353
|
-
end
|
|
354
|
-
|
|
355
325
|
if attributes.key?(:'backup_state')
|
|
356
326
|
self.backup_state = attributes[:'backup_state']
|
|
357
327
|
end
|
|
@@ -372,6 +342,10 @@ module DaytonaApiClient
|
|
|
372
342
|
self.auto_delete_interval = attributes[:'auto_delete_interval']
|
|
373
343
|
end
|
|
374
344
|
|
|
345
|
+
if attributes.key?(:'runner_domain')
|
|
346
|
+
self.runner_domain = attributes[:'runner_domain']
|
|
347
|
+
end
|
|
348
|
+
|
|
375
349
|
if attributes.key?(:'volumes')
|
|
376
350
|
if (value = attributes[:'volumes']).is_a?(Array)
|
|
377
351
|
self.volumes = value
|
|
@@ -390,10 +364,6 @@ module DaytonaApiClient
|
|
|
390
364
|
self.updated_at = attributes[:'updated_at']
|
|
391
365
|
end
|
|
392
366
|
|
|
393
|
-
if attributes.key?(:'last_activity_at')
|
|
394
|
-
self.last_activity_at = attributes[:'last_activity_at']
|
|
395
|
-
end
|
|
396
|
-
|
|
397
367
|
if attributes.key?(:'_class')
|
|
398
368
|
self._class = attributes[:'_class']
|
|
399
369
|
end
|
|
@@ -401,16 +371,6 @@ module DaytonaApiClient
|
|
|
401
371
|
if attributes.key?(:'daemon_version')
|
|
402
372
|
self.daemon_version = attributes[:'daemon_version']
|
|
403
373
|
end
|
|
404
|
-
|
|
405
|
-
if attributes.key?(:'runner_id')
|
|
406
|
-
self.runner_id = attributes[:'runner_id']
|
|
407
|
-
end
|
|
408
|
-
|
|
409
|
-
if attributes.key?(:'toolbox_proxy_url')
|
|
410
|
-
self.toolbox_proxy_url = attributes[:'toolbox_proxy_url']
|
|
411
|
-
else
|
|
412
|
-
self.toolbox_proxy_url = nil
|
|
413
|
-
end
|
|
414
374
|
end
|
|
415
375
|
|
|
416
376
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -426,10 +386,6 @@ module DaytonaApiClient
|
|
|
426
386
|
invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
|
|
427
387
|
end
|
|
428
388
|
|
|
429
|
-
if @name.nil?
|
|
430
|
-
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
431
|
-
end
|
|
432
|
-
|
|
433
389
|
if @user.nil?
|
|
434
390
|
invalid_properties.push('invalid value for "user", user cannot be nil.')
|
|
435
391
|
end
|
|
@@ -470,10 +426,6 @@ module DaytonaApiClient
|
|
|
470
426
|
invalid_properties.push('invalid value for "disk", disk cannot be nil.')
|
|
471
427
|
end
|
|
472
428
|
|
|
473
|
-
if @toolbox_proxy_url.nil?
|
|
474
|
-
invalid_properties.push('invalid value for "toolbox_proxy_url", toolbox_proxy_url cannot be nil.')
|
|
475
|
-
end
|
|
476
|
-
|
|
477
429
|
invalid_properties
|
|
478
430
|
end
|
|
479
431
|
|
|
@@ -483,7 +435,6 @@ module DaytonaApiClient
|
|
|
483
435
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
484
436
|
return false if @id.nil?
|
|
485
437
|
return false if @organization_id.nil?
|
|
486
|
-
return false if @name.nil?
|
|
487
438
|
return false if @user.nil?
|
|
488
439
|
return false if @env.nil?
|
|
489
440
|
return false if @labels.nil?
|
|
@@ -494,11 +445,10 @@ module DaytonaApiClient
|
|
|
494
445
|
return false if @gpu.nil?
|
|
495
446
|
return false if @memory.nil?
|
|
496
447
|
return false if @disk.nil?
|
|
497
|
-
backup_state_validator = EnumAttributeValidator.new('String', ["None", "Pending", "InProgress", "Completed", "Error"
|
|
448
|
+
backup_state_validator = EnumAttributeValidator.new('String', ["None", "Pending", "InProgress", "Completed", "Error"])
|
|
498
449
|
return false unless backup_state_validator.valid?(@backup_state)
|
|
499
|
-
_class_validator = EnumAttributeValidator.new('String', ["small", "medium", "large"
|
|
450
|
+
_class_validator = EnumAttributeValidator.new('String', ["small", "medium", "large"])
|
|
500
451
|
return false unless _class_validator.valid?(@_class)
|
|
501
|
-
return false if @toolbox_proxy_url.nil?
|
|
502
452
|
true
|
|
503
453
|
end
|
|
504
454
|
|
|
@@ -522,16 +472,6 @@ module DaytonaApiClient
|
|
|
522
472
|
@organization_id = organization_id
|
|
523
473
|
end
|
|
524
474
|
|
|
525
|
-
# Custom attribute writer method with validation
|
|
526
|
-
# @param [Object] name Value to be assigned
|
|
527
|
-
def name=(name)
|
|
528
|
-
if name.nil?
|
|
529
|
-
fail ArgumentError, 'name cannot be nil'
|
|
530
|
-
end
|
|
531
|
-
|
|
532
|
-
@name = name
|
|
533
|
-
end
|
|
534
|
-
|
|
535
475
|
# Custom attribute writer method with validation
|
|
536
476
|
# @param [Object] user Value to be assigned
|
|
537
477
|
def user=(user)
|
|
@@ -635,7 +575,7 @@ module DaytonaApiClient
|
|
|
635
575
|
# Custom attribute writer method checking allowed values (enum).
|
|
636
576
|
# @param [Object] backup_state Object to be assigned
|
|
637
577
|
def backup_state=(backup_state)
|
|
638
|
-
validator = EnumAttributeValidator.new('String', ["None", "Pending", "InProgress", "Completed", "Error"
|
|
578
|
+
validator = EnumAttributeValidator.new('String', ["None", "Pending", "InProgress", "Completed", "Error"])
|
|
639
579
|
unless validator.valid?(backup_state)
|
|
640
580
|
fail ArgumentError, "invalid value for \"backup_state\", must be one of #{validator.allowable_values}."
|
|
641
581
|
end
|
|
@@ -645,23 +585,13 @@ module DaytonaApiClient
|
|
|
645
585
|
# Custom attribute writer method checking allowed values (enum).
|
|
646
586
|
# @param [Object] _class Object to be assigned
|
|
647
587
|
def _class=(_class)
|
|
648
|
-
validator = EnumAttributeValidator.new('String', ["small", "medium", "large"
|
|
588
|
+
validator = EnumAttributeValidator.new('String', ["small", "medium", "large"])
|
|
649
589
|
unless validator.valid?(_class)
|
|
650
590
|
fail ArgumentError, "invalid value for \"_class\", must be one of #{validator.allowable_values}."
|
|
651
591
|
end
|
|
652
592
|
@_class = _class
|
|
653
593
|
end
|
|
654
594
|
|
|
655
|
-
# Custom attribute writer method with validation
|
|
656
|
-
# @param [Object] toolbox_proxy_url Value to be assigned
|
|
657
|
-
def toolbox_proxy_url=(toolbox_proxy_url)
|
|
658
|
-
if toolbox_proxy_url.nil?
|
|
659
|
-
fail ArgumentError, 'toolbox_proxy_url cannot be nil'
|
|
660
|
-
end
|
|
661
|
-
|
|
662
|
-
@toolbox_proxy_url = toolbox_proxy_url
|
|
663
|
-
end
|
|
664
|
-
|
|
665
595
|
# Checks equality by comparing each attribute.
|
|
666
596
|
# @param [Object] Object to be compared
|
|
667
597
|
def ==(o)
|
|
@@ -669,7 +599,6 @@ module DaytonaApiClient
|
|
|
669
599
|
self.class == o.class &&
|
|
670
600
|
id == o.id &&
|
|
671
601
|
organization_id == o.organization_id &&
|
|
672
|
-
name == o.name &&
|
|
673
602
|
snapshot == o.snapshot &&
|
|
674
603
|
user == o.user &&
|
|
675
604
|
env == o.env &&
|
|
@@ -685,21 +614,18 @@ module DaytonaApiClient
|
|
|
685
614
|
state == o.state &&
|
|
686
615
|
desired_state == o.desired_state &&
|
|
687
616
|
error_reason == o.error_reason &&
|
|
688
|
-
recoverable == o.recoverable &&
|
|
689
617
|
backup_state == o.backup_state &&
|
|
690
618
|
backup_created_at == o.backup_created_at &&
|
|
691
619
|
auto_stop_interval == o.auto_stop_interval &&
|
|
692
620
|
auto_archive_interval == o.auto_archive_interval &&
|
|
693
621
|
auto_delete_interval == o.auto_delete_interval &&
|
|
622
|
+
runner_domain == o.runner_domain &&
|
|
694
623
|
volumes == o.volumes &&
|
|
695
624
|
build_info == o.build_info &&
|
|
696
625
|
created_at == o.created_at &&
|
|
697
626
|
updated_at == o.updated_at &&
|
|
698
|
-
last_activity_at == o.last_activity_at &&
|
|
699
627
|
_class == o._class &&
|
|
700
|
-
daemon_version == o.daemon_version
|
|
701
|
-
runner_id == o.runner_id &&
|
|
702
|
-
toolbox_proxy_url == o.toolbox_proxy_url
|
|
628
|
+
daemon_version == o.daemon_version
|
|
703
629
|
end
|
|
704
630
|
|
|
705
631
|
# @see the `==` method
|
|
@@ -711,7 +637,7 @@ module DaytonaApiClient
|
|
|
711
637
|
# Calculates hash code according to all attributes.
|
|
712
638
|
# @return [Integer] Hash code
|
|
713
639
|
def hash
|
|
714
|
-
[id, organization_id,
|
|
640
|
+
[id, organization_id, snapshot, user, env, labels, public, network_block_all, network_allow_list, target, cpu, gpu, memory, disk, state, desired_state, error_reason, backup_state, backup_created_at, auto_stop_interval, auto_archive_interval, auto_delete_interval, runner_domain, volumes, build_info, created_at, updated_at, _class, daemon_version].hash
|
|
715
641
|
end
|
|
716
642
|
|
|
717
643
|
# Builds the object from hash
|
|
@@ -737,6 +663,61 @@ module DaytonaApiClient
|
|
|
737
663
|
new(transformed_hash)
|
|
738
664
|
end
|
|
739
665
|
|
|
666
|
+
# Deserializes the data based on type
|
|
667
|
+
# @param string type Data type
|
|
668
|
+
# @param string value Value to be deserialized
|
|
669
|
+
# @return [Object] Deserialized data
|
|
670
|
+
def self._deserialize(type, value)
|
|
671
|
+
case type.to_sym
|
|
672
|
+
when :Time
|
|
673
|
+
Time.parse(value)
|
|
674
|
+
when :Date
|
|
675
|
+
Date.parse(value)
|
|
676
|
+
when :String
|
|
677
|
+
value.to_s
|
|
678
|
+
when :Integer
|
|
679
|
+
value.to_i
|
|
680
|
+
when :Float
|
|
681
|
+
value.to_f
|
|
682
|
+
when :Boolean
|
|
683
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
684
|
+
true
|
|
685
|
+
else
|
|
686
|
+
false
|
|
687
|
+
end
|
|
688
|
+
when :Object
|
|
689
|
+
# generic object (usually a Hash), return directly
|
|
690
|
+
value
|
|
691
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
692
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
693
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
694
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
695
|
+
k_type = Regexp.last_match[:k_type]
|
|
696
|
+
v_type = Regexp.last_match[:v_type]
|
|
697
|
+
{}.tap do |hash|
|
|
698
|
+
value.each do |k, v|
|
|
699
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
700
|
+
end
|
|
701
|
+
end
|
|
702
|
+
else # model
|
|
703
|
+
# models (e.g. Pet) or oneOf
|
|
704
|
+
klass = DaytonaApiClient.const_get(type)
|
|
705
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
706
|
+
end
|
|
707
|
+
end
|
|
708
|
+
|
|
709
|
+
# Returns the string representation of the object
|
|
710
|
+
# @return [String] String presentation of the object
|
|
711
|
+
def to_s
|
|
712
|
+
to_hash.to_s
|
|
713
|
+
end
|
|
714
|
+
|
|
715
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
716
|
+
# @return [Hash] Returns the object in the form of hash
|
|
717
|
+
def to_body
|
|
718
|
+
to_hash
|
|
719
|
+
end
|
|
720
|
+
|
|
740
721
|
# Returns the object in the form of hash
|
|
741
722
|
# @return [Hash] Returns the object in the form of hash
|
|
742
723
|
def to_hash
|
|
@@ -753,6 +734,22 @@ module DaytonaApiClient
|
|
|
753
734
|
hash
|
|
754
735
|
end
|
|
755
736
|
|
|
737
|
+
# Outputs non-array value in the form of hash
|
|
738
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
739
|
+
# @param [Object] value Any valid value
|
|
740
|
+
# @return [Hash] Returns the value in the form of hash
|
|
741
|
+
def _to_hash(value)
|
|
742
|
+
if value.is_a?(Array)
|
|
743
|
+
value.compact.map { |v| _to_hash(v) }
|
|
744
|
+
elsif value.is_a?(Hash)
|
|
745
|
+
{}.tap do |hash|
|
|
746
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
747
|
+
end
|
|
748
|
+
elsif value.respond_to? :to_hash
|
|
749
|
+
value.to_hash
|
|
750
|
+
else
|
|
751
|
+
value
|
|
752
|
+
end
|
|
753
|
+
end
|
|
756
754
|
end
|
|
757
|
-
|
|
758
755
|
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
|
|
|
@@ -18,10 +18,9 @@ module DaytonaApiClient
|
|
|
18
18
|
SMALL = "small".freeze
|
|
19
19
|
MEDIUM = "medium".freeze
|
|
20
20
|
LARGE = "large".freeze
|
|
21
|
-
UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze
|
|
22
21
|
|
|
23
22
|
def self.all_vars
|
|
24
|
-
@all_vars ||= [SMALL, MEDIUM, LARGE
|
|
23
|
+
@all_vars ||= [SMALL, MEDIUM, LARGE].freeze
|
|
25
24
|
end
|
|
26
25
|
|
|
27
26
|
# Builds the enum from string
|
|
@@ -36,7 +35,7 @@ module DaytonaApiClient
|
|
|
36
35
|
# @return [String] The enum value
|
|
37
36
|
def build_from_hash(value)
|
|
38
37
|
return value if SandboxClass.all_vars.include?(value)
|
|
39
|
-
|
|
38
|
+
raise "Invalid ENUM value #{value} for class #SandboxClass"
|
|
40
39
|
end
|
|
41
40
|
end
|
|
42
41
|
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
|
|
|
@@ -20,10 +20,9 @@ module DaytonaApiClient
|
|
|
20
20
|
STOPPED = "stopped".freeze
|
|
21
21
|
RESIZED = "resized".freeze
|
|
22
22
|
ARCHIVED = "archived".freeze
|
|
23
|
-
UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze
|
|
24
23
|
|
|
25
24
|
def self.all_vars
|
|
26
|
-
@all_vars ||= [DESTROYED, STARTED, STOPPED, RESIZED, ARCHIVED
|
|
25
|
+
@all_vars ||= [DESTROYED, STARTED, STOPPED, RESIZED, ARCHIVED].freeze
|
|
27
26
|
end
|
|
28
27
|
|
|
29
28
|
# Builds the enum from string
|
|
@@ -38,7 +37,7 @@ module DaytonaApiClient
|
|
|
38
37
|
# @return [String] The enum value
|
|
39
38
|
def build_from_hash(value)
|
|
40
39
|
return value if SandboxDesiredState.all_vars.include?(value)
|
|
41
|
-
|
|
40
|
+
raise "Invalid ENUM value #{value} for class #SandboxDesiredState"
|
|
42
41
|
end
|
|
43
42
|
end
|
|
44
43
|
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 SandboxInfo
|
|
17
|
+
class SandboxInfo
|
|
18
18
|
# The creation timestamp of the project
|
|
19
19
|
attr_accessor :created
|
|
20
20
|
|
|
@@ -181,6 +181,61 @@ module DaytonaApiClient
|
|
|
181
181
|
new(transformed_hash)
|
|
182
182
|
end
|
|
183
183
|
|
|
184
|
+
# Deserializes the data based on type
|
|
185
|
+
# @param string type Data type
|
|
186
|
+
# @param string value Value to be deserialized
|
|
187
|
+
# @return [Object] Deserialized data
|
|
188
|
+
def self._deserialize(type, value)
|
|
189
|
+
case type.to_sym
|
|
190
|
+
when :Time
|
|
191
|
+
Time.parse(value)
|
|
192
|
+
when :Date
|
|
193
|
+
Date.parse(value)
|
|
194
|
+
when :String
|
|
195
|
+
value.to_s
|
|
196
|
+
when :Integer
|
|
197
|
+
value.to_i
|
|
198
|
+
when :Float
|
|
199
|
+
value.to_f
|
|
200
|
+
when :Boolean
|
|
201
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
202
|
+
true
|
|
203
|
+
else
|
|
204
|
+
false
|
|
205
|
+
end
|
|
206
|
+
when :Object
|
|
207
|
+
# generic object (usually a Hash), return directly
|
|
208
|
+
value
|
|
209
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
210
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
211
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
212
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
213
|
+
k_type = Regexp.last_match[:k_type]
|
|
214
|
+
v_type = Regexp.last_match[:v_type]
|
|
215
|
+
{}.tap do |hash|
|
|
216
|
+
value.each do |k, v|
|
|
217
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
else # model
|
|
221
|
+
# models (e.g. Pet) or oneOf
|
|
222
|
+
klass = DaytonaApiClient.const_get(type)
|
|
223
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Returns the string representation of the object
|
|
228
|
+
# @return [String] String presentation of the object
|
|
229
|
+
def to_s
|
|
230
|
+
to_hash.to_s
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
234
|
+
# @return [Hash] Returns the object in the form of hash
|
|
235
|
+
def to_body
|
|
236
|
+
to_hash
|
|
237
|
+
end
|
|
238
|
+
|
|
184
239
|
# Returns the object in the form of hash
|
|
185
240
|
# @return [Hash] Returns the object in the form of hash
|
|
186
241
|
def to_hash
|
|
@@ -197,6 +252,22 @@ module DaytonaApiClient
|
|
|
197
252
|
hash
|
|
198
253
|
end
|
|
199
254
|
|
|
255
|
+
# Outputs non-array value in the form of hash
|
|
256
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
257
|
+
# @param [Object] value Any valid value
|
|
258
|
+
# @return [Hash] Returns the value in the form of hash
|
|
259
|
+
def _to_hash(value)
|
|
260
|
+
if value.is_a?(Array)
|
|
261
|
+
value.compact.map { |v| _to_hash(v) }
|
|
262
|
+
elsif value.is_a?(Hash)
|
|
263
|
+
{}.tap do |hash|
|
|
264
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
265
|
+
end
|
|
266
|
+
elsif value.respond_to? :to_hash
|
|
267
|
+
value.to_hash
|
|
268
|
+
else
|
|
269
|
+
value
|
|
270
|
+
end
|
|
271
|
+
end
|
|
200
272
|
end
|
|
201
|
-
|
|
202
273
|
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 SandboxLabels
|
|
17
|
+
class SandboxLabels
|
|
18
18
|
# Key-value pairs of labels
|
|
19
19
|
attr_accessor :labels
|
|
20
20
|
|
|
@@ -146,6 +146,61 @@ module DaytonaApiClient
|
|
|
146
146
|
new(transformed_hash)
|
|
147
147
|
end
|
|
148
148
|
|
|
149
|
+
# Deserializes the data based on type
|
|
150
|
+
# @param string type Data type
|
|
151
|
+
# @param string value Value to be deserialized
|
|
152
|
+
# @return [Object] Deserialized data
|
|
153
|
+
def self._deserialize(type, value)
|
|
154
|
+
case type.to_sym
|
|
155
|
+
when :Time
|
|
156
|
+
Time.parse(value)
|
|
157
|
+
when :Date
|
|
158
|
+
Date.parse(value)
|
|
159
|
+
when :String
|
|
160
|
+
value.to_s
|
|
161
|
+
when :Integer
|
|
162
|
+
value.to_i
|
|
163
|
+
when :Float
|
|
164
|
+
value.to_f
|
|
165
|
+
when :Boolean
|
|
166
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
167
|
+
true
|
|
168
|
+
else
|
|
169
|
+
false
|
|
170
|
+
end
|
|
171
|
+
when :Object
|
|
172
|
+
# generic object (usually a Hash), return directly
|
|
173
|
+
value
|
|
174
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
175
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
176
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
177
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
178
|
+
k_type = Regexp.last_match[:k_type]
|
|
179
|
+
v_type = Regexp.last_match[:v_type]
|
|
180
|
+
{}.tap do |hash|
|
|
181
|
+
value.each do |k, v|
|
|
182
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
else # model
|
|
186
|
+
# models (e.g. Pet) or oneOf
|
|
187
|
+
klass = DaytonaApiClient.const_get(type)
|
|
188
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Returns the string representation of the object
|
|
193
|
+
# @return [String] String presentation of the object
|
|
194
|
+
def to_s
|
|
195
|
+
to_hash.to_s
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
|
200
|
+
def to_body
|
|
201
|
+
to_hash
|
|
202
|
+
end
|
|
203
|
+
|
|
149
204
|
# Returns the object in the form of hash
|
|
150
205
|
# @return [Hash] Returns the object in the form of hash
|
|
151
206
|
def to_hash
|
|
@@ -162,6 +217,22 @@ module DaytonaApiClient
|
|
|
162
217
|
hash
|
|
163
218
|
end
|
|
164
219
|
|
|
220
|
+
# Outputs non-array value in the form of hash
|
|
221
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
222
|
+
# @param [Object] value Any valid value
|
|
223
|
+
# @return [Hash] Returns the value in the form of hash
|
|
224
|
+
def _to_hash(value)
|
|
225
|
+
if value.is_a?(Array)
|
|
226
|
+
value.compact.map { |v| _to_hash(v) }
|
|
227
|
+
elsif value.is_a?(Hash)
|
|
228
|
+
{}.tap do |hash|
|
|
229
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
230
|
+
end
|
|
231
|
+
elsif value.respond_to? :to_hash
|
|
232
|
+
value.to_hash
|
|
233
|
+
else
|
|
234
|
+
value
|
|
235
|
+
end
|
|
236
|
+
end
|
|
165
237
|
end
|
|
166
|
-
|
|
167
238
|
end
|