daytona_api_client 0.184.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 +2 -2
- data/lib/daytona_api_client/api/api_keys_api.rb +2 -2
- data/lib/daytona_api_client/api/audit_api.rb +140 -10
- 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 +307 -1732
- 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 +74 -3
- 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 +121 -38
- 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 -54
- data/lib/daytona_api_client/models/display_info_response.rb +74 -3
- data/lib/daytona_api_client/models/docker_registry.rb +76 -5
- data/lib/daytona_api_client/models/download_files.rb +74 -3
- data/lib/daytona_api_client/models/execute_request.rb +74 -3
- data/lib/daytona_api_client/models/execute_response.rb +74 -3
- data/lib/daytona_api_client/models/file_info.rb +74 -3
- data/lib/daytona_api_client/models/file_status.rb +74 -3
- data/lib/daytona_api_client/models/git_add_request.rb +74 -3
- data/lib/daytona_api_client/models/git_branch_request.rb +74 -3
- data/lib/daytona_api_client/models/git_checkout_request.rb +74 -3
- data/lib/daytona_api_client/models/git_clone_request.rb +74 -3
- data/lib/daytona_api_client/models/git_commit_info.rb +74 -3
- data/lib/daytona_api_client/models/git_commit_request.rb +74 -3
- data/lib/daytona_api_client/models/git_commit_response.rb +74 -3
- data/lib/daytona_api_client/models/git_delete_branch_request.rb +74 -3
- data/lib/daytona_api_client/models/git_repo_request.rb +74 -3
- data/lib/daytona_api_client/models/git_status.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check200_response.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check200_response_info_value.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check503_response.rb +74 -3
- data/lib/daytona_api_client/models/keyboard_hotkey_request.rb +74 -3
- data/lib/daytona_api_client/models/keyboard_press_request.rb +74 -3
- data/lib/daytona_api_client/models/keyboard_type_request.rb +74 -3
- data/lib/daytona_api_client/models/list_branch_response.rb +74 -3
- data/lib/daytona_api_client/models/lsp_completion_params.rb +74 -3
- data/lib/daytona_api_client/models/lsp_document_request.rb +74 -3
- data/lib/daytona_api_client/models/lsp_location.rb +74 -3
- data/lib/daytona_api_client/models/lsp_server_request.rb +74 -3
- data/lib/daytona_api_client/models/lsp_symbol.rb +74 -3
- data/lib/daytona_api_client/models/match.rb +74 -3
- data/lib/daytona_api_client/models/mouse_click_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_click_response.rb +74 -3
- data/lib/daytona_api_client/models/mouse_drag_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_drag_response.rb +74 -3
- data/lib/daytona_api_client/models/mouse_move_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_move_response.rb +74 -3
- data/lib/daytona_api_client/models/mouse_position.rb +74 -3
- data/lib/daytona_api_client/models/mouse_scroll_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_scroll_response.rb +74 -3
- data/lib/daytona_api_client/models/oidc_config.rb +74 -3
- data/lib/daytona_api_client/models/organization.rb +159 -162
- data/lib/daytona_api_client/models/organization_invitation.rb +78 -7
- data/lib/daytona_api_client/models/organization_role.rb +74 -3
- data/lib/daytona_api_client/models/organization_sandbox_default_limited_network_egress.rb +74 -3
- data/lib/daytona_api_client/models/organization_suspension.rb +79 -10
- data/lib/daytona_api_client/models/organization_usage_overview.rb +220 -21
- data/lib/daytona_api_client/models/organization_user.rb +76 -5
- data/lib/daytona_api_client/models/paginated_audit_logs.rb +78 -17
- data/lib/daytona_api_client/models/{paginated_sandboxes_deprecated.rb → paginated_sandboxes.rb} +76 -5
- data/lib/daytona_api_client/models/paginated_snapshots.rb +74 -3
- data/lib/daytona_api_client/models/{paginated_jobs.rb → paginated_snapshots_dto.rb} +77 -6
- data/lib/daytona_api_client/models/port_preview_url.rb +88 -34
- data/lib/daytona_api_client/models/position.rb +74 -3
- data/lib/daytona_api_client/models/posthog_config.rb +74 -3
- data/lib/daytona_api_client/models/process_errors_response.rb +74 -3
- data/lib/daytona_api_client/models/process_logs_response.rb +74 -3
- data/lib/daytona_api_client/models/process_restart_response.rb +74 -3
- data/lib/daytona_api_client/models/process_status_response.rb +74 -3
- data/lib/daytona_api_client/models/project_dir_response.rb +74 -3
- data/lib/daytona_api_client/models/pty_create_request.rb +74 -3
- data/lib/daytona_api_client/models/pty_create_response.rb +74 -3
- data/lib/daytona_api_client/models/pty_list_response.rb +74 -3
- data/lib/daytona_api_client/models/pty_resize_request.rb +74 -3
- data/lib/daytona_api_client/models/pty_session_info.rb +74 -3
- data/lib/daytona_api_client/models/range.rb +74 -3
- data/lib/daytona_api_client/models/region.rb +78 -181
- data/lib/daytona_api_client/models/region_screenshot_response.rb +74 -3
- data/lib/daytona_api_client/models/registry_push_access_dto.rb +74 -3
- data/lib/daytona_api_client/models/replace_request.rb +74 -3
- data/lib/daytona_api_client/models/replace_result.rb +74 -3
- data/lib/daytona_api_client/models/runner.rb +215 -145
- 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 -127
- data/lib/daytona_api_client/models/sandbox_class.rb +6 -8
- data/lib/daytona_api_client/models/sandbox_desired_state.rb +3 -4
- data/lib/daytona_api_client/models/{create_region.rb → sandbox_info.rb} +113 -38
- data/lib/daytona_api_client/models/sandbox_labels.rb +74 -3
- data/lib/daytona_api_client/models/sandbox_state.rb +3 -7
- data/lib/daytona_api_client/models/sandbox_volume.rb +78 -17
- 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 -93
- 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 -180
- data/lib/daytona_api_client/version.rb +2 -2
- data/lib/daytona_api_client.rb +8 -55
- data/project.json +11 -42
- metadata +11 -62
- data/.gitignore +0 -39
- data/.openapi-generator/FILES +0 -212
- 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 -1449
- 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_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_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 -165
- data/lib/daytona_api_client/models/fork_sandbox.rb +0 -148
- data/lib/daytona_api_client/models/gpu_type.rb +0 -41
- data/lib/daytona_api_client/models/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 -53
- data/lib/daytona_api_client/models/list_sandboxes_response.rb +0 -180
- data/lib/daytona_api_client/models/log_entry.rb +0 -334
- data/lib/daytona_api_client/models/metric_data_point.rb +0 -192
- data/lib/daytona_api_client/models/metric_series.rb +0 -194
- data/lib/daytona_api_client/models/metrics_response.rb +0 -167
- data/lib/daytona_api_client/models/otel_config.rb +0 -178
- data/lib/daytona_api_client/models/paginated_logs.rb +0 -248
- data/lib/daytona_api_client/models/paginated_traces.rb +0 -248
- data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -167
- data/lib/daytona_api_client/models/rate_limit_config.rb +0 -178
- 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/runner_class.rb +0 -41
- data/lib/daytona_api_client/models/runner_full.rb +0 -747
- 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/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/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 -158
- 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,37 +33,18 @@ module DaytonaApiClient
|
|
|
27
33
|
|
|
28
34
|
attr_accessor :volume_quota
|
|
29
35
|
|
|
30
|
-
attr_accessor :authenticated_rate_limit
|
|
31
|
-
|
|
32
|
-
attr_accessor :sandbox_create_rate_limit
|
|
33
|
-
|
|
34
|
-
attr_accessor :sandbox_lifecycle_rate_limit
|
|
35
|
-
|
|
36
|
-
attr_accessor :authenticated_rate_limit_ttl_seconds
|
|
37
|
-
|
|
38
|
-
attr_accessor :sandbox_create_rate_limit_ttl_seconds
|
|
39
|
-
|
|
40
|
-
attr_accessor :sandbox_lifecycle_rate_limit_ttl_seconds
|
|
41
|
-
|
|
42
|
-
# Time in minutes before an unused snapshot is deactivated
|
|
43
|
-
attr_accessor :snapshot_deactivation_timeout_minutes
|
|
44
|
-
|
|
45
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
46
37
|
def self.attribute_map
|
|
47
38
|
{
|
|
39
|
+
:'total_cpu_quota' => :'totalCpuQuota',
|
|
40
|
+
:'total_memory_quota' => :'totalMemoryQuota',
|
|
41
|
+
:'total_disk_quota' => :'totalDiskQuota',
|
|
48
42
|
:'max_cpu_per_sandbox' => :'maxCpuPerSandbox',
|
|
49
43
|
:'max_memory_per_sandbox' => :'maxMemoryPerSandbox',
|
|
50
44
|
:'max_disk_per_sandbox' => :'maxDiskPerSandbox',
|
|
51
45
|
:'snapshot_quota' => :'snapshotQuota',
|
|
52
46
|
:'max_snapshot_size' => :'maxSnapshotSize',
|
|
53
|
-
:'volume_quota' => :'volumeQuota'
|
|
54
|
-
:'authenticated_rate_limit' => :'authenticatedRateLimit',
|
|
55
|
-
:'sandbox_create_rate_limit' => :'sandboxCreateRateLimit',
|
|
56
|
-
:'sandbox_lifecycle_rate_limit' => :'sandboxLifecycleRateLimit',
|
|
57
|
-
:'authenticated_rate_limit_ttl_seconds' => :'authenticatedRateLimitTtlSeconds',
|
|
58
|
-
:'sandbox_create_rate_limit_ttl_seconds' => :'sandboxCreateRateLimitTtlSeconds',
|
|
59
|
-
:'sandbox_lifecycle_rate_limit_ttl_seconds' => :'sandboxLifecycleRateLimitTtlSeconds',
|
|
60
|
-
:'snapshot_deactivation_timeout_minutes' => :'snapshotDeactivationTimeoutMinutes'
|
|
47
|
+
:'volume_quota' => :'volumeQuota'
|
|
61
48
|
}
|
|
62
49
|
end
|
|
63
50
|
|
|
@@ -74,38 +61,30 @@ module DaytonaApiClient
|
|
|
74
61
|
# Attribute type mapping.
|
|
75
62
|
def self.openapi_types
|
|
76
63
|
{
|
|
64
|
+
:'total_cpu_quota' => :'Float',
|
|
65
|
+
:'total_memory_quota' => :'Float',
|
|
66
|
+
:'total_disk_quota' => :'Float',
|
|
77
67
|
:'max_cpu_per_sandbox' => :'Float',
|
|
78
68
|
:'max_memory_per_sandbox' => :'Float',
|
|
79
69
|
:'max_disk_per_sandbox' => :'Float',
|
|
80
70
|
:'snapshot_quota' => :'Float',
|
|
81
71
|
:'max_snapshot_size' => :'Float',
|
|
82
|
-
:'volume_quota' => :'Float'
|
|
83
|
-
:'authenticated_rate_limit' => :'Float',
|
|
84
|
-
:'sandbox_create_rate_limit' => :'Float',
|
|
85
|
-
:'sandbox_lifecycle_rate_limit' => :'Float',
|
|
86
|
-
:'authenticated_rate_limit_ttl_seconds' => :'Float',
|
|
87
|
-
:'sandbox_create_rate_limit_ttl_seconds' => :'Float',
|
|
88
|
-
:'sandbox_lifecycle_rate_limit_ttl_seconds' => :'Float',
|
|
89
|
-
:'snapshot_deactivation_timeout_minutes' => :'Float'
|
|
72
|
+
:'volume_quota' => :'Float'
|
|
90
73
|
}
|
|
91
74
|
end
|
|
92
75
|
|
|
93
76
|
# List of attributes with nullable: true
|
|
94
77
|
def self.openapi_nullable
|
|
95
78
|
Set.new([
|
|
79
|
+
:'total_cpu_quota',
|
|
80
|
+
:'total_memory_quota',
|
|
81
|
+
:'total_disk_quota',
|
|
96
82
|
:'max_cpu_per_sandbox',
|
|
97
83
|
:'max_memory_per_sandbox',
|
|
98
84
|
:'max_disk_per_sandbox',
|
|
99
85
|
:'snapshot_quota',
|
|
100
86
|
:'max_snapshot_size',
|
|
101
|
-
:'volume_quota'
|
|
102
|
-
:'authenticated_rate_limit',
|
|
103
|
-
:'sandbox_create_rate_limit',
|
|
104
|
-
:'sandbox_lifecycle_rate_limit',
|
|
105
|
-
:'authenticated_rate_limit_ttl_seconds',
|
|
106
|
-
:'sandbox_create_rate_limit_ttl_seconds',
|
|
107
|
-
:'sandbox_lifecycle_rate_limit_ttl_seconds',
|
|
108
|
-
:'snapshot_deactivation_timeout_minutes'
|
|
87
|
+
:'volume_quota'
|
|
109
88
|
])
|
|
110
89
|
end
|
|
111
90
|
|
|
@@ -125,6 +104,24 @@ module DaytonaApiClient
|
|
|
125
104
|
h[k.to_sym] = v
|
|
126
105
|
}
|
|
127
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
|
+
|
|
128
125
|
if attributes.key?(:'max_cpu_per_sandbox')
|
|
129
126
|
self.max_cpu_per_sandbox = attributes[:'max_cpu_per_sandbox']
|
|
130
127
|
else
|
|
@@ -160,48 +157,6 @@ module DaytonaApiClient
|
|
|
160
157
|
else
|
|
161
158
|
self.volume_quota = nil
|
|
162
159
|
end
|
|
163
|
-
|
|
164
|
-
if attributes.key?(:'authenticated_rate_limit')
|
|
165
|
-
self.authenticated_rate_limit = attributes[:'authenticated_rate_limit']
|
|
166
|
-
else
|
|
167
|
-
self.authenticated_rate_limit = nil
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
if attributes.key?(:'sandbox_create_rate_limit')
|
|
171
|
-
self.sandbox_create_rate_limit = attributes[:'sandbox_create_rate_limit']
|
|
172
|
-
else
|
|
173
|
-
self.sandbox_create_rate_limit = nil
|
|
174
|
-
end
|
|
175
|
-
|
|
176
|
-
if attributes.key?(:'sandbox_lifecycle_rate_limit')
|
|
177
|
-
self.sandbox_lifecycle_rate_limit = attributes[:'sandbox_lifecycle_rate_limit']
|
|
178
|
-
else
|
|
179
|
-
self.sandbox_lifecycle_rate_limit = nil
|
|
180
|
-
end
|
|
181
|
-
|
|
182
|
-
if attributes.key?(:'authenticated_rate_limit_ttl_seconds')
|
|
183
|
-
self.authenticated_rate_limit_ttl_seconds = attributes[:'authenticated_rate_limit_ttl_seconds']
|
|
184
|
-
else
|
|
185
|
-
self.authenticated_rate_limit_ttl_seconds = nil
|
|
186
|
-
end
|
|
187
|
-
|
|
188
|
-
if attributes.key?(:'sandbox_create_rate_limit_ttl_seconds')
|
|
189
|
-
self.sandbox_create_rate_limit_ttl_seconds = attributes[:'sandbox_create_rate_limit_ttl_seconds']
|
|
190
|
-
else
|
|
191
|
-
self.sandbox_create_rate_limit_ttl_seconds = nil
|
|
192
|
-
end
|
|
193
|
-
|
|
194
|
-
if attributes.key?(:'sandbox_lifecycle_rate_limit_ttl_seconds')
|
|
195
|
-
self.sandbox_lifecycle_rate_limit_ttl_seconds = attributes[:'sandbox_lifecycle_rate_limit_ttl_seconds']
|
|
196
|
-
else
|
|
197
|
-
self.sandbox_lifecycle_rate_limit_ttl_seconds = nil
|
|
198
|
-
end
|
|
199
|
-
|
|
200
|
-
if attributes.key?(:'snapshot_deactivation_timeout_minutes')
|
|
201
|
-
self.snapshot_deactivation_timeout_minutes = attributes[:'snapshot_deactivation_timeout_minutes']
|
|
202
|
-
else
|
|
203
|
-
self.snapshot_deactivation_timeout_minutes = nil
|
|
204
|
-
end
|
|
205
160
|
end
|
|
206
161
|
|
|
207
162
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -224,19 +179,15 @@ module DaytonaApiClient
|
|
|
224
179
|
def ==(o)
|
|
225
180
|
return true if self.equal?(o)
|
|
226
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 &&
|
|
227
185
|
max_cpu_per_sandbox == o.max_cpu_per_sandbox &&
|
|
228
186
|
max_memory_per_sandbox == o.max_memory_per_sandbox &&
|
|
229
187
|
max_disk_per_sandbox == o.max_disk_per_sandbox &&
|
|
230
188
|
snapshot_quota == o.snapshot_quota &&
|
|
231
189
|
max_snapshot_size == o.max_snapshot_size &&
|
|
232
|
-
volume_quota == o.volume_quota
|
|
233
|
-
authenticated_rate_limit == o.authenticated_rate_limit &&
|
|
234
|
-
sandbox_create_rate_limit == o.sandbox_create_rate_limit &&
|
|
235
|
-
sandbox_lifecycle_rate_limit == o.sandbox_lifecycle_rate_limit &&
|
|
236
|
-
authenticated_rate_limit_ttl_seconds == o.authenticated_rate_limit_ttl_seconds &&
|
|
237
|
-
sandbox_create_rate_limit_ttl_seconds == o.sandbox_create_rate_limit_ttl_seconds &&
|
|
238
|
-
sandbox_lifecycle_rate_limit_ttl_seconds == o.sandbox_lifecycle_rate_limit_ttl_seconds &&
|
|
239
|
-
snapshot_deactivation_timeout_minutes == o.snapshot_deactivation_timeout_minutes
|
|
190
|
+
volume_quota == o.volume_quota
|
|
240
191
|
end
|
|
241
192
|
|
|
242
193
|
# @see the `==` method
|
|
@@ -248,7 +199,7 @@ module DaytonaApiClient
|
|
|
248
199
|
# Calculates hash code according to all attributes.
|
|
249
200
|
# @return [Integer] Hash code
|
|
250
201
|
def hash
|
|
251
|
-
[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
|
|
252
203
|
end
|
|
253
204
|
|
|
254
205
|
# Builds the object from hash
|
|
@@ -274,6 +225,61 @@ module DaytonaApiClient
|
|
|
274
225
|
new(transformed_hash)
|
|
275
226
|
end
|
|
276
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
|
+
|
|
277
283
|
# Returns the object in the form of hash
|
|
278
284
|
# @return [Hash] Returns the object in the form of hash
|
|
279
285
|
def to_hash
|
|
@@ -290,6 +296,22 @@ module DaytonaApiClient
|
|
|
290
296
|
hash
|
|
291
297
|
end
|
|
292
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
|
|
293
316
|
end
|
|
294
|
-
|
|
295
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
|
|
@@ -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 User
|
|
17
|
+
class User
|
|
18
18
|
# User ID
|
|
19
19
|
attr_accessor :id
|
|
20
20
|
|
|
@@ -254,6 +254,61 @@ module DaytonaApiClient
|
|
|
254
254
|
new(transformed_hash)
|
|
255
255
|
end
|
|
256
256
|
|
|
257
|
+
# Deserializes the data based on type
|
|
258
|
+
# @param string type Data type
|
|
259
|
+
# @param string value Value to be deserialized
|
|
260
|
+
# @return [Object] Deserialized data
|
|
261
|
+
def self._deserialize(type, value)
|
|
262
|
+
case type.to_sym
|
|
263
|
+
when :Time
|
|
264
|
+
Time.parse(value)
|
|
265
|
+
when :Date
|
|
266
|
+
Date.parse(value)
|
|
267
|
+
when :String
|
|
268
|
+
value.to_s
|
|
269
|
+
when :Integer
|
|
270
|
+
value.to_i
|
|
271
|
+
when :Float
|
|
272
|
+
value.to_f
|
|
273
|
+
when :Boolean
|
|
274
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
275
|
+
true
|
|
276
|
+
else
|
|
277
|
+
false
|
|
278
|
+
end
|
|
279
|
+
when :Object
|
|
280
|
+
# generic object (usually a Hash), return directly
|
|
281
|
+
value
|
|
282
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
283
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
284
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
285
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
286
|
+
k_type = Regexp.last_match[:k_type]
|
|
287
|
+
v_type = Regexp.last_match[:v_type]
|
|
288
|
+
{}.tap do |hash|
|
|
289
|
+
value.each do |k, v|
|
|
290
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
291
|
+
end
|
|
292
|
+
end
|
|
293
|
+
else # model
|
|
294
|
+
# models (e.g. Pet) or oneOf
|
|
295
|
+
klass = DaytonaApiClient.const_get(type)
|
|
296
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
297
|
+
end
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
# Returns the string representation of the object
|
|
301
|
+
# @return [String] String presentation of the object
|
|
302
|
+
def to_s
|
|
303
|
+
to_hash.to_s
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
307
|
+
# @return [Hash] Returns the object in the form of hash
|
|
308
|
+
def to_body
|
|
309
|
+
to_hash
|
|
310
|
+
end
|
|
311
|
+
|
|
257
312
|
# Returns the object in the form of hash
|
|
258
313
|
# @return [Hash] Returns the object in the form of hash
|
|
259
314
|
def to_hash
|
|
@@ -270,6 +325,22 @@ module DaytonaApiClient
|
|
|
270
325
|
hash
|
|
271
326
|
end
|
|
272
327
|
|
|
328
|
+
# Outputs non-array value in the form of hash
|
|
329
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
330
|
+
# @param [Object] value Any valid value
|
|
331
|
+
# @return [Hash] Returns the value in the form of hash
|
|
332
|
+
def _to_hash(value)
|
|
333
|
+
if value.is_a?(Array)
|
|
334
|
+
value.compact.map { |v| _to_hash(v) }
|
|
335
|
+
elsif value.is_a?(Hash)
|
|
336
|
+
{}.tap do |hash|
|
|
337
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
338
|
+
end
|
|
339
|
+
elsif value.respond_to? :to_hash
|
|
340
|
+
value.to_hash
|
|
341
|
+
else
|
|
342
|
+
value
|
|
343
|
+
end
|
|
344
|
+
end
|
|
273
345
|
end
|
|
274
|
-
|
|
275
346
|
end
|