daytona_api_client 0.216.1 → 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 -108
- 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 -210
- 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 -45
- 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
|
|
|
@@ -14,25 +14,16 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class DaytonaConfiguration
|
|
17
|
+
class DaytonaConfiguration
|
|
18
18
|
# Daytona version
|
|
19
19
|
attr_accessor :version
|
|
20
20
|
|
|
21
|
-
# Commit sha of the source the app was built from
|
|
22
|
-
attr_accessor :build_sha
|
|
23
|
-
|
|
24
21
|
# PostHog configuration
|
|
25
22
|
attr_accessor :posthog
|
|
26
23
|
|
|
27
24
|
# OIDC configuration
|
|
28
25
|
attr_accessor :oidc
|
|
29
26
|
|
|
30
|
-
# OIDC configuration for org-SSO logins (Daytona Auth issuer). Present only when the secondary (org-SSO) issuer is configured; the dashboard uses it as its authority when entered via an organization SSO link.
|
|
31
|
-
attr_accessor :sso_oidc
|
|
32
|
-
|
|
33
|
-
# Feature flags forced on for this deployment regardless of PostHog targeting. Lets environments without PostHog (previews, local dev) enable flag-gated dashboard features.
|
|
34
|
-
attr_accessor :forced_feature_flags
|
|
35
|
-
|
|
36
27
|
# Whether linked accounts are enabled
|
|
37
28
|
attr_accessor :linked_accounts_enabled
|
|
38
29
|
|
|
@@ -45,9 +36,6 @@ module DaytonaApiClient
|
|
|
45
36
|
# Proxy template URL
|
|
46
37
|
attr_accessor :proxy_template_url
|
|
47
38
|
|
|
48
|
-
# Toolbox template URL
|
|
49
|
-
attr_accessor :proxy_toolbox_url
|
|
50
|
-
|
|
51
39
|
# Default snapshot for sandboxes
|
|
52
40
|
attr_accessor :default_snapshot
|
|
53
41
|
|
|
@@ -66,62 +54,30 @@ module DaytonaApiClient
|
|
|
66
54
|
# Billing API URL
|
|
67
55
|
attr_accessor :billing_api_url
|
|
68
56
|
|
|
69
|
-
# Analytics API URL
|
|
70
|
-
attr_accessor :analytics_api_url
|
|
71
|
-
|
|
72
|
-
# Stripe publishable key for client-side Stripe.js
|
|
73
|
-
attr_accessor :stripe_publishable_key
|
|
74
|
-
|
|
75
57
|
# SSH Gateway command
|
|
76
58
|
attr_accessor :ssh_gateway_command
|
|
77
59
|
|
|
78
60
|
# Base64 encoded SSH Gateway public key
|
|
79
61
|
attr_accessor :ssh_gateway_public_key
|
|
80
62
|
|
|
81
|
-
# Hostname of the SSH Gateway that sandbox SSH connections terminate at
|
|
82
|
-
attr_accessor :ssh_gateway_host
|
|
83
|
-
|
|
84
|
-
# TCP port of the SSH Gateway
|
|
85
|
-
attr_accessor :ssh_gateway_port
|
|
86
|
-
|
|
87
|
-
# SSH host public keys presented by the SSH Gateway, as OpenSSH public key lines (`<type> <base64>`). To build a known_hosts entry, prefix each with `sshGatewayHost` when `sshGatewayPort` is 22, or with `[sshGatewayHost]:sshGatewayPort` otherwise.
|
|
88
|
-
attr_accessor :ssh_gateway_host_keys
|
|
89
|
-
|
|
90
|
-
# SHA256 fingerprints of sshGatewayHostKeys, in the same order, in `ssh-keygen -lf` format. Compare against the fingerprint published at https://github.com/daytona/.github/blob/main/SECURITY.md#ssh-host-key-verification
|
|
91
|
-
attr_accessor :ssh_gateway_host_key_fingerprints
|
|
92
|
-
|
|
93
|
-
# Rate limit configuration
|
|
94
|
-
attr_accessor :rate_limit
|
|
95
|
-
|
|
96
63
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
97
64
|
def self.attribute_map
|
|
98
65
|
{
|
|
99
66
|
:'version' => :'version',
|
|
100
|
-
:'build_sha' => :'buildSha',
|
|
101
67
|
:'posthog' => :'posthog',
|
|
102
68
|
:'oidc' => :'oidc',
|
|
103
|
-
:'sso_oidc' => :'ssoOidc',
|
|
104
|
-
:'forced_feature_flags' => :'forcedFeatureFlags',
|
|
105
69
|
:'linked_accounts_enabled' => :'linkedAccountsEnabled',
|
|
106
70
|
:'announcements' => :'announcements',
|
|
107
71
|
:'pylon_app_id' => :'pylonAppId',
|
|
108
72
|
:'proxy_template_url' => :'proxyTemplateUrl',
|
|
109
|
-
:'proxy_toolbox_url' => :'proxyToolboxUrl',
|
|
110
73
|
:'default_snapshot' => :'defaultSnapshot',
|
|
111
74
|
:'dashboard_url' => :'dashboardUrl',
|
|
112
75
|
:'max_auto_archive_interval' => :'maxAutoArchiveInterval',
|
|
113
76
|
:'maintanance_mode' => :'maintananceMode',
|
|
114
77
|
:'environment' => :'environment',
|
|
115
78
|
:'billing_api_url' => :'billingApiUrl',
|
|
116
|
-
:'analytics_api_url' => :'analyticsApiUrl',
|
|
117
|
-
:'stripe_publishable_key' => :'stripePublishableKey',
|
|
118
79
|
:'ssh_gateway_command' => :'sshGatewayCommand',
|
|
119
|
-
:'ssh_gateway_public_key' => :'sshGatewayPublicKey'
|
|
120
|
-
:'ssh_gateway_host' => :'sshGatewayHost',
|
|
121
|
-
:'ssh_gateway_port' => :'sshGatewayPort',
|
|
122
|
-
:'ssh_gateway_host_keys' => :'sshGatewayHostKeys',
|
|
123
|
-
:'ssh_gateway_host_key_fingerprints' => :'sshGatewayHostKeyFingerprints',
|
|
124
|
-
:'rate_limit' => :'rateLimit'
|
|
80
|
+
:'ssh_gateway_public_key' => :'sshGatewayPublicKey'
|
|
125
81
|
}
|
|
126
82
|
end
|
|
127
83
|
|
|
@@ -139,31 +95,20 @@ module DaytonaApiClient
|
|
|
139
95
|
def self.openapi_types
|
|
140
96
|
{
|
|
141
97
|
:'version' => :'String',
|
|
142
|
-
:'build_sha' => :'String',
|
|
143
98
|
:'posthog' => :'PosthogConfig',
|
|
144
99
|
:'oidc' => :'OidcConfig',
|
|
145
|
-
:'sso_oidc' => :'SsoOidcConfig',
|
|
146
|
-
:'forced_feature_flags' => :'Array<String>',
|
|
147
100
|
:'linked_accounts_enabled' => :'Boolean',
|
|
148
101
|
:'announcements' => :'Hash<String, Announcement>',
|
|
149
102
|
:'pylon_app_id' => :'String',
|
|
150
103
|
:'proxy_template_url' => :'String',
|
|
151
|
-
:'proxy_toolbox_url' => :'String',
|
|
152
104
|
:'default_snapshot' => :'String',
|
|
153
105
|
:'dashboard_url' => :'String',
|
|
154
106
|
:'max_auto_archive_interval' => :'Float',
|
|
155
107
|
:'maintanance_mode' => :'Boolean',
|
|
156
108
|
:'environment' => :'String',
|
|
157
109
|
:'billing_api_url' => :'String',
|
|
158
|
-
:'analytics_api_url' => :'String',
|
|
159
|
-
:'stripe_publishable_key' => :'String',
|
|
160
110
|
:'ssh_gateway_command' => :'String',
|
|
161
|
-
:'ssh_gateway_public_key' => :'String'
|
|
162
|
-
:'ssh_gateway_host' => :'String',
|
|
163
|
-
:'ssh_gateway_port' => :'Float',
|
|
164
|
-
:'ssh_gateway_host_keys' => :'Array<String>',
|
|
165
|
-
:'ssh_gateway_host_key_fingerprints' => :'Array<String>',
|
|
166
|
-
:'rate_limit' => :'RateLimitConfig'
|
|
111
|
+
:'ssh_gateway_public_key' => :'String'
|
|
167
112
|
}
|
|
168
113
|
end
|
|
169
114
|
|
|
@@ -195,10 +140,6 @@ module DaytonaApiClient
|
|
|
195
140
|
self.version = nil
|
|
196
141
|
end
|
|
197
142
|
|
|
198
|
-
if attributes.key?(:'build_sha')
|
|
199
|
-
self.build_sha = attributes[:'build_sha']
|
|
200
|
-
end
|
|
201
|
-
|
|
202
143
|
if attributes.key?(:'posthog')
|
|
203
144
|
self.posthog = attributes[:'posthog']
|
|
204
145
|
end
|
|
@@ -209,16 +150,6 @@ module DaytonaApiClient
|
|
|
209
150
|
self.oidc = nil
|
|
210
151
|
end
|
|
211
152
|
|
|
212
|
-
if attributes.key?(:'sso_oidc')
|
|
213
|
-
self.sso_oidc = attributes[:'sso_oidc']
|
|
214
|
-
end
|
|
215
|
-
|
|
216
|
-
if attributes.key?(:'forced_feature_flags')
|
|
217
|
-
if (value = attributes[:'forced_feature_flags']).is_a?(Array)
|
|
218
|
-
self.forced_feature_flags = value
|
|
219
|
-
end
|
|
220
|
-
end
|
|
221
|
-
|
|
222
153
|
if attributes.key?(:'linked_accounts_enabled')
|
|
223
154
|
self.linked_accounts_enabled = attributes[:'linked_accounts_enabled']
|
|
224
155
|
else
|
|
@@ -243,12 +174,6 @@ module DaytonaApiClient
|
|
|
243
174
|
self.proxy_template_url = nil
|
|
244
175
|
end
|
|
245
176
|
|
|
246
|
-
if attributes.key?(:'proxy_toolbox_url')
|
|
247
|
-
self.proxy_toolbox_url = attributes[:'proxy_toolbox_url']
|
|
248
|
-
else
|
|
249
|
-
self.proxy_toolbox_url = nil
|
|
250
|
-
end
|
|
251
|
-
|
|
252
177
|
if attributes.key?(:'default_snapshot')
|
|
253
178
|
self.default_snapshot = attributes[:'default_snapshot']
|
|
254
179
|
else
|
|
@@ -283,14 +208,6 @@ module DaytonaApiClient
|
|
|
283
208
|
self.billing_api_url = attributes[:'billing_api_url']
|
|
284
209
|
end
|
|
285
210
|
|
|
286
|
-
if attributes.key?(:'analytics_api_url')
|
|
287
|
-
self.analytics_api_url = attributes[:'analytics_api_url']
|
|
288
|
-
end
|
|
289
|
-
|
|
290
|
-
if attributes.key?(:'stripe_publishable_key')
|
|
291
|
-
self.stripe_publishable_key = attributes[:'stripe_publishable_key']
|
|
292
|
-
end
|
|
293
|
-
|
|
294
211
|
if attributes.key?(:'ssh_gateway_command')
|
|
295
212
|
self.ssh_gateway_command = attributes[:'ssh_gateway_command']
|
|
296
213
|
end
|
|
@@ -298,30 +215,6 @@ module DaytonaApiClient
|
|
|
298
215
|
if attributes.key?(:'ssh_gateway_public_key')
|
|
299
216
|
self.ssh_gateway_public_key = attributes[:'ssh_gateway_public_key']
|
|
300
217
|
end
|
|
301
|
-
|
|
302
|
-
if attributes.key?(:'ssh_gateway_host')
|
|
303
|
-
self.ssh_gateway_host = attributes[:'ssh_gateway_host']
|
|
304
|
-
end
|
|
305
|
-
|
|
306
|
-
if attributes.key?(:'ssh_gateway_port')
|
|
307
|
-
self.ssh_gateway_port = attributes[:'ssh_gateway_port']
|
|
308
|
-
end
|
|
309
|
-
|
|
310
|
-
if attributes.key?(:'ssh_gateway_host_keys')
|
|
311
|
-
if (value = attributes[:'ssh_gateway_host_keys']).is_a?(Array)
|
|
312
|
-
self.ssh_gateway_host_keys = value
|
|
313
|
-
end
|
|
314
|
-
end
|
|
315
|
-
|
|
316
|
-
if attributes.key?(:'ssh_gateway_host_key_fingerprints')
|
|
317
|
-
if (value = attributes[:'ssh_gateway_host_key_fingerprints']).is_a?(Array)
|
|
318
|
-
self.ssh_gateway_host_key_fingerprints = value
|
|
319
|
-
end
|
|
320
|
-
end
|
|
321
|
-
|
|
322
|
-
if attributes.key?(:'rate_limit')
|
|
323
|
-
self.rate_limit = attributes[:'rate_limit']
|
|
324
|
-
end
|
|
325
218
|
end
|
|
326
219
|
|
|
327
220
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -349,10 +242,6 @@ module DaytonaApiClient
|
|
|
349
242
|
invalid_properties.push('invalid value for "proxy_template_url", proxy_template_url cannot be nil.')
|
|
350
243
|
end
|
|
351
244
|
|
|
352
|
-
if @proxy_toolbox_url.nil?
|
|
353
|
-
invalid_properties.push('invalid value for "proxy_toolbox_url", proxy_toolbox_url cannot be nil.')
|
|
354
|
-
end
|
|
355
|
-
|
|
356
245
|
if @default_snapshot.nil?
|
|
357
246
|
invalid_properties.push('invalid value for "default_snapshot", default_snapshot cannot be nil.')
|
|
358
247
|
end
|
|
@@ -385,7 +274,6 @@ module DaytonaApiClient
|
|
|
385
274
|
return false if @linked_accounts_enabled.nil?
|
|
386
275
|
return false if @announcements.nil?
|
|
387
276
|
return false if @proxy_template_url.nil?
|
|
388
|
-
return false if @proxy_toolbox_url.nil?
|
|
389
277
|
return false if @default_snapshot.nil?
|
|
390
278
|
return false if @dashboard_url.nil?
|
|
391
279
|
return false if @max_auto_archive_interval.nil?
|
|
@@ -444,16 +332,6 @@ module DaytonaApiClient
|
|
|
444
332
|
@proxy_template_url = proxy_template_url
|
|
445
333
|
end
|
|
446
334
|
|
|
447
|
-
# Custom attribute writer method with validation
|
|
448
|
-
# @param [Object] proxy_toolbox_url Value to be assigned
|
|
449
|
-
def proxy_toolbox_url=(proxy_toolbox_url)
|
|
450
|
-
if proxy_toolbox_url.nil?
|
|
451
|
-
fail ArgumentError, 'proxy_toolbox_url cannot be nil'
|
|
452
|
-
end
|
|
453
|
-
|
|
454
|
-
@proxy_toolbox_url = proxy_toolbox_url
|
|
455
|
-
end
|
|
456
|
-
|
|
457
335
|
# Custom attribute writer method with validation
|
|
458
336
|
# @param [Object] default_snapshot Value to be assigned
|
|
459
337
|
def default_snapshot=(default_snapshot)
|
|
@@ -510,31 +388,20 @@ module DaytonaApiClient
|
|
|
510
388
|
return true if self.equal?(o)
|
|
511
389
|
self.class == o.class &&
|
|
512
390
|
version == o.version &&
|
|
513
|
-
build_sha == o.build_sha &&
|
|
514
391
|
posthog == o.posthog &&
|
|
515
392
|
oidc == o.oidc &&
|
|
516
|
-
sso_oidc == o.sso_oidc &&
|
|
517
|
-
forced_feature_flags == o.forced_feature_flags &&
|
|
518
393
|
linked_accounts_enabled == o.linked_accounts_enabled &&
|
|
519
394
|
announcements == o.announcements &&
|
|
520
395
|
pylon_app_id == o.pylon_app_id &&
|
|
521
396
|
proxy_template_url == o.proxy_template_url &&
|
|
522
|
-
proxy_toolbox_url == o.proxy_toolbox_url &&
|
|
523
397
|
default_snapshot == o.default_snapshot &&
|
|
524
398
|
dashboard_url == o.dashboard_url &&
|
|
525
399
|
max_auto_archive_interval == o.max_auto_archive_interval &&
|
|
526
400
|
maintanance_mode == o.maintanance_mode &&
|
|
527
401
|
environment == o.environment &&
|
|
528
402
|
billing_api_url == o.billing_api_url &&
|
|
529
|
-
analytics_api_url == o.analytics_api_url &&
|
|
530
|
-
stripe_publishable_key == o.stripe_publishable_key &&
|
|
531
403
|
ssh_gateway_command == o.ssh_gateway_command &&
|
|
532
|
-
ssh_gateway_public_key == o.ssh_gateway_public_key
|
|
533
|
-
ssh_gateway_host == o.ssh_gateway_host &&
|
|
534
|
-
ssh_gateway_port == o.ssh_gateway_port &&
|
|
535
|
-
ssh_gateway_host_keys == o.ssh_gateway_host_keys &&
|
|
536
|
-
ssh_gateway_host_key_fingerprints == o.ssh_gateway_host_key_fingerprints &&
|
|
537
|
-
rate_limit == o.rate_limit
|
|
404
|
+
ssh_gateway_public_key == o.ssh_gateway_public_key
|
|
538
405
|
end
|
|
539
406
|
|
|
540
407
|
# @see the `==` method
|
|
@@ -546,7 +413,7 @@ module DaytonaApiClient
|
|
|
546
413
|
# Calculates hash code according to all attributes.
|
|
547
414
|
# @return [Integer] Hash code
|
|
548
415
|
def hash
|
|
549
|
-
[version,
|
|
416
|
+
[version, posthog, oidc, linked_accounts_enabled, announcements, pylon_app_id, proxy_template_url, default_snapshot, dashboard_url, max_auto_archive_interval, maintanance_mode, environment, billing_api_url, ssh_gateway_command, ssh_gateway_public_key].hash
|
|
550
417
|
end
|
|
551
418
|
|
|
552
419
|
# Builds the object from hash
|
|
@@ -572,6 +439,61 @@ module DaytonaApiClient
|
|
|
572
439
|
new(transformed_hash)
|
|
573
440
|
end
|
|
574
441
|
|
|
442
|
+
# Deserializes the data based on type
|
|
443
|
+
# @param string type Data type
|
|
444
|
+
# @param string value Value to be deserialized
|
|
445
|
+
# @return [Object] Deserialized data
|
|
446
|
+
def self._deserialize(type, value)
|
|
447
|
+
case type.to_sym
|
|
448
|
+
when :Time
|
|
449
|
+
Time.parse(value)
|
|
450
|
+
when :Date
|
|
451
|
+
Date.parse(value)
|
|
452
|
+
when :String
|
|
453
|
+
value.to_s
|
|
454
|
+
when :Integer
|
|
455
|
+
value.to_i
|
|
456
|
+
when :Float
|
|
457
|
+
value.to_f
|
|
458
|
+
when :Boolean
|
|
459
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
460
|
+
true
|
|
461
|
+
else
|
|
462
|
+
false
|
|
463
|
+
end
|
|
464
|
+
when :Object
|
|
465
|
+
# generic object (usually a Hash), return directly
|
|
466
|
+
value
|
|
467
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
468
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
469
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
470
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
471
|
+
k_type = Regexp.last_match[:k_type]
|
|
472
|
+
v_type = Regexp.last_match[:v_type]
|
|
473
|
+
{}.tap do |hash|
|
|
474
|
+
value.each do |k, v|
|
|
475
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
476
|
+
end
|
|
477
|
+
end
|
|
478
|
+
else # model
|
|
479
|
+
# models (e.g. Pet) or oneOf
|
|
480
|
+
klass = DaytonaApiClient.const_get(type)
|
|
481
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
482
|
+
end
|
|
483
|
+
end
|
|
484
|
+
|
|
485
|
+
# Returns the string representation of the object
|
|
486
|
+
# @return [String] String presentation of the object
|
|
487
|
+
def to_s
|
|
488
|
+
to_hash.to_s
|
|
489
|
+
end
|
|
490
|
+
|
|
491
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
492
|
+
# @return [Hash] Returns the object in the form of hash
|
|
493
|
+
def to_body
|
|
494
|
+
to_hash
|
|
495
|
+
end
|
|
496
|
+
|
|
575
497
|
# Returns the object in the form of hash
|
|
576
498
|
# @return [Hash] Returns the object in the form of hash
|
|
577
499
|
def to_hash
|
|
@@ -588,6 +510,22 @@ module DaytonaApiClient
|
|
|
588
510
|
hash
|
|
589
511
|
end
|
|
590
512
|
|
|
513
|
+
# Outputs non-array value in the form of hash
|
|
514
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
515
|
+
# @param [Object] value Any valid value
|
|
516
|
+
# @return [Hash] Returns the value in the form of hash
|
|
517
|
+
def _to_hash(value)
|
|
518
|
+
if value.is_a?(Array)
|
|
519
|
+
value.compact.map { |v| _to_hash(v) }
|
|
520
|
+
elsif value.is_a?(Hash)
|
|
521
|
+
{}.tap do |hash|
|
|
522
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
523
|
+
end
|
|
524
|
+
elsif value.respond_to? :to_hash
|
|
525
|
+
value.to_hash
|
|
526
|
+
else
|
|
527
|
+
value
|
|
528
|
+
end
|
|
529
|
+
end
|
|
591
530
|
end
|
|
592
|
-
|
|
593
531
|
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,14 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class
|
|
18
|
-
#
|
|
19
|
-
attr_accessor :
|
|
20
|
-
|
|
21
|
-
# Whether the service is healthy
|
|
22
|
-
attr_accessor :healthy
|
|
23
|
-
|
|
24
|
-
# Error reason if the service is unhealthy
|
|
25
|
-
attr_accessor :error_reason
|
|
17
|
+
class DisplayInfoResponse
|
|
18
|
+
# Array of display information for all connected displays
|
|
19
|
+
attr_accessor :displays
|
|
26
20
|
|
|
27
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
22
|
def self.attribute_map
|
|
29
23
|
{
|
|
30
|
-
:'
|
|
31
|
-
:'healthy' => :'healthy',
|
|
32
|
-
:'error_reason' => :'errorReason'
|
|
24
|
+
:'displays' => :'displays'
|
|
33
25
|
}
|
|
34
26
|
end
|
|
35
27
|
|
|
@@ -46,9 +38,7 @@ module DaytonaApiClient
|
|
|
46
38
|
# Attribute type mapping.
|
|
47
39
|
def self.openapi_types
|
|
48
40
|
{
|
|
49
|
-
:'
|
|
50
|
-
:'healthy' => :'Boolean',
|
|
51
|
-
:'error_reason' => :'String'
|
|
41
|
+
:'displays' => :'Array<Object>'
|
|
52
42
|
}
|
|
53
43
|
end
|
|
54
44
|
|
|
@@ -62,32 +52,24 @@ module DaytonaApiClient
|
|
|
62
52
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
63
53
|
def initialize(attributes = {})
|
|
64
54
|
if (!attributes.is_a?(Hash))
|
|
65
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::DisplayInfoResponse` initialize method"
|
|
66
56
|
end
|
|
67
57
|
|
|
68
58
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
69
59
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
70
60
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
71
61
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
72
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::DisplayInfoResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
73
63
|
end
|
|
74
64
|
h[k.to_sym] = v
|
|
75
65
|
}
|
|
76
66
|
|
|
77
|
-
if attributes.key?(:'
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
if attributes.key?(:'healthy')
|
|
84
|
-
self.healthy = attributes[:'healthy']
|
|
67
|
+
if attributes.key?(:'displays')
|
|
68
|
+
if (value = attributes[:'displays']).is_a?(Array)
|
|
69
|
+
self.displays = value
|
|
70
|
+
end
|
|
85
71
|
else
|
|
86
|
-
self.
|
|
87
|
-
end
|
|
88
|
-
|
|
89
|
-
if attributes.key?(:'error_reason')
|
|
90
|
-
self.error_reason = attributes[:'error_reason']
|
|
72
|
+
self.displays = nil
|
|
91
73
|
end
|
|
92
74
|
end
|
|
93
75
|
|
|
@@ -96,12 +78,8 @@ module DaytonaApiClient
|
|
|
96
78
|
def list_invalid_properties
|
|
97
79
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
98
80
|
invalid_properties = Array.new
|
|
99
|
-
if @
|
|
100
|
-
invalid_properties.push('invalid value for "
|
|
101
|
-
end
|
|
102
|
-
|
|
103
|
-
if @healthy.nil?
|
|
104
|
-
invalid_properties.push('invalid value for "healthy", healthy cannot be nil.')
|
|
81
|
+
if @displays.nil?
|
|
82
|
+
invalid_properties.push('invalid value for "displays", displays cannot be nil.')
|
|
105
83
|
end
|
|
106
84
|
|
|
107
85
|
invalid_properties
|
|
@@ -111,29 +89,18 @@ module DaytonaApiClient
|
|
|
111
89
|
# @return true if the model is valid
|
|
112
90
|
def valid?
|
|
113
91
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
114
|
-
return false if @
|
|
115
|
-
return false if @healthy.nil?
|
|
92
|
+
return false if @displays.nil?
|
|
116
93
|
true
|
|
117
94
|
end
|
|
118
95
|
|
|
119
96
|
# Custom attribute writer method with validation
|
|
120
|
-
# @param [Object]
|
|
121
|
-
def
|
|
122
|
-
if
|
|
123
|
-
fail ArgumentError, '
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
@service_name = service_name
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
# Custom attribute writer method with validation
|
|
130
|
-
# @param [Object] healthy Value to be assigned
|
|
131
|
-
def healthy=(healthy)
|
|
132
|
-
if healthy.nil?
|
|
133
|
-
fail ArgumentError, 'healthy cannot be nil'
|
|
97
|
+
# @param [Object] displays Value to be assigned
|
|
98
|
+
def displays=(displays)
|
|
99
|
+
if displays.nil?
|
|
100
|
+
fail ArgumentError, 'displays cannot be nil'
|
|
134
101
|
end
|
|
135
102
|
|
|
136
|
-
@
|
|
103
|
+
@displays = displays
|
|
137
104
|
end
|
|
138
105
|
|
|
139
106
|
# Checks equality by comparing each attribute.
|
|
@@ -141,9 +108,7 @@ module DaytonaApiClient
|
|
|
141
108
|
def ==(o)
|
|
142
109
|
return true if self.equal?(o)
|
|
143
110
|
self.class == o.class &&
|
|
144
|
-
|
|
145
|
-
healthy == o.healthy &&
|
|
146
|
-
error_reason == o.error_reason
|
|
111
|
+
displays == o.displays
|
|
147
112
|
end
|
|
148
113
|
|
|
149
114
|
# @see the `==` method
|
|
@@ -155,7 +120,7 @@ module DaytonaApiClient
|
|
|
155
120
|
# Calculates hash code according to all attributes.
|
|
156
121
|
# @return [Integer] Hash code
|
|
157
122
|
def hash
|
|
158
|
-
[
|
|
123
|
+
[displays].hash
|
|
159
124
|
end
|
|
160
125
|
|
|
161
126
|
# Builds the object from hash
|
|
@@ -181,6 +146,61 @@ module DaytonaApiClient
|
|
|
181
146
|
new(transformed_hash)
|
|
182
147
|
end
|
|
183
148
|
|
|
149
|
+
# Deserializes the data based on type
|
|
150
|
+
# @param string type Data type
|
|
151
|
+
# @param string value Value to be deserialized
|
|
152
|
+
# @return [Object] Deserialized data
|
|
153
|
+
def self._deserialize(type, value)
|
|
154
|
+
case type.to_sym
|
|
155
|
+
when :Time
|
|
156
|
+
Time.parse(value)
|
|
157
|
+
when :Date
|
|
158
|
+
Date.parse(value)
|
|
159
|
+
when :String
|
|
160
|
+
value.to_s
|
|
161
|
+
when :Integer
|
|
162
|
+
value.to_i
|
|
163
|
+
when :Float
|
|
164
|
+
value.to_f
|
|
165
|
+
when :Boolean
|
|
166
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
167
|
+
true
|
|
168
|
+
else
|
|
169
|
+
false
|
|
170
|
+
end
|
|
171
|
+
when :Object
|
|
172
|
+
# generic object (usually a Hash), return directly
|
|
173
|
+
value
|
|
174
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
175
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
176
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
177
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
178
|
+
k_type = Regexp.last_match[:k_type]
|
|
179
|
+
v_type = Regexp.last_match[:v_type]
|
|
180
|
+
{}.tap do |hash|
|
|
181
|
+
value.each do |k, v|
|
|
182
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
else # model
|
|
186
|
+
# models (e.g. Pet) or oneOf
|
|
187
|
+
klass = DaytonaApiClient.const_get(type)
|
|
188
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Returns the string representation of the object
|
|
193
|
+
# @return [String] String presentation of the object
|
|
194
|
+
def to_s
|
|
195
|
+
to_hash.to_s
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
|
200
|
+
def to_body
|
|
201
|
+
to_hash
|
|
202
|
+
end
|
|
203
|
+
|
|
184
204
|
# Returns the object in the form of hash
|
|
185
205
|
# @return [Hash] Returns the object in the form of hash
|
|
186
206
|
def to_hash
|
|
@@ -197,6 +217,22 @@ module DaytonaApiClient
|
|
|
197
217
|
hash
|
|
198
218
|
end
|
|
199
219
|
|
|
220
|
+
# Outputs non-array value in the form of hash
|
|
221
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
222
|
+
# @param [Object] value Any valid value
|
|
223
|
+
# @return [Hash] Returns the value in the form of hash
|
|
224
|
+
def _to_hash(value)
|
|
225
|
+
if value.is_a?(Array)
|
|
226
|
+
value.compact.map { |v| _to_hash(v) }
|
|
227
|
+
elsif value.is_a?(Hash)
|
|
228
|
+
{}.tap do |hash|
|
|
229
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
230
|
+
end
|
|
231
|
+
elsif value.respond_to? :to_hash
|
|
232
|
+
value.to_hash
|
|
233
|
+
else
|
|
234
|
+
value
|
|
235
|
+
end
|
|
236
|
+
end
|
|
200
237
|
end
|
|
201
|
-
|
|
202
238
|
end
|