daytona_api_client 0.171.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 +163 -954
- 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 +292 -1620
- 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 +268 -5
- data/lib/daytona_api_client/api/workspace_api.rb +6 -6
- 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 +389 -34
- data/lib/daytona_api_client/models/create_sandbox.rb +77 -16
- data/lib/daytona_api_client/models/create_session_request.rb +74 -3
- data/lib/daytona_api_client/models/create_snapshot.rb +88 -17
- 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 +78 -7
- 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 -149
- 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.rb +74 -3
- data/lib/daytona_api_client/models/paginated_snapshots.rb +74 -3
- data/lib/daytona_api_client/models/{paginated_logs.rb → paginated_snapshots_dto.rb} +77 -10
- 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 +191 -109
- 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 +92 -95
- data/lib/daytona_api_client/models/sandbox_class.rb +3 -4
- data/lib/daytona_api_client/models/sandbox_desired_state.rb +3 -4
- data/lib/daytona_api_client/models/sandbox_info.rb +74 -3
- 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 -39
- 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/workspace.rb +107 -83
- data/lib/daytona_api_client/version.rb +2 -2
- data/lib/daytona_api_client.rb +3 -49
- data/project.json +11 -42
- metadata +6 -56
- data/.gitignore +0 -39
- data/.openapi-generator/FILES +0 -211
- 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 -1151
- 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 -314
- 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 -165
- data/lib/daytona_api_client/models/fork_sandbox.rb +0 -148
- 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/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_jobs.rb +0 -244
- 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 -316
- data/lib/daytona_api_client/models/region_type.rb +0 -42
- data/lib/daytona_api_client/models/region_usage_overview.rb +0 -368
- 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 -735
- data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -462
- 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/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 -214
- 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
- data/lib/daytona_api_client/models/workspace_port_preview_url.rb +0 -192
|
@@ -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 Organization
|
|
17
|
+
class Organization
|
|
18
18
|
# Organization ID
|
|
19
19
|
attr_accessor :id
|
|
20
20
|
|
|
@@ -48,6 +48,15 @@ module DaytonaApiClient
|
|
|
48
48
|
# Suspension cleanup grace period hours
|
|
49
49
|
attr_accessor :suspension_cleanup_grace_period_hours
|
|
50
50
|
|
|
51
|
+
# Total CPU quota
|
|
52
|
+
attr_accessor :total_cpu_quota
|
|
53
|
+
|
|
54
|
+
# Total memory quota
|
|
55
|
+
attr_accessor :total_memory_quota
|
|
56
|
+
|
|
57
|
+
# Total disk quota
|
|
58
|
+
attr_accessor :total_disk_quota
|
|
59
|
+
|
|
51
60
|
# Max CPU per sandbox
|
|
52
61
|
attr_accessor :max_cpu_per_sandbox
|
|
53
62
|
|
|
@@ -57,36 +66,9 @@ module DaytonaApiClient
|
|
|
57
66
|
# Max disk per sandbox
|
|
58
67
|
attr_accessor :max_disk_per_sandbox
|
|
59
68
|
|
|
60
|
-
# Time in minutes before an unused snapshot is deactivated
|
|
61
|
-
attr_accessor :snapshot_deactivation_timeout_minutes
|
|
62
|
-
|
|
63
69
|
# Sandbox default network block all
|
|
64
70
|
attr_accessor :sandbox_limited_network_egress
|
|
65
71
|
|
|
66
|
-
# Default region ID
|
|
67
|
-
attr_accessor :default_region_id
|
|
68
|
-
|
|
69
|
-
# Authenticated rate limit per minute
|
|
70
|
-
attr_accessor :authenticated_rate_limit
|
|
71
|
-
|
|
72
|
-
# Sandbox create rate limit per minute
|
|
73
|
-
attr_accessor :sandbox_create_rate_limit
|
|
74
|
-
|
|
75
|
-
# Sandbox lifecycle rate limit per minute
|
|
76
|
-
attr_accessor :sandbox_lifecycle_rate_limit
|
|
77
|
-
|
|
78
|
-
# Experimental configuration
|
|
79
|
-
attr_accessor :experimental_config
|
|
80
|
-
|
|
81
|
-
# Authenticated rate limit TTL in seconds
|
|
82
|
-
attr_accessor :authenticated_rate_limit_ttl_seconds
|
|
83
|
-
|
|
84
|
-
# Sandbox create rate limit TTL in seconds
|
|
85
|
-
attr_accessor :sandbox_create_rate_limit_ttl_seconds
|
|
86
|
-
|
|
87
|
-
# Sandbox lifecycle rate limit TTL in seconds
|
|
88
|
-
attr_accessor :sandbox_lifecycle_rate_limit_ttl_seconds
|
|
89
|
-
|
|
90
72
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
91
73
|
def self.attribute_map
|
|
92
74
|
{
|
|
@@ -101,19 +83,13 @@ module DaytonaApiClient
|
|
|
101
83
|
:'suspension_reason' => :'suspensionReason',
|
|
102
84
|
:'suspended_until' => :'suspendedUntil',
|
|
103
85
|
:'suspension_cleanup_grace_period_hours' => :'suspensionCleanupGracePeriodHours',
|
|
86
|
+
:'total_cpu_quota' => :'totalCpuQuota',
|
|
87
|
+
:'total_memory_quota' => :'totalMemoryQuota',
|
|
88
|
+
:'total_disk_quota' => :'totalDiskQuota',
|
|
104
89
|
:'max_cpu_per_sandbox' => :'maxCpuPerSandbox',
|
|
105
90
|
:'max_memory_per_sandbox' => :'maxMemoryPerSandbox',
|
|
106
91
|
:'max_disk_per_sandbox' => :'maxDiskPerSandbox',
|
|
107
|
-
:'
|
|
108
|
-
:'sandbox_limited_network_egress' => :'sandboxLimitedNetworkEgress',
|
|
109
|
-
:'default_region_id' => :'defaultRegionId',
|
|
110
|
-
:'authenticated_rate_limit' => :'authenticatedRateLimit',
|
|
111
|
-
:'sandbox_create_rate_limit' => :'sandboxCreateRateLimit',
|
|
112
|
-
:'sandbox_lifecycle_rate_limit' => :'sandboxLifecycleRateLimit',
|
|
113
|
-
:'experimental_config' => :'experimentalConfig',
|
|
114
|
-
:'authenticated_rate_limit_ttl_seconds' => :'authenticatedRateLimitTtlSeconds',
|
|
115
|
-
:'sandbox_create_rate_limit_ttl_seconds' => :'sandboxCreateRateLimitTtlSeconds',
|
|
116
|
-
:'sandbox_lifecycle_rate_limit_ttl_seconds' => :'sandboxLifecycleRateLimitTtlSeconds'
|
|
92
|
+
:'sandbox_limited_network_egress' => :'sandboxLimitedNetworkEgress'
|
|
117
93
|
}
|
|
118
94
|
end
|
|
119
95
|
|
|
@@ -141,31 +117,19 @@ module DaytonaApiClient
|
|
|
141
117
|
:'suspension_reason' => :'String',
|
|
142
118
|
:'suspended_until' => :'Time',
|
|
143
119
|
:'suspension_cleanup_grace_period_hours' => :'Float',
|
|
120
|
+
:'total_cpu_quota' => :'Float',
|
|
121
|
+
:'total_memory_quota' => :'Float',
|
|
122
|
+
:'total_disk_quota' => :'Float',
|
|
144
123
|
:'max_cpu_per_sandbox' => :'Float',
|
|
145
124
|
:'max_memory_per_sandbox' => :'Float',
|
|
146
125
|
:'max_disk_per_sandbox' => :'Float',
|
|
147
|
-
:'
|
|
148
|
-
:'sandbox_limited_network_egress' => :'Boolean',
|
|
149
|
-
:'default_region_id' => :'String',
|
|
150
|
-
:'authenticated_rate_limit' => :'Float',
|
|
151
|
-
:'sandbox_create_rate_limit' => :'Float',
|
|
152
|
-
:'sandbox_lifecycle_rate_limit' => :'Float',
|
|
153
|
-
:'experimental_config' => :'Object',
|
|
154
|
-
:'authenticated_rate_limit_ttl_seconds' => :'Float',
|
|
155
|
-
:'sandbox_create_rate_limit_ttl_seconds' => :'Float',
|
|
156
|
-
:'sandbox_lifecycle_rate_limit_ttl_seconds' => :'Float'
|
|
126
|
+
:'sandbox_limited_network_egress' => :'Boolean'
|
|
157
127
|
}
|
|
158
128
|
end
|
|
159
129
|
|
|
160
130
|
# List of attributes with nullable: true
|
|
161
131
|
def self.openapi_nullable
|
|
162
132
|
Set.new([
|
|
163
|
-
:'authenticated_rate_limit',
|
|
164
|
-
:'sandbox_create_rate_limit',
|
|
165
|
-
:'sandbox_lifecycle_rate_limit',
|
|
166
|
-
:'authenticated_rate_limit_ttl_seconds',
|
|
167
|
-
:'sandbox_create_rate_limit_ttl_seconds',
|
|
168
|
-
:'sandbox_lifecycle_rate_limit_ttl_seconds'
|
|
169
133
|
])
|
|
170
134
|
end
|
|
171
135
|
|
|
@@ -251,6 +215,24 @@ module DaytonaApiClient
|
|
|
251
215
|
self.suspension_cleanup_grace_period_hours = nil
|
|
252
216
|
end
|
|
253
217
|
|
|
218
|
+
if attributes.key?(:'total_cpu_quota')
|
|
219
|
+
self.total_cpu_quota = attributes[:'total_cpu_quota']
|
|
220
|
+
else
|
|
221
|
+
self.total_cpu_quota = nil
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
if attributes.key?(:'total_memory_quota')
|
|
225
|
+
self.total_memory_quota = attributes[:'total_memory_quota']
|
|
226
|
+
else
|
|
227
|
+
self.total_memory_quota = nil
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
if attributes.key?(:'total_disk_quota')
|
|
231
|
+
self.total_disk_quota = attributes[:'total_disk_quota']
|
|
232
|
+
else
|
|
233
|
+
self.total_disk_quota = nil
|
|
234
|
+
end
|
|
235
|
+
|
|
254
236
|
if attributes.key?(:'max_cpu_per_sandbox')
|
|
255
237
|
self.max_cpu_per_sandbox = attributes[:'max_cpu_per_sandbox']
|
|
256
238
|
else
|
|
@@ -269,63 +251,11 @@ module DaytonaApiClient
|
|
|
269
251
|
self.max_disk_per_sandbox = nil
|
|
270
252
|
end
|
|
271
253
|
|
|
272
|
-
if attributes.key?(:'snapshot_deactivation_timeout_minutes')
|
|
273
|
-
self.snapshot_deactivation_timeout_minutes = attributes[:'snapshot_deactivation_timeout_minutes']
|
|
274
|
-
else
|
|
275
|
-
self.snapshot_deactivation_timeout_minutes = 20160
|
|
276
|
-
end
|
|
277
|
-
|
|
278
254
|
if attributes.key?(:'sandbox_limited_network_egress')
|
|
279
255
|
self.sandbox_limited_network_egress = attributes[:'sandbox_limited_network_egress']
|
|
280
256
|
else
|
|
281
257
|
self.sandbox_limited_network_egress = nil
|
|
282
258
|
end
|
|
283
|
-
|
|
284
|
-
if attributes.key?(:'default_region_id')
|
|
285
|
-
self.default_region_id = attributes[:'default_region_id']
|
|
286
|
-
end
|
|
287
|
-
|
|
288
|
-
if attributes.key?(:'authenticated_rate_limit')
|
|
289
|
-
self.authenticated_rate_limit = attributes[:'authenticated_rate_limit']
|
|
290
|
-
else
|
|
291
|
-
self.authenticated_rate_limit = nil
|
|
292
|
-
end
|
|
293
|
-
|
|
294
|
-
if attributes.key?(:'sandbox_create_rate_limit')
|
|
295
|
-
self.sandbox_create_rate_limit = attributes[:'sandbox_create_rate_limit']
|
|
296
|
-
else
|
|
297
|
-
self.sandbox_create_rate_limit = nil
|
|
298
|
-
end
|
|
299
|
-
|
|
300
|
-
if attributes.key?(:'sandbox_lifecycle_rate_limit')
|
|
301
|
-
self.sandbox_lifecycle_rate_limit = attributes[:'sandbox_lifecycle_rate_limit']
|
|
302
|
-
else
|
|
303
|
-
self.sandbox_lifecycle_rate_limit = nil
|
|
304
|
-
end
|
|
305
|
-
|
|
306
|
-
if attributes.key?(:'experimental_config')
|
|
307
|
-
self.experimental_config = attributes[:'experimental_config']
|
|
308
|
-
else
|
|
309
|
-
self.experimental_config = nil
|
|
310
|
-
end
|
|
311
|
-
|
|
312
|
-
if attributes.key?(:'authenticated_rate_limit_ttl_seconds')
|
|
313
|
-
self.authenticated_rate_limit_ttl_seconds = attributes[:'authenticated_rate_limit_ttl_seconds']
|
|
314
|
-
else
|
|
315
|
-
self.authenticated_rate_limit_ttl_seconds = nil
|
|
316
|
-
end
|
|
317
|
-
|
|
318
|
-
if attributes.key?(:'sandbox_create_rate_limit_ttl_seconds')
|
|
319
|
-
self.sandbox_create_rate_limit_ttl_seconds = attributes[:'sandbox_create_rate_limit_ttl_seconds']
|
|
320
|
-
else
|
|
321
|
-
self.sandbox_create_rate_limit_ttl_seconds = nil
|
|
322
|
-
end
|
|
323
|
-
|
|
324
|
-
if attributes.key?(:'sandbox_lifecycle_rate_limit_ttl_seconds')
|
|
325
|
-
self.sandbox_lifecycle_rate_limit_ttl_seconds = attributes[:'sandbox_lifecycle_rate_limit_ttl_seconds']
|
|
326
|
-
else
|
|
327
|
-
self.sandbox_lifecycle_rate_limit_ttl_seconds = nil
|
|
328
|
-
end
|
|
329
259
|
end
|
|
330
260
|
|
|
331
261
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -377,6 +307,18 @@ module DaytonaApiClient
|
|
|
377
307
|
invalid_properties.push('invalid value for "suspension_cleanup_grace_period_hours", suspension_cleanup_grace_period_hours cannot be nil.')
|
|
378
308
|
end
|
|
379
309
|
|
|
310
|
+
if @total_cpu_quota.nil?
|
|
311
|
+
invalid_properties.push('invalid value for "total_cpu_quota", total_cpu_quota cannot be nil.')
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
if @total_memory_quota.nil?
|
|
315
|
+
invalid_properties.push('invalid value for "total_memory_quota", total_memory_quota cannot be nil.')
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
if @total_disk_quota.nil?
|
|
319
|
+
invalid_properties.push('invalid value for "total_disk_quota", total_disk_quota cannot be nil.')
|
|
320
|
+
end
|
|
321
|
+
|
|
380
322
|
if @max_cpu_per_sandbox.nil?
|
|
381
323
|
invalid_properties.push('invalid value for "max_cpu_per_sandbox", max_cpu_per_sandbox cannot be nil.')
|
|
382
324
|
end
|
|
@@ -389,18 +331,10 @@ module DaytonaApiClient
|
|
|
389
331
|
invalid_properties.push('invalid value for "max_disk_per_sandbox", max_disk_per_sandbox cannot be nil.')
|
|
390
332
|
end
|
|
391
333
|
|
|
392
|
-
if @snapshot_deactivation_timeout_minutes.nil?
|
|
393
|
-
invalid_properties.push('invalid value for "snapshot_deactivation_timeout_minutes", snapshot_deactivation_timeout_minutes cannot be nil.')
|
|
394
|
-
end
|
|
395
|
-
|
|
396
334
|
if @sandbox_limited_network_egress.nil?
|
|
397
335
|
invalid_properties.push('invalid value for "sandbox_limited_network_egress", sandbox_limited_network_egress cannot be nil.')
|
|
398
336
|
end
|
|
399
337
|
|
|
400
|
-
if @experimental_config.nil?
|
|
401
|
-
invalid_properties.push('invalid value for "experimental_config", experimental_config cannot be nil.')
|
|
402
|
-
end
|
|
403
|
-
|
|
404
338
|
invalid_properties
|
|
405
339
|
end
|
|
406
340
|
|
|
@@ -419,12 +353,13 @@ module DaytonaApiClient
|
|
|
419
353
|
return false if @suspension_reason.nil?
|
|
420
354
|
return false if @suspended_until.nil?
|
|
421
355
|
return false if @suspension_cleanup_grace_period_hours.nil?
|
|
356
|
+
return false if @total_cpu_quota.nil?
|
|
357
|
+
return false if @total_memory_quota.nil?
|
|
358
|
+
return false if @total_disk_quota.nil?
|
|
422
359
|
return false if @max_cpu_per_sandbox.nil?
|
|
423
360
|
return false if @max_memory_per_sandbox.nil?
|
|
424
361
|
return false if @max_disk_per_sandbox.nil?
|
|
425
|
-
return false if @snapshot_deactivation_timeout_minutes.nil?
|
|
426
362
|
return false if @sandbox_limited_network_egress.nil?
|
|
427
|
-
return false if @experimental_config.nil?
|
|
428
363
|
true
|
|
429
364
|
end
|
|
430
365
|
|
|
@@ -538,6 +473,36 @@ module DaytonaApiClient
|
|
|
538
473
|
@suspension_cleanup_grace_period_hours = suspension_cleanup_grace_period_hours
|
|
539
474
|
end
|
|
540
475
|
|
|
476
|
+
# Custom attribute writer method with validation
|
|
477
|
+
# @param [Object] total_cpu_quota Value to be assigned
|
|
478
|
+
def total_cpu_quota=(total_cpu_quota)
|
|
479
|
+
if total_cpu_quota.nil?
|
|
480
|
+
fail ArgumentError, 'total_cpu_quota cannot be nil'
|
|
481
|
+
end
|
|
482
|
+
|
|
483
|
+
@total_cpu_quota = total_cpu_quota
|
|
484
|
+
end
|
|
485
|
+
|
|
486
|
+
# Custom attribute writer method with validation
|
|
487
|
+
# @param [Object] total_memory_quota Value to be assigned
|
|
488
|
+
def total_memory_quota=(total_memory_quota)
|
|
489
|
+
if total_memory_quota.nil?
|
|
490
|
+
fail ArgumentError, 'total_memory_quota cannot be nil'
|
|
491
|
+
end
|
|
492
|
+
|
|
493
|
+
@total_memory_quota = total_memory_quota
|
|
494
|
+
end
|
|
495
|
+
|
|
496
|
+
# Custom attribute writer method with validation
|
|
497
|
+
# @param [Object] total_disk_quota Value to be assigned
|
|
498
|
+
def total_disk_quota=(total_disk_quota)
|
|
499
|
+
if total_disk_quota.nil?
|
|
500
|
+
fail ArgumentError, 'total_disk_quota cannot be nil'
|
|
501
|
+
end
|
|
502
|
+
|
|
503
|
+
@total_disk_quota = total_disk_quota
|
|
504
|
+
end
|
|
505
|
+
|
|
541
506
|
# Custom attribute writer method with validation
|
|
542
507
|
# @param [Object] max_cpu_per_sandbox Value to be assigned
|
|
543
508
|
def max_cpu_per_sandbox=(max_cpu_per_sandbox)
|
|
@@ -568,16 +533,6 @@ module DaytonaApiClient
|
|
|
568
533
|
@max_disk_per_sandbox = max_disk_per_sandbox
|
|
569
534
|
end
|
|
570
535
|
|
|
571
|
-
# Custom attribute writer method with validation
|
|
572
|
-
# @param [Object] snapshot_deactivation_timeout_minutes Value to be assigned
|
|
573
|
-
def snapshot_deactivation_timeout_minutes=(snapshot_deactivation_timeout_minutes)
|
|
574
|
-
if snapshot_deactivation_timeout_minutes.nil?
|
|
575
|
-
fail ArgumentError, 'snapshot_deactivation_timeout_minutes cannot be nil'
|
|
576
|
-
end
|
|
577
|
-
|
|
578
|
-
@snapshot_deactivation_timeout_minutes = snapshot_deactivation_timeout_minutes
|
|
579
|
-
end
|
|
580
|
-
|
|
581
536
|
# Custom attribute writer method with validation
|
|
582
537
|
# @param [Object] sandbox_limited_network_egress Value to be assigned
|
|
583
538
|
def sandbox_limited_network_egress=(sandbox_limited_network_egress)
|
|
@@ -588,16 +543,6 @@ module DaytonaApiClient
|
|
|
588
543
|
@sandbox_limited_network_egress = sandbox_limited_network_egress
|
|
589
544
|
end
|
|
590
545
|
|
|
591
|
-
# Custom attribute writer method with validation
|
|
592
|
-
# @param [Object] experimental_config Value to be assigned
|
|
593
|
-
def experimental_config=(experimental_config)
|
|
594
|
-
if experimental_config.nil?
|
|
595
|
-
fail ArgumentError, 'experimental_config cannot be nil'
|
|
596
|
-
end
|
|
597
|
-
|
|
598
|
-
@experimental_config = experimental_config
|
|
599
|
-
end
|
|
600
|
-
|
|
601
546
|
# Checks equality by comparing each attribute.
|
|
602
547
|
# @param [Object] Object to be compared
|
|
603
548
|
def ==(o)
|
|
@@ -614,19 +559,13 @@ module DaytonaApiClient
|
|
|
614
559
|
suspension_reason == o.suspension_reason &&
|
|
615
560
|
suspended_until == o.suspended_until &&
|
|
616
561
|
suspension_cleanup_grace_period_hours == o.suspension_cleanup_grace_period_hours &&
|
|
562
|
+
total_cpu_quota == o.total_cpu_quota &&
|
|
563
|
+
total_memory_quota == o.total_memory_quota &&
|
|
564
|
+
total_disk_quota == o.total_disk_quota &&
|
|
617
565
|
max_cpu_per_sandbox == o.max_cpu_per_sandbox &&
|
|
618
566
|
max_memory_per_sandbox == o.max_memory_per_sandbox &&
|
|
619
567
|
max_disk_per_sandbox == o.max_disk_per_sandbox &&
|
|
620
|
-
|
|
621
|
-
sandbox_limited_network_egress == o.sandbox_limited_network_egress &&
|
|
622
|
-
default_region_id == o.default_region_id &&
|
|
623
|
-
authenticated_rate_limit == o.authenticated_rate_limit &&
|
|
624
|
-
sandbox_create_rate_limit == o.sandbox_create_rate_limit &&
|
|
625
|
-
sandbox_lifecycle_rate_limit == o.sandbox_lifecycle_rate_limit &&
|
|
626
|
-
experimental_config == o.experimental_config &&
|
|
627
|
-
authenticated_rate_limit_ttl_seconds == o.authenticated_rate_limit_ttl_seconds &&
|
|
628
|
-
sandbox_create_rate_limit_ttl_seconds == o.sandbox_create_rate_limit_ttl_seconds &&
|
|
629
|
-
sandbox_lifecycle_rate_limit_ttl_seconds == o.sandbox_lifecycle_rate_limit_ttl_seconds
|
|
568
|
+
sandbox_limited_network_egress == o.sandbox_limited_network_egress
|
|
630
569
|
end
|
|
631
570
|
|
|
632
571
|
# @see the `==` method
|
|
@@ -638,7 +577,7 @@ module DaytonaApiClient
|
|
|
638
577
|
# Calculates hash code according to all attributes.
|
|
639
578
|
# @return [Integer] Hash code
|
|
640
579
|
def hash
|
|
641
|
-
[id, name, created_by, personal, created_at, updated_at, suspended, suspended_at, suspension_reason, suspended_until, suspension_cleanup_grace_period_hours,
|
|
580
|
+
[id, name, created_by, personal, created_at, updated_at, suspended, suspended_at, suspension_reason, suspended_until, suspension_cleanup_grace_period_hours, total_cpu_quota, total_memory_quota, total_disk_quota, max_cpu_per_sandbox, max_memory_per_sandbox, max_disk_per_sandbox, sandbox_limited_network_egress].hash
|
|
642
581
|
end
|
|
643
582
|
|
|
644
583
|
# Builds the object from hash
|
|
@@ -664,6 +603,61 @@ module DaytonaApiClient
|
|
|
664
603
|
new(transformed_hash)
|
|
665
604
|
end
|
|
666
605
|
|
|
606
|
+
# Deserializes the data based on type
|
|
607
|
+
# @param string type Data type
|
|
608
|
+
# @param string value Value to be deserialized
|
|
609
|
+
# @return [Object] Deserialized data
|
|
610
|
+
def self._deserialize(type, value)
|
|
611
|
+
case type.to_sym
|
|
612
|
+
when :Time
|
|
613
|
+
Time.parse(value)
|
|
614
|
+
when :Date
|
|
615
|
+
Date.parse(value)
|
|
616
|
+
when :String
|
|
617
|
+
value.to_s
|
|
618
|
+
when :Integer
|
|
619
|
+
value.to_i
|
|
620
|
+
when :Float
|
|
621
|
+
value.to_f
|
|
622
|
+
when :Boolean
|
|
623
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
624
|
+
true
|
|
625
|
+
else
|
|
626
|
+
false
|
|
627
|
+
end
|
|
628
|
+
when :Object
|
|
629
|
+
# generic object (usually a Hash), return directly
|
|
630
|
+
value
|
|
631
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
632
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
633
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
634
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
635
|
+
k_type = Regexp.last_match[:k_type]
|
|
636
|
+
v_type = Regexp.last_match[:v_type]
|
|
637
|
+
{}.tap do |hash|
|
|
638
|
+
value.each do |k, v|
|
|
639
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
640
|
+
end
|
|
641
|
+
end
|
|
642
|
+
else # model
|
|
643
|
+
# models (e.g. Pet) or oneOf
|
|
644
|
+
klass = DaytonaApiClient.const_get(type)
|
|
645
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
646
|
+
end
|
|
647
|
+
end
|
|
648
|
+
|
|
649
|
+
# Returns the string representation of the object
|
|
650
|
+
# @return [String] String presentation of the object
|
|
651
|
+
def to_s
|
|
652
|
+
to_hash.to_s
|
|
653
|
+
end
|
|
654
|
+
|
|
655
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
656
|
+
# @return [Hash] Returns the object in the form of hash
|
|
657
|
+
def to_body
|
|
658
|
+
to_hash
|
|
659
|
+
end
|
|
660
|
+
|
|
667
661
|
# Returns the object in the form of hash
|
|
668
662
|
# @return [Hash] Returns the object in the form of hash
|
|
669
663
|
def to_hash
|
|
@@ -680,6 +674,22 @@ module DaytonaApiClient
|
|
|
680
674
|
hash
|
|
681
675
|
end
|
|
682
676
|
|
|
677
|
+
# Outputs non-array value in the form of hash
|
|
678
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
679
|
+
# @param [Object] value Any valid value
|
|
680
|
+
# @return [Hash] Returns the value in the form of hash
|
|
681
|
+
def _to_hash(value)
|
|
682
|
+
if value.is_a?(Array)
|
|
683
|
+
value.compact.map { |v| _to_hash(v) }
|
|
684
|
+
elsif value.is_a?(Hash)
|
|
685
|
+
{}.tap do |hash|
|
|
686
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
687
|
+
end
|
|
688
|
+
elsif value.respond_to? :to_hash
|
|
689
|
+
value.to_hash
|
|
690
|
+
else
|
|
691
|
+
value
|
|
692
|
+
end
|
|
693
|
+
end
|
|
683
694
|
end
|
|
684
|
-
|
|
685
695
|
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 OrganizationInvitation
|
|
17
|
+
class OrganizationInvitation
|
|
18
18
|
# Invitation ID
|
|
19
19
|
attr_accessor :id
|
|
20
20
|
|
|
@@ -268,10 +268,10 @@ module DaytonaApiClient
|
|
|
268
268
|
return false if @organization_name.nil?
|
|
269
269
|
return false if @expires_at.nil?
|
|
270
270
|
return false if @status.nil?
|
|
271
|
-
status_validator = EnumAttributeValidator.new('String', ["pending", "accepted", "declined", "cancelled"
|
|
271
|
+
status_validator = EnumAttributeValidator.new('String', ["pending", "accepted", "declined", "cancelled"])
|
|
272
272
|
return false unless status_validator.valid?(@status)
|
|
273
273
|
return false if @role.nil?
|
|
274
|
-
role_validator = EnumAttributeValidator.new('String', ["owner", "member"
|
|
274
|
+
role_validator = EnumAttributeValidator.new('String', ["owner", "member"])
|
|
275
275
|
return false unless role_validator.valid?(@role)
|
|
276
276
|
return false if @assigned_roles.nil?
|
|
277
277
|
return false if @created_at.nil?
|
|
@@ -342,7 +342,7 @@ module DaytonaApiClient
|
|
|
342
342
|
# Custom attribute writer method checking allowed values (enum).
|
|
343
343
|
# @param [Object] status Object to be assigned
|
|
344
344
|
def status=(status)
|
|
345
|
-
validator = EnumAttributeValidator.new('String', ["pending", "accepted", "declined", "cancelled"
|
|
345
|
+
validator = EnumAttributeValidator.new('String', ["pending", "accepted", "declined", "cancelled"])
|
|
346
346
|
unless validator.valid?(status)
|
|
347
347
|
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
348
348
|
end
|
|
@@ -352,7 +352,7 @@ module DaytonaApiClient
|
|
|
352
352
|
# Custom attribute writer method checking allowed values (enum).
|
|
353
353
|
# @param [Object] role Object to be assigned
|
|
354
354
|
def role=(role)
|
|
355
|
-
validator = EnumAttributeValidator.new('String', ["owner", "member"
|
|
355
|
+
validator = EnumAttributeValidator.new('String', ["owner", "member"])
|
|
356
356
|
unless validator.valid?(role)
|
|
357
357
|
fail ArgumentError, "invalid value for \"role\", must be one of #{validator.allowable_values}."
|
|
358
358
|
end
|
|
@@ -442,6 +442,61 @@ module DaytonaApiClient
|
|
|
442
442
|
new(transformed_hash)
|
|
443
443
|
end
|
|
444
444
|
|
|
445
|
+
# Deserializes the data based on type
|
|
446
|
+
# @param string type Data type
|
|
447
|
+
# @param string value Value to be deserialized
|
|
448
|
+
# @return [Object] Deserialized data
|
|
449
|
+
def self._deserialize(type, value)
|
|
450
|
+
case type.to_sym
|
|
451
|
+
when :Time
|
|
452
|
+
Time.parse(value)
|
|
453
|
+
when :Date
|
|
454
|
+
Date.parse(value)
|
|
455
|
+
when :String
|
|
456
|
+
value.to_s
|
|
457
|
+
when :Integer
|
|
458
|
+
value.to_i
|
|
459
|
+
when :Float
|
|
460
|
+
value.to_f
|
|
461
|
+
when :Boolean
|
|
462
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
463
|
+
true
|
|
464
|
+
else
|
|
465
|
+
false
|
|
466
|
+
end
|
|
467
|
+
when :Object
|
|
468
|
+
# generic object (usually a Hash), return directly
|
|
469
|
+
value
|
|
470
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
471
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
472
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
473
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
474
|
+
k_type = Regexp.last_match[:k_type]
|
|
475
|
+
v_type = Regexp.last_match[:v_type]
|
|
476
|
+
{}.tap do |hash|
|
|
477
|
+
value.each do |k, v|
|
|
478
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
479
|
+
end
|
|
480
|
+
end
|
|
481
|
+
else # model
|
|
482
|
+
# models (e.g. Pet) or oneOf
|
|
483
|
+
klass = DaytonaApiClient.const_get(type)
|
|
484
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
485
|
+
end
|
|
486
|
+
end
|
|
487
|
+
|
|
488
|
+
# Returns the string representation of the object
|
|
489
|
+
# @return [String] String presentation of the object
|
|
490
|
+
def to_s
|
|
491
|
+
to_hash.to_s
|
|
492
|
+
end
|
|
493
|
+
|
|
494
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
495
|
+
# @return [Hash] Returns the object in the form of hash
|
|
496
|
+
def to_body
|
|
497
|
+
to_hash
|
|
498
|
+
end
|
|
499
|
+
|
|
445
500
|
# Returns the object in the form of hash
|
|
446
501
|
# @return [Hash] Returns the object in the form of hash
|
|
447
502
|
def to_hash
|
|
@@ -458,6 +513,22 @@ module DaytonaApiClient
|
|
|
458
513
|
hash
|
|
459
514
|
end
|
|
460
515
|
|
|
516
|
+
# Outputs non-array value in the form of hash
|
|
517
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
518
|
+
# @param [Object] value Any valid value
|
|
519
|
+
# @return [Hash] Returns the value in the form of hash
|
|
520
|
+
def _to_hash(value)
|
|
521
|
+
if value.is_a?(Array)
|
|
522
|
+
value.compact.map { |v| _to_hash(v) }
|
|
523
|
+
elsif value.is_a?(Hash)
|
|
524
|
+
{}.tap do |hash|
|
|
525
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
526
|
+
end
|
|
527
|
+
elsif value.respond_to? :to_hash
|
|
528
|
+
value.to_hash
|
|
529
|
+
else
|
|
530
|
+
value
|
|
531
|
+
end
|
|
532
|
+
end
|
|
461
533
|
end
|
|
462
|
-
|
|
463
534
|
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 OrganizationRole
|
|
17
|
+
class OrganizationRole
|
|
18
18
|
# Role ID
|
|
19
19
|
attr_accessor :id
|
|
20
20
|
|
|
@@ -320,6 +320,61 @@ module DaytonaApiClient
|
|
|
320
320
|
new(transformed_hash)
|
|
321
321
|
end
|
|
322
322
|
|
|
323
|
+
# Deserializes the data based on type
|
|
324
|
+
# @param string type Data type
|
|
325
|
+
# @param string value Value to be deserialized
|
|
326
|
+
# @return [Object] Deserialized data
|
|
327
|
+
def self._deserialize(type, value)
|
|
328
|
+
case type.to_sym
|
|
329
|
+
when :Time
|
|
330
|
+
Time.parse(value)
|
|
331
|
+
when :Date
|
|
332
|
+
Date.parse(value)
|
|
333
|
+
when :String
|
|
334
|
+
value.to_s
|
|
335
|
+
when :Integer
|
|
336
|
+
value.to_i
|
|
337
|
+
when :Float
|
|
338
|
+
value.to_f
|
|
339
|
+
when :Boolean
|
|
340
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
341
|
+
true
|
|
342
|
+
else
|
|
343
|
+
false
|
|
344
|
+
end
|
|
345
|
+
when :Object
|
|
346
|
+
# generic object (usually a Hash), return directly
|
|
347
|
+
value
|
|
348
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
349
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
350
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
351
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
352
|
+
k_type = Regexp.last_match[:k_type]
|
|
353
|
+
v_type = Regexp.last_match[:v_type]
|
|
354
|
+
{}.tap do |hash|
|
|
355
|
+
value.each do |k, v|
|
|
356
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
357
|
+
end
|
|
358
|
+
end
|
|
359
|
+
else # model
|
|
360
|
+
# models (e.g. Pet) or oneOf
|
|
361
|
+
klass = DaytonaApiClient.const_get(type)
|
|
362
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
363
|
+
end
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
# Returns the string representation of the object
|
|
367
|
+
# @return [String] String presentation of the object
|
|
368
|
+
def to_s
|
|
369
|
+
to_hash.to_s
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
373
|
+
# @return [Hash] Returns the object in the form of hash
|
|
374
|
+
def to_body
|
|
375
|
+
to_hash
|
|
376
|
+
end
|
|
377
|
+
|
|
323
378
|
# Returns the object in the form of hash
|
|
324
379
|
# @return [Hash] Returns the object in the form of hash
|
|
325
380
|
def to_hash
|
|
@@ -336,6 +391,22 @@ module DaytonaApiClient
|
|
|
336
391
|
hash
|
|
337
392
|
end
|
|
338
393
|
|
|
394
|
+
# Outputs non-array value in the form of hash
|
|
395
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
396
|
+
# @param [Object] value Any valid value
|
|
397
|
+
# @return [Hash] Returns the value in the form of hash
|
|
398
|
+
def _to_hash(value)
|
|
399
|
+
if value.is_a?(Array)
|
|
400
|
+
value.compact.map { |v| _to_hash(v) }
|
|
401
|
+
elsif value.is_a?(Hash)
|
|
402
|
+
{}.tap do |hash|
|
|
403
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
404
|
+
end
|
|
405
|
+
elsif value.respond_to? :to_hash
|
|
406
|
+
value.to_hash
|
|
407
|
+
else
|
|
408
|
+
value
|
|
409
|
+
end
|
|
410
|
+
end
|
|
339
411
|
end
|
|
340
|
-
|
|
341
412
|
end
|