daytona_api_client 0.168.0 → 0.170.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/.openapi-generator/FILES +2 -0
- data/.openapi-generator/VERSION +1 -1
- data/lib/daytona_api_client/api/admin_api.rb +1 -1
- data/lib/daytona_api_client/api/api_keys_api.rb +1 -1
- data/lib/daytona_api_client/api/audit_api.rb +1 -1
- data/lib/daytona_api_client/api/config_api.rb +1 -1
- data/lib/daytona_api_client/api/docker_registry_api.rb +1 -1
- data/lib/daytona_api_client/api/health_api.rb +1 -1
- data/lib/daytona_api_client/api/jobs_api.rb +1 -1
- data/lib/daytona_api_client/api/object_storage_api.rb +1 -1
- data/lib/daytona_api_client/api/organizations_api.rb +1 -1
- data/lib/daytona_api_client/api/preview_api.rb +1 -1
- data/lib/daytona_api_client/api/regions_api.rb +1 -1
- data/lib/daytona_api_client/api/runners_api.rb +1 -1
- data/lib/daytona_api_client/api/sandbox_api.rb +81 -4
- data/lib/daytona_api_client/api/snapshots_api.rb +3 -3
- data/lib/daytona_api_client/api/toolbox_api.rb +1 -1
- data/lib/daytona_api_client/api/users_api.rb +1 -1
- data/lib/daytona_api_client/api/volumes_api.rb +1 -1
- data/lib/daytona_api_client/api/webhooks_api.rb +1 -1
- data/lib/daytona_api_client/api/workspace_api.rb +1 -1
- data/lib/daytona_api_client/api_client.rb +7 -3
- data/lib/daytona_api_client/api_error.rb +1 -1
- data/lib/daytona_api_client/api_model_base.rb +88 -0
- data/lib/daytona_api_client/configuration.rb +1 -1
- data/lib/daytona_api_client/models/account_provider.rb +2 -75
- data/lib/daytona_api_client/models/admin_create_runner.rb +2 -75
- data/lib/daytona_api_client/models/admin_get_webhook_status200_response.rb +2 -75
- data/lib/daytona_api_client/models/announcement.rb +2 -75
- data/lib/daytona_api_client/models/api_key_list.rb +2 -75
- data/lib/daytona_api_client/models/api_key_response.rb +2 -75
- data/lib/daytona_api_client/models/audit_log.rb +2 -75
- data/lib/daytona_api_client/models/build_info.rb +2 -75
- data/lib/daytona_api_client/models/command.rb +2 -75
- data/lib/daytona_api_client/models/completion_context.rb +2 -75
- data/lib/daytona_api_client/models/completion_item.rb +2 -75
- data/lib/daytona_api_client/models/completion_list.rb +2 -75
- data/lib/daytona_api_client/models/compressed_screenshot_response.rb +2 -75
- data/lib/daytona_api_client/models/computer_use_start_response.rb +2 -75
- data/lib/daytona_api_client/models/computer_use_status_response.rb +4 -77
- data/lib/daytona_api_client/models/computer_use_stop_response.rb +2 -75
- data/lib/daytona_api_client/models/create_api_key.rb +2 -75
- data/lib/daytona_api_client/models/create_build_info.rb +2 -75
- data/lib/daytona_api_client/models/create_docker_registry.rb +2 -75
- data/lib/daytona_api_client/models/create_linked_account.rb +2 -75
- data/lib/daytona_api_client/models/create_organization.rb +2 -75
- data/lib/daytona_api_client/models/create_organization_invitation.rb +4 -77
- data/lib/daytona_api_client/models/create_organization_quota.rb +2 -75
- data/lib/daytona_api_client/models/create_organization_role.rb +2 -75
- data/lib/daytona_api_client/models/create_region.rb +2 -75
- data/lib/daytona_api_client/models/create_region_response.rb +2 -75
- data/lib/daytona_api_client/models/create_runner.rb +2 -75
- data/lib/daytona_api_client/models/create_runner_response.rb +2 -75
- data/lib/daytona_api_client/models/create_sandbox.rb +4 -77
- data/lib/daytona_api_client/models/create_sandbox_snapshot.rb +2 -75
- data/lib/daytona_api_client/models/create_session_request.rb +2 -75
- data/lib/daytona_api_client/models/create_snapshot.rb +2 -75
- data/lib/daytona_api_client/models/create_user.rb +4 -77
- data/lib/daytona_api_client/models/create_volume.rb +2 -75
- data/lib/daytona_api_client/models/create_workspace.rb +6 -79
- data/lib/daytona_api_client/models/daytona_configuration.rb +2 -75
- data/lib/daytona_api_client/models/display_info_response.rb +2 -75
- data/lib/daytona_api_client/models/docker_registry.rb +4 -77
- data/lib/daytona_api_client/models/download_files.rb +2 -75
- data/lib/daytona_api_client/models/execute_request.rb +2 -75
- data/lib/daytona_api_client/models/execute_response.rb +2 -75
- data/lib/daytona_api_client/models/file_info.rb +2 -75
- data/lib/daytona_api_client/models/file_status.rb +2 -75
- data/lib/daytona_api_client/models/fork_sandbox.rb +2 -75
- data/lib/daytona_api_client/models/git_add_request.rb +2 -75
- data/lib/daytona_api_client/models/git_branch_request.rb +2 -75
- data/lib/daytona_api_client/models/git_checkout_request.rb +2 -75
- data/lib/daytona_api_client/models/git_clone_request.rb +2 -75
- data/lib/daytona_api_client/models/git_commit_info.rb +2 -75
- data/lib/daytona_api_client/models/git_commit_request.rb +2 -75
- data/lib/daytona_api_client/models/git_commit_response.rb +2 -75
- data/lib/daytona_api_client/models/git_delete_branch_request.rb +2 -75
- data/lib/daytona_api_client/models/git_repo_request.rb +2 -75
- data/lib/daytona_api_client/models/git_status.rb +2 -75
- data/lib/daytona_api_client/models/health_controller_check200_response.rb +2 -75
- data/lib/daytona_api_client/models/health_controller_check200_response_info_value.rb +2 -75
- data/lib/daytona_api_client/models/health_controller_check503_response.rb +2 -75
- data/lib/daytona_api_client/models/job.rb +4 -77
- data/lib/daytona_api_client/models/job_status.rb +4 -3
- data/lib/daytona_api_client/models/job_type.rb +4 -3
- data/lib/daytona_api_client/models/keyboard_hotkey_request.rb +2 -75
- data/lib/daytona_api_client/models/keyboard_press_request.rb +2 -75
- data/lib/daytona_api_client/models/keyboard_type_request.rb +2 -75
- data/lib/daytona_api_client/models/list_branch_response.rb +2 -75
- data/lib/daytona_api_client/models/log_entry.rb +2 -75
- data/lib/daytona_api_client/models/lsp_completion_params.rb +2 -75
- data/lib/daytona_api_client/models/lsp_document_request.rb +2 -75
- data/lib/daytona_api_client/models/lsp_location.rb +2 -75
- data/lib/daytona_api_client/models/lsp_server_request.rb +2 -75
- data/lib/daytona_api_client/models/lsp_symbol.rb +2 -75
- data/lib/daytona_api_client/models/match.rb +2 -75
- data/lib/daytona_api_client/models/metric_data_point.rb +2 -75
- data/lib/daytona_api_client/models/metric_series.rb +2 -75
- data/lib/daytona_api_client/models/metrics_response.rb +2 -75
- data/lib/daytona_api_client/models/mouse_click_request.rb +2 -75
- data/lib/daytona_api_client/models/mouse_click_response.rb +2 -75
- data/lib/daytona_api_client/models/mouse_drag_request.rb +2 -75
- data/lib/daytona_api_client/models/mouse_drag_response.rb +2 -75
- data/lib/daytona_api_client/models/mouse_move_request.rb +2 -75
- data/lib/daytona_api_client/models/mouse_move_response.rb +2 -75
- data/lib/daytona_api_client/models/mouse_position.rb +2 -75
- data/lib/daytona_api_client/models/mouse_scroll_request.rb +2 -75
- data/lib/daytona_api_client/models/mouse_scroll_response.rb +2 -75
- data/lib/daytona_api_client/models/oidc_config.rb +2 -75
- data/lib/daytona_api_client/models/organization.rb +2 -75
- data/lib/daytona_api_client/models/organization_invitation.rb +6 -79
- data/lib/daytona_api_client/models/organization_role.rb +2 -75
- data/lib/daytona_api_client/models/organization_sandbox_default_limited_network_egress.rb +2 -75
- data/lib/daytona_api_client/models/organization_suspension.rb +2 -75
- data/lib/daytona_api_client/models/organization_usage_overview.rb +2 -75
- data/lib/daytona_api_client/models/organization_user.rb +4 -77
- data/lib/daytona_api_client/models/otel_config.rb +2 -75
- data/lib/daytona_api_client/models/paginated_audit_logs.rb +2 -75
- data/lib/daytona_api_client/models/paginated_jobs.rb +2 -75
- data/lib/daytona_api_client/models/paginated_logs.rb +2 -75
- data/lib/daytona_api_client/models/paginated_sandboxes.rb +2 -75
- data/lib/daytona_api_client/models/paginated_snapshots.rb +2 -75
- data/lib/daytona_api_client/models/paginated_traces.rb +2 -75
- data/lib/daytona_api_client/models/poll_jobs_response.rb +2 -75
- data/lib/daytona_api_client/models/port_preview_url.rb +2 -75
- data/lib/daytona_api_client/models/position.rb +2 -75
- data/lib/daytona_api_client/models/posthog_config.rb +2 -75
- data/lib/daytona_api_client/models/process_errors_response.rb +2 -75
- data/lib/daytona_api_client/models/process_logs_response.rb +2 -75
- data/lib/daytona_api_client/models/process_restart_response.rb +2 -75
- data/lib/daytona_api_client/models/process_status_response.rb +2 -75
- data/lib/daytona_api_client/models/project_dir_response.rb +2 -75
- data/lib/daytona_api_client/models/pty_create_request.rb +2 -75
- data/lib/daytona_api_client/models/pty_create_response.rb +2 -75
- data/lib/daytona_api_client/models/pty_list_response.rb +2 -75
- data/lib/daytona_api_client/models/pty_resize_request.rb +2 -75
- data/lib/daytona_api_client/models/pty_session_info.rb +2 -75
- data/lib/daytona_api_client/models/range.rb +2 -75
- data/lib/daytona_api_client/models/rate_limit_config.rb +2 -75
- data/lib/daytona_api_client/models/rate_limit_entry.rb +2 -75
- data/lib/daytona_api_client/models/regenerate_api_key_response.rb +2 -75
- data/lib/daytona_api_client/models/region.rb +2 -75
- data/lib/daytona_api_client/models/region_quota.rb +2 -75
- data/lib/daytona_api_client/models/region_screenshot_response.rb +2 -75
- data/lib/daytona_api_client/models/region_type.rb +4 -3
- data/lib/daytona_api_client/models/region_usage_overview.rb +2 -75
- data/lib/daytona_api_client/models/registry_push_access_dto.rb +2 -75
- data/lib/daytona_api_client/models/replace_request.rb +2 -75
- data/lib/daytona_api_client/models/replace_result.rb +2 -75
- data/lib/daytona_api_client/models/resize_sandbox.rb +2 -75
- data/lib/daytona_api_client/models/runner.rb +2 -75
- data/lib/daytona_api_client/models/runner_class.rb +4 -3
- data/lib/daytona_api_client/models/runner_full.rb +2 -75
- data/lib/daytona_api_client/models/runner_health_metrics.rb +2 -75
- data/lib/daytona_api_client/models/runner_healthcheck.rb +2 -75
- data/lib/daytona_api_client/models/runner_service_health.rb +2 -75
- data/lib/daytona_api_client/models/runner_snapshot_dto.rb +2 -75
- data/lib/daytona_api_client/models/runner_state.rb +4 -3
- data/lib/daytona_api_client/models/sandbox.rb +6 -79
- data/lib/daytona_api_client/models/sandbox_class.rb +4 -3
- data/lib/daytona_api_client/models/sandbox_desired_state.rb +4 -3
- data/lib/daytona_api_client/models/sandbox_info.rb +2 -75
- data/lib/daytona_api_client/models/sandbox_labels.rb +2 -75
- data/lib/daytona_api_client/models/sandbox_state.rb +4 -3
- data/lib/daytona_api_client/models/sandbox_volume.rb +2 -75
- data/lib/daytona_api_client/models/screenshot_response.rb +2 -75
- data/lib/daytona_api_client/models/search_files_response.rb +2 -75
- data/lib/daytona_api_client/models/send_webhook_dto.rb +2 -75
- data/lib/daytona_api_client/models/session.rb +2 -75
- data/lib/daytona_api_client/models/session_execute_request.rb +2 -75
- data/lib/daytona_api_client/models/session_execute_response.rb +2 -75
- data/lib/daytona_api_client/models/set_snapshot_general_status_dto.rb +2 -75
- data/lib/daytona_api_client/models/signed_port_preview_url.rb +2 -75
- data/lib/daytona_api_client/models/snapshot_dto.rb +2 -75
- data/lib/daytona_api_client/models/snapshot_manager_credentials.rb +2 -75
- data/lib/daytona_api_client/models/snapshot_state.rb +4 -3
- data/lib/daytona_api_client/models/ssh_access_dto.rb +2 -75
- data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +2 -75
- data/lib/daytona_api_client/models/storage_access_dto.rb +2 -75
- data/lib/daytona_api_client/models/toolbox_proxy_url.rb +2 -75
- data/lib/daytona_api_client/models/trace_span.rb +2 -75
- data/lib/daytona_api_client/models/trace_summary.rb +2 -75
- data/lib/daytona_api_client/models/update_docker_registry.rb +2 -75
- data/lib/daytona_api_client/models/update_job_status.rb +2 -75
- data/lib/daytona_api_client/models/update_organization_default_region.rb +2 -75
- data/lib/daytona_api_client/models/update_organization_invitation.rb +4 -77
- data/lib/daytona_api_client/models/update_organization_member_access.rb +4 -77
- data/lib/daytona_api_client/models/update_organization_quota.rb +2 -75
- data/lib/daytona_api_client/models/update_organization_region_quota.rb +2 -75
- data/lib/daytona_api_client/models/update_organization_role.rb +2 -75
- data/lib/daytona_api_client/models/update_region.rb +2 -75
- data/lib/daytona_api_client/models/update_sandbox_network_settings.rb +158 -0
- data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +4 -77
- data/lib/daytona_api_client/models/url.rb +2 -75
- data/lib/daytona_api_client/models/user.rb +2 -75
- data/lib/daytona_api_client/models/user_home_dir_response.rb +2 -75
- data/lib/daytona_api_client/models/user_public_key.rb +2 -75
- data/lib/daytona_api_client/models/volume_dto.rb +2 -75
- data/lib/daytona_api_client/models/volume_state.rb +4 -3
- data/lib/daytona_api_client/models/webhook_app_portal_access.rb +2 -75
- data/lib/daytona_api_client/models/webhook_event.rb +4 -3
- data/lib/daytona_api_client/models/webhook_initialization_status.rb +2 -75
- data/lib/daytona_api_client/models/windows_response.rb +2 -75
- data/lib/daytona_api_client/models/work_dir_response.rb +2 -75
- data/lib/daytona_api_client/models/workspace.rb +8 -81
- data/lib/daytona_api_client/models/workspace_port_preview_url.rb +2 -75
- data/lib/daytona_api_client/version.rb +2 -2
- data/lib/daytona_api_client.rb +3 -1
- data/project.json +6 -2
- metadata +3 -1
|
@@ -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.21.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 UserPublicKey
|
|
17
|
+
class UserPublicKey < ApiModelBase
|
|
18
18
|
# Public key
|
|
19
19
|
attr_accessor :key
|
|
20
20
|
|
|
@@ -171,61 +171,6 @@ module DaytonaApiClient
|
|
|
171
171
|
new(transformed_hash)
|
|
172
172
|
end
|
|
173
173
|
|
|
174
|
-
# Deserializes the data based on type
|
|
175
|
-
# @param string type Data type
|
|
176
|
-
# @param string value Value to be deserialized
|
|
177
|
-
# @return [Object] Deserialized data
|
|
178
|
-
def self._deserialize(type, value)
|
|
179
|
-
case type.to_sym
|
|
180
|
-
when :Time
|
|
181
|
-
Time.parse(value)
|
|
182
|
-
when :Date
|
|
183
|
-
Date.parse(value)
|
|
184
|
-
when :String
|
|
185
|
-
value.to_s
|
|
186
|
-
when :Integer
|
|
187
|
-
value.to_i
|
|
188
|
-
when :Float
|
|
189
|
-
value.to_f
|
|
190
|
-
when :Boolean
|
|
191
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
192
|
-
true
|
|
193
|
-
else
|
|
194
|
-
false
|
|
195
|
-
end
|
|
196
|
-
when :Object
|
|
197
|
-
# generic object (usually a Hash), return directly
|
|
198
|
-
value
|
|
199
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
200
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
201
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
202
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
203
|
-
k_type = Regexp.last_match[:k_type]
|
|
204
|
-
v_type = Regexp.last_match[:v_type]
|
|
205
|
-
{}.tap do |hash|
|
|
206
|
-
value.each do |k, v|
|
|
207
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
208
|
-
end
|
|
209
|
-
end
|
|
210
|
-
else # model
|
|
211
|
-
# models (e.g. Pet) or oneOf
|
|
212
|
-
klass = DaytonaApiClient.const_get(type)
|
|
213
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
214
|
-
end
|
|
215
|
-
end
|
|
216
|
-
|
|
217
|
-
# Returns the string representation of the object
|
|
218
|
-
# @return [String] String presentation of the object
|
|
219
|
-
def to_s
|
|
220
|
-
to_hash.to_s
|
|
221
|
-
end
|
|
222
|
-
|
|
223
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
224
|
-
# @return [Hash] Returns the object in the form of hash
|
|
225
|
-
def to_body
|
|
226
|
-
to_hash
|
|
227
|
-
end
|
|
228
|
-
|
|
229
174
|
# Returns the object in the form of hash
|
|
230
175
|
# @return [Hash] Returns the object in the form of hash
|
|
231
176
|
def to_hash
|
|
@@ -242,24 +187,6 @@ module DaytonaApiClient
|
|
|
242
187
|
hash
|
|
243
188
|
end
|
|
244
189
|
|
|
245
|
-
# Outputs non-array value in the form of hash
|
|
246
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
247
|
-
# @param [Object] value Any valid value
|
|
248
|
-
# @return [Hash] Returns the value in the form of hash
|
|
249
|
-
def _to_hash(value)
|
|
250
|
-
if value.is_a?(Array)
|
|
251
|
-
value.compact.map { |v| _to_hash(v) }
|
|
252
|
-
elsif value.is_a?(Hash)
|
|
253
|
-
{}.tap do |hash|
|
|
254
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
255
|
-
end
|
|
256
|
-
elsif value.respond_to? :to_hash
|
|
257
|
-
value.to_hash
|
|
258
|
-
else
|
|
259
|
-
value
|
|
260
|
-
end
|
|
261
|
-
end
|
|
262
|
-
|
|
263
190
|
end
|
|
264
191
|
|
|
265
192
|
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.21.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 VolumeDto
|
|
17
|
+
class VolumeDto < ApiModelBase
|
|
18
18
|
# Volume ID
|
|
19
19
|
attr_accessor :id
|
|
20
20
|
|
|
@@ -325,61 +325,6 @@ module DaytonaApiClient
|
|
|
325
325
|
new(transformed_hash)
|
|
326
326
|
end
|
|
327
327
|
|
|
328
|
-
# Deserializes the data based on type
|
|
329
|
-
# @param string type Data type
|
|
330
|
-
# @param string value Value to be deserialized
|
|
331
|
-
# @return [Object] Deserialized data
|
|
332
|
-
def self._deserialize(type, value)
|
|
333
|
-
case type.to_sym
|
|
334
|
-
when :Time
|
|
335
|
-
Time.parse(value)
|
|
336
|
-
when :Date
|
|
337
|
-
Date.parse(value)
|
|
338
|
-
when :String
|
|
339
|
-
value.to_s
|
|
340
|
-
when :Integer
|
|
341
|
-
value.to_i
|
|
342
|
-
when :Float
|
|
343
|
-
value.to_f
|
|
344
|
-
when :Boolean
|
|
345
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
346
|
-
true
|
|
347
|
-
else
|
|
348
|
-
false
|
|
349
|
-
end
|
|
350
|
-
when :Object
|
|
351
|
-
# generic object (usually a Hash), return directly
|
|
352
|
-
value
|
|
353
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
354
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
355
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
356
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
357
|
-
k_type = Regexp.last_match[:k_type]
|
|
358
|
-
v_type = Regexp.last_match[:v_type]
|
|
359
|
-
{}.tap do |hash|
|
|
360
|
-
value.each do |k, v|
|
|
361
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
362
|
-
end
|
|
363
|
-
end
|
|
364
|
-
else # model
|
|
365
|
-
# models (e.g. Pet) or oneOf
|
|
366
|
-
klass = DaytonaApiClient.const_get(type)
|
|
367
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
368
|
-
end
|
|
369
|
-
end
|
|
370
|
-
|
|
371
|
-
# Returns the string representation of the object
|
|
372
|
-
# @return [String] String presentation of the object
|
|
373
|
-
def to_s
|
|
374
|
-
to_hash.to_s
|
|
375
|
-
end
|
|
376
|
-
|
|
377
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
378
|
-
# @return [Hash] Returns the object in the form of hash
|
|
379
|
-
def to_body
|
|
380
|
-
to_hash
|
|
381
|
-
end
|
|
382
|
-
|
|
383
328
|
# Returns the object in the form of hash
|
|
384
329
|
# @return [Hash] Returns the object in the form of hash
|
|
385
330
|
def to_hash
|
|
@@ -396,24 +341,6 @@ module DaytonaApiClient
|
|
|
396
341
|
hash
|
|
397
342
|
end
|
|
398
343
|
|
|
399
|
-
# Outputs non-array value in the form of hash
|
|
400
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
401
|
-
# @param [Object] value Any valid value
|
|
402
|
-
# @return [Hash] Returns the value in the form of hash
|
|
403
|
-
def _to_hash(value)
|
|
404
|
-
if value.is_a?(Array)
|
|
405
|
-
value.compact.map { |v| _to_hash(v) }
|
|
406
|
-
elsif value.is_a?(Hash)
|
|
407
|
-
{}.tap do |hash|
|
|
408
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
409
|
-
end
|
|
410
|
-
elsif value.respond_to? :to_hash
|
|
411
|
-
value.to_hash
|
|
412
|
-
else
|
|
413
|
-
value
|
|
414
|
-
end
|
|
415
|
-
end
|
|
416
|
-
|
|
417
344
|
end
|
|
418
345
|
|
|
419
346
|
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.21.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -22,9 +22,10 @@ module DaytonaApiClient
|
|
|
22
22
|
DELETING = "deleting".freeze
|
|
23
23
|
DELETED = "deleted".freeze
|
|
24
24
|
ERROR = "error".freeze
|
|
25
|
+
UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze
|
|
25
26
|
|
|
26
27
|
def self.all_vars
|
|
27
|
-
@all_vars ||= [CREATING, READY, PENDING_CREATE, PENDING_DELETE, DELETING, DELETED, ERROR].freeze
|
|
28
|
+
@all_vars ||= [CREATING, READY, PENDING_CREATE, PENDING_DELETE, DELETING, DELETED, ERROR, UNKNOWN_DEFAULT_OPEN_API].freeze
|
|
28
29
|
end
|
|
29
30
|
|
|
30
31
|
# Builds the enum from string
|
|
@@ -39,7 +40,7 @@ module DaytonaApiClient
|
|
|
39
40
|
# @return [String] The enum value
|
|
40
41
|
def build_from_hash(value)
|
|
41
42
|
return value if VolumeState.all_vars.include?(value)
|
|
42
|
-
|
|
43
|
+
UNKNOWN_DEFAULT_OPEN_API
|
|
43
44
|
end
|
|
44
45
|
end
|
|
45
46
|
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.21.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 WebhookAppPortalAccess
|
|
17
|
+
class WebhookAppPortalAccess < ApiModelBase
|
|
18
18
|
# The authentication token for the Svix consumer app portal
|
|
19
19
|
attr_accessor :token
|
|
20
20
|
|
|
@@ -171,61 +171,6 @@ module DaytonaApiClient
|
|
|
171
171
|
new(transformed_hash)
|
|
172
172
|
end
|
|
173
173
|
|
|
174
|
-
# Deserializes the data based on type
|
|
175
|
-
# @param string type Data type
|
|
176
|
-
# @param string value Value to be deserialized
|
|
177
|
-
# @return [Object] Deserialized data
|
|
178
|
-
def self._deserialize(type, value)
|
|
179
|
-
case type.to_sym
|
|
180
|
-
when :Time
|
|
181
|
-
Time.parse(value)
|
|
182
|
-
when :Date
|
|
183
|
-
Date.parse(value)
|
|
184
|
-
when :String
|
|
185
|
-
value.to_s
|
|
186
|
-
when :Integer
|
|
187
|
-
value.to_i
|
|
188
|
-
when :Float
|
|
189
|
-
value.to_f
|
|
190
|
-
when :Boolean
|
|
191
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
192
|
-
true
|
|
193
|
-
else
|
|
194
|
-
false
|
|
195
|
-
end
|
|
196
|
-
when :Object
|
|
197
|
-
# generic object (usually a Hash), return directly
|
|
198
|
-
value
|
|
199
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
200
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
201
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
202
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
203
|
-
k_type = Regexp.last_match[:k_type]
|
|
204
|
-
v_type = Regexp.last_match[:v_type]
|
|
205
|
-
{}.tap do |hash|
|
|
206
|
-
value.each do |k, v|
|
|
207
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
208
|
-
end
|
|
209
|
-
end
|
|
210
|
-
else # model
|
|
211
|
-
# models (e.g. Pet) or oneOf
|
|
212
|
-
klass = DaytonaApiClient.const_get(type)
|
|
213
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
214
|
-
end
|
|
215
|
-
end
|
|
216
|
-
|
|
217
|
-
# Returns the string representation of the object
|
|
218
|
-
# @return [String] String presentation of the object
|
|
219
|
-
def to_s
|
|
220
|
-
to_hash.to_s
|
|
221
|
-
end
|
|
222
|
-
|
|
223
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
224
|
-
# @return [Hash] Returns the object in the form of hash
|
|
225
|
-
def to_body
|
|
226
|
-
to_hash
|
|
227
|
-
end
|
|
228
|
-
|
|
229
174
|
# Returns the object in the form of hash
|
|
230
175
|
# @return [Hash] Returns the object in the form of hash
|
|
231
176
|
def to_hash
|
|
@@ -242,24 +187,6 @@ module DaytonaApiClient
|
|
|
242
187
|
hash
|
|
243
188
|
end
|
|
244
189
|
|
|
245
|
-
# Outputs non-array value in the form of hash
|
|
246
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
247
|
-
# @param [Object] value Any valid value
|
|
248
|
-
# @return [Hash] Returns the value in the form of hash
|
|
249
|
-
def _to_hash(value)
|
|
250
|
-
if value.is_a?(Array)
|
|
251
|
-
value.compact.map { |v| _to_hash(v) }
|
|
252
|
-
elsif value.is_a?(Hash)
|
|
253
|
-
{}.tap do |hash|
|
|
254
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
255
|
-
end
|
|
256
|
-
elsif value.respond_to? :to_hash
|
|
257
|
-
value.to_hash
|
|
258
|
-
else
|
|
259
|
-
value
|
|
260
|
-
end
|
|
261
|
-
end
|
|
262
|
-
|
|
263
190
|
end
|
|
264
191
|
|
|
265
192
|
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.21.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -22,9 +22,10 @@ module DaytonaApiClient
|
|
|
22
22
|
SNAPSHOT_REMOVED = "snapshot.removed".freeze
|
|
23
23
|
VOLUME_CREATED = "volume.created".freeze
|
|
24
24
|
VOLUME_STATE_UPDATED = "volume.state.updated".freeze
|
|
25
|
+
UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze
|
|
25
26
|
|
|
26
27
|
def self.all_vars
|
|
27
|
-
@all_vars ||= [SANDBOX_CREATED, SANDBOX_STATE_UPDATED, SNAPSHOT_CREATED, SNAPSHOT_STATE_UPDATED, SNAPSHOT_REMOVED, VOLUME_CREATED, VOLUME_STATE_UPDATED].freeze
|
|
28
|
+
@all_vars ||= [SANDBOX_CREATED, SANDBOX_STATE_UPDATED, SNAPSHOT_CREATED, SNAPSHOT_STATE_UPDATED, SNAPSHOT_REMOVED, VOLUME_CREATED, VOLUME_STATE_UPDATED, UNKNOWN_DEFAULT_OPEN_API].freeze
|
|
28
29
|
end
|
|
29
30
|
|
|
30
31
|
# Builds the enum from string
|
|
@@ -39,7 +40,7 @@ module DaytonaApiClient
|
|
|
39
40
|
# @return [String] The enum value
|
|
40
41
|
def build_from_hash(value)
|
|
41
42
|
return value if WebhookEvent.all_vars.include?(value)
|
|
42
|
-
|
|
43
|
+
UNKNOWN_DEFAULT_OPEN_API
|
|
43
44
|
end
|
|
44
45
|
end
|
|
45
46
|
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.21.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 WebhookInitializationStatus
|
|
17
|
+
class WebhookInitializationStatus < ApiModelBase
|
|
18
18
|
# Organization ID
|
|
19
19
|
attr_accessor :organization_id
|
|
20
20
|
|
|
@@ -251,61 +251,6 @@ module DaytonaApiClient
|
|
|
251
251
|
new(transformed_hash)
|
|
252
252
|
end
|
|
253
253
|
|
|
254
|
-
# Deserializes the data based on type
|
|
255
|
-
# @param string type Data type
|
|
256
|
-
# @param string value Value to be deserialized
|
|
257
|
-
# @return [Object] Deserialized data
|
|
258
|
-
def self._deserialize(type, value)
|
|
259
|
-
case type.to_sym
|
|
260
|
-
when :Time
|
|
261
|
-
Time.parse(value)
|
|
262
|
-
when :Date
|
|
263
|
-
Date.parse(value)
|
|
264
|
-
when :String
|
|
265
|
-
value.to_s
|
|
266
|
-
when :Integer
|
|
267
|
-
value.to_i
|
|
268
|
-
when :Float
|
|
269
|
-
value.to_f
|
|
270
|
-
when :Boolean
|
|
271
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
272
|
-
true
|
|
273
|
-
else
|
|
274
|
-
false
|
|
275
|
-
end
|
|
276
|
-
when :Object
|
|
277
|
-
# generic object (usually a Hash), return directly
|
|
278
|
-
value
|
|
279
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
280
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
281
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
282
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
283
|
-
k_type = Regexp.last_match[:k_type]
|
|
284
|
-
v_type = Regexp.last_match[:v_type]
|
|
285
|
-
{}.tap do |hash|
|
|
286
|
-
value.each do |k, v|
|
|
287
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
288
|
-
end
|
|
289
|
-
end
|
|
290
|
-
else # model
|
|
291
|
-
# models (e.g. Pet) or oneOf
|
|
292
|
-
klass = DaytonaApiClient.const_get(type)
|
|
293
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
294
|
-
end
|
|
295
|
-
end
|
|
296
|
-
|
|
297
|
-
# Returns the string representation of the object
|
|
298
|
-
# @return [String] String presentation of the object
|
|
299
|
-
def to_s
|
|
300
|
-
to_hash.to_s
|
|
301
|
-
end
|
|
302
|
-
|
|
303
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
304
|
-
# @return [Hash] Returns the object in the form of hash
|
|
305
|
-
def to_body
|
|
306
|
-
to_hash
|
|
307
|
-
end
|
|
308
|
-
|
|
309
254
|
# Returns the object in the form of hash
|
|
310
255
|
# @return [Hash] Returns the object in the form of hash
|
|
311
256
|
def to_hash
|
|
@@ -322,24 +267,6 @@ module DaytonaApiClient
|
|
|
322
267
|
hash
|
|
323
268
|
end
|
|
324
269
|
|
|
325
|
-
# Outputs non-array value in the form of hash
|
|
326
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
327
|
-
# @param [Object] value Any valid value
|
|
328
|
-
# @return [Hash] Returns the value in the form of hash
|
|
329
|
-
def _to_hash(value)
|
|
330
|
-
if value.is_a?(Array)
|
|
331
|
-
value.compact.map { |v| _to_hash(v) }
|
|
332
|
-
elsif value.is_a?(Hash)
|
|
333
|
-
{}.tap do |hash|
|
|
334
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
335
|
-
end
|
|
336
|
-
elsif value.respond_to? :to_hash
|
|
337
|
-
value.to_hash
|
|
338
|
-
else
|
|
339
|
-
value
|
|
340
|
-
end
|
|
341
|
-
end
|
|
342
|
-
|
|
343
270
|
end
|
|
344
271
|
|
|
345
272
|
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.21.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 WindowsResponse
|
|
17
|
+
class WindowsResponse < ApiModelBase
|
|
18
18
|
# Array of window information for all visible windows
|
|
19
19
|
attr_accessor :windows
|
|
20
20
|
|
|
@@ -173,61 +173,6 @@ module DaytonaApiClient
|
|
|
173
173
|
new(transformed_hash)
|
|
174
174
|
end
|
|
175
175
|
|
|
176
|
-
# Deserializes the data based on type
|
|
177
|
-
# @param string type Data type
|
|
178
|
-
# @param string value Value to be deserialized
|
|
179
|
-
# @return [Object] Deserialized data
|
|
180
|
-
def self._deserialize(type, value)
|
|
181
|
-
case type.to_sym
|
|
182
|
-
when :Time
|
|
183
|
-
Time.parse(value)
|
|
184
|
-
when :Date
|
|
185
|
-
Date.parse(value)
|
|
186
|
-
when :String
|
|
187
|
-
value.to_s
|
|
188
|
-
when :Integer
|
|
189
|
-
value.to_i
|
|
190
|
-
when :Float
|
|
191
|
-
value.to_f
|
|
192
|
-
when :Boolean
|
|
193
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
194
|
-
true
|
|
195
|
-
else
|
|
196
|
-
false
|
|
197
|
-
end
|
|
198
|
-
when :Object
|
|
199
|
-
# generic object (usually a Hash), return directly
|
|
200
|
-
value
|
|
201
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
202
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
203
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
204
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
205
|
-
k_type = Regexp.last_match[:k_type]
|
|
206
|
-
v_type = Regexp.last_match[:v_type]
|
|
207
|
-
{}.tap do |hash|
|
|
208
|
-
value.each do |k, v|
|
|
209
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
210
|
-
end
|
|
211
|
-
end
|
|
212
|
-
else # model
|
|
213
|
-
# models (e.g. Pet) or oneOf
|
|
214
|
-
klass = DaytonaApiClient.const_get(type)
|
|
215
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
216
|
-
end
|
|
217
|
-
end
|
|
218
|
-
|
|
219
|
-
# Returns the string representation of the object
|
|
220
|
-
# @return [String] String presentation of the object
|
|
221
|
-
def to_s
|
|
222
|
-
to_hash.to_s
|
|
223
|
-
end
|
|
224
|
-
|
|
225
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
226
|
-
# @return [Hash] Returns the object in the form of hash
|
|
227
|
-
def to_body
|
|
228
|
-
to_hash
|
|
229
|
-
end
|
|
230
|
-
|
|
231
176
|
# Returns the object in the form of hash
|
|
232
177
|
# @return [Hash] Returns the object in the form of hash
|
|
233
178
|
def to_hash
|
|
@@ -244,24 +189,6 @@ module DaytonaApiClient
|
|
|
244
189
|
hash
|
|
245
190
|
end
|
|
246
191
|
|
|
247
|
-
# Outputs non-array value in the form of hash
|
|
248
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
249
|
-
# @param [Object] value Any valid value
|
|
250
|
-
# @return [Hash] Returns the value in the form of hash
|
|
251
|
-
def _to_hash(value)
|
|
252
|
-
if value.is_a?(Array)
|
|
253
|
-
value.compact.map { |v| _to_hash(v) }
|
|
254
|
-
elsif value.is_a?(Hash)
|
|
255
|
-
{}.tap do |hash|
|
|
256
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
257
|
-
end
|
|
258
|
-
elsif value.respond_to? :to_hash
|
|
259
|
-
value.to_hash
|
|
260
|
-
else
|
|
261
|
-
value
|
|
262
|
-
end
|
|
263
|
-
end
|
|
264
|
-
|
|
265
192
|
end
|
|
266
193
|
|
|
267
194
|
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.21.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 WorkDirResponse
|
|
17
|
+
class WorkDirResponse < ApiModelBase
|
|
18
18
|
attr_accessor :dir
|
|
19
19
|
|
|
20
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -126,61 +126,6 @@ module DaytonaApiClient
|
|
|
126
126
|
new(transformed_hash)
|
|
127
127
|
end
|
|
128
128
|
|
|
129
|
-
# Deserializes the data based on type
|
|
130
|
-
# @param string type Data type
|
|
131
|
-
# @param string value Value to be deserialized
|
|
132
|
-
# @return [Object] Deserialized data
|
|
133
|
-
def self._deserialize(type, value)
|
|
134
|
-
case type.to_sym
|
|
135
|
-
when :Time
|
|
136
|
-
Time.parse(value)
|
|
137
|
-
when :Date
|
|
138
|
-
Date.parse(value)
|
|
139
|
-
when :String
|
|
140
|
-
value.to_s
|
|
141
|
-
when :Integer
|
|
142
|
-
value.to_i
|
|
143
|
-
when :Float
|
|
144
|
-
value.to_f
|
|
145
|
-
when :Boolean
|
|
146
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
147
|
-
true
|
|
148
|
-
else
|
|
149
|
-
false
|
|
150
|
-
end
|
|
151
|
-
when :Object
|
|
152
|
-
# generic object (usually a Hash), return directly
|
|
153
|
-
value
|
|
154
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
155
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
156
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
157
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
158
|
-
k_type = Regexp.last_match[:k_type]
|
|
159
|
-
v_type = Regexp.last_match[:v_type]
|
|
160
|
-
{}.tap do |hash|
|
|
161
|
-
value.each do |k, v|
|
|
162
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
163
|
-
end
|
|
164
|
-
end
|
|
165
|
-
else # model
|
|
166
|
-
# models (e.g. Pet) or oneOf
|
|
167
|
-
klass = DaytonaApiClient.const_get(type)
|
|
168
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
169
|
-
end
|
|
170
|
-
end
|
|
171
|
-
|
|
172
|
-
# Returns the string representation of the object
|
|
173
|
-
# @return [String] String presentation of the object
|
|
174
|
-
def to_s
|
|
175
|
-
to_hash.to_s
|
|
176
|
-
end
|
|
177
|
-
|
|
178
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
179
|
-
# @return [Hash] Returns the object in the form of hash
|
|
180
|
-
def to_body
|
|
181
|
-
to_hash
|
|
182
|
-
end
|
|
183
|
-
|
|
184
129
|
# Returns the object in the form of hash
|
|
185
130
|
# @return [Hash] Returns the object in the form of hash
|
|
186
131
|
def to_hash
|
|
@@ -197,24 +142,6 @@ module DaytonaApiClient
|
|
|
197
142
|
hash
|
|
198
143
|
end
|
|
199
144
|
|
|
200
|
-
# Outputs non-array value in the form of hash
|
|
201
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
202
|
-
# @param [Object] value Any valid value
|
|
203
|
-
# @return [Hash] Returns the value in the form of hash
|
|
204
|
-
def _to_hash(value)
|
|
205
|
-
if value.is_a?(Array)
|
|
206
|
-
value.compact.map { |v| _to_hash(v) }
|
|
207
|
-
elsif value.is_a?(Hash)
|
|
208
|
-
{}.tap do |hash|
|
|
209
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
210
|
-
end
|
|
211
|
-
elsif value.respond_to? :to_hash
|
|
212
|
-
value.to_hash
|
|
213
|
-
else
|
|
214
|
-
value
|
|
215
|
-
end
|
|
216
|
-
end
|
|
217
|
-
|
|
218
145
|
end
|
|
219
146
|
|
|
220
147
|
end
|