daytona_api_client 0.192.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 +155 -1075
- data/lib/daytona_api_client/api/preview_api.rb +8 -77
- data/lib/daytona_api_client/api/runners_api.rb +22 -412
- data/lib/daytona_api_client/api/sandbox_api.rb +346 -1901
- data/lib/daytona_api_client/api/snapshots_api.rb +113 -39
- data/lib/daytona_api_client/api/toolbox_api.rb +741 -741
- data/lib/daytona_api_client/api/users_api.rb +239 -2
- data/lib/daytona_api_client/api/volumes_api.rb +2 -2
- data/lib/daytona_api_client/api/webhooks_api.rb +164 -27
- data/lib/daytona_api_client/api/workspace_api.rb +955 -0
- data/lib/daytona_api_client/api_client.rb +4 -8
- data/lib/daytona_api_client/api_error.rb +1 -1
- data/lib/daytona_api_client/configuration.rb +2 -5
- data/lib/daytona_api_client/models/account_provider.rb +74 -3
- data/lib/daytona_api_client/models/announcement.rb +74 -3
- data/lib/daytona_api_client/models/api_key_list.rb +74 -3
- data/lib/daytona_api_client/models/api_key_response.rb +74 -3
- data/lib/daytona_api_client/models/audit_log.rb +75 -22
- data/lib/daytona_api_client/models/build_info.rb +78 -34
- data/lib/daytona_api_client/models/command.rb +74 -3
- data/lib/daytona_api_client/models/completion_context.rb +74 -3
- data/lib/daytona_api_client/models/completion_item.rb +74 -3
- data/lib/daytona_api_client/models/completion_list.rb +74 -3
- data/lib/daytona_api_client/models/compressed_screenshot_response.rb +74 -3
- data/lib/daytona_api_client/models/computer_use_start_response.rb +74 -3
- data/lib/daytona_api_client/models/computer_use_status_response.rb +76 -5
- data/lib/daytona_api_client/models/computer_use_stop_response.rb +74 -3
- data/lib/daytona_api_client/models/create_api_key.rb +75 -4
- data/lib/daytona_api_client/models/create_audit_log.rb +350 -0
- data/lib/daytona_api_client/models/create_build_info.rb +74 -3
- data/lib/daytona_api_client/models/create_docker_registry.rb +139 -7
- data/lib/daytona_api_client/models/create_linked_account.rb +74 -3
- data/lib/daytona_api_client/models/create_organization.rb +78 -34
- data/lib/daytona_api_client/models/create_organization_invitation.rb +76 -5
- data/lib/daytona_api_client/models/create_organization_quota.rb +78 -17
- 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 -56
- data/lib/daytona_api_client/models/create_session_request.rb +74 -3
- 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 +74 -3
- data/lib/daytona_api_client/models/docker_registry.rb +76 -5
- data/lib/daytona_api_client/models/download_files.rb +74 -3
- data/lib/daytona_api_client/models/execute_request.rb +74 -3
- data/lib/daytona_api_client/models/execute_response.rb +74 -3
- data/lib/daytona_api_client/models/file_info.rb +74 -3
- data/lib/daytona_api_client/models/file_status.rb +74 -3
- data/lib/daytona_api_client/models/git_add_request.rb +74 -3
- data/lib/daytona_api_client/models/git_branch_request.rb +74 -3
- data/lib/daytona_api_client/models/git_checkout_request.rb +74 -3
- data/lib/daytona_api_client/models/git_clone_request.rb +74 -3
- data/lib/daytona_api_client/models/git_commit_info.rb +74 -3
- data/lib/daytona_api_client/models/git_commit_request.rb +74 -3
- data/lib/daytona_api_client/models/git_commit_response.rb +74 -3
- data/lib/daytona_api_client/models/git_delete_branch_request.rb +74 -3
- data/lib/daytona_api_client/models/git_repo_request.rb +74 -3
- data/lib/daytona_api_client/models/git_status.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check200_response.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check200_response_info_value.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check503_response.rb +74 -3
- data/lib/daytona_api_client/models/keyboard_hotkey_request.rb +74 -3
- data/lib/daytona_api_client/models/keyboard_press_request.rb +74 -3
- data/lib/daytona_api_client/models/keyboard_type_request.rb +74 -3
- data/lib/daytona_api_client/models/list_branch_response.rb +74 -3
- data/lib/daytona_api_client/models/lsp_completion_params.rb +74 -3
- data/lib/daytona_api_client/models/lsp_document_request.rb +74 -3
- data/lib/daytona_api_client/models/lsp_location.rb +74 -3
- data/lib/daytona_api_client/models/lsp_server_request.rb +74 -3
- data/lib/daytona_api_client/models/lsp_symbol.rb +74 -3
- data/lib/daytona_api_client/models/match.rb +74 -3
- data/lib/daytona_api_client/models/mouse_click_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_click_response.rb +74 -3
- data/lib/daytona_api_client/models/mouse_drag_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_drag_response.rb +74 -3
- data/lib/daytona_api_client/models/mouse_move_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_move_response.rb +74 -3
- data/lib/daytona_api_client/models/mouse_position.rb +74 -3
- data/lib/daytona_api_client/models/mouse_scroll_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_scroll_response.rb +74 -3
- data/lib/daytona_api_client/models/oidc_config.rb +74 -3
- data/lib/daytona_api_client/models/organization.rb +159 -162
- data/lib/daytona_api_client/models/organization_invitation.rb +78 -7
- data/lib/daytona_api_client/models/organization_role.rb +74 -3
- data/lib/daytona_api_client/models/organization_sandbox_default_limited_network_egress.rb +74 -3
- data/lib/daytona_api_client/models/organization_suspension.rb +79 -10
- data/lib/daytona_api_client/models/organization_usage_overview.rb +220 -21
- data/lib/daytona_api_client/models/organization_user.rb +76 -5
- data/lib/daytona_api_client/models/paginated_audit_logs.rb +78 -17
- data/lib/daytona_api_client/models/{paginated_sandboxes_deprecated.rb → paginated_sandboxes.rb} +76 -5
- data/lib/daytona_api_client/models/paginated_snapshots.rb +74 -3
- data/lib/daytona_api_client/models/{paginated_jobs.rb → paginated_snapshots_dto.rb} +77 -6
- data/lib/daytona_api_client/models/port_preview_url.rb +88 -34
- data/lib/daytona_api_client/models/position.rb +74 -3
- data/lib/daytona_api_client/models/posthog_config.rb +74 -3
- data/lib/daytona_api_client/models/process_errors_response.rb +74 -3
- data/lib/daytona_api_client/models/process_logs_response.rb +74 -3
- data/lib/daytona_api_client/models/process_restart_response.rb +74 -3
- data/lib/daytona_api_client/models/process_status_response.rb +74 -3
- data/lib/daytona_api_client/models/project_dir_response.rb +74 -3
- data/lib/daytona_api_client/models/pty_create_request.rb +74 -3
- data/lib/daytona_api_client/models/pty_create_response.rb +74 -3
- data/lib/daytona_api_client/models/pty_list_response.rb +74 -3
- data/lib/daytona_api_client/models/pty_resize_request.rb +74 -3
- data/lib/daytona_api_client/models/pty_session_info.rb +74 -3
- data/lib/daytona_api_client/models/range.rb +74 -3
- data/lib/daytona_api_client/models/region.rb +78 -181
- data/lib/daytona_api_client/models/region_screenshot_response.rb +74 -3
- data/lib/daytona_api_client/models/registry_push_access_dto.rb +74 -3
- data/lib/daytona_api_client/models/replace_request.rb +74 -3
- data/lib/daytona_api_client/models/replace_result.rb +74 -3
- data/lib/daytona_api_client/models/runner.rb +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 +104 -137
- 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_secret.rb → sandbox_info.rb} +112 -53
- 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 +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 -71
- 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 -106
- data/lib/daytona_api_client/models/update_organization_role.rb +74 -3
- data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +80 -29
- data/lib/daytona_api_client/models/user.rb +74 -3
- data/lib/daytona_api_client/models/user_home_dir_response.rb +74 -3
- data/lib/daytona_api_client/models/user_public_key.rb +74 -3
- data/lib/daytona_api_client/models/volume_dto.rb +74 -3
- data/lib/daytona_api_client/models/volume_state.rb +3 -4
- data/lib/daytona_api_client/models/webhook_app_portal_access.rb +75 -31
- data/lib/daytona_api_client/models/{admin_get_webhook_status200_response.rb → webhook_controller_get_status200_response.rb} +76 -5
- data/lib/daytona_api_client/models/webhook_initialization_status.rb +74 -3
- data/lib/daytona_api_client/models/windows_response.rb +74 -3
- data/lib/daytona_api_client/models/work_dir_response.rb +74 -3
- data/lib/daytona_api_client/models/{sandbox_list_item.rb → workspace.rb} +344 -168
- data/lib/daytona_api_client/version.rb +2 -2
- data/lib/daytona_api_client.rb +8 -63
- data/project.json +13 -38
- metadata +13 -72
- data/.gitignore +0 -39
- data/.openapi-generator/FILES +0 -220
- 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 -1479
- 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 -350
- data/lib/daytona_api_client/api_model_base.rb +0 -88
- data/lib/daytona_api_client/models/admin_create_runner.rb +0 -326
- data/lib/daytona_api_client/models/create_organization_region_quota.rb +0 -372
- 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 -177
- 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 -41
- 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 -54
- data/lib/daytona_api_client/models/list_sandboxes_response.rb +0 -180
- data/lib/daytona_api_client/models/log_entry.rb +0 -334
- data/lib/daytona_api_client/models/metric_data_point.rb +0 -192
- data/lib/daytona_api_client/models/metric_series.rb +0 -194
- data/lib/daytona_api_client/models/metrics_response.rb +0 -167
- data/lib/daytona_api_client/models/otel_config.rb +0 -178
- data/lib/daytona_api_client/models/paginated_logs.rb +0 -248
- data/lib/daytona_api_client/models/paginated_traces.rb +0 -248
- data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -167
- data/lib/daytona_api_client/models/rate_limit_config.rb +0 -188
- 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 -437
- data/lib/daytona_api_client/models/region_type.rb +0 -42
- data/lib/daytona_api_client/models/region_usage_overview.rb +0 -515
- data/lib/daytona_api_client/models/resize_sandbox.rb +0 -225
- 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/runner_healthcheck.rb +0 -217
- data/lib/daytona_api_client/models/runner_service_health.rb +0 -202
- data/lib/daytona_api_client/models/sandbox_list_sort_direction.rb +0 -41
- data/lib/daytona_api_client/models/sandbox_list_sort_field.rb +0 -45
- data/lib/daytona_api_client/models/secret.rb +0 -312
- 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/string_filter.rb +0 -182
- 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 -299
- 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_secret.rb +0 -170
- data/lib/daytona_api_client/models/url.rb +0 -165
- data/lib/daytona_api_client/models/webhook_event.rb +0 -46
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
|
7
7
|
Contact: support@daytona.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.12.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class Runner
|
|
17
|
+
class Runner
|
|
18
18
|
# The ID of the runner
|
|
19
19
|
attr_accessor :id
|
|
20
20
|
|
|
@@ -27,6 +27,9 @@ module DaytonaApiClient
|
|
|
27
27
|
# The proxy URL of the runner
|
|
28
28
|
attr_accessor :proxy_url
|
|
29
29
|
|
|
30
|
+
# The API key for the runner
|
|
31
|
+
attr_accessor :api_key
|
|
32
|
+
|
|
30
33
|
# The CPU capacity of the runner
|
|
31
34
|
attr_accessor :cpu
|
|
32
35
|
|
|
@@ -42,8 +45,8 @@ module DaytonaApiClient
|
|
|
42
45
|
# The type of GPU
|
|
43
46
|
attr_accessor :gpu_type
|
|
44
47
|
|
|
45
|
-
# The
|
|
46
|
-
attr_accessor :
|
|
48
|
+
# The class of the runner
|
|
49
|
+
attr_accessor :_class
|
|
47
50
|
|
|
48
51
|
# Current CPU usage percentage
|
|
49
52
|
attr_accessor :current_cpu_usage_percentage
|
|
@@ -66,18 +69,12 @@ module DaytonaApiClient
|
|
|
66
69
|
# Current snapshot count
|
|
67
70
|
attr_accessor :current_snapshot_count
|
|
68
71
|
|
|
69
|
-
# Current number of started sandboxes
|
|
70
|
-
attr_accessor :current_started_sandboxes
|
|
71
|
-
|
|
72
72
|
# Runner availability score
|
|
73
73
|
attr_accessor :availability_score
|
|
74
74
|
|
|
75
75
|
# The region of the runner
|
|
76
76
|
attr_accessor :region
|
|
77
77
|
|
|
78
|
-
# The name of the runner
|
|
79
|
-
attr_accessor :name
|
|
80
|
-
|
|
81
78
|
# The state of the runner
|
|
82
79
|
attr_accessor :state
|
|
83
80
|
|
|
@@ -87,30 +84,15 @@ module DaytonaApiClient
|
|
|
87
84
|
# Whether the runner is unschedulable
|
|
88
85
|
attr_accessor :unschedulable
|
|
89
86
|
|
|
90
|
-
# Tags associated with the runner
|
|
91
|
-
attr_accessor :tags
|
|
92
|
-
|
|
93
87
|
# The creation timestamp of the runner
|
|
94
88
|
attr_accessor :created_at
|
|
95
89
|
|
|
96
90
|
# The last update timestamp of the runner
|
|
97
91
|
attr_accessor :updated_at
|
|
98
92
|
|
|
99
|
-
# The version of the runner
|
|
93
|
+
# The version of the runner
|
|
100
94
|
attr_accessor :version
|
|
101
95
|
|
|
102
|
-
# The api version of the runner
|
|
103
|
-
attr_accessor :api_version
|
|
104
|
-
|
|
105
|
-
# The class of the runner. Deprecated and always returns \"container\" for backward compatibility - use sandboxClass instead.
|
|
106
|
-
attr_accessor :runner_class
|
|
107
|
-
|
|
108
|
-
# The app version of the runner
|
|
109
|
-
attr_accessor :app_version
|
|
110
|
-
|
|
111
|
-
# Deprecated runner class property
|
|
112
|
-
attr_accessor :_class
|
|
113
|
-
|
|
114
96
|
class EnumAttributeValidator
|
|
115
97
|
attr_reader :datatype
|
|
116
98
|
attr_reader :allowable_values
|
|
@@ -140,12 +122,13 @@ module DaytonaApiClient
|
|
|
140
122
|
:'domain' => :'domain',
|
|
141
123
|
:'api_url' => :'apiUrl',
|
|
142
124
|
:'proxy_url' => :'proxyUrl',
|
|
125
|
+
:'api_key' => :'apiKey',
|
|
143
126
|
:'cpu' => :'cpu',
|
|
144
127
|
:'memory' => :'memory',
|
|
145
128
|
:'disk' => :'disk',
|
|
146
129
|
:'gpu' => :'gpu',
|
|
147
130
|
:'gpu_type' => :'gpuType',
|
|
148
|
-
:'
|
|
131
|
+
:'_class' => :'class',
|
|
149
132
|
:'current_cpu_usage_percentage' => :'currentCpuUsagePercentage',
|
|
150
133
|
:'current_memory_usage_percentage' => :'currentMemoryUsagePercentage',
|
|
151
134
|
:'current_disk_usage_percentage' => :'currentDiskUsagePercentage',
|
|
@@ -153,21 +136,14 @@ module DaytonaApiClient
|
|
|
153
136
|
:'current_allocated_memory_gi_b' => :'currentAllocatedMemoryGiB',
|
|
154
137
|
:'current_allocated_disk_gi_b' => :'currentAllocatedDiskGiB',
|
|
155
138
|
:'current_snapshot_count' => :'currentSnapshotCount',
|
|
156
|
-
:'current_started_sandboxes' => :'currentStartedSandboxes',
|
|
157
139
|
:'availability_score' => :'availabilityScore',
|
|
158
140
|
:'region' => :'region',
|
|
159
|
-
:'name' => :'name',
|
|
160
141
|
:'state' => :'state',
|
|
161
142
|
:'last_checked' => :'lastChecked',
|
|
162
143
|
:'unschedulable' => :'unschedulable',
|
|
163
|
-
:'tags' => :'tags',
|
|
164
144
|
:'created_at' => :'createdAt',
|
|
165
145
|
:'updated_at' => :'updatedAt',
|
|
166
|
-
:'version' => :'version'
|
|
167
|
-
:'api_version' => :'apiVersion',
|
|
168
|
-
:'runner_class' => :'runnerClass',
|
|
169
|
-
:'app_version' => :'appVersion',
|
|
170
|
-
:'_class' => :'class'
|
|
146
|
+
:'version' => :'version'
|
|
171
147
|
}
|
|
172
148
|
end
|
|
173
149
|
|
|
@@ -188,12 +164,13 @@ module DaytonaApiClient
|
|
|
188
164
|
:'domain' => :'String',
|
|
189
165
|
:'api_url' => :'String',
|
|
190
166
|
:'proxy_url' => :'String',
|
|
167
|
+
:'api_key' => :'String',
|
|
191
168
|
:'cpu' => :'Float',
|
|
192
169
|
:'memory' => :'Float',
|
|
193
170
|
:'disk' => :'Float',
|
|
194
171
|
:'gpu' => :'Float',
|
|
195
172
|
:'gpu_type' => :'String',
|
|
196
|
-
:'
|
|
173
|
+
:'_class' => :'SandboxClass',
|
|
197
174
|
:'current_cpu_usage_percentage' => :'Float',
|
|
198
175
|
:'current_memory_usage_percentage' => :'Float',
|
|
199
176
|
:'current_disk_usage_percentage' => :'Float',
|
|
@@ -201,21 +178,14 @@ module DaytonaApiClient
|
|
|
201
178
|
:'current_allocated_memory_gi_b' => :'Float',
|
|
202
179
|
:'current_allocated_disk_gi_b' => :'Float',
|
|
203
180
|
:'current_snapshot_count' => :'Float',
|
|
204
|
-
:'current_started_sandboxes' => :'Float',
|
|
205
181
|
:'availability_score' => :'Float',
|
|
206
182
|
:'region' => :'String',
|
|
207
|
-
:'name' => :'String',
|
|
208
183
|
:'state' => :'RunnerState',
|
|
209
184
|
:'last_checked' => :'String',
|
|
210
185
|
:'unschedulable' => :'Boolean',
|
|
211
|
-
:'tags' => :'Array<String>',
|
|
212
186
|
:'created_at' => :'String',
|
|
213
187
|
:'updated_at' => :'String',
|
|
214
|
-
:'version' => :'String'
|
|
215
|
-
:'api_version' => :'String',
|
|
216
|
-
:'runner_class' => :'RunnerClass',
|
|
217
|
-
:'app_version' => :'String',
|
|
218
|
-
:'_class' => :'String'
|
|
188
|
+
:'version' => :'String'
|
|
219
189
|
}
|
|
220
190
|
end
|
|
221
191
|
|
|
@@ -249,14 +219,26 @@ module DaytonaApiClient
|
|
|
249
219
|
|
|
250
220
|
if attributes.key?(:'domain')
|
|
251
221
|
self.domain = attributes[:'domain']
|
|
222
|
+
else
|
|
223
|
+
self.domain = nil
|
|
252
224
|
end
|
|
253
225
|
|
|
254
226
|
if attributes.key?(:'api_url')
|
|
255
227
|
self.api_url = attributes[:'api_url']
|
|
228
|
+
else
|
|
229
|
+
self.api_url = nil
|
|
256
230
|
end
|
|
257
231
|
|
|
258
232
|
if attributes.key?(:'proxy_url')
|
|
259
233
|
self.proxy_url = attributes[:'proxy_url']
|
|
234
|
+
else
|
|
235
|
+
self.proxy_url = nil
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
if attributes.key?(:'api_key')
|
|
239
|
+
self.api_key = attributes[:'api_key']
|
|
240
|
+
else
|
|
241
|
+
self.api_key = nil
|
|
260
242
|
end
|
|
261
243
|
|
|
262
244
|
if attributes.key?(:'cpu')
|
|
@@ -279,14 +261,20 @@ module DaytonaApiClient
|
|
|
279
261
|
|
|
280
262
|
if attributes.key?(:'gpu')
|
|
281
263
|
self.gpu = attributes[:'gpu']
|
|
264
|
+
else
|
|
265
|
+
self.gpu = nil
|
|
282
266
|
end
|
|
283
267
|
|
|
284
268
|
if attributes.key?(:'gpu_type')
|
|
285
269
|
self.gpu_type = attributes[:'gpu_type']
|
|
270
|
+
else
|
|
271
|
+
self.gpu_type = nil
|
|
286
272
|
end
|
|
287
273
|
|
|
288
|
-
if attributes.key?(:'
|
|
289
|
-
self.
|
|
274
|
+
if attributes.key?(:'_class')
|
|
275
|
+
self._class = attributes[:'_class']
|
|
276
|
+
else
|
|
277
|
+
self._class = nil
|
|
290
278
|
end
|
|
291
279
|
|
|
292
280
|
if attributes.key?(:'current_cpu_usage_percentage')
|
|
@@ -317,10 +305,6 @@ module DaytonaApiClient
|
|
|
317
305
|
self.current_snapshot_count = attributes[:'current_snapshot_count']
|
|
318
306
|
end
|
|
319
307
|
|
|
320
|
-
if attributes.key?(:'current_started_sandboxes')
|
|
321
|
-
self.current_started_sandboxes = attributes[:'current_started_sandboxes']
|
|
322
|
-
end
|
|
323
|
-
|
|
324
308
|
if attributes.key?(:'availability_score')
|
|
325
309
|
self.availability_score = attributes[:'availability_score']
|
|
326
310
|
end
|
|
@@ -331,12 +315,6 @@ module DaytonaApiClient
|
|
|
331
315
|
self.region = nil
|
|
332
316
|
end
|
|
333
317
|
|
|
334
|
-
if attributes.key?(:'name')
|
|
335
|
-
self.name = attributes[:'name']
|
|
336
|
-
else
|
|
337
|
-
self.name = nil
|
|
338
|
-
end
|
|
339
|
-
|
|
340
318
|
if attributes.key?(:'state')
|
|
341
319
|
self.state = attributes[:'state']
|
|
342
320
|
else
|
|
@@ -353,14 +331,6 @@ module DaytonaApiClient
|
|
|
353
331
|
self.unschedulable = nil
|
|
354
332
|
end
|
|
355
333
|
|
|
356
|
-
if attributes.key?(:'tags')
|
|
357
|
-
if (value = attributes[:'tags']).is_a?(Array)
|
|
358
|
-
self.tags = value
|
|
359
|
-
end
|
|
360
|
-
else
|
|
361
|
-
self.tags = nil
|
|
362
|
-
end
|
|
363
|
-
|
|
364
334
|
if attributes.key?(:'created_at')
|
|
365
335
|
self.created_at = attributes[:'created_at']
|
|
366
336
|
else
|
|
@@ -378,26 +348,6 @@ module DaytonaApiClient
|
|
|
378
348
|
else
|
|
379
349
|
self.version = nil
|
|
380
350
|
end
|
|
381
|
-
|
|
382
|
-
if attributes.key?(:'api_version')
|
|
383
|
-
self.api_version = attributes[:'api_version']
|
|
384
|
-
else
|
|
385
|
-
self.api_version = nil
|
|
386
|
-
end
|
|
387
|
-
|
|
388
|
-
if attributes.key?(:'runner_class')
|
|
389
|
-
self.runner_class = attributes[:'runner_class']
|
|
390
|
-
else
|
|
391
|
-
self.runner_class = nil
|
|
392
|
-
end
|
|
393
|
-
|
|
394
|
-
if attributes.key?(:'app_version')
|
|
395
|
-
self.app_version = attributes[:'app_version']
|
|
396
|
-
end
|
|
397
|
-
|
|
398
|
-
if attributes.key?(:'_class')
|
|
399
|
-
self._class = attributes[:'_class']
|
|
400
|
-
end
|
|
401
351
|
end
|
|
402
352
|
|
|
403
353
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -409,6 +359,22 @@ module DaytonaApiClient
|
|
|
409
359
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
410
360
|
end
|
|
411
361
|
|
|
362
|
+
if @domain.nil?
|
|
363
|
+
invalid_properties.push('invalid value for "domain", domain cannot be nil.')
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
if @api_url.nil?
|
|
367
|
+
invalid_properties.push('invalid value for "api_url", api_url cannot be nil.')
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
if @proxy_url.nil?
|
|
371
|
+
invalid_properties.push('invalid value for "proxy_url", proxy_url cannot be nil.')
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
if @api_key.nil?
|
|
375
|
+
invalid_properties.push('invalid value for "api_key", api_key cannot be nil.')
|
|
376
|
+
end
|
|
377
|
+
|
|
412
378
|
if @cpu.nil?
|
|
413
379
|
invalid_properties.push('invalid value for "cpu", cpu cannot be nil.')
|
|
414
380
|
end
|
|
@@ -421,12 +387,20 @@ module DaytonaApiClient
|
|
|
421
387
|
invalid_properties.push('invalid value for "disk", disk cannot be nil.')
|
|
422
388
|
end
|
|
423
389
|
|
|
424
|
-
if @
|
|
425
|
-
invalid_properties.push('invalid value for "
|
|
390
|
+
if @gpu.nil?
|
|
391
|
+
invalid_properties.push('invalid value for "gpu", gpu cannot be nil.')
|
|
392
|
+
end
|
|
393
|
+
|
|
394
|
+
if @gpu_type.nil?
|
|
395
|
+
invalid_properties.push('invalid value for "gpu_type", gpu_type cannot be nil.')
|
|
426
396
|
end
|
|
427
397
|
|
|
428
|
-
if @
|
|
429
|
-
invalid_properties.push('invalid value for "
|
|
398
|
+
if @_class.nil?
|
|
399
|
+
invalid_properties.push('invalid value for "_class", _class cannot be nil.')
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
if @region.nil?
|
|
403
|
+
invalid_properties.push('invalid value for "region", region cannot be nil.')
|
|
430
404
|
end
|
|
431
405
|
|
|
432
406
|
if @state.nil?
|
|
@@ -437,10 +411,6 @@ module DaytonaApiClient
|
|
|
437
411
|
invalid_properties.push('invalid value for "unschedulable", unschedulable cannot be nil.')
|
|
438
412
|
end
|
|
439
413
|
|
|
440
|
-
if @tags.nil?
|
|
441
|
-
invalid_properties.push('invalid value for "tags", tags cannot be nil.')
|
|
442
|
-
end
|
|
443
|
-
|
|
444
414
|
if @created_at.nil?
|
|
445
415
|
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
446
416
|
end
|
|
@@ -453,14 +423,6 @@ module DaytonaApiClient
|
|
|
453
423
|
invalid_properties.push('invalid value for "version", version cannot be nil.')
|
|
454
424
|
end
|
|
455
425
|
|
|
456
|
-
if @api_version.nil?
|
|
457
|
-
invalid_properties.push('invalid value for "api_version", api_version cannot be nil.')
|
|
458
|
-
end
|
|
459
|
-
|
|
460
|
-
if @runner_class.nil?
|
|
461
|
-
invalid_properties.push('invalid value for "runner_class", runner_class cannot be nil.')
|
|
462
|
-
end
|
|
463
|
-
|
|
464
426
|
invalid_properties
|
|
465
427
|
end
|
|
466
428
|
|
|
@@ -469,19 +431,22 @@ module DaytonaApiClient
|
|
|
469
431
|
def valid?
|
|
470
432
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
471
433
|
return false if @id.nil?
|
|
434
|
+
return false if @domain.nil?
|
|
435
|
+
return false if @api_url.nil?
|
|
436
|
+
return false if @proxy_url.nil?
|
|
437
|
+
return false if @api_key.nil?
|
|
472
438
|
return false if @cpu.nil?
|
|
473
439
|
return false if @memory.nil?
|
|
474
440
|
return false if @disk.nil?
|
|
441
|
+
return false if @gpu.nil?
|
|
442
|
+
return false if @gpu_type.nil?
|
|
443
|
+
return false if @_class.nil?
|
|
475
444
|
return false if @region.nil?
|
|
476
|
-
return false if @name.nil?
|
|
477
445
|
return false if @state.nil?
|
|
478
446
|
return false if @unschedulable.nil?
|
|
479
|
-
return false if @tags.nil?
|
|
480
447
|
return false if @created_at.nil?
|
|
481
448
|
return false if @updated_at.nil?
|
|
482
449
|
return false if @version.nil?
|
|
483
|
-
return false if @api_version.nil?
|
|
484
|
-
return false if @runner_class.nil?
|
|
485
450
|
true
|
|
486
451
|
end
|
|
487
452
|
|
|
@@ -495,6 +460,46 @@ module DaytonaApiClient
|
|
|
495
460
|
@id = id
|
|
496
461
|
end
|
|
497
462
|
|
|
463
|
+
# Custom attribute writer method with validation
|
|
464
|
+
# @param [Object] domain Value to be assigned
|
|
465
|
+
def domain=(domain)
|
|
466
|
+
if domain.nil?
|
|
467
|
+
fail ArgumentError, 'domain cannot be nil'
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
@domain = domain
|
|
471
|
+
end
|
|
472
|
+
|
|
473
|
+
# Custom attribute writer method with validation
|
|
474
|
+
# @param [Object] api_url Value to be assigned
|
|
475
|
+
def api_url=(api_url)
|
|
476
|
+
if api_url.nil?
|
|
477
|
+
fail ArgumentError, 'api_url cannot be nil'
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
@api_url = api_url
|
|
481
|
+
end
|
|
482
|
+
|
|
483
|
+
# Custom attribute writer method with validation
|
|
484
|
+
# @param [Object] proxy_url Value to be assigned
|
|
485
|
+
def proxy_url=(proxy_url)
|
|
486
|
+
if proxy_url.nil?
|
|
487
|
+
fail ArgumentError, 'proxy_url cannot be nil'
|
|
488
|
+
end
|
|
489
|
+
|
|
490
|
+
@proxy_url = proxy_url
|
|
491
|
+
end
|
|
492
|
+
|
|
493
|
+
# Custom attribute writer method with validation
|
|
494
|
+
# @param [Object] api_key Value to be assigned
|
|
495
|
+
def api_key=(api_key)
|
|
496
|
+
if api_key.nil?
|
|
497
|
+
fail ArgumentError, 'api_key cannot be nil'
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
@api_key = api_key
|
|
501
|
+
end
|
|
502
|
+
|
|
498
503
|
# Custom attribute writer method with validation
|
|
499
504
|
# @param [Object] cpu Value to be assigned
|
|
500
505
|
def cpu=(cpu)
|
|
@@ -526,23 +531,43 @@ module DaytonaApiClient
|
|
|
526
531
|
end
|
|
527
532
|
|
|
528
533
|
# Custom attribute writer method with validation
|
|
529
|
-
# @param [Object]
|
|
530
|
-
def
|
|
531
|
-
if
|
|
532
|
-
fail ArgumentError, '
|
|
534
|
+
# @param [Object] gpu Value to be assigned
|
|
535
|
+
def gpu=(gpu)
|
|
536
|
+
if gpu.nil?
|
|
537
|
+
fail ArgumentError, 'gpu cannot be nil'
|
|
533
538
|
end
|
|
534
539
|
|
|
535
|
-
@
|
|
540
|
+
@gpu = gpu
|
|
541
|
+
end
|
|
542
|
+
|
|
543
|
+
# Custom attribute writer method with validation
|
|
544
|
+
# @param [Object] gpu_type Value to be assigned
|
|
545
|
+
def gpu_type=(gpu_type)
|
|
546
|
+
if gpu_type.nil?
|
|
547
|
+
fail ArgumentError, 'gpu_type cannot be nil'
|
|
548
|
+
end
|
|
549
|
+
|
|
550
|
+
@gpu_type = gpu_type
|
|
536
551
|
end
|
|
537
552
|
|
|
538
553
|
# Custom attribute writer method with validation
|
|
539
|
-
# @param [Object]
|
|
540
|
-
def
|
|
541
|
-
if
|
|
542
|
-
fail ArgumentError, '
|
|
554
|
+
# @param [Object] _class Value to be assigned
|
|
555
|
+
def _class=(_class)
|
|
556
|
+
if _class.nil?
|
|
557
|
+
fail ArgumentError, '_class cannot be nil'
|
|
543
558
|
end
|
|
544
559
|
|
|
545
|
-
@
|
|
560
|
+
@_class = _class
|
|
561
|
+
end
|
|
562
|
+
|
|
563
|
+
# Custom attribute writer method with validation
|
|
564
|
+
# @param [Object] region Value to be assigned
|
|
565
|
+
def region=(region)
|
|
566
|
+
if region.nil?
|
|
567
|
+
fail ArgumentError, 'region cannot be nil'
|
|
568
|
+
end
|
|
569
|
+
|
|
570
|
+
@region = region
|
|
546
571
|
end
|
|
547
572
|
|
|
548
573
|
# Custom attribute writer method with validation
|
|
@@ -565,16 +590,6 @@ module DaytonaApiClient
|
|
|
565
590
|
@unschedulable = unschedulable
|
|
566
591
|
end
|
|
567
592
|
|
|
568
|
-
# Custom attribute writer method with validation
|
|
569
|
-
# @param [Object] tags Value to be assigned
|
|
570
|
-
def tags=(tags)
|
|
571
|
-
if tags.nil?
|
|
572
|
-
fail ArgumentError, 'tags cannot be nil'
|
|
573
|
-
end
|
|
574
|
-
|
|
575
|
-
@tags = tags
|
|
576
|
-
end
|
|
577
|
-
|
|
578
593
|
# Custom attribute writer method with validation
|
|
579
594
|
# @param [Object] created_at Value to be assigned
|
|
580
595
|
def created_at=(created_at)
|
|
@@ -605,26 +620,6 @@ module DaytonaApiClient
|
|
|
605
620
|
@version = version
|
|
606
621
|
end
|
|
607
622
|
|
|
608
|
-
# Custom attribute writer method with validation
|
|
609
|
-
# @param [Object] api_version Value to be assigned
|
|
610
|
-
def api_version=(api_version)
|
|
611
|
-
if api_version.nil?
|
|
612
|
-
fail ArgumentError, 'api_version cannot be nil'
|
|
613
|
-
end
|
|
614
|
-
|
|
615
|
-
@api_version = api_version
|
|
616
|
-
end
|
|
617
|
-
|
|
618
|
-
# Custom attribute writer method with validation
|
|
619
|
-
# @param [Object] runner_class Value to be assigned
|
|
620
|
-
def runner_class=(runner_class)
|
|
621
|
-
if runner_class.nil?
|
|
622
|
-
fail ArgumentError, 'runner_class cannot be nil'
|
|
623
|
-
end
|
|
624
|
-
|
|
625
|
-
@runner_class = runner_class
|
|
626
|
-
end
|
|
627
|
-
|
|
628
623
|
# Checks equality by comparing each attribute.
|
|
629
624
|
# @param [Object] Object to be compared
|
|
630
625
|
def ==(o)
|
|
@@ -634,12 +629,13 @@ module DaytonaApiClient
|
|
|
634
629
|
domain == o.domain &&
|
|
635
630
|
api_url == o.api_url &&
|
|
636
631
|
proxy_url == o.proxy_url &&
|
|
632
|
+
api_key == o.api_key &&
|
|
637
633
|
cpu == o.cpu &&
|
|
638
634
|
memory == o.memory &&
|
|
639
635
|
disk == o.disk &&
|
|
640
636
|
gpu == o.gpu &&
|
|
641
637
|
gpu_type == o.gpu_type &&
|
|
642
|
-
|
|
638
|
+
_class == o._class &&
|
|
643
639
|
current_cpu_usage_percentage == o.current_cpu_usage_percentage &&
|
|
644
640
|
current_memory_usage_percentage == o.current_memory_usage_percentage &&
|
|
645
641
|
current_disk_usage_percentage == o.current_disk_usage_percentage &&
|
|
@@ -647,21 +643,14 @@ module DaytonaApiClient
|
|
|
647
643
|
current_allocated_memory_gi_b == o.current_allocated_memory_gi_b &&
|
|
648
644
|
current_allocated_disk_gi_b == o.current_allocated_disk_gi_b &&
|
|
649
645
|
current_snapshot_count == o.current_snapshot_count &&
|
|
650
|
-
current_started_sandboxes == o.current_started_sandboxes &&
|
|
651
646
|
availability_score == o.availability_score &&
|
|
652
647
|
region == o.region &&
|
|
653
|
-
name == o.name &&
|
|
654
648
|
state == o.state &&
|
|
655
649
|
last_checked == o.last_checked &&
|
|
656
650
|
unschedulable == o.unschedulable &&
|
|
657
|
-
tags == o.tags &&
|
|
658
651
|
created_at == o.created_at &&
|
|
659
652
|
updated_at == o.updated_at &&
|
|
660
|
-
version == o.version
|
|
661
|
-
api_version == o.api_version &&
|
|
662
|
-
runner_class == o.runner_class &&
|
|
663
|
-
app_version == o.app_version &&
|
|
664
|
-
_class == o._class
|
|
653
|
+
version == o.version
|
|
665
654
|
end
|
|
666
655
|
|
|
667
656
|
# @see the `==` method
|
|
@@ -673,7 +662,7 @@ module DaytonaApiClient
|
|
|
673
662
|
# Calculates hash code according to all attributes.
|
|
674
663
|
# @return [Integer] Hash code
|
|
675
664
|
def hash
|
|
676
|
-
[id, domain, api_url, proxy_url, cpu, memory, disk, gpu, gpu_type,
|
|
665
|
+
[id, domain, api_url, proxy_url, api_key, cpu, memory, disk, gpu, gpu_type, _class, current_cpu_usage_percentage, current_memory_usage_percentage, current_disk_usage_percentage, current_allocated_cpu, current_allocated_memory_gi_b, current_allocated_disk_gi_b, current_snapshot_count, availability_score, region, state, last_checked, unschedulable, created_at, updated_at, version].hash
|
|
677
666
|
end
|
|
678
667
|
|
|
679
668
|
# Builds the object from hash
|
|
@@ -699,6 +688,61 @@ module DaytonaApiClient
|
|
|
699
688
|
new(transformed_hash)
|
|
700
689
|
end
|
|
701
690
|
|
|
691
|
+
# Deserializes the data based on type
|
|
692
|
+
# @param string type Data type
|
|
693
|
+
# @param string value Value to be deserialized
|
|
694
|
+
# @return [Object] Deserialized data
|
|
695
|
+
def self._deserialize(type, value)
|
|
696
|
+
case type.to_sym
|
|
697
|
+
when :Time
|
|
698
|
+
Time.parse(value)
|
|
699
|
+
when :Date
|
|
700
|
+
Date.parse(value)
|
|
701
|
+
when :String
|
|
702
|
+
value.to_s
|
|
703
|
+
when :Integer
|
|
704
|
+
value.to_i
|
|
705
|
+
when :Float
|
|
706
|
+
value.to_f
|
|
707
|
+
when :Boolean
|
|
708
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
709
|
+
true
|
|
710
|
+
else
|
|
711
|
+
false
|
|
712
|
+
end
|
|
713
|
+
when :Object
|
|
714
|
+
# generic object (usually a Hash), return directly
|
|
715
|
+
value
|
|
716
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
717
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
718
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
719
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
720
|
+
k_type = Regexp.last_match[:k_type]
|
|
721
|
+
v_type = Regexp.last_match[:v_type]
|
|
722
|
+
{}.tap do |hash|
|
|
723
|
+
value.each do |k, v|
|
|
724
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
725
|
+
end
|
|
726
|
+
end
|
|
727
|
+
else # model
|
|
728
|
+
# models (e.g. Pet) or oneOf
|
|
729
|
+
klass = DaytonaApiClient.const_get(type)
|
|
730
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
731
|
+
end
|
|
732
|
+
end
|
|
733
|
+
|
|
734
|
+
# Returns the string representation of the object
|
|
735
|
+
# @return [String] String presentation of the object
|
|
736
|
+
def to_s
|
|
737
|
+
to_hash.to_s
|
|
738
|
+
end
|
|
739
|
+
|
|
740
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
741
|
+
# @return [Hash] Returns the object in the form of hash
|
|
742
|
+
def to_body
|
|
743
|
+
to_hash
|
|
744
|
+
end
|
|
745
|
+
|
|
702
746
|
# Returns the object in the form of hash
|
|
703
747
|
# @return [Hash] Returns the object in the form of hash
|
|
704
748
|
def to_hash
|
|
@@ -715,6 +759,22 @@ module DaytonaApiClient
|
|
|
715
759
|
hash
|
|
716
760
|
end
|
|
717
761
|
|
|
762
|
+
# Outputs non-array value in the form of hash
|
|
763
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
764
|
+
# @param [Object] value Any valid value
|
|
765
|
+
# @return [Hash] Returns the value in the form of hash
|
|
766
|
+
def _to_hash(value)
|
|
767
|
+
if value.is_a?(Array)
|
|
768
|
+
value.compact.map { |v| _to_hash(v) }
|
|
769
|
+
elsif value.is_a?(Hash)
|
|
770
|
+
{}.tap do |hash|
|
|
771
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
772
|
+
end
|
|
773
|
+
elsif value.respond_to? :to_hash
|
|
774
|
+
value.to_hash
|
|
775
|
+
else
|
|
776
|
+
value
|
|
777
|
+
end
|
|
778
|
+
end
|
|
718
779
|
end
|
|
719
|
-
|
|
720
780
|
end
|