daytona_api_client 0.195.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +9 -0
- data/Gemfile.lock +101 -0
- data/daytona_api_client.gemspec +4 -4
- data/lib/daytona_api_client/api/api_keys_api.rb +2 -2
- data/lib/daytona_api_client/api/audit_api.rb +140 -40
- data/lib/daytona_api_client/api/config_api.rb +1 -1
- data/lib/daytona_api_client/api/docker_registry_api.rb +67 -6
- data/lib/daytona_api_client/api/health_api.rb +3 -54
- data/lib/daytona_api_client/api/object_storage_api.rb +1 -1
- data/lib/daytona_api_client/api/organizations_api.rb +155 -1075
- data/lib/daytona_api_client/api/preview_api.rb +8 -77
- data/lib/daytona_api_client/api/runners_api.rb +22 -412
- data/lib/daytona_api_client/api/sandbox_api.rb +346 -1901
- data/lib/daytona_api_client/api/snapshots_api.rb +113 -39
- data/lib/daytona_api_client/api/toolbox_api.rb +741 -741
- data/lib/daytona_api_client/api/users_api.rb +239 -2
- data/lib/daytona_api_client/api/volumes_api.rb +2 -2
- data/lib/daytona_api_client/api/webhooks_api.rb +164 -27
- data/lib/daytona_api_client/api/workspace_api.rb +955 -0
- data/lib/daytona_api_client/api_client.rb +4 -8
- data/lib/daytona_api_client/api_error.rb +1 -1
- data/lib/daytona_api_client/configuration.rb +2 -5
- data/lib/daytona_api_client/models/account_provider.rb +74 -3
- data/lib/daytona_api_client/models/announcement.rb +74 -3
- data/lib/daytona_api_client/models/api_key_list.rb +74 -3
- data/lib/daytona_api_client/models/api_key_response.rb +74 -3
- data/lib/daytona_api_client/models/audit_log.rb +75 -22
- data/lib/daytona_api_client/models/build_info.rb +78 -34
- data/lib/daytona_api_client/models/command.rb +74 -3
- data/lib/daytona_api_client/models/completion_context.rb +74 -3
- data/lib/daytona_api_client/models/completion_item.rb +74 -3
- data/lib/daytona_api_client/models/completion_list.rb +74 -3
- data/lib/daytona_api_client/models/compressed_screenshot_response.rb +74 -3
- data/lib/daytona_api_client/models/computer_use_start_response.rb +74 -3
- data/lib/daytona_api_client/models/computer_use_status_response.rb +76 -5
- data/lib/daytona_api_client/models/computer_use_stop_response.rb +74 -3
- data/lib/daytona_api_client/models/create_api_key.rb +75 -4
- data/lib/daytona_api_client/models/create_audit_log.rb +350 -0
- data/lib/daytona_api_client/models/create_build_info.rb +74 -3
- data/lib/daytona_api_client/models/create_docker_registry.rb +139 -7
- data/lib/daytona_api_client/models/create_linked_account.rb +74 -3
- data/lib/daytona_api_client/models/create_organization.rb +78 -34
- data/lib/daytona_api_client/models/create_organization_invitation.rb +76 -5
- data/lib/daytona_api_client/models/create_organization_quota.rb +78 -17
- data/lib/daytona_api_client/models/create_organization_role.rb +74 -3
- data/lib/daytona_api_client/models/create_runner.rb +386 -43
- data/lib/daytona_api_client/models/create_sandbox.rb +117 -56
- data/lib/daytona_api_client/models/create_session_request.rb +74 -3
- data/lib/daytona_api_client/models/create_snapshot.rb +88 -61
- data/lib/daytona_api_client/models/create_user.rb +77 -15
- data/lib/daytona_api_client/models/create_volume.rb +74 -3
- data/lib/daytona_api_client/models/create_workspace.rb +411 -0
- data/lib/daytona_api_client/models/daytona_configuration.rb +78 -64
- data/lib/daytona_api_client/models/display_info_response.rb +74 -3
- data/lib/daytona_api_client/models/docker_registry.rb +76 -5
- data/lib/daytona_api_client/models/download_files.rb +74 -3
- data/lib/daytona_api_client/models/execute_request.rb +74 -3
- data/lib/daytona_api_client/models/execute_response.rb +74 -3
- data/lib/daytona_api_client/models/file_info.rb +74 -3
- data/lib/daytona_api_client/models/file_status.rb +74 -3
- data/lib/daytona_api_client/models/git_add_request.rb +74 -3
- data/lib/daytona_api_client/models/git_branch_request.rb +74 -3
- data/lib/daytona_api_client/models/git_checkout_request.rb +74 -3
- data/lib/daytona_api_client/models/git_clone_request.rb +74 -3
- data/lib/daytona_api_client/models/git_commit_info.rb +74 -3
- data/lib/daytona_api_client/models/git_commit_request.rb +74 -3
- data/lib/daytona_api_client/models/git_commit_response.rb +74 -3
- data/lib/daytona_api_client/models/git_delete_branch_request.rb +74 -3
- data/lib/daytona_api_client/models/git_repo_request.rb +74 -3
- data/lib/daytona_api_client/models/git_status.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check200_response.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check200_response_info_value.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check503_response.rb +74 -3
- data/lib/daytona_api_client/models/keyboard_hotkey_request.rb +74 -3
- data/lib/daytona_api_client/models/keyboard_press_request.rb +74 -3
- data/lib/daytona_api_client/models/keyboard_type_request.rb +74 -3
- data/lib/daytona_api_client/models/list_branch_response.rb +74 -3
- data/lib/daytona_api_client/models/lsp_completion_params.rb +74 -3
- data/lib/daytona_api_client/models/lsp_document_request.rb +74 -3
- data/lib/daytona_api_client/models/lsp_location.rb +74 -3
- data/lib/daytona_api_client/models/lsp_server_request.rb +74 -3
- data/lib/daytona_api_client/models/lsp_symbol.rb +74 -3
- data/lib/daytona_api_client/models/match.rb +74 -3
- data/lib/daytona_api_client/models/mouse_click_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_click_response.rb +74 -3
- data/lib/daytona_api_client/models/mouse_drag_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_drag_response.rb +74 -3
- data/lib/daytona_api_client/models/mouse_move_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_move_response.rb +74 -3
- data/lib/daytona_api_client/models/mouse_position.rb +74 -3
- data/lib/daytona_api_client/models/mouse_scroll_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_scroll_response.rb +74 -3
- data/lib/daytona_api_client/models/oidc_config.rb +74 -3
- data/lib/daytona_api_client/models/organization.rb +159 -216
- data/lib/daytona_api_client/models/organization_invitation.rb +78 -7
- data/lib/daytona_api_client/models/organization_role.rb +74 -3
- data/lib/daytona_api_client/models/organization_sandbox_default_limited_network_egress.rb +74 -3
- data/lib/daytona_api_client/models/organization_suspension.rb +79 -10
- data/lib/daytona_api_client/models/organization_usage_overview.rb +220 -21
- data/lib/daytona_api_client/models/organization_user.rb +76 -5
- data/lib/daytona_api_client/models/paginated_audit_logs.rb +78 -17
- data/lib/daytona_api_client/models/{paginated_sandboxes_deprecated.rb → paginated_sandboxes.rb} +76 -5
- data/lib/daytona_api_client/models/paginated_snapshots.rb +74 -3
- data/lib/daytona_api_client/models/{paginated_jobs.rb → paginated_snapshots_dto.rb} +77 -6
- data/lib/daytona_api_client/models/port_preview_url.rb +88 -34
- data/lib/daytona_api_client/models/position.rb +74 -3
- data/lib/daytona_api_client/models/posthog_config.rb +74 -3
- data/lib/daytona_api_client/models/process_errors_response.rb +74 -3
- data/lib/daytona_api_client/models/process_logs_response.rb +74 -3
- data/lib/daytona_api_client/models/process_restart_response.rb +74 -3
- data/lib/daytona_api_client/models/process_status_response.rb +74 -3
- data/lib/daytona_api_client/models/project_dir_response.rb +74 -3
- data/lib/daytona_api_client/models/pty_create_request.rb +74 -3
- data/lib/daytona_api_client/models/pty_create_response.rb +74 -3
- data/lib/daytona_api_client/models/pty_list_response.rb +74 -3
- data/lib/daytona_api_client/models/pty_resize_request.rb +74 -3
- data/lib/daytona_api_client/models/pty_session_info.rb +74 -3
- data/lib/daytona_api_client/models/range.rb +74 -3
- data/lib/daytona_api_client/models/region.rb +78 -181
- data/lib/daytona_api_client/models/region_screenshot_response.rb +74 -3
- data/lib/daytona_api_client/models/registry_push_access_dto.rb +74 -3
- data/lib/daytona_api_client/models/replace_request.rb +74 -3
- data/lib/daytona_api_client/models/replace_result.rb +74 -3
- data/lib/daytona_api_client/models/runner.rb +215 -155
- data/lib/daytona_api_client/models/runner_snapshot_dto.rb +91 -3
- data/lib/daytona_api_client/models/runner_state.rb +3 -4
- data/lib/daytona_api_client/models/sandbox.rb +104 -137
- data/lib/daytona_api_client/models/sandbox_class.rb +6 -8
- data/lib/daytona_api_client/models/sandbox_desired_state.rb +3 -5
- data/lib/daytona_api_client/models/{admin_create_organization.rb → sandbox_info.rb} +102 -48
- data/lib/daytona_api_client/models/sandbox_labels.rb +74 -3
- data/lib/daytona_api_client/models/sandbox_state.rb +3 -10
- data/lib/daytona_api_client/models/sandbox_volume.rb +79 -18
- data/lib/daytona_api_client/models/screenshot_response.rb +74 -3
- data/lib/daytona_api_client/models/search_files_response.rb +74 -3
- data/lib/daytona_api_client/models/send_webhook_dto.rb +75 -26
- data/lib/daytona_api_client/models/session.rb +74 -3
- data/lib/daytona_api_client/models/session_execute_request.rb +74 -3
- data/lib/daytona_api_client/models/session_execute_response.rb +74 -3
- data/lib/daytona_api_client/models/set_snapshot_general_status_dto.rb +74 -3
- data/lib/daytona_api_client/models/snapshot_dto.rb +78 -71
- data/lib/daytona_api_client/models/snapshot_state.rb +6 -4
- data/lib/daytona_api_client/models/ssh_access_dto.rb +78 -34
- data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +98 -7
- data/lib/daytona_api_client/models/storage_access_dto.rb +74 -3
- data/lib/daytona_api_client/models/update_docker_registry.rb +74 -3
- data/lib/daytona_api_client/models/update_organization_invitation.rb +76 -5
- data/lib/daytona_api_client/models/update_organization_member_access.rb +76 -5
- data/lib/daytona_api_client/models/update_organization_quota.rb +115 -131
- data/lib/daytona_api_client/models/update_organization_role.rb +74 -3
- data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +80 -29
- data/lib/daytona_api_client/models/user.rb +74 -3
- data/lib/daytona_api_client/models/user_home_dir_response.rb +74 -3
- data/lib/daytona_api_client/models/user_public_key.rb +74 -3
- data/lib/daytona_api_client/models/volume_dto.rb +74 -3
- data/lib/daytona_api_client/models/volume_state.rb +3 -4
- data/lib/daytona_api_client/models/webhook_app_portal_access.rb +75 -31
- data/lib/daytona_api_client/models/{admin_get_webhook_status200_response.rb → webhook_controller_get_status200_response.rb} +76 -5
- data/lib/daytona_api_client/models/webhook_initialization_status.rb +74 -3
- data/lib/daytona_api_client/models/windows_response.rb +74 -3
- data/lib/daytona_api_client/models/work_dir_response.rb +74 -3
- data/lib/daytona_api_client/models/{sandbox_list_item.rb → workspace.rb} +344 -168
- data/lib/daytona_api_client/version.rb +2 -2
- data/lib/daytona_api_client.rb +8 -65
- data/project.json +13 -38
- metadata +15 -76
- data/.gitignore +0 -39
- data/.openapi-generator/FILES +0 -222
- data/.openapi-generator/VERSION +0 -1
- data/.openapi-generator-ignore +0 -31
- data/.rspec +0 -2
- data/.rubocop.yml +0 -148
- data/fix-gemspec.sh +0 -11
- data/lib/daytona_api_client/api/admin_api.rb +0 -1545
- 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_model_base.rb +0 -88
- data/lib/daytona_api_client/models/admin_create_runner.rb +0 -326
- data/lib/daytona_api_client/models/create_organization_region_quota.rb +0 -372
- data/lib/daytona_api_client/models/create_region.rb +0 -198
- data/lib/daytona_api_client/models/create_region_response.rb +0 -209
- data/lib/daytona_api_client/models/create_runner_response.rb +0 -192
- data/lib/daytona_api_client/models/create_sandbox_snapshot.rb +0 -177
- data/lib/daytona_api_client/models/create_secret.rb +0 -214
- 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 -44
- data/lib/daytona_api_client/models/int_filter.rb +0 -222
- data/lib/daytona_api_client/models/job.rb +0 -366
- data/lib/daytona_api_client/models/job_status.rb +0 -43
- data/lib/daytona_api_client/models/job_type.rb +0 -54
- data/lib/daytona_api_client/models/list_sandboxes_response.rb +0 -180
- data/lib/daytona_api_client/models/list_secrets_response.rb +0 -207
- data/lib/daytona_api_client/models/log_entry.rb +0 -334
- data/lib/daytona_api_client/models/metric_data_point.rb +0 -192
- data/lib/daytona_api_client/models/metric_series.rb +0 -194
- data/lib/daytona_api_client/models/metrics_response.rb +0 -167
- data/lib/daytona_api_client/models/otel_config.rb +0 -188
- data/lib/daytona_api_client/models/paginated_logs.rb +0 -248
- data/lib/daytona_api_client/models/paginated_traces.rb +0 -248
- data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -167
- data/lib/daytona_api_client/models/rate_limit_config.rb +0 -188
- data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -158
- data/lib/daytona_api_client/models/regenerate_api_key_response.rb +0 -165
- data/lib/daytona_api_client/models/region_quota.rb +0 -437
- data/lib/daytona_api_client/models/region_type.rb +0 -42
- data/lib/daytona_api_client/models/region_usage_overview.rb +0 -515
- data/lib/daytona_api_client/models/resize_sandbox.rb +0 -225
- data/lib/daytona_api_client/models/resolve_sandbox_secrets200_response_inner.rb +0 -176
- data/lib/daytona_api_client/models/runner_class.rb +0 -40
- data/lib/daytona_api_client/models/runner_full.rb +0 -757
- data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -482
- data/lib/daytona_api_client/models/runner_healthcheck.rb +0 -217
- data/lib/daytona_api_client/models/runner_service_health.rb +0 -202
- data/lib/daytona_api_client/models/sandbox_list_sort_direction.rb +0 -41
- data/lib/daytona_api_client/models/sandbox_list_sort_field.rb +0 -45
- data/lib/daytona_api_client/models/secret.rb +0 -312
- data/lib/daytona_api_client/models/signed_port_preview_url.rb +0 -246
- data/lib/daytona_api_client/models/snapshot_manager_credentials.rb +0 -192
- data/lib/daytona_api_client/models/string_filter.rb +0 -182
- data/lib/daytona_api_client/models/toolbox_proxy_url.rb +0 -165
- data/lib/daytona_api_client/models/trace_span.rb +0 -332
- data/lib/daytona_api_client/models/trace_summary.rb +0 -310
- data/lib/daytona_api_client/models/update_job_status.rb +0 -207
- data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -165
- data/lib/daytona_api_client/models/update_organization_region_quota.rb +0 -299
- data/lib/daytona_api_client/models/update_region.rb +0 -171
- data/lib/daytona_api_client/models/update_sandbox_network_settings.rb +0 -168
- data/lib/daytona_api_client/models/update_secret.rb +0 -170
- data/lib/daytona_api_client/models/url.rb +0 -165
- data/lib/daytona_api_client/models/webhook_event.rb +0 -46
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
|
7
7
|
Contact: support@daytona.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.12.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,7 +14,13 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class UpdateOrganizationQuota
|
|
17
|
+
class UpdateOrganizationQuota
|
|
18
|
+
attr_accessor :total_cpu_quota
|
|
19
|
+
|
|
20
|
+
attr_accessor :total_memory_quota
|
|
21
|
+
|
|
22
|
+
attr_accessor :total_disk_quota
|
|
23
|
+
|
|
18
24
|
attr_accessor :max_cpu_per_sandbox
|
|
19
25
|
|
|
20
26
|
attr_accessor :max_memory_per_sandbox
|
|
@@ -27,48 +33,18 @@ module DaytonaApiClient
|
|
|
27
33
|
|
|
28
34
|
attr_accessor :volume_quota
|
|
29
35
|
|
|
30
|
-
attr_accessor :secret_quota
|
|
31
|
-
|
|
32
|
-
# Maximum number of secrets that can be mounted to a single sandbox
|
|
33
|
-
attr_accessor :max_secrets_per_sandbox
|
|
34
|
-
|
|
35
|
-
attr_accessor :authenticated_rate_limit
|
|
36
|
-
|
|
37
|
-
attr_accessor :sandbox_create_rate_limit
|
|
38
|
-
|
|
39
|
-
attr_accessor :sandbox_lifecycle_rate_limit
|
|
40
|
-
|
|
41
|
-
attr_accessor :authenticated_rate_limit_ttl_seconds
|
|
42
|
-
|
|
43
|
-
attr_accessor :sandbox_create_rate_limit_ttl_seconds
|
|
44
|
-
|
|
45
|
-
attr_accessor :sandbox_lifecycle_rate_limit_ttl_seconds
|
|
46
|
-
|
|
47
|
-
# Time in minutes before an unused snapshot is deactivated
|
|
48
|
-
attr_accessor :snapshot_deactivation_timeout_minutes
|
|
49
|
-
|
|
50
|
-
# Maximum number of snapshots an organization can process (building or pulling) concurrently. Excess are queued. <= 0 means unlimited.
|
|
51
|
-
attr_accessor :max_concurrent_snapshot_processing
|
|
52
|
-
|
|
53
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
54
37
|
def self.attribute_map
|
|
55
38
|
{
|
|
39
|
+
:'total_cpu_quota' => :'totalCpuQuota',
|
|
40
|
+
:'total_memory_quota' => :'totalMemoryQuota',
|
|
41
|
+
:'total_disk_quota' => :'totalDiskQuota',
|
|
56
42
|
:'max_cpu_per_sandbox' => :'maxCpuPerSandbox',
|
|
57
43
|
:'max_memory_per_sandbox' => :'maxMemoryPerSandbox',
|
|
58
44
|
:'max_disk_per_sandbox' => :'maxDiskPerSandbox',
|
|
59
45
|
:'snapshot_quota' => :'snapshotQuota',
|
|
60
46
|
:'max_snapshot_size' => :'maxSnapshotSize',
|
|
61
|
-
:'volume_quota' => :'volumeQuota'
|
|
62
|
-
:'secret_quota' => :'secretQuota',
|
|
63
|
-
:'max_secrets_per_sandbox' => :'maxSecretsPerSandbox',
|
|
64
|
-
:'authenticated_rate_limit' => :'authenticatedRateLimit',
|
|
65
|
-
:'sandbox_create_rate_limit' => :'sandboxCreateRateLimit',
|
|
66
|
-
:'sandbox_lifecycle_rate_limit' => :'sandboxLifecycleRateLimit',
|
|
67
|
-
:'authenticated_rate_limit_ttl_seconds' => :'authenticatedRateLimitTtlSeconds',
|
|
68
|
-
:'sandbox_create_rate_limit_ttl_seconds' => :'sandboxCreateRateLimitTtlSeconds',
|
|
69
|
-
:'sandbox_lifecycle_rate_limit_ttl_seconds' => :'sandboxLifecycleRateLimitTtlSeconds',
|
|
70
|
-
:'snapshot_deactivation_timeout_minutes' => :'snapshotDeactivationTimeoutMinutes',
|
|
71
|
-
:'max_concurrent_snapshot_processing' => :'maxConcurrentSnapshotProcessing'
|
|
47
|
+
:'volume_quota' => :'volumeQuota'
|
|
72
48
|
}
|
|
73
49
|
end
|
|
74
50
|
|
|
@@ -85,44 +61,30 @@ module DaytonaApiClient
|
|
|
85
61
|
# Attribute type mapping.
|
|
86
62
|
def self.openapi_types
|
|
87
63
|
{
|
|
64
|
+
:'total_cpu_quota' => :'Float',
|
|
65
|
+
:'total_memory_quota' => :'Float',
|
|
66
|
+
:'total_disk_quota' => :'Float',
|
|
88
67
|
:'max_cpu_per_sandbox' => :'Float',
|
|
89
68
|
:'max_memory_per_sandbox' => :'Float',
|
|
90
69
|
:'max_disk_per_sandbox' => :'Float',
|
|
91
70
|
:'snapshot_quota' => :'Float',
|
|
92
71
|
:'max_snapshot_size' => :'Float',
|
|
93
|
-
:'volume_quota' => :'Float'
|
|
94
|
-
:'secret_quota' => :'Float',
|
|
95
|
-
:'max_secrets_per_sandbox' => :'Float',
|
|
96
|
-
:'authenticated_rate_limit' => :'Float',
|
|
97
|
-
:'sandbox_create_rate_limit' => :'Float',
|
|
98
|
-
:'sandbox_lifecycle_rate_limit' => :'Float',
|
|
99
|
-
:'authenticated_rate_limit_ttl_seconds' => :'Float',
|
|
100
|
-
:'sandbox_create_rate_limit_ttl_seconds' => :'Float',
|
|
101
|
-
:'sandbox_lifecycle_rate_limit_ttl_seconds' => :'Float',
|
|
102
|
-
:'snapshot_deactivation_timeout_minutes' => :'Float',
|
|
103
|
-
:'max_concurrent_snapshot_processing' => :'Float'
|
|
72
|
+
:'volume_quota' => :'Float'
|
|
104
73
|
}
|
|
105
74
|
end
|
|
106
75
|
|
|
107
76
|
# List of attributes with nullable: true
|
|
108
77
|
def self.openapi_nullable
|
|
109
78
|
Set.new([
|
|
79
|
+
:'total_cpu_quota',
|
|
80
|
+
:'total_memory_quota',
|
|
81
|
+
:'total_disk_quota',
|
|
110
82
|
:'max_cpu_per_sandbox',
|
|
111
83
|
:'max_memory_per_sandbox',
|
|
112
84
|
:'max_disk_per_sandbox',
|
|
113
85
|
:'snapshot_quota',
|
|
114
86
|
:'max_snapshot_size',
|
|
115
|
-
:'volume_quota'
|
|
116
|
-
:'secret_quota',
|
|
117
|
-
:'max_secrets_per_sandbox',
|
|
118
|
-
:'authenticated_rate_limit',
|
|
119
|
-
:'sandbox_create_rate_limit',
|
|
120
|
-
:'sandbox_lifecycle_rate_limit',
|
|
121
|
-
:'authenticated_rate_limit_ttl_seconds',
|
|
122
|
-
:'sandbox_create_rate_limit_ttl_seconds',
|
|
123
|
-
:'sandbox_lifecycle_rate_limit_ttl_seconds',
|
|
124
|
-
:'snapshot_deactivation_timeout_minutes',
|
|
125
|
-
:'max_concurrent_snapshot_processing'
|
|
87
|
+
:'volume_quota'
|
|
126
88
|
])
|
|
127
89
|
end
|
|
128
90
|
|
|
@@ -142,6 +104,24 @@ module DaytonaApiClient
|
|
|
142
104
|
h[k.to_sym] = v
|
|
143
105
|
}
|
|
144
106
|
|
|
107
|
+
if attributes.key?(:'total_cpu_quota')
|
|
108
|
+
self.total_cpu_quota = attributes[:'total_cpu_quota']
|
|
109
|
+
else
|
|
110
|
+
self.total_cpu_quota = nil
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'total_memory_quota')
|
|
114
|
+
self.total_memory_quota = attributes[:'total_memory_quota']
|
|
115
|
+
else
|
|
116
|
+
self.total_memory_quota = nil
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'total_disk_quota')
|
|
120
|
+
self.total_disk_quota = attributes[:'total_disk_quota']
|
|
121
|
+
else
|
|
122
|
+
self.total_disk_quota = nil
|
|
123
|
+
end
|
|
124
|
+
|
|
145
125
|
if attributes.key?(:'max_cpu_per_sandbox')
|
|
146
126
|
self.max_cpu_per_sandbox = attributes[:'max_cpu_per_sandbox']
|
|
147
127
|
else
|
|
@@ -177,66 +157,6 @@ module DaytonaApiClient
|
|
|
177
157
|
else
|
|
178
158
|
self.volume_quota = nil
|
|
179
159
|
end
|
|
180
|
-
|
|
181
|
-
if attributes.key?(:'secret_quota')
|
|
182
|
-
self.secret_quota = attributes[:'secret_quota']
|
|
183
|
-
else
|
|
184
|
-
self.secret_quota = nil
|
|
185
|
-
end
|
|
186
|
-
|
|
187
|
-
if attributes.key?(:'max_secrets_per_sandbox')
|
|
188
|
-
self.max_secrets_per_sandbox = attributes[:'max_secrets_per_sandbox']
|
|
189
|
-
else
|
|
190
|
-
self.max_secrets_per_sandbox = nil
|
|
191
|
-
end
|
|
192
|
-
|
|
193
|
-
if attributes.key?(:'authenticated_rate_limit')
|
|
194
|
-
self.authenticated_rate_limit = attributes[:'authenticated_rate_limit']
|
|
195
|
-
else
|
|
196
|
-
self.authenticated_rate_limit = nil
|
|
197
|
-
end
|
|
198
|
-
|
|
199
|
-
if attributes.key?(:'sandbox_create_rate_limit')
|
|
200
|
-
self.sandbox_create_rate_limit = attributes[:'sandbox_create_rate_limit']
|
|
201
|
-
else
|
|
202
|
-
self.sandbox_create_rate_limit = nil
|
|
203
|
-
end
|
|
204
|
-
|
|
205
|
-
if attributes.key?(:'sandbox_lifecycle_rate_limit')
|
|
206
|
-
self.sandbox_lifecycle_rate_limit = attributes[:'sandbox_lifecycle_rate_limit']
|
|
207
|
-
else
|
|
208
|
-
self.sandbox_lifecycle_rate_limit = nil
|
|
209
|
-
end
|
|
210
|
-
|
|
211
|
-
if attributes.key?(:'authenticated_rate_limit_ttl_seconds')
|
|
212
|
-
self.authenticated_rate_limit_ttl_seconds = attributes[:'authenticated_rate_limit_ttl_seconds']
|
|
213
|
-
else
|
|
214
|
-
self.authenticated_rate_limit_ttl_seconds = nil
|
|
215
|
-
end
|
|
216
|
-
|
|
217
|
-
if attributes.key?(:'sandbox_create_rate_limit_ttl_seconds')
|
|
218
|
-
self.sandbox_create_rate_limit_ttl_seconds = attributes[:'sandbox_create_rate_limit_ttl_seconds']
|
|
219
|
-
else
|
|
220
|
-
self.sandbox_create_rate_limit_ttl_seconds = nil
|
|
221
|
-
end
|
|
222
|
-
|
|
223
|
-
if attributes.key?(:'sandbox_lifecycle_rate_limit_ttl_seconds')
|
|
224
|
-
self.sandbox_lifecycle_rate_limit_ttl_seconds = attributes[:'sandbox_lifecycle_rate_limit_ttl_seconds']
|
|
225
|
-
else
|
|
226
|
-
self.sandbox_lifecycle_rate_limit_ttl_seconds = nil
|
|
227
|
-
end
|
|
228
|
-
|
|
229
|
-
if attributes.key?(:'snapshot_deactivation_timeout_minutes')
|
|
230
|
-
self.snapshot_deactivation_timeout_minutes = attributes[:'snapshot_deactivation_timeout_minutes']
|
|
231
|
-
else
|
|
232
|
-
self.snapshot_deactivation_timeout_minutes = nil
|
|
233
|
-
end
|
|
234
|
-
|
|
235
|
-
if attributes.key?(:'max_concurrent_snapshot_processing')
|
|
236
|
-
self.max_concurrent_snapshot_processing = attributes[:'max_concurrent_snapshot_processing']
|
|
237
|
-
else
|
|
238
|
-
self.max_concurrent_snapshot_processing = nil
|
|
239
|
-
end
|
|
240
160
|
end
|
|
241
161
|
|
|
242
162
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -259,22 +179,15 @@ module DaytonaApiClient
|
|
|
259
179
|
def ==(o)
|
|
260
180
|
return true if self.equal?(o)
|
|
261
181
|
self.class == o.class &&
|
|
182
|
+
total_cpu_quota == o.total_cpu_quota &&
|
|
183
|
+
total_memory_quota == o.total_memory_quota &&
|
|
184
|
+
total_disk_quota == o.total_disk_quota &&
|
|
262
185
|
max_cpu_per_sandbox == o.max_cpu_per_sandbox &&
|
|
263
186
|
max_memory_per_sandbox == o.max_memory_per_sandbox &&
|
|
264
187
|
max_disk_per_sandbox == o.max_disk_per_sandbox &&
|
|
265
188
|
snapshot_quota == o.snapshot_quota &&
|
|
266
189
|
max_snapshot_size == o.max_snapshot_size &&
|
|
267
|
-
volume_quota == o.volume_quota
|
|
268
|
-
secret_quota == o.secret_quota &&
|
|
269
|
-
max_secrets_per_sandbox == o.max_secrets_per_sandbox &&
|
|
270
|
-
authenticated_rate_limit == o.authenticated_rate_limit &&
|
|
271
|
-
sandbox_create_rate_limit == o.sandbox_create_rate_limit &&
|
|
272
|
-
sandbox_lifecycle_rate_limit == o.sandbox_lifecycle_rate_limit &&
|
|
273
|
-
authenticated_rate_limit_ttl_seconds == o.authenticated_rate_limit_ttl_seconds &&
|
|
274
|
-
sandbox_create_rate_limit_ttl_seconds == o.sandbox_create_rate_limit_ttl_seconds &&
|
|
275
|
-
sandbox_lifecycle_rate_limit_ttl_seconds == o.sandbox_lifecycle_rate_limit_ttl_seconds &&
|
|
276
|
-
snapshot_deactivation_timeout_minutes == o.snapshot_deactivation_timeout_minutes &&
|
|
277
|
-
max_concurrent_snapshot_processing == o.max_concurrent_snapshot_processing
|
|
190
|
+
volume_quota == o.volume_quota
|
|
278
191
|
end
|
|
279
192
|
|
|
280
193
|
# @see the `==` method
|
|
@@ -286,7 +199,7 @@ module DaytonaApiClient
|
|
|
286
199
|
# Calculates hash code according to all attributes.
|
|
287
200
|
# @return [Integer] Hash code
|
|
288
201
|
def hash
|
|
289
|
-
[max_cpu_per_sandbox, max_memory_per_sandbox, max_disk_per_sandbox, snapshot_quota, max_snapshot_size, volume_quota
|
|
202
|
+
[total_cpu_quota, total_memory_quota, total_disk_quota, max_cpu_per_sandbox, max_memory_per_sandbox, max_disk_per_sandbox, snapshot_quota, max_snapshot_size, volume_quota].hash
|
|
290
203
|
end
|
|
291
204
|
|
|
292
205
|
# Builds the object from hash
|
|
@@ -312,6 +225,61 @@ module DaytonaApiClient
|
|
|
312
225
|
new(transformed_hash)
|
|
313
226
|
end
|
|
314
227
|
|
|
228
|
+
# Deserializes the data based on type
|
|
229
|
+
# @param string type Data type
|
|
230
|
+
# @param string value Value to be deserialized
|
|
231
|
+
# @return [Object] Deserialized data
|
|
232
|
+
def self._deserialize(type, value)
|
|
233
|
+
case type.to_sym
|
|
234
|
+
when :Time
|
|
235
|
+
Time.parse(value)
|
|
236
|
+
when :Date
|
|
237
|
+
Date.parse(value)
|
|
238
|
+
when :String
|
|
239
|
+
value.to_s
|
|
240
|
+
when :Integer
|
|
241
|
+
value.to_i
|
|
242
|
+
when :Float
|
|
243
|
+
value.to_f
|
|
244
|
+
when :Boolean
|
|
245
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
246
|
+
true
|
|
247
|
+
else
|
|
248
|
+
false
|
|
249
|
+
end
|
|
250
|
+
when :Object
|
|
251
|
+
# generic object (usually a Hash), return directly
|
|
252
|
+
value
|
|
253
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
254
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
255
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
256
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
257
|
+
k_type = Regexp.last_match[:k_type]
|
|
258
|
+
v_type = Regexp.last_match[:v_type]
|
|
259
|
+
{}.tap do |hash|
|
|
260
|
+
value.each do |k, v|
|
|
261
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
else # model
|
|
265
|
+
# models (e.g. Pet) or oneOf
|
|
266
|
+
klass = DaytonaApiClient.const_get(type)
|
|
267
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# Returns the string representation of the object
|
|
272
|
+
# @return [String] String presentation of the object
|
|
273
|
+
def to_s
|
|
274
|
+
to_hash.to_s
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
278
|
+
# @return [Hash] Returns the object in the form of hash
|
|
279
|
+
def to_body
|
|
280
|
+
to_hash
|
|
281
|
+
end
|
|
282
|
+
|
|
315
283
|
# Returns the object in the form of hash
|
|
316
284
|
# @return [Hash] Returns the object in the form of hash
|
|
317
285
|
def to_hash
|
|
@@ -328,6 +296,22 @@ module DaytonaApiClient
|
|
|
328
296
|
hash
|
|
329
297
|
end
|
|
330
298
|
|
|
299
|
+
# Outputs non-array value in the form of hash
|
|
300
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
301
|
+
# @param [Object] value Any valid value
|
|
302
|
+
# @return [Hash] Returns the value in the form of hash
|
|
303
|
+
def _to_hash(value)
|
|
304
|
+
if value.is_a?(Array)
|
|
305
|
+
value.compact.map { |v| _to_hash(v) }
|
|
306
|
+
elsif value.is_a?(Hash)
|
|
307
|
+
{}.tap do |hash|
|
|
308
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
309
|
+
end
|
|
310
|
+
elsif value.respond_to? :to_hash
|
|
311
|
+
value.to_hash
|
|
312
|
+
else
|
|
313
|
+
value
|
|
314
|
+
end
|
|
315
|
+
end
|
|
331
316
|
end
|
|
332
|
-
|
|
333
317
|
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 UpdateOrganizationRole
|
|
17
|
+
class UpdateOrganizationRole
|
|
18
18
|
# The name of the role
|
|
19
19
|
attr_accessor :name
|
|
20
20
|
|
|
@@ -212,6 +212,61 @@ module DaytonaApiClient
|
|
|
212
212
|
new(transformed_hash)
|
|
213
213
|
end
|
|
214
214
|
|
|
215
|
+
# Deserializes the data based on type
|
|
216
|
+
# @param string type Data type
|
|
217
|
+
# @param string value Value to be deserialized
|
|
218
|
+
# @return [Object] Deserialized data
|
|
219
|
+
def self._deserialize(type, value)
|
|
220
|
+
case type.to_sym
|
|
221
|
+
when :Time
|
|
222
|
+
Time.parse(value)
|
|
223
|
+
when :Date
|
|
224
|
+
Date.parse(value)
|
|
225
|
+
when :String
|
|
226
|
+
value.to_s
|
|
227
|
+
when :Integer
|
|
228
|
+
value.to_i
|
|
229
|
+
when :Float
|
|
230
|
+
value.to_f
|
|
231
|
+
when :Boolean
|
|
232
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
233
|
+
true
|
|
234
|
+
else
|
|
235
|
+
false
|
|
236
|
+
end
|
|
237
|
+
when :Object
|
|
238
|
+
# generic object (usually a Hash), return directly
|
|
239
|
+
value
|
|
240
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
241
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
242
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
243
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
244
|
+
k_type = Regexp.last_match[:k_type]
|
|
245
|
+
v_type = Regexp.last_match[:v_type]
|
|
246
|
+
{}.tap do |hash|
|
|
247
|
+
value.each do |k, v|
|
|
248
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
else # model
|
|
252
|
+
# models (e.g. Pet) or oneOf
|
|
253
|
+
klass = DaytonaApiClient.const_get(type)
|
|
254
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
255
|
+
end
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# Returns the string representation of the object
|
|
259
|
+
# @return [String] String presentation of the object
|
|
260
|
+
def to_s
|
|
261
|
+
to_hash.to_s
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
265
|
+
# @return [Hash] Returns the object in the form of hash
|
|
266
|
+
def to_body
|
|
267
|
+
to_hash
|
|
268
|
+
end
|
|
269
|
+
|
|
215
270
|
# Returns the object in the form of hash
|
|
216
271
|
# @return [Hash] Returns the object in the form of hash
|
|
217
272
|
def to_hash
|
|
@@ -228,6 +283,22 @@ module DaytonaApiClient
|
|
|
228
283
|
hash
|
|
229
284
|
end
|
|
230
285
|
|
|
286
|
+
# Outputs non-array value in the form of hash
|
|
287
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
288
|
+
# @param [Object] value Any valid value
|
|
289
|
+
# @return [Hash] Returns the value in the form of hash
|
|
290
|
+
def _to_hash(value)
|
|
291
|
+
if value.is_a?(Array)
|
|
292
|
+
value.compact.map { |v| _to_hash(v) }
|
|
293
|
+
elsif value.is_a?(Hash)
|
|
294
|
+
{}.tap do |hash|
|
|
295
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
296
|
+
end
|
|
297
|
+
elsif value.respond_to? :to_hash
|
|
298
|
+
value.to_hash
|
|
299
|
+
else
|
|
300
|
+
value
|
|
301
|
+
end
|
|
302
|
+
end
|
|
231
303
|
end
|
|
232
|
-
|
|
233
304
|
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,16 +14,10 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class UpdateSandboxStateDto
|
|
17
|
+
class UpdateSandboxStateDto
|
|
18
18
|
# The new state for the sandbox
|
|
19
19
|
attr_accessor :state
|
|
20
20
|
|
|
21
|
-
# Optional error message when reporting an error state
|
|
22
|
-
attr_accessor :error_reason
|
|
23
|
-
|
|
24
|
-
# Whether the sandbox is recoverable
|
|
25
|
-
attr_accessor :recoverable
|
|
26
|
-
|
|
27
21
|
class EnumAttributeValidator
|
|
28
22
|
attr_reader :datatype
|
|
29
23
|
attr_reader :allowable_values
|
|
@@ -49,9 +43,7 @@ module DaytonaApiClient
|
|
|
49
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
50
44
|
def self.attribute_map
|
|
51
45
|
{
|
|
52
|
-
:'state' => :'state'
|
|
53
|
-
:'error_reason' => :'errorReason',
|
|
54
|
-
:'recoverable' => :'recoverable'
|
|
46
|
+
:'state' => :'state'
|
|
55
47
|
}
|
|
56
48
|
end
|
|
57
49
|
|
|
@@ -68,9 +60,7 @@ module DaytonaApiClient
|
|
|
68
60
|
# Attribute type mapping.
|
|
69
61
|
def self.openapi_types
|
|
70
62
|
{
|
|
71
|
-
:'state' => :'String'
|
|
72
|
-
:'error_reason' => :'String',
|
|
73
|
-
:'recoverable' => :'Boolean'
|
|
63
|
+
:'state' => :'String'
|
|
74
64
|
}
|
|
75
65
|
end
|
|
76
66
|
|
|
@@ -101,14 +91,6 @@ module DaytonaApiClient
|
|
|
101
91
|
else
|
|
102
92
|
self.state = nil
|
|
103
93
|
end
|
|
104
|
-
|
|
105
|
-
if attributes.key?(:'error_reason')
|
|
106
|
-
self.error_reason = attributes[:'error_reason']
|
|
107
|
-
end
|
|
108
|
-
|
|
109
|
-
if attributes.key?(:'recoverable')
|
|
110
|
-
self.recoverable = attributes[:'recoverable']
|
|
111
|
-
end
|
|
112
94
|
end
|
|
113
95
|
|
|
114
96
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -128,7 +110,7 @@ module DaytonaApiClient
|
|
|
128
110
|
def valid?
|
|
129
111
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
130
112
|
return false if @state.nil?
|
|
131
|
-
state_validator = EnumAttributeValidator.new('String', ["creating", "restoring", "destroyed", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving"
|
|
113
|
+
state_validator = EnumAttributeValidator.new('String', ["creating", "restoring", "destroyed", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving"])
|
|
132
114
|
return false unless state_validator.valid?(@state)
|
|
133
115
|
true
|
|
134
116
|
end
|
|
@@ -136,7 +118,7 @@ module DaytonaApiClient
|
|
|
136
118
|
# Custom attribute writer method checking allowed values (enum).
|
|
137
119
|
# @param [Object] state Object to be assigned
|
|
138
120
|
def state=(state)
|
|
139
|
-
validator = EnumAttributeValidator.new('String', ["creating", "restoring", "destroyed", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving"
|
|
121
|
+
validator = EnumAttributeValidator.new('String', ["creating", "restoring", "destroyed", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving"])
|
|
140
122
|
unless validator.valid?(state)
|
|
141
123
|
fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
|
|
142
124
|
end
|
|
@@ -148,9 +130,7 @@ module DaytonaApiClient
|
|
|
148
130
|
def ==(o)
|
|
149
131
|
return true if self.equal?(o)
|
|
150
132
|
self.class == o.class &&
|
|
151
|
-
state == o.state
|
|
152
|
-
error_reason == o.error_reason &&
|
|
153
|
-
recoverable == o.recoverable
|
|
133
|
+
state == o.state
|
|
154
134
|
end
|
|
155
135
|
|
|
156
136
|
# @see the `==` method
|
|
@@ -162,7 +142,7 @@ module DaytonaApiClient
|
|
|
162
142
|
# Calculates hash code according to all attributes.
|
|
163
143
|
# @return [Integer] Hash code
|
|
164
144
|
def hash
|
|
165
|
-
[state
|
|
145
|
+
[state].hash
|
|
166
146
|
end
|
|
167
147
|
|
|
168
148
|
# Builds the object from hash
|
|
@@ -188,6 +168,61 @@ module DaytonaApiClient
|
|
|
188
168
|
new(transformed_hash)
|
|
189
169
|
end
|
|
190
170
|
|
|
171
|
+
# Deserializes the data based on type
|
|
172
|
+
# @param string type Data type
|
|
173
|
+
# @param string value Value to be deserialized
|
|
174
|
+
# @return [Object] Deserialized data
|
|
175
|
+
def self._deserialize(type, value)
|
|
176
|
+
case type.to_sym
|
|
177
|
+
when :Time
|
|
178
|
+
Time.parse(value)
|
|
179
|
+
when :Date
|
|
180
|
+
Date.parse(value)
|
|
181
|
+
when :String
|
|
182
|
+
value.to_s
|
|
183
|
+
when :Integer
|
|
184
|
+
value.to_i
|
|
185
|
+
when :Float
|
|
186
|
+
value.to_f
|
|
187
|
+
when :Boolean
|
|
188
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
189
|
+
true
|
|
190
|
+
else
|
|
191
|
+
false
|
|
192
|
+
end
|
|
193
|
+
when :Object
|
|
194
|
+
# generic object (usually a Hash), return directly
|
|
195
|
+
value
|
|
196
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
197
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
198
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
199
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
200
|
+
k_type = Regexp.last_match[:k_type]
|
|
201
|
+
v_type = Regexp.last_match[:v_type]
|
|
202
|
+
{}.tap do |hash|
|
|
203
|
+
value.each do |k, v|
|
|
204
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
else # model
|
|
208
|
+
# models (e.g. Pet) or oneOf
|
|
209
|
+
klass = DaytonaApiClient.const_get(type)
|
|
210
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Returns the string representation of the object
|
|
215
|
+
# @return [String] String presentation of the object
|
|
216
|
+
def to_s
|
|
217
|
+
to_hash.to_s
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
221
|
+
# @return [Hash] Returns the object in the form of hash
|
|
222
|
+
def to_body
|
|
223
|
+
to_hash
|
|
224
|
+
end
|
|
225
|
+
|
|
191
226
|
# Returns the object in the form of hash
|
|
192
227
|
# @return [Hash] Returns the object in the form of hash
|
|
193
228
|
def to_hash
|
|
@@ -204,6 +239,22 @@ module DaytonaApiClient
|
|
|
204
239
|
hash
|
|
205
240
|
end
|
|
206
241
|
|
|
242
|
+
# Outputs non-array value in the form of hash
|
|
243
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
244
|
+
# @param [Object] value Any valid value
|
|
245
|
+
# @return [Hash] Returns the value in the form of hash
|
|
246
|
+
def _to_hash(value)
|
|
247
|
+
if value.is_a?(Array)
|
|
248
|
+
value.compact.map { |v| _to_hash(v) }
|
|
249
|
+
elsif value.is_a?(Hash)
|
|
250
|
+
{}.tap do |hash|
|
|
251
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
252
|
+
end
|
|
253
|
+
elsif value.respond_to? :to_hash
|
|
254
|
+
value.to_hash
|
|
255
|
+
else
|
|
256
|
+
value
|
|
257
|
+
end
|
|
258
|
+
end
|
|
207
259
|
end
|
|
208
|
-
|
|
209
260
|
end
|