daytona_api_client 0.192.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 -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 -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/{create_secret.rb → sandbox_info.rb} +112 -53
- 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 -106
- 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 -63
- data/project.json +13 -38
- metadata +13 -72
- data/.gitignore +0 -39
- data/.openapi-generator/FILES +0 -220
- 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 -1479
- 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 -350
- 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/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 -41
- 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/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 -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,41 +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
|
-
# Maximum number of snapshots an organization can process (building or pulling) concurrently. Excess are queued. <= 0 means unlimited.
|
|
46
|
-
attr_accessor :max_concurrent_snapshot_processing
|
|
47
|
-
|
|
48
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
49
37
|
def self.attribute_map
|
|
50
38
|
{
|
|
39
|
+
:'total_cpu_quota' => :'totalCpuQuota',
|
|
40
|
+
:'total_memory_quota' => :'totalMemoryQuota',
|
|
41
|
+
:'total_disk_quota' => :'totalDiskQuota',
|
|
51
42
|
:'max_cpu_per_sandbox' => :'maxCpuPerSandbox',
|
|
52
43
|
:'max_memory_per_sandbox' => :'maxMemoryPerSandbox',
|
|
53
44
|
:'max_disk_per_sandbox' => :'maxDiskPerSandbox',
|
|
54
45
|
:'snapshot_quota' => :'snapshotQuota',
|
|
55
46
|
:'max_snapshot_size' => :'maxSnapshotSize',
|
|
56
|
-
:'volume_quota' => :'volumeQuota'
|
|
57
|
-
:'authenticated_rate_limit' => :'authenticatedRateLimit',
|
|
58
|
-
:'sandbox_create_rate_limit' => :'sandboxCreateRateLimit',
|
|
59
|
-
:'sandbox_lifecycle_rate_limit' => :'sandboxLifecycleRateLimit',
|
|
60
|
-
:'authenticated_rate_limit_ttl_seconds' => :'authenticatedRateLimitTtlSeconds',
|
|
61
|
-
:'sandbox_create_rate_limit_ttl_seconds' => :'sandboxCreateRateLimitTtlSeconds',
|
|
62
|
-
:'sandbox_lifecycle_rate_limit_ttl_seconds' => :'sandboxLifecycleRateLimitTtlSeconds',
|
|
63
|
-
:'snapshot_deactivation_timeout_minutes' => :'snapshotDeactivationTimeoutMinutes',
|
|
64
|
-
:'max_concurrent_snapshot_processing' => :'maxConcurrentSnapshotProcessing'
|
|
47
|
+
:'volume_quota' => :'volumeQuota'
|
|
65
48
|
}
|
|
66
49
|
end
|
|
67
50
|
|
|
@@ -78,40 +61,30 @@ module DaytonaApiClient
|
|
|
78
61
|
# Attribute type mapping.
|
|
79
62
|
def self.openapi_types
|
|
80
63
|
{
|
|
64
|
+
:'total_cpu_quota' => :'Float',
|
|
65
|
+
:'total_memory_quota' => :'Float',
|
|
66
|
+
:'total_disk_quota' => :'Float',
|
|
81
67
|
:'max_cpu_per_sandbox' => :'Float',
|
|
82
68
|
:'max_memory_per_sandbox' => :'Float',
|
|
83
69
|
:'max_disk_per_sandbox' => :'Float',
|
|
84
70
|
:'snapshot_quota' => :'Float',
|
|
85
71
|
:'max_snapshot_size' => :'Float',
|
|
86
|
-
:'volume_quota' => :'Float'
|
|
87
|
-
:'authenticated_rate_limit' => :'Float',
|
|
88
|
-
:'sandbox_create_rate_limit' => :'Float',
|
|
89
|
-
:'sandbox_lifecycle_rate_limit' => :'Float',
|
|
90
|
-
:'authenticated_rate_limit_ttl_seconds' => :'Float',
|
|
91
|
-
:'sandbox_create_rate_limit_ttl_seconds' => :'Float',
|
|
92
|
-
:'sandbox_lifecycle_rate_limit_ttl_seconds' => :'Float',
|
|
93
|
-
:'snapshot_deactivation_timeout_minutes' => :'Float',
|
|
94
|
-
:'max_concurrent_snapshot_processing' => :'Float'
|
|
72
|
+
:'volume_quota' => :'Float'
|
|
95
73
|
}
|
|
96
74
|
end
|
|
97
75
|
|
|
98
76
|
# List of attributes with nullable: true
|
|
99
77
|
def self.openapi_nullable
|
|
100
78
|
Set.new([
|
|
79
|
+
:'total_cpu_quota',
|
|
80
|
+
:'total_memory_quota',
|
|
81
|
+
:'total_disk_quota',
|
|
101
82
|
:'max_cpu_per_sandbox',
|
|
102
83
|
:'max_memory_per_sandbox',
|
|
103
84
|
:'max_disk_per_sandbox',
|
|
104
85
|
:'snapshot_quota',
|
|
105
86
|
:'max_snapshot_size',
|
|
106
|
-
:'volume_quota'
|
|
107
|
-
:'authenticated_rate_limit',
|
|
108
|
-
:'sandbox_create_rate_limit',
|
|
109
|
-
:'sandbox_lifecycle_rate_limit',
|
|
110
|
-
:'authenticated_rate_limit_ttl_seconds',
|
|
111
|
-
:'sandbox_create_rate_limit_ttl_seconds',
|
|
112
|
-
:'sandbox_lifecycle_rate_limit_ttl_seconds',
|
|
113
|
-
:'snapshot_deactivation_timeout_minutes',
|
|
114
|
-
:'max_concurrent_snapshot_processing'
|
|
87
|
+
:'volume_quota'
|
|
115
88
|
])
|
|
116
89
|
end
|
|
117
90
|
|
|
@@ -131,6 +104,24 @@ module DaytonaApiClient
|
|
|
131
104
|
h[k.to_sym] = v
|
|
132
105
|
}
|
|
133
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
|
+
|
|
134
125
|
if attributes.key?(:'max_cpu_per_sandbox')
|
|
135
126
|
self.max_cpu_per_sandbox = attributes[:'max_cpu_per_sandbox']
|
|
136
127
|
else
|
|
@@ -166,54 +157,6 @@ module DaytonaApiClient
|
|
|
166
157
|
else
|
|
167
158
|
self.volume_quota = nil
|
|
168
159
|
end
|
|
169
|
-
|
|
170
|
-
if attributes.key?(:'authenticated_rate_limit')
|
|
171
|
-
self.authenticated_rate_limit = attributes[:'authenticated_rate_limit']
|
|
172
|
-
else
|
|
173
|
-
self.authenticated_rate_limit = nil
|
|
174
|
-
end
|
|
175
|
-
|
|
176
|
-
if attributes.key?(:'sandbox_create_rate_limit')
|
|
177
|
-
self.sandbox_create_rate_limit = attributes[:'sandbox_create_rate_limit']
|
|
178
|
-
else
|
|
179
|
-
self.sandbox_create_rate_limit = nil
|
|
180
|
-
end
|
|
181
|
-
|
|
182
|
-
if attributes.key?(:'sandbox_lifecycle_rate_limit')
|
|
183
|
-
self.sandbox_lifecycle_rate_limit = attributes[:'sandbox_lifecycle_rate_limit']
|
|
184
|
-
else
|
|
185
|
-
self.sandbox_lifecycle_rate_limit = nil
|
|
186
|
-
end
|
|
187
|
-
|
|
188
|
-
if attributes.key?(:'authenticated_rate_limit_ttl_seconds')
|
|
189
|
-
self.authenticated_rate_limit_ttl_seconds = attributes[:'authenticated_rate_limit_ttl_seconds']
|
|
190
|
-
else
|
|
191
|
-
self.authenticated_rate_limit_ttl_seconds = nil
|
|
192
|
-
end
|
|
193
|
-
|
|
194
|
-
if attributes.key?(:'sandbox_create_rate_limit_ttl_seconds')
|
|
195
|
-
self.sandbox_create_rate_limit_ttl_seconds = attributes[:'sandbox_create_rate_limit_ttl_seconds']
|
|
196
|
-
else
|
|
197
|
-
self.sandbox_create_rate_limit_ttl_seconds = nil
|
|
198
|
-
end
|
|
199
|
-
|
|
200
|
-
if attributes.key?(:'sandbox_lifecycle_rate_limit_ttl_seconds')
|
|
201
|
-
self.sandbox_lifecycle_rate_limit_ttl_seconds = attributes[:'sandbox_lifecycle_rate_limit_ttl_seconds']
|
|
202
|
-
else
|
|
203
|
-
self.sandbox_lifecycle_rate_limit_ttl_seconds = nil
|
|
204
|
-
end
|
|
205
|
-
|
|
206
|
-
if attributes.key?(:'snapshot_deactivation_timeout_minutes')
|
|
207
|
-
self.snapshot_deactivation_timeout_minutes = attributes[:'snapshot_deactivation_timeout_minutes']
|
|
208
|
-
else
|
|
209
|
-
self.snapshot_deactivation_timeout_minutes = nil
|
|
210
|
-
end
|
|
211
|
-
|
|
212
|
-
if attributes.key?(:'max_concurrent_snapshot_processing')
|
|
213
|
-
self.max_concurrent_snapshot_processing = attributes[:'max_concurrent_snapshot_processing']
|
|
214
|
-
else
|
|
215
|
-
self.max_concurrent_snapshot_processing = nil
|
|
216
|
-
end
|
|
217
160
|
end
|
|
218
161
|
|
|
219
162
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -236,20 +179,15 @@ module DaytonaApiClient
|
|
|
236
179
|
def ==(o)
|
|
237
180
|
return true if self.equal?(o)
|
|
238
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 &&
|
|
239
185
|
max_cpu_per_sandbox == o.max_cpu_per_sandbox &&
|
|
240
186
|
max_memory_per_sandbox == o.max_memory_per_sandbox &&
|
|
241
187
|
max_disk_per_sandbox == o.max_disk_per_sandbox &&
|
|
242
188
|
snapshot_quota == o.snapshot_quota &&
|
|
243
189
|
max_snapshot_size == o.max_snapshot_size &&
|
|
244
|
-
volume_quota == o.volume_quota
|
|
245
|
-
authenticated_rate_limit == o.authenticated_rate_limit &&
|
|
246
|
-
sandbox_create_rate_limit == o.sandbox_create_rate_limit &&
|
|
247
|
-
sandbox_lifecycle_rate_limit == o.sandbox_lifecycle_rate_limit &&
|
|
248
|
-
authenticated_rate_limit_ttl_seconds == o.authenticated_rate_limit_ttl_seconds &&
|
|
249
|
-
sandbox_create_rate_limit_ttl_seconds == o.sandbox_create_rate_limit_ttl_seconds &&
|
|
250
|
-
sandbox_lifecycle_rate_limit_ttl_seconds == o.sandbox_lifecycle_rate_limit_ttl_seconds &&
|
|
251
|
-
snapshot_deactivation_timeout_minutes == o.snapshot_deactivation_timeout_minutes &&
|
|
252
|
-
max_concurrent_snapshot_processing == o.max_concurrent_snapshot_processing
|
|
190
|
+
volume_quota == o.volume_quota
|
|
253
191
|
end
|
|
254
192
|
|
|
255
193
|
# @see the `==` method
|
|
@@ -261,7 +199,7 @@ module DaytonaApiClient
|
|
|
261
199
|
# Calculates hash code according to all attributes.
|
|
262
200
|
# @return [Integer] Hash code
|
|
263
201
|
def hash
|
|
264
|
-
[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
|
|
265
203
|
end
|
|
266
204
|
|
|
267
205
|
# Builds the object from hash
|
|
@@ -287,6 +225,61 @@ module DaytonaApiClient
|
|
|
287
225
|
new(transformed_hash)
|
|
288
226
|
end
|
|
289
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
|
+
|
|
290
283
|
# Returns the object in the form of hash
|
|
291
284
|
# @return [Hash] Returns the object in the form of hash
|
|
292
285
|
def to_hash
|
|
@@ -303,6 +296,22 @@ module DaytonaApiClient
|
|
|
303
296
|
hash
|
|
304
297
|
end
|
|
305
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
|
|
306
316
|
end
|
|
307
|
-
|
|
308
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
|