daytona_api_client 0.218.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 +102 -59
- 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 +279 -1591
- data/lib/daytona_api_client/api/preview_api.rb +8 -202
- data/lib/daytona_api_client/api/runners_api.rb +22 -470
- data/lib/daytona_api_client/api/sandbox_api.rb +429 -2200
- data/lib/daytona_api_client/api/snapshots_api.rb +117 -46
- data/lib/daytona_api_client/api/toolbox_api.rb +5108 -0
- data/lib/daytona_api_client/api/users_api.rb +172 -100
- 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 +93 -51
- data/lib/daytona_api_client/models/announcement.rb +74 -3
- data/lib/daytona_api_client/models/api_key_list.rb +78 -17
- data/lib/daytona_api_client/models/api_key_response.rb +74 -3
- data/lib/daytona_api_client/models/audit_log.rb +75 -22
- data/lib/daytona_api_client/models/build_info.rb +78 -34
- data/lib/daytona_api_client/models/{create_runner_response.rb → command.rb} +104 -23
- data/lib/daytona_api_client/models/completion_context.rb +244 -0
- data/lib/daytona_api_client/models/completion_item.rb +289 -0
- data/lib/daytona_api_client/models/{paginated_traces.rb → completion_list.rb} +106 -91
- data/lib/daytona_api_client/models/compressed_screenshot_response.rb +256 -0
- data/lib/daytona_api_client/models/computer_use_start_response.rb +263 -0
- data/lib/daytona_api_client/models/{audit_target_scenario.rb → computer_use_status_response.rb} +96 -44
- data/lib/daytona_api_client/models/computer_use_stop_response.rb +263 -0
- data/lib/daytona_api_client/models/create_api_key.rb +75 -4
- data/lib/daytona_api_client/models/create_audit_log.rb +350 -0
- data/lib/daytona_api_client/models/create_build_info.rb +74 -3
- data/lib/daytona_api_client/models/create_docker_registry.rb +139 -7
- data/lib/daytona_api_client/models/create_linked_account.rb +74 -3
- data/lib/daytona_api_client/models/create_organization.rb +78 -34
- data/lib/daytona_api_client/models/create_organization_invitation.rb +76 -5
- data/lib/daytona_api_client/models/create_organization_quota.rb +290 -0
- data/lib/daytona_api_client/models/create_organization_role.rb +74 -3
- data/lib/daytona_api_client/models/create_runner.rb +361 -51
- data/lib/daytona_api_client/models/create_sandbox.rb +117 -120
- data/lib/daytona_api_client/models/{signed_port_preview_url.rb → create_session_request.rb} +93 -103
- data/lib/daytona_api_client/models/create_snapshot.rb +88 -61
- data/lib/daytona_api_client/models/{volume_created_webhook.rb → create_user.rb} +113 -131
- 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 -140
- data/lib/daytona_api_client/models/{runner_service_health.rb → display_info_response.rb} +95 -59
- data/lib/daytona_api_client/models/docker_registry.rb +76 -5
- data/lib/daytona_api_client/models/{oidc_id_p_config.rb → download_files.rb} +95 -86
- data/lib/daytona_api_client/models/{create_warm_pool.rb → execute_request.rb} +106 -62
- data/lib/daytona_api_client/models/{metric_data_point.rb → execute_response.rb} +109 -38
- data/lib/daytona_api_client/models/file_info.rb +417 -0
- data/lib/daytona_api_client/models/{snapshot_removed_webhook.rb → file_status.rb} +133 -142
- data/lib/daytona_api_client/models/git_add_request.rb +264 -0
- data/lib/daytona_api_client/models/{create_secret.rb → git_branch_request.rb} +106 -59
- data/lib/daytona_api_client/models/git_checkout_request.rb +261 -0
- data/lib/daytona_api_client/models/{toolbox_proxy_url.rb → git_clone_request.rb} +142 -10
- data/lib/daytona_api_client/models/{snapshot_created_webhook.rb → git_commit_info.rb} +151 -161
- data/lib/daytona_api_client/models/git_commit_request.rb +325 -0
- data/lib/daytona_api_client/models/{runner_healthcheck.rb → git_commit_response.rb} +92 -74
- data/lib/daytona_api_client/models/{create_region.rb → git_delete_branch_request.rb} +106 -54
- data/lib/daytona_api_client/models/{snapshot_manager_credentials.rb → git_repo_request.rb} +96 -35
- data/lib/daytona_api_client/models/git_status.rb +290 -0
- data/lib/daytona_api_client/models/health_controller_check200_response.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check200_response_info_value.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check503_response.rb +74 -3
- data/lib/daytona_api_client/models/{oidc_id_p_config_response.rb → keyboard_hotkey_request.rb} +93 -59
- data/lib/daytona_api_client/models/{create_region_response.rb → keyboard_press_request.rb} +102 -63
- data/lib/daytona_api_client/models/keyboard_type_request.rb +246 -0
- data/lib/daytona_api_client/models/list_branch_response.rb +237 -0
- data/lib/daytona_api_client/models/lsp_completion_params.rb +325 -0
- data/lib/daytona_api_client/models/lsp_document_request.rb +290 -0
- data/lib/daytona_api_client/models/lsp_location.rb +261 -0
- data/lib/daytona_api_client/models/{gpu_capacity.rb → lsp_server_request.rb} +109 -104
- data/lib/daytona_api_client/models/{secret.rb → lsp_symbol.rb} +121 -146
- data/lib/daytona_api_client/models/match.rb +287 -0
- data/lib/daytona_api_client/models/mouse_click_request.rb +283 -0
- data/lib/daytona_api_client/models/mouse_click_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_drag_request.rb +327 -0
- data/lib/daytona_api_client/models/mouse_drag_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_move_request.rb +263 -0
- data/lib/daytona_api_client/models/mouse_move_response.rb +263 -0
- data/lib/daytona_api_client/models/{available_sandbox_class.rb → mouse_position.rb} +109 -95
- data/lib/daytona_api_client/models/mouse_scroll_request.rb +300 -0
- data/lib/daytona_api_client/models/{test_identity_provider_connection_response.rb → mouse_scroll_response.rb} +81 -30
- data/lib/daytona_api_client/models/oidc_config.rb +78 -68
- data/lib/daytona_api_client/models/organization.rb +159 -307
- 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 +236 -0
- data/lib/daytona_api_client/models/organization_suspension.rb +290 -0
- 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 +80 -19
- data/lib/daytona_api_client/models/{paginated_jobs.rb → paginated_sandboxes.rb} +80 -9
- data/lib/daytona_api_client/models/paginated_snapshots.rb +77 -6
- data/lib/daytona_api_client/models/{paginated_logs.rb → paginated_snapshots_dto.rb} +80 -13
- data/lib/daytona_api_client/models/port_preview_url.rb +88 -34
- data/lib/daytona_api_client/models/position.rb +261 -0
- data/lib/daytona_api_client/models/posthog_config.rb +74 -3
- data/lib/daytona_api_client/models/process_errors_response.rb +263 -0
- data/lib/daytona_api_client/models/process_logs_response.rb +263 -0
- data/lib/daytona_api_client/models/process_restart_response.rb +263 -0
- data/lib/daytona_api_client/models/process_status_response.rb +263 -0
- data/lib/daytona_api_client/models/{update_last_activity.rb → project_dir_response.rb} +83 -13
- data/lib/daytona_api_client/models/{pending_sso_link.rb → pty_create_request.rb} +114 -109
- data/lib/daytona_api_client/models/pty_create_response.rb +236 -0
- data/lib/daytona_api_client/models/{sandbox_identity.rb → pty_list_response.rb} +95 -49
- data/lib/daytona_api_client/models/pty_resize_request.rb +263 -0
- data/lib/daytona_api_client/models/pty_session_info.rb +425 -0
- data/lib/daytona_api_client/models/range.rb +261 -0
- data/lib/daytona_api_client/models/region.rb +78 -192
- data/lib/daytona_api_client/models/{regenerate_api_key_response.rb → region_screenshot_response.rb} +113 -22
- data/lib/daytona_api_client/models/registry_push_access_dto.rb +74 -3
- data/lib/daytona_api_client/models/replace_request.rb +289 -0
- data/lib/daytona_api_client/models/replace_result.rb +236 -0
- 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 +105 -220
- 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_sandbox_snapshot.rb → sandbox_info.rb} +113 -17
- data/lib/daytona_api_client/models/sandbox_labels.rb +74 -3
- data/lib/daytona_api_client/models/sandbox_state.rb +3 -10
- data/lib/daytona_api_client/models/sandbox_volume.rb +79 -18
- data/lib/daytona_api_client/models/screenshot_response.rb +256 -0
- data/lib/daytona_api_client/models/{gpu_capacity_response.rb → search_files_response.rb} +93 -49
- data/lib/daytona_api_client/models/send_webhook_dto.rb +273 -0
- data/lib/daytona_api_client/models/session.rb +251 -0
- data/lib/daytona_api_client/models/{list_sandboxes_response.rb → session_execute_request.rb} +110 -34
- data/lib/daytona_api_client/models/session_execute_response.rb +239 -0
- data/lib/daytona_api_client/models/{generate_workos_admin_portal_link.rb → set_snapshot_general_status_dto.rb} +93 -44
- data/lib/daytona_api_client/models/snapshot_dto.rb +78 -84
- data/lib/daytona_api_client/models/snapshot_state.rb +6 -5
- data/lib/daytona_api_client/models/ssh_access_dto.rb +78 -34
- data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +98 -7
- data/lib/daytona_api_client/models/storage_access_dto.rb +78 -34
- data/lib/daytona_api_client/models/update_docker_registry.rb +74 -3
- data/lib/daytona_api_client/models/update_organization_invitation.rb +76 -5
- data/lib/daytona_api_client/models/update_organization_member_access.rb +76 -5
- data/lib/daytona_api_client/models/update_organization_quota.rb +317 -0
- 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 +75 -51
- data/lib/daytona_api_client/models/{list_secrets_response.rb → user_home_dir_response.rb} +83 -72
- data/lib/daytona_api_client/models/user_public_key.rb +74 -3
- data/lib/daytona_api_client/models/volume_dto.rb +74 -3
- data/lib/daytona_api_client/models/volume_state.rb +3 -4
- data/lib/daytona_api_client/models/webhook_app_portal_access.rb +75 -31
- data/lib/daytona_api_client/models/{preview_warning.rb → webhook_controller_get_status200_response.rb} +76 -23
- data/lib/daytona_api_client/models/webhook_initialization_status.rb +74 -3
- data/lib/daytona_api_client/models/windows_response.rb +265 -0
- data/lib/daytona_api_client/models/{update_job_status.rb → work_dir_response.rb} +83 -72
- data/lib/daytona_api_client/models/{sandbox_list_item.rb → workspace.rb} +303 -226
- data/lib/daytona_api_client/version.rb +2 -2
- data/lib/daytona_api_client.rb +83 -93
- data/project.json +13 -38
- metadata +88 -102
- data/.gitignore +0 -39
- data/.openapi-generator/FILES +0 -175
- 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/jobs_api.rb +0 -299
- data/lib/daytona_api_client/api/regions_api.rb +0 -77
- data/lib/daytona_api_client/api/secret_api.rb +0 -441
- data/lib/daytona_api_client/api/warm_pools_api.rb +0 -286
- data/lib/daytona_api_client/api_model_base.rb +0 -88
- data/lib/daytona_api_client/models/audit_scenarios.rb +0 -167
- data/lib/daytona_api_client/models/create_identity_provider.rb +0 -269
- data/lib/daytona_api_client/models/create_runner_sandbox_class.rb +0 -42
- 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 -46
- data/lib/daytona_api_client/models/identity_provider.rb +0 -439
- data/lib/daytona_api_client/models/int_filter.rb +0 -222
- data/lib/daytona_api_client/models/job.rb +0 -366
- data/lib/daytona_api_client/models/job_status.rb +0 -43
- data/lib/daytona_api_client/models/job_type.rb +0 -55
- data/lib/daytona_api_client/models/log_entry.rb +0 -334
- data/lib/daytona_api_client/models/metric_series.rb +0 -194
- data/lib/daytona_api_client/models/metrics_response.rb +0 -167
- data/lib/daytona_api_client/models/otel_config.rb +0 -188
- data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -167
- data/lib/daytona_api_client/models/rate_limit_config.rb +0 -188
- data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -158
- data/lib/daytona_api_client/models/region_quota.rb +0 -453
- data/lib/daytona_api_client/models/region_type.rb +0 -42
- data/lib/daytona_api_client/models/region_usage_overview.rb +0 -518
- data/lib/daytona_api_client/models/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/sandbox_created_webhook.rb +0 -349
- 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/sandbox_state_updated_webhook.rb +0 -349
- data/lib/daytona_api_client/models/snapshot_state_updated_webhook.rb +0 -376
- data/lib/daytona_api_client/models/sso_oidc_config.rb +0 -192
- data/lib/daytona_api_client/models/string_filter.rb +0 -182
- data/lib/daytona_api_client/models/test_identity_provider_connection.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_identity_provider.rb +0 -212
- data/lib/daytona_api_client/models/update_oidc_id_p_config.rb +0 -178
- data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -165
- data/lib/daytona_api_client/models/update_region.rb +0 -182
- data/lib/daytona_api_client/models/update_sandbox_network_settings.rb +0 -168
- data/lib/daytona_api_client/models/update_sandbox_secrets.rb +0 -167
- data/lib/daytona_api_client/models/update_secret.rb +0 -170
- data/lib/daytona_api_client/models/update_warm_pool.rb +0 -174
- data/lib/daytona_api_client/models/url.rb +0 -165
- data/lib/daytona_api_client/models/volume_state_updated_webhook.rb +0 -376
- data/lib/daytona_api_client/models/warm_pool.rb +0 -490
- data/lib/daytona_api_client/models/webhook_event.rb +0 -46
- data/lib/daytona_api_client/models/workos_admin_portal_intent.rb +0 -41
- data/lib/daytona_api_client/models/workos_admin_portal_link.rb +0 -165
- data/lib/daytona_api_client/models/workos_sso_connection.rb +0 -329
|
@@ -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
|
|
|
@@ -32,7 +32,7 @@ module DaytonaApiClient
|
|
|
32
32
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
|
33
33
|
def initialize(config = Configuration.default)
|
|
34
34
|
@config = config
|
|
35
|
-
@user_agent = "
|
|
35
|
+
@user_agent = "OpenAPI-Generator/#{VERSION}/ruby"
|
|
36
36
|
@default_headers = {
|
|
37
37
|
'Content-Type' => 'application/json',
|
|
38
38
|
'User-Agent' => @user_agent
|
|
@@ -278,13 +278,9 @@ module DaytonaApiClient
|
|
|
278
278
|
data.each { |k, v| hash[k] = convert_to_type(v, sub_type) }
|
|
279
279
|
end
|
|
280
280
|
else
|
|
281
|
-
# models (e.g. Pet) or oneOf
|
|
281
|
+
# models (e.g. Pet) or oneOf
|
|
282
282
|
klass = DaytonaApiClient.const_get(return_type)
|
|
283
|
-
|
|
284
|
-
klass.build(data)
|
|
285
|
-
else
|
|
286
|
-
klass.build_from_hash(data)
|
|
287
|
-
end
|
|
283
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(data) : klass.build_from_hash(data)
|
|
288
284
|
end
|
|
289
285
|
end
|
|
290
286
|
|
|
@@ -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
|
|
|
@@ -266,8 +266,7 @@ module DaytonaApiClient
|
|
|
266
266
|
end
|
|
267
267
|
|
|
268
268
|
def operation_server_settings
|
|
269
|
-
{
|
|
270
|
-
}
|
|
269
|
+
{}
|
|
271
270
|
end
|
|
272
271
|
|
|
273
272
|
# Returns URL based on server settings
|
|
@@ -303,7 +302,5 @@ module DaytonaApiClient
|
|
|
303
302
|
|
|
304
303
|
url
|
|
305
304
|
end
|
|
306
|
-
|
|
307
|
-
|
|
308
305
|
end
|
|
309
306
|
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,22 +14,16 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class AccountProvider
|
|
18
|
-
|
|
19
|
-
attr_accessor :provider
|
|
17
|
+
class AccountProvider
|
|
18
|
+
attr_accessor :name
|
|
20
19
|
|
|
21
|
-
# Human-readable provider name
|
|
22
20
|
attr_accessor :display_name
|
|
23
21
|
|
|
24
|
-
# Whether the authenticated user has an identity from this provider
|
|
25
|
-
attr_accessor :linked
|
|
26
|
-
|
|
27
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
23
|
def self.attribute_map
|
|
29
24
|
{
|
|
30
|
-
:'
|
|
31
|
-
:'display_name' => :'displayName'
|
|
32
|
-
:'linked' => :'linked'
|
|
25
|
+
:'name' => :'name',
|
|
26
|
+
:'display_name' => :'displayName'
|
|
33
27
|
}
|
|
34
28
|
end
|
|
35
29
|
|
|
@@ -46,9 +40,8 @@ module DaytonaApiClient
|
|
|
46
40
|
# Attribute type mapping.
|
|
47
41
|
def self.openapi_types
|
|
48
42
|
{
|
|
49
|
-
:'
|
|
50
|
-
:'display_name' => :'String'
|
|
51
|
-
:'linked' => :'Boolean'
|
|
43
|
+
:'name' => :'String',
|
|
44
|
+
:'display_name' => :'String'
|
|
52
45
|
}
|
|
53
46
|
end
|
|
54
47
|
|
|
@@ -74,10 +67,10 @@ module DaytonaApiClient
|
|
|
74
67
|
h[k.to_sym] = v
|
|
75
68
|
}
|
|
76
69
|
|
|
77
|
-
if attributes.key?(:'
|
|
78
|
-
self.
|
|
70
|
+
if attributes.key?(:'name')
|
|
71
|
+
self.name = attributes[:'name']
|
|
79
72
|
else
|
|
80
|
-
self.
|
|
73
|
+
self.name = nil
|
|
81
74
|
end
|
|
82
75
|
|
|
83
76
|
if attributes.key?(:'display_name')
|
|
@@ -85,12 +78,6 @@ module DaytonaApiClient
|
|
|
85
78
|
else
|
|
86
79
|
self.display_name = nil
|
|
87
80
|
end
|
|
88
|
-
|
|
89
|
-
if attributes.key?(:'linked')
|
|
90
|
-
self.linked = attributes[:'linked']
|
|
91
|
-
else
|
|
92
|
-
self.linked = nil
|
|
93
|
-
end
|
|
94
81
|
end
|
|
95
82
|
|
|
96
83
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -98,18 +85,14 @@ module DaytonaApiClient
|
|
|
98
85
|
def list_invalid_properties
|
|
99
86
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
100
87
|
invalid_properties = Array.new
|
|
101
|
-
if @
|
|
102
|
-
invalid_properties.push('invalid value for "
|
|
88
|
+
if @name.nil?
|
|
89
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
103
90
|
end
|
|
104
91
|
|
|
105
92
|
if @display_name.nil?
|
|
106
93
|
invalid_properties.push('invalid value for "display_name", display_name cannot be nil.')
|
|
107
94
|
end
|
|
108
95
|
|
|
109
|
-
if @linked.nil?
|
|
110
|
-
invalid_properties.push('invalid value for "linked", linked cannot be nil.')
|
|
111
|
-
end
|
|
112
|
-
|
|
113
96
|
invalid_properties
|
|
114
97
|
end
|
|
115
98
|
|
|
@@ -117,20 +100,19 @@ module DaytonaApiClient
|
|
|
117
100
|
# @return true if the model is valid
|
|
118
101
|
def valid?
|
|
119
102
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
120
|
-
return false if @
|
|
103
|
+
return false if @name.nil?
|
|
121
104
|
return false if @display_name.nil?
|
|
122
|
-
return false if @linked.nil?
|
|
123
105
|
true
|
|
124
106
|
end
|
|
125
107
|
|
|
126
108
|
# Custom attribute writer method with validation
|
|
127
|
-
# @param [Object]
|
|
128
|
-
def
|
|
129
|
-
if
|
|
130
|
-
fail ArgumentError, '
|
|
109
|
+
# @param [Object] name Value to be assigned
|
|
110
|
+
def name=(name)
|
|
111
|
+
if name.nil?
|
|
112
|
+
fail ArgumentError, 'name cannot be nil'
|
|
131
113
|
end
|
|
132
114
|
|
|
133
|
-
@
|
|
115
|
+
@name = name
|
|
134
116
|
end
|
|
135
117
|
|
|
136
118
|
# Custom attribute writer method with validation
|
|
@@ -143,24 +125,13 @@ module DaytonaApiClient
|
|
|
143
125
|
@display_name = display_name
|
|
144
126
|
end
|
|
145
127
|
|
|
146
|
-
# Custom attribute writer method with validation
|
|
147
|
-
# @param [Object] linked Value to be assigned
|
|
148
|
-
def linked=(linked)
|
|
149
|
-
if linked.nil?
|
|
150
|
-
fail ArgumentError, 'linked cannot be nil'
|
|
151
|
-
end
|
|
152
|
-
|
|
153
|
-
@linked = linked
|
|
154
|
-
end
|
|
155
|
-
|
|
156
128
|
# Checks equality by comparing each attribute.
|
|
157
129
|
# @param [Object] Object to be compared
|
|
158
130
|
def ==(o)
|
|
159
131
|
return true if self.equal?(o)
|
|
160
132
|
self.class == o.class &&
|
|
161
|
-
|
|
162
|
-
display_name == o.display_name
|
|
163
|
-
linked == o.linked
|
|
133
|
+
name == o.name &&
|
|
134
|
+
display_name == o.display_name
|
|
164
135
|
end
|
|
165
136
|
|
|
166
137
|
# @see the `==` method
|
|
@@ -172,7 +143,7 @@ module DaytonaApiClient
|
|
|
172
143
|
# Calculates hash code according to all attributes.
|
|
173
144
|
# @return [Integer] Hash code
|
|
174
145
|
def hash
|
|
175
|
-
[
|
|
146
|
+
[name, display_name].hash
|
|
176
147
|
end
|
|
177
148
|
|
|
178
149
|
# Builds the object from hash
|
|
@@ -198,6 +169,61 @@ module DaytonaApiClient
|
|
|
198
169
|
new(transformed_hash)
|
|
199
170
|
end
|
|
200
171
|
|
|
172
|
+
# Deserializes the data based on type
|
|
173
|
+
# @param string type Data type
|
|
174
|
+
# @param string value Value to be deserialized
|
|
175
|
+
# @return [Object] Deserialized data
|
|
176
|
+
def self._deserialize(type, value)
|
|
177
|
+
case type.to_sym
|
|
178
|
+
when :Time
|
|
179
|
+
Time.parse(value)
|
|
180
|
+
when :Date
|
|
181
|
+
Date.parse(value)
|
|
182
|
+
when :String
|
|
183
|
+
value.to_s
|
|
184
|
+
when :Integer
|
|
185
|
+
value.to_i
|
|
186
|
+
when :Float
|
|
187
|
+
value.to_f
|
|
188
|
+
when :Boolean
|
|
189
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
190
|
+
true
|
|
191
|
+
else
|
|
192
|
+
false
|
|
193
|
+
end
|
|
194
|
+
when :Object
|
|
195
|
+
# generic object (usually a Hash), return directly
|
|
196
|
+
value
|
|
197
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
198
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
199
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
200
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
201
|
+
k_type = Regexp.last_match[:k_type]
|
|
202
|
+
v_type = Regexp.last_match[:v_type]
|
|
203
|
+
{}.tap do |hash|
|
|
204
|
+
value.each do |k, v|
|
|
205
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
else # model
|
|
209
|
+
# models (e.g. Pet) or oneOf
|
|
210
|
+
klass = DaytonaApiClient.const_get(type)
|
|
211
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Returns the string representation of the object
|
|
216
|
+
# @return [String] String presentation of the object
|
|
217
|
+
def to_s
|
|
218
|
+
to_hash.to_s
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
222
|
+
# @return [Hash] Returns the object in the form of hash
|
|
223
|
+
def to_body
|
|
224
|
+
to_hash
|
|
225
|
+
end
|
|
226
|
+
|
|
201
227
|
# Returns the object in the form of hash
|
|
202
228
|
# @return [Hash] Returns the object in the form of hash
|
|
203
229
|
def to_hash
|
|
@@ -214,6 +240,22 @@ module DaytonaApiClient
|
|
|
214
240
|
hash
|
|
215
241
|
end
|
|
216
242
|
|
|
243
|
+
# Outputs non-array value in the form of hash
|
|
244
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
245
|
+
# @param [Object] value Any valid value
|
|
246
|
+
# @return [Hash] Returns the value in the form of hash
|
|
247
|
+
def _to_hash(value)
|
|
248
|
+
if value.is_a?(Array)
|
|
249
|
+
value.compact.map { |v| _to_hash(v) }
|
|
250
|
+
elsif value.is_a?(Hash)
|
|
251
|
+
{}.tap do |hash|
|
|
252
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
253
|
+
end
|
|
254
|
+
elsif value.respond_to? :to_hash
|
|
255
|
+
value.to_hash
|
|
256
|
+
else
|
|
257
|
+
value
|
|
258
|
+
end
|
|
259
|
+
end
|
|
217
260
|
end
|
|
218
|
-
|
|
219
261
|
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 Announcement
|
|
17
|
+
class Announcement
|
|
18
18
|
# The announcement text
|
|
19
19
|
attr_accessor :text
|
|
20
20
|
|
|
@@ -154,6 +154,61 @@ module DaytonaApiClient
|
|
|
154
154
|
new(transformed_hash)
|
|
155
155
|
end
|
|
156
156
|
|
|
157
|
+
# Deserializes the data based on type
|
|
158
|
+
# @param string type Data type
|
|
159
|
+
# @param string value Value to be deserialized
|
|
160
|
+
# @return [Object] Deserialized data
|
|
161
|
+
def self._deserialize(type, value)
|
|
162
|
+
case type.to_sym
|
|
163
|
+
when :Time
|
|
164
|
+
Time.parse(value)
|
|
165
|
+
when :Date
|
|
166
|
+
Date.parse(value)
|
|
167
|
+
when :String
|
|
168
|
+
value.to_s
|
|
169
|
+
when :Integer
|
|
170
|
+
value.to_i
|
|
171
|
+
when :Float
|
|
172
|
+
value.to_f
|
|
173
|
+
when :Boolean
|
|
174
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
175
|
+
true
|
|
176
|
+
else
|
|
177
|
+
false
|
|
178
|
+
end
|
|
179
|
+
when :Object
|
|
180
|
+
# generic object (usually a Hash), return directly
|
|
181
|
+
value
|
|
182
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
183
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
184
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
185
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
186
|
+
k_type = Regexp.last_match[:k_type]
|
|
187
|
+
v_type = Regexp.last_match[:v_type]
|
|
188
|
+
{}.tap do |hash|
|
|
189
|
+
value.each do |k, v|
|
|
190
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
else # model
|
|
194
|
+
# models (e.g. Pet) or oneOf
|
|
195
|
+
klass = DaytonaApiClient.const_get(type)
|
|
196
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# Returns the string representation of the object
|
|
201
|
+
# @return [String] String presentation of the object
|
|
202
|
+
def to_s
|
|
203
|
+
to_hash.to_s
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
207
|
+
# @return [Hash] Returns the object in the form of hash
|
|
208
|
+
def to_body
|
|
209
|
+
to_hash
|
|
210
|
+
end
|
|
211
|
+
|
|
157
212
|
# Returns the object in the form of hash
|
|
158
213
|
# @return [Hash] Returns the object in the form of hash
|
|
159
214
|
def to_hash
|
|
@@ -170,6 +225,22 @@ module DaytonaApiClient
|
|
|
170
225
|
hash
|
|
171
226
|
end
|
|
172
227
|
|
|
228
|
+
# Outputs non-array value in the form of hash
|
|
229
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
230
|
+
# @param [Object] value Any valid value
|
|
231
|
+
# @return [Hash] Returns the value in the form of hash
|
|
232
|
+
def _to_hash(value)
|
|
233
|
+
if value.is_a?(Array)
|
|
234
|
+
value.compact.map { |v| _to_hash(v) }
|
|
235
|
+
elsif value.is_a?(Hash)
|
|
236
|
+
{}.tap do |hash|
|
|
237
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
238
|
+
end
|
|
239
|
+
elsif value.respond_to? :to_hash
|
|
240
|
+
value.to_hash
|
|
241
|
+
else
|
|
242
|
+
value
|
|
243
|
+
end
|
|
244
|
+
end
|
|
173
245
|
end
|
|
174
|
-
|
|
175
246
|
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 ApiKeyList
|
|
17
|
+
class ApiKeyList
|
|
18
18
|
# The name of the API key
|
|
19
19
|
attr_accessor :name
|
|
20
20
|
|
|
@@ -36,9 +36,6 @@ module DaytonaApiClient
|
|
|
36
36
|
# The user ID of the user who created the API key
|
|
37
37
|
attr_accessor :user_id
|
|
38
38
|
|
|
39
|
-
# The organization ID associated with the API key
|
|
40
|
-
attr_accessor :organization_id
|
|
41
|
-
|
|
42
39
|
class EnumAttributeValidator
|
|
43
40
|
attr_reader :datatype
|
|
44
41
|
attr_reader :allowable_values
|
|
@@ -70,8 +67,7 @@ module DaytonaApiClient
|
|
|
70
67
|
:'permissions' => :'permissions',
|
|
71
68
|
:'last_used_at' => :'lastUsedAt',
|
|
72
69
|
:'expires_at' => :'expiresAt',
|
|
73
|
-
:'user_id' => :'userId'
|
|
74
|
-
:'organization_id' => :'organizationId'
|
|
70
|
+
:'user_id' => :'userId'
|
|
75
71
|
}
|
|
76
72
|
end
|
|
77
73
|
|
|
@@ -94,8 +90,7 @@ module DaytonaApiClient
|
|
|
94
90
|
:'permissions' => :'Array<String>',
|
|
95
91
|
:'last_used_at' => :'Time',
|
|
96
92
|
:'expires_at' => :'Time',
|
|
97
|
-
:'user_id' => :'String'
|
|
98
|
-
:'organization_id' => :'String'
|
|
93
|
+
:'user_id' => :'String'
|
|
99
94
|
}
|
|
100
95
|
end
|
|
101
96
|
|
|
@@ -166,10 +161,6 @@ module DaytonaApiClient
|
|
|
166
161
|
else
|
|
167
162
|
self.user_id = nil
|
|
168
163
|
end
|
|
169
|
-
|
|
170
|
-
if attributes.key?(:'organization_id')
|
|
171
|
-
self.organization_id = attributes[:'organization_id']
|
|
172
|
-
end
|
|
173
164
|
end
|
|
174
165
|
|
|
175
166
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -263,8 +254,7 @@ module DaytonaApiClient
|
|
|
263
254
|
permissions == o.permissions &&
|
|
264
255
|
last_used_at == o.last_used_at &&
|
|
265
256
|
expires_at == o.expires_at &&
|
|
266
|
-
user_id == o.user_id
|
|
267
|
-
organization_id == o.organization_id
|
|
257
|
+
user_id == o.user_id
|
|
268
258
|
end
|
|
269
259
|
|
|
270
260
|
# @see the `==` method
|
|
@@ -276,7 +266,7 @@ module DaytonaApiClient
|
|
|
276
266
|
# Calculates hash code according to all attributes.
|
|
277
267
|
# @return [Integer] Hash code
|
|
278
268
|
def hash
|
|
279
|
-
[name, value, created_at, permissions, last_used_at, expires_at, user_id
|
|
269
|
+
[name, value, created_at, permissions, last_used_at, expires_at, user_id].hash
|
|
280
270
|
end
|
|
281
271
|
|
|
282
272
|
# Builds the object from hash
|
|
@@ -302,6 +292,61 @@ module DaytonaApiClient
|
|
|
302
292
|
new(transformed_hash)
|
|
303
293
|
end
|
|
304
294
|
|
|
295
|
+
# Deserializes the data based on type
|
|
296
|
+
# @param string type Data type
|
|
297
|
+
# @param string value Value to be deserialized
|
|
298
|
+
# @return [Object] Deserialized data
|
|
299
|
+
def self._deserialize(type, value)
|
|
300
|
+
case type.to_sym
|
|
301
|
+
when :Time
|
|
302
|
+
Time.parse(value)
|
|
303
|
+
when :Date
|
|
304
|
+
Date.parse(value)
|
|
305
|
+
when :String
|
|
306
|
+
value.to_s
|
|
307
|
+
when :Integer
|
|
308
|
+
value.to_i
|
|
309
|
+
when :Float
|
|
310
|
+
value.to_f
|
|
311
|
+
when :Boolean
|
|
312
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
313
|
+
true
|
|
314
|
+
else
|
|
315
|
+
false
|
|
316
|
+
end
|
|
317
|
+
when :Object
|
|
318
|
+
# generic object (usually a Hash), return directly
|
|
319
|
+
value
|
|
320
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
321
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
322
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
323
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
324
|
+
k_type = Regexp.last_match[:k_type]
|
|
325
|
+
v_type = Regexp.last_match[:v_type]
|
|
326
|
+
{}.tap do |hash|
|
|
327
|
+
value.each do |k, v|
|
|
328
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
329
|
+
end
|
|
330
|
+
end
|
|
331
|
+
else # model
|
|
332
|
+
# models (e.g. Pet) or oneOf
|
|
333
|
+
klass = DaytonaApiClient.const_get(type)
|
|
334
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
335
|
+
end
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
# Returns the string representation of the object
|
|
339
|
+
# @return [String] String presentation of the object
|
|
340
|
+
def to_s
|
|
341
|
+
to_hash.to_s
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
345
|
+
# @return [Hash] Returns the object in the form of hash
|
|
346
|
+
def to_body
|
|
347
|
+
to_hash
|
|
348
|
+
end
|
|
349
|
+
|
|
305
350
|
# Returns the object in the form of hash
|
|
306
351
|
# @return [Hash] Returns the object in the form of hash
|
|
307
352
|
def to_hash
|
|
@@ -318,6 +363,22 @@ module DaytonaApiClient
|
|
|
318
363
|
hash
|
|
319
364
|
end
|
|
320
365
|
|
|
366
|
+
# Outputs non-array value in the form of hash
|
|
367
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
368
|
+
# @param [Object] value Any valid value
|
|
369
|
+
# @return [Hash] Returns the value in the form of hash
|
|
370
|
+
def _to_hash(value)
|
|
371
|
+
if value.is_a?(Array)
|
|
372
|
+
value.compact.map { |v| _to_hash(v) }
|
|
373
|
+
elsif value.is_a?(Hash)
|
|
374
|
+
{}.tap do |hash|
|
|
375
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
376
|
+
end
|
|
377
|
+
elsif value.respond_to? :to_hash
|
|
378
|
+
value.to_hash
|
|
379
|
+
else
|
|
380
|
+
value
|
|
381
|
+
end
|
|
382
|
+
end
|
|
321
383
|
end
|
|
322
|
-
|
|
323
384
|
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 ApiKeyResponse
|
|
17
|
+
class ApiKeyResponse
|
|
18
18
|
# The name of the API key
|
|
19
19
|
attr_accessor :name
|
|
20
20
|
|
|
@@ -252,6 +252,61 @@ module DaytonaApiClient
|
|
|
252
252
|
new(transformed_hash)
|
|
253
253
|
end
|
|
254
254
|
|
|
255
|
+
# Deserializes the data based on type
|
|
256
|
+
# @param string type Data type
|
|
257
|
+
# @param string value Value to be deserialized
|
|
258
|
+
# @return [Object] Deserialized data
|
|
259
|
+
def self._deserialize(type, value)
|
|
260
|
+
case type.to_sym
|
|
261
|
+
when :Time
|
|
262
|
+
Time.parse(value)
|
|
263
|
+
when :Date
|
|
264
|
+
Date.parse(value)
|
|
265
|
+
when :String
|
|
266
|
+
value.to_s
|
|
267
|
+
when :Integer
|
|
268
|
+
value.to_i
|
|
269
|
+
when :Float
|
|
270
|
+
value.to_f
|
|
271
|
+
when :Boolean
|
|
272
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
273
|
+
true
|
|
274
|
+
else
|
|
275
|
+
false
|
|
276
|
+
end
|
|
277
|
+
when :Object
|
|
278
|
+
# generic object (usually a Hash), return directly
|
|
279
|
+
value
|
|
280
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
281
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
282
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
283
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
284
|
+
k_type = Regexp.last_match[:k_type]
|
|
285
|
+
v_type = Regexp.last_match[:v_type]
|
|
286
|
+
{}.tap do |hash|
|
|
287
|
+
value.each do |k, v|
|
|
288
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
289
|
+
end
|
|
290
|
+
end
|
|
291
|
+
else # model
|
|
292
|
+
# models (e.g. Pet) or oneOf
|
|
293
|
+
klass = DaytonaApiClient.const_get(type)
|
|
294
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
295
|
+
end
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
# Returns the string representation of the object
|
|
299
|
+
# @return [String] String presentation of the object
|
|
300
|
+
def to_s
|
|
301
|
+
to_hash.to_s
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
305
|
+
# @return [Hash] Returns the object in the form of hash
|
|
306
|
+
def to_body
|
|
307
|
+
to_hash
|
|
308
|
+
end
|
|
309
|
+
|
|
255
310
|
# Returns the object in the form of hash
|
|
256
311
|
# @return [Hash] Returns the object in the form of hash
|
|
257
312
|
def to_hash
|
|
@@ -268,6 +323,22 @@ module DaytonaApiClient
|
|
|
268
323
|
hash
|
|
269
324
|
end
|
|
270
325
|
|
|
326
|
+
# Outputs non-array value in the form of hash
|
|
327
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
328
|
+
# @param [Object] value Any valid value
|
|
329
|
+
# @return [Hash] Returns the value in the form of hash
|
|
330
|
+
def _to_hash(value)
|
|
331
|
+
if value.is_a?(Array)
|
|
332
|
+
value.compact.map { |v| _to_hash(v) }
|
|
333
|
+
elsif value.is_a?(Hash)
|
|
334
|
+
{}.tap do |hash|
|
|
335
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
336
|
+
end
|
|
337
|
+
elsif value.respond_to? :to_hash
|
|
338
|
+
value.to_hash
|
|
339
|
+
else
|
|
340
|
+
value
|
|
341
|
+
end
|
|
342
|
+
end
|
|
271
343
|
end
|
|
272
|
-
|
|
273
344
|
end
|