daytona_api_client 0.211.2 → 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 +98 -55
- 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 +310 -1846
- data/lib/daytona_api_client/api/preview_api.rb +8 -202
- data/lib/daytona_api_client/api/runners_api.rb +22 -470
- data/lib/daytona_api_client/api/sandbox_api.rb +434 -2354
- data/lib/daytona_api_client/api/snapshots_api.rb +113 -42
- data/lib/daytona_api_client/api/toolbox_api.rb +5108 -0
- data/lib/daytona_api_client/api/users_api.rb +153 -89
- 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/{create_runner_response.rb → command.rb} +104 -23
- data/lib/daytona_api_client/models/completion_context.rb +244 -0
- data/lib/daytona_api_client/models/completion_item.rb +289 -0
- data/lib/daytona_api_client/models/{paginated_traces.rb → completion_list.rb} +106 -91
- data/lib/daytona_api_client/models/compressed_screenshot_response.rb +256 -0
- data/lib/daytona_api_client/models/computer_use_start_response.rb +263 -0
- data/lib/daytona_api_client/models/{available_sandbox_class.rb → computer_use_status_response.rb} +97 -86
- data/lib/daytona_api_client/models/computer_use_stop_response.rb +263 -0
- data/lib/daytona_api_client/models/create_api_key.rb +75 -4
- data/lib/daytona_api_client/models/create_audit_log.rb +350 -0
- data/lib/daytona_api_client/models/create_build_info.rb +74 -3
- data/lib/daytona_api_client/models/create_docker_registry.rb +139 -7
- data/lib/daytona_api_client/models/create_linked_account.rb +74 -3
- data/lib/daytona_api_client/models/create_organization.rb +78 -34
- data/lib/daytona_api_client/models/create_organization_invitation.rb +76 -5
- data/lib/daytona_api_client/models/create_organization_quota.rb +78 -26
- 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 -108
- data/lib/daytona_api_client/models/{signed_port_preview_url.rb → create_session_request.rb} +93 -103
- data/lib/daytona_api_client/models/create_snapshot.rb +88 -61
- data/lib/daytona_api_client/models/create_user.rb +97 -40
- 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 -96
- data/lib/daytona_api_client/models/{runner_service_health.rb → display_info_response.rb} +95 -59
- data/lib/daytona_api_client/models/docker_registry.rb +76 -5
- data/lib/daytona_api_client/models/{paginated_jobs.rb → download_files.rb} +94 -100
- data/lib/daytona_api_client/models/{create_warm_pool.rb → execute_request.rb} +106 -62
- data/lib/daytona_api_client/models/execute_response.rb +263 -0
- data/lib/daytona_api_client/models/file_info.rb +417 -0
- data/lib/daytona_api_client/models/{secret.rb → file_status.rb} +122 -121
- data/lib/daytona_api_client/models/git_add_request.rb +264 -0
- data/lib/daytona_api_client/models/{admin_create_organization.rb → git_branch_request.rb} +95 -53
- data/lib/daytona_api_client/models/git_checkout_request.rb +261 -0
- data/lib/daytona_api_client/models/{toolbox_proxy_url.rb → git_clone_request.rb} +142 -10
- data/lib/daytona_api_client/models/{trace_span.rb → git_commit_info.rb} +148 -141
- data/lib/daytona_api_client/models/git_commit_request.rb +325 -0
- data/lib/daytona_api_client/models/{runner_healthcheck.rb → git_commit_response.rb} +92 -74
- data/lib/daytona_api_client/models/{create_secret.rb → git_delete_branch_request.rb} +106 -59
- data/lib/daytona_api_client/models/{snapshot_manager_credentials.rb → git_repo_request.rb} +96 -35
- data/lib/daytona_api_client/models/git_status.rb +290 -0
- data/lib/daytona_api_client/models/health_controller_check200_response.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check200_response_info_value.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check503_response.rb +74 -3
- data/lib/daytona_api_client/models/{oidc_id_p_config_response.rb → keyboard_hotkey_request.rb} +93 -59
- data/lib/daytona_api_client/models/{create_region_response.rb → keyboard_press_request.rb} +102 -63
- data/lib/daytona_api_client/models/keyboard_type_request.rb +246 -0
- data/lib/daytona_api_client/models/list_branch_response.rb +237 -0
- data/lib/daytona_api_client/models/lsp_completion_params.rb +325 -0
- data/lib/daytona_api_client/models/lsp_document_request.rb +290 -0
- data/lib/daytona_api_client/models/lsp_location.rb +261 -0
- data/lib/daytona_api_client/models/lsp_server_request.rb +263 -0
- data/lib/daytona_api_client/models/{create_sandbox_snapshot.rb → lsp_symbol.rb} +132 -22
- data/lib/daytona_api_client/models/match.rb +287 -0
- data/lib/daytona_api_client/models/mouse_click_request.rb +283 -0
- data/lib/daytona_api_client/models/mouse_click_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_drag_request.rb +327 -0
- data/lib/daytona_api_client/models/mouse_drag_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_move_request.rb +263 -0
- data/lib/daytona_api_client/models/mouse_move_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_position.rb +263 -0
- data/lib/daytona_api_client/models/mouse_scroll_request.rb +300 -0
- data/lib/daytona_api_client/models/{test_identity_provider_connection_response.rb → mouse_scroll_response.rb} +81 -30
- data/lib/daytona_api_client/models/oidc_config.rb +74 -3
- data/lib/daytona_api_client/models/organization.rb +159 -270
- 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_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 +261 -0
- data/lib/daytona_api_client/models/posthog_config.rb +74 -3
- data/lib/daytona_api_client/models/process_errors_response.rb +263 -0
- data/lib/daytona_api_client/models/process_logs_response.rb +263 -0
- data/lib/daytona_api_client/models/process_restart_response.rb +263 -0
- data/lib/daytona_api_client/models/process_status_response.rb +263 -0
- data/lib/daytona_api_client/models/{update_last_activity.rb → project_dir_response.rb} +83 -13
- data/lib/daytona_api_client/models/{pending_sso_link.rb → pty_create_request.rb} +114 -109
- data/lib/daytona_api_client/models/pty_create_response.rb +236 -0
- data/lib/daytona_api_client/models/{metric_data_point.rb → pty_list_response.rb} +95 -49
- data/lib/daytona_api_client/models/pty_resize_request.rb +263 -0
- data/lib/daytona_api_client/models/pty_session_info.rb +425 -0
- data/lib/daytona_api_client/models/range.rb +261 -0
- data/lib/daytona_api_client/models/region.rb +78 -192
- data/lib/daytona_api_client/models/{regenerate_api_key_response.rb → region_screenshot_response.rb} +113 -22
- data/lib/daytona_api_client/models/registry_push_access_dto.rb +74 -3
- data/lib/daytona_api_client/models/replace_request.rb +289 -0
- data/lib/daytona_api_client/models/{oidc_id_p_config.rb → replace_result.rb} +95 -88
- 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 +101 -206
- 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_region.rb → sandbox_info.rb} +113 -49
- data/lib/daytona_api_client/models/sandbox_labels.rb +74 -3
- data/lib/daytona_api_client/models/sandbox_state.rb +3 -10
- data/lib/daytona_api_client/models/sandbox_volume.rb +79 -18
- data/lib/daytona_api_client/models/screenshot_response.rb +256 -0
- data/lib/daytona_api_client/models/{audit_target_scenario.rb → search_files_response.rb} +95 -66
- data/lib/daytona_api_client/models/send_webhook_dto.rb +75 -26
- data/lib/daytona_api_client/models/session.rb +251 -0
- data/lib/daytona_api_client/models/{list_sandboxes_response.rb → session_execute_request.rb} +110 -34
- data/lib/daytona_api_client/models/{organization_sso_enabled.rb → session_execute_response.rb} +104 -30
- data/lib/daytona_api_client/models/set_snapshot_general_status_dto.rb +74 -3
- data/lib/daytona_api_client/models/snapshot_dto.rb +78 -84
- data/lib/daytona_api_client/models/snapshot_state.rb +6 -5
- data/lib/daytona_api_client/models/ssh_access_dto.rb +78 -34
- data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +98 -7
- data/lib/daytona_api_client/models/storage_access_dto.rb +78 -34
- data/lib/daytona_api_client/models/update_docker_registry.rb +74 -3
- data/lib/daytona_api_client/models/update_organization_invitation.rb +76 -5
- data/lib/daytona_api_client/models/update_organization_member_access.rb +76 -5
- data/lib/daytona_api_client/models/update_organization_quota.rb +115 -131
- data/lib/daytona_api_client/models/update_organization_role.rb +74 -3
- data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +80 -29
- data/lib/daytona_api_client/models/user.rb +75 -41
- data/lib/daytona_api_client/models/{list_secrets_response.rb → user_home_dir_response.rb} +83 -72
- data/lib/daytona_api_client/models/user_public_key.rb +74 -3
- data/lib/daytona_api_client/models/volume_dto.rb +74 -3
- data/lib/daytona_api_client/models/volume_state.rb +3 -4
- data/lib/daytona_api_client/models/webhook_app_portal_access.rb +75 -31
- data/lib/daytona_api_client/models/{preview_warning.rb → webhook_controller_get_status200_response.rb} +76 -23
- data/lib/daytona_api_client/models/webhook_initialization_status.rb +74 -3
- data/lib/daytona_api_client/models/windows_response.rb +265 -0
- data/lib/daytona_api_client/models/{update_job_status.rb → work_dir_response.rb} +83 -72
- data/lib/daytona_api_client/models/{sandbox_list_item.rb → workspace.rb} +299 -222
- data/lib/daytona_api_client/version.rb +2 -2
- data/lib/daytona_api_client.rb +76 -87
- data/project.json +13 -38
- metadata +81 -96
- data/.gitignore +0 -39
- data/.openapi-generator/FILES +0 -176
- 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 -1618
- data/lib/daytona_api_client/api/jobs_api.rb +0 -299
- data/lib/daytona_api_client/api/regions_api.rb +0 -77
- data/lib/daytona_api_client/api/secret_api.rb +0 -441
- data/lib/daytona_api_client/api/warm_pools_api.rb +0 -286
- data/lib/daytona_api_client/api_model_base.rb +0 -88
- data/lib/daytona_api_client/models/admin_create_runner.rb +0 -326
- data/lib/daytona_api_client/models/admin_get_webhook_status200_response.rb +0 -147
- data/lib/daytona_api_client/models/audit_scenarios.rb +0 -167
- data/lib/daytona_api_client/models/create_identity_provider.rb +0 -269
- data/lib/daytona_api_client/models/create_organization_region_quota.rb +0 -386
- data/lib/daytona_api_client/models/date_filter.rb +0 -178
- data/lib/daytona_api_client/models/fork_sandbox.rb +0 -148
- data/lib/daytona_api_client/models/gpu_type.rb +0 -45
- data/lib/daytona_api_client/models/identity_provider.rb +0 -439
- data/lib/daytona_api_client/models/int_filter.rb +0 -222
- data/lib/daytona_api_client/models/job.rb +0 -366
- data/lib/daytona_api_client/models/job_status.rb +0 -43
- data/lib/daytona_api_client/models/job_type.rb +0 -55
- data/lib/daytona_api_client/models/log_entry.rb +0 -334
- data/lib/daytona_api_client/models/metric_series.rb +0 -194
- data/lib/daytona_api_client/models/metrics_response.rb +0 -167
- data/lib/daytona_api_client/models/organization_preview_warning.rb +0 -165
- data/lib/daytona_api_client/models/otel_config.rb +0 -188
- data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -167
- data/lib/daytona_api_client/models/rate_limit_config.rb +0 -188
- data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -158
- data/lib/daytona_api_client/models/region_quota.rb +0 -453
- data/lib/daytona_api_client/models/region_type.rb +0 -42
- data/lib/daytona_api_client/models/region_usage_overview.rb +0 -518
- data/lib/daytona_api_client/models/resize_sandbox.rb +0 -225
- data/lib/daytona_api_client/models/resolve_sandbox_secrets200_response_inner.rb +0 -176
- data/lib/daytona_api_client/models/runner_class.rb +0 -40
- data/lib/daytona_api_client/models/runner_full.rb +0 -757
- data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -482
- data/lib/daytona_api_client/models/sandbox_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/sso_oidc_config.rb +0 -192
- data/lib/daytona_api_client/models/string_filter.rb +0 -182
- data/lib/daytona_api_client/models/test_identity_provider_connection.rb +0 -165
- data/lib/daytona_api_client/models/trace_summary.rb +0 -310
- data/lib/daytona_api_client/models/update_identity_provider.rb +0 -212
- data/lib/daytona_api_client/models/update_oidc_id_p_config.rb +0 -178
- data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -165
- data/lib/daytona_api_client/models/update_organization_region_quota.rb +0 -313
- data/lib/daytona_api_client/models/update_region.rb +0 -182
- data/lib/daytona_api_client/models/update_sandbox_network_settings.rb +0 -168
- data/lib/daytona_api_client/models/update_sandbox_secrets.rb +0 -167
- data/lib/daytona_api_client/models/update_secret.rb +0 -170
- data/lib/daytona_api_client/models/update_warm_pool.rb +0 -174
- data/lib/daytona_api_client/models/url.rb +0 -165
- data/lib/daytona_api_client/models/warm_pool.rb +0 -490
- 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,72 +14,14 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class Region
|
|
18
|
-
# Region ID
|
|
19
|
-
attr_accessor :id
|
|
20
|
-
|
|
17
|
+
class Region
|
|
21
18
|
# Region name
|
|
22
19
|
attr_accessor :name
|
|
23
20
|
|
|
24
|
-
# Organization ID
|
|
25
|
-
attr_accessor :organization_id
|
|
26
|
-
|
|
27
|
-
# The type of the region
|
|
28
|
-
attr_accessor :region_type
|
|
29
|
-
|
|
30
|
-
# Creation timestamp
|
|
31
|
-
attr_accessor :created_at
|
|
32
|
-
|
|
33
|
-
# Last update timestamp
|
|
34
|
-
attr_accessor :updated_at
|
|
35
|
-
|
|
36
|
-
# Proxy URL for the region
|
|
37
|
-
attr_accessor :proxy_url
|
|
38
|
-
|
|
39
|
-
# SSH Gateway URL for the region
|
|
40
|
-
attr_accessor :ssh_gateway_url
|
|
41
|
-
|
|
42
|
-
# Snapshot Manager URL for the region
|
|
43
|
-
attr_accessor :snapshot_manager_url
|
|
44
|
-
|
|
45
|
-
# OTel collector endpoint for sandboxes created in this region. When set, sandbox OTel data is sent to this endpoint instead of the Daytona-hosted collector and will not be available in the Daytona analytics API or dashboard.
|
|
46
|
-
attr_accessor :otel_endpoint
|
|
47
|
-
|
|
48
|
-
class EnumAttributeValidator
|
|
49
|
-
attr_reader :datatype
|
|
50
|
-
attr_reader :allowable_values
|
|
51
|
-
|
|
52
|
-
def initialize(datatype, allowable_values)
|
|
53
|
-
@allowable_values = allowable_values.map do |value|
|
|
54
|
-
case datatype.to_s
|
|
55
|
-
when /Integer/i
|
|
56
|
-
value.to_i
|
|
57
|
-
when /Float/i
|
|
58
|
-
value.to_f
|
|
59
|
-
else
|
|
60
|
-
value
|
|
61
|
-
end
|
|
62
|
-
end
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
def valid?(value)
|
|
66
|
-
!value || allowable_values.include?(value)
|
|
67
|
-
end
|
|
68
|
-
end
|
|
69
|
-
|
|
70
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
71
22
|
def self.attribute_map
|
|
72
23
|
{
|
|
73
|
-
:'
|
|
74
|
-
:'name' => :'name',
|
|
75
|
-
:'organization_id' => :'organizationId',
|
|
76
|
-
:'region_type' => :'regionType',
|
|
77
|
-
:'created_at' => :'createdAt',
|
|
78
|
-
:'updated_at' => :'updatedAt',
|
|
79
|
-
:'proxy_url' => :'proxyUrl',
|
|
80
|
-
:'ssh_gateway_url' => :'sshGatewayUrl',
|
|
81
|
-
:'snapshot_manager_url' => :'snapshotManagerUrl',
|
|
82
|
-
:'otel_endpoint' => :'otelEndpoint'
|
|
24
|
+
:'name' => :'name'
|
|
83
25
|
}
|
|
84
26
|
end
|
|
85
27
|
|
|
@@ -96,27 +38,13 @@ module DaytonaApiClient
|
|
|
96
38
|
# Attribute type mapping.
|
|
97
39
|
def self.openapi_types
|
|
98
40
|
{
|
|
99
|
-
:'
|
|
100
|
-
:'name' => :'String',
|
|
101
|
-
:'organization_id' => :'String',
|
|
102
|
-
:'region_type' => :'RegionType',
|
|
103
|
-
:'created_at' => :'String',
|
|
104
|
-
:'updated_at' => :'String',
|
|
105
|
-
:'proxy_url' => :'String',
|
|
106
|
-
:'ssh_gateway_url' => :'String',
|
|
107
|
-
:'snapshot_manager_url' => :'String',
|
|
108
|
-
:'otel_endpoint' => :'String'
|
|
41
|
+
:'name' => :'String'
|
|
109
42
|
}
|
|
110
43
|
end
|
|
111
44
|
|
|
112
45
|
# List of attributes with nullable: true
|
|
113
46
|
def self.openapi_nullable
|
|
114
47
|
Set.new([
|
|
115
|
-
:'organization_id',
|
|
116
|
-
:'proxy_url',
|
|
117
|
-
:'ssh_gateway_url',
|
|
118
|
-
:'snapshot_manager_url',
|
|
119
|
-
:'otel_endpoint'
|
|
120
48
|
])
|
|
121
49
|
end
|
|
122
50
|
|
|
@@ -136,55 +64,11 @@ module DaytonaApiClient
|
|
|
136
64
|
h[k.to_sym] = v
|
|
137
65
|
}
|
|
138
66
|
|
|
139
|
-
if attributes.key?(:'id')
|
|
140
|
-
self.id = attributes[:'id']
|
|
141
|
-
else
|
|
142
|
-
self.id = nil
|
|
143
|
-
end
|
|
144
|
-
|
|
145
67
|
if attributes.key?(:'name')
|
|
146
68
|
self.name = attributes[:'name']
|
|
147
69
|
else
|
|
148
70
|
self.name = nil
|
|
149
71
|
end
|
|
150
|
-
|
|
151
|
-
if attributes.key?(:'organization_id')
|
|
152
|
-
self.organization_id = attributes[:'organization_id']
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
if attributes.key?(:'region_type')
|
|
156
|
-
self.region_type = attributes[:'region_type']
|
|
157
|
-
else
|
|
158
|
-
self.region_type = nil
|
|
159
|
-
end
|
|
160
|
-
|
|
161
|
-
if attributes.key?(:'created_at')
|
|
162
|
-
self.created_at = attributes[:'created_at']
|
|
163
|
-
else
|
|
164
|
-
self.created_at = nil
|
|
165
|
-
end
|
|
166
|
-
|
|
167
|
-
if attributes.key?(:'updated_at')
|
|
168
|
-
self.updated_at = attributes[:'updated_at']
|
|
169
|
-
else
|
|
170
|
-
self.updated_at = nil
|
|
171
|
-
end
|
|
172
|
-
|
|
173
|
-
if attributes.key?(:'proxy_url')
|
|
174
|
-
self.proxy_url = attributes[:'proxy_url']
|
|
175
|
-
end
|
|
176
|
-
|
|
177
|
-
if attributes.key?(:'ssh_gateway_url')
|
|
178
|
-
self.ssh_gateway_url = attributes[:'ssh_gateway_url']
|
|
179
|
-
end
|
|
180
|
-
|
|
181
|
-
if attributes.key?(:'snapshot_manager_url')
|
|
182
|
-
self.snapshot_manager_url = attributes[:'snapshot_manager_url']
|
|
183
|
-
end
|
|
184
|
-
|
|
185
|
-
if attributes.key?(:'otel_endpoint')
|
|
186
|
-
self.otel_endpoint = attributes[:'otel_endpoint']
|
|
187
|
-
end
|
|
188
72
|
end
|
|
189
73
|
|
|
190
74
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -192,26 +76,10 @@ module DaytonaApiClient
|
|
|
192
76
|
def list_invalid_properties
|
|
193
77
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
194
78
|
invalid_properties = Array.new
|
|
195
|
-
if @id.nil?
|
|
196
|
-
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
197
|
-
end
|
|
198
|
-
|
|
199
79
|
if @name.nil?
|
|
200
80
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
201
81
|
end
|
|
202
82
|
|
|
203
|
-
if @region_type.nil?
|
|
204
|
-
invalid_properties.push('invalid value for "region_type", region_type cannot be nil.')
|
|
205
|
-
end
|
|
206
|
-
|
|
207
|
-
if @created_at.nil?
|
|
208
|
-
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
209
|
-
end
|
|
210
|
-
|
|
211
|
-
if @updated_at.nil?
|
|
212
|
-
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
213
|
-
end
|
|
214
|
-
|
|
215
83
|
invalid_properties
|
|
216
84
|
end
|
|
217
85
|
|
|
@@ -219,24 +87,10 @@ module DaytonaApiClient
|
|
|
219
87
|
# @return true if the model is valid
|
|
220
88
|
def valid?
|
|
221
89
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
222
|
-
return false if @id.nil?
|
|
223
90
|
return false if @name.nil?
|
|
224
|
-
return false if @region_type.nil?
|
|
225
|
-
return false if @created_at.nil?
|
|
226
|
-
return false if @updated_at.nil?
|
|
227
91
|
true
|
|
228
92
|
end
|
|
229
93
|
|
|
230
|
-
# Custom attribute writer method with validation
|
|
231
|
-
# @param [Object] id Value to be assigned
|
|
232
|
-
def id=(id)
|
|
233
|
-
if id.nil?
|
|
234
|
-
fail ArgumentError, 'id cannot be nil'
|
|
235
|
-
end
|
|
236
|
-
|
|
237
|
-
@id = id
|
|
238
|
-
end
|
|
239
|
-
|
|
240
94
|
# Custom attribute writer method with validation
|
|
241
95
|
# @param [Object] name Value to be assigned
|
|
242
96
|
def name=(name)
|
|
@@ -247,51 +101,12 @@ module DaytonaApiClient
|
|
|
247
101
|
@name = name
|
|
248
102
|
end
|
|
249
103
|
|
|
250
|
-
# Custom attribute writer method with validation
|
|
251
|
-
# @param [Object] region_type Value to be assigned
|
|
252
|
-
def region_type=(region_type)
|
|
253
|
-
if region_type.nil?
|
|
254
|
-
fail ArgumentError, 'region_type cannot be nil'
|
|
255
|
-
end
|
|
256
|
-
|
|
257
|
-
@region_type = region_type
|
|
258
|
-
end
|
|
259
|
-
|
|
260
|
-
# Custom attribute writer method with validation
|
|
261
|
-
# @param [Object] created_at Value to be assigned
|
|
262
|
-
def created_at=(created_at)
|
|
263
|
-
if created_at.nil?
|
|
264
|
-
fail ArgumentError, 'created_at cannot be nil'
|
|
265
|
-
end
|
|
266
|
-
|
|
267
|
-
@created_at = created_at
|
|
268
|
-
end
|
|
269
|
-
|
|
270
|
-
# Custom attribute writer method with validation
|
|
271
|
-
# @param [Object] updated_at Value to be assigned
|
|
272
|
-
def updated_at=(updated_at)
|
|
273
|
-
if updated_at.nil?
|
|
274
|
-
fail ArgumentError, 'updated_at cannot be nil'
|
|
275
|
-
end
|
|
276
|
-
|
|
277
|
-
@updated_at = updated_at
|
|
278
|
-
end
|
|
279
|
-
|
|
280
104
|
# Checks equality by comparing each attribute.
|
|
281
105
|
# @param [Object] Object to be compared
|
|
282
106
|
def ==(o)
|
|
283
107
|
return true if self.equal?(o)
|
|
284
108
|
self.class == o.class &&
|
|
285
|
-
|
|
286
|
-
name == o.name &&
|
|
287
|
-
organization_id == o.organization_id &&
|
|
288
|
-
region_type == o.region_type &&
|
|
289
|
-
created_at == o.created_at &&
|
|
290
|
-
updated_at == o.updated_at &&
|
|
291
|
-
proxy_url == o.proxy_url &&
|
|
292
|
-
ssh_gateway_url == o.ssh_gateway_url &&
|
|
293
|
-
snapshot_manager_url == o.snapshot_manager_url &&
|
|
294
|
-
otel_endpoint == o.otel_endpoint
|
|
109
|
+
name == o.name
|
|
295
110
|
end
|
|
296
111
|
|
|
297
112
|
# @see the `==` method
|
|
@@ -303,7 +118,7 @@ module DaytonaApiClient
|
|
|
303
118
|
# Calculates hash code according to all attributes.
|
|
304
119
|
# @return [Integer] Hash code
|
|
305
120
|
def hash
|
|
306
|
-
[
|
|
121
|
+
[name].hash
|
|
307
122
|
end
|
|
308
123
|
|
|
309
124
|
# Builds the object from hash
|
|
@@ -329,6 +144,61 @@ module DaytonaApiClient
|
|
|
329
144
|
new(transformed_hash)
|
|
330
145
|
end
|
|
331
146
|
|
|
147
|
+
# Deserializes the data based on type
|
|
148
|
+
# @param string type Data type
|
|
149
|
+
# @param string value Value to be deserialized
|
|
150
|
+
# @return [Object] Deserialized data
|
|
151
|
+
def self._deserialize(type, value)
|
|
152
|
+
case type.to_sym
|
|
153
|
+
when :Time
|
|
154
|
+
Time.parse(value)
|
|
155
|
+
when :Date
|
|
156
|
+
Date.parse(value)
|
|
157
|
+
when :String
|
|
158
|
+
value.to_s
|
|
159
|
+
when :Integer
|
|
160
|
+
value.to_i
|
|
161
|
+
when :Float
|
|
162
|
+
value.to_f
|
|
163
|
+
when :Boolean
|
|
164
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
165
|
+
true
|
|
166
|
+
else
|
|
167
|
+
false
|
|
168
|
+
end
|
|
169
|
+
when :Object
|
|
170
|
+
# generic object (usually a Hash), return directly
|
|
171
|
+
value
|
|
172
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
173
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
174
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
175
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
176
|
+
k_type = Regexp.last_match[:k_type]
|
|
177
|
+
v_type = Regexp.last_match[:v_type]
|
|
178
|
+
{}.tap do |hash|
|
|
179
|
+
value.each do |k, v|
|
|
180
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
else # model
|
|
184
|
+
# models (e.g. Pet) or oneOf
|
|
185
|
+
klass = DaytonaApiClient.const_get(type)
|
|
186
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Returns the string representation of the object
|
|
191
|
+
# @return [String] String presentation of the object
|
|
192
|
+
def to_s
|
|
193
|
+
to_hash.to_s
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
197
|
+
# @return [Hash] Returns the object in the form of hash
|
|
198
|
+
def to_body
|
|
199
|
+
to_hash
|
|
200
|
+
end
|
|
201
|
+
|
|
332
202
|
# Returns the object in the form of hash
|
|
333
203
|
# @return [Hash] Returns the object in the form of hash
|
|
334
204
|
def to_hash
|
|
@@ -345,6 +215,22 @@ module DaytonaApiClient
|
|
|
345
215
|
hash
|
|
346
216
|
end
|
|
347
217
|
|
|
218
|
+
# Outputs non-array value in the form of hash
|
|
219
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
220
|
+
# @param [Object] value Any valid value
|
|
221
|
+
# @return [Hash] Returns the value in the form of hash
|
|
222
|
+
def _to_hash(value)
|
|
223
|
+
if value.is_a?(Array)
|
|
224
|
+
value.compact.map { |v| _to_hash(v) }
|
|
225
|
+
elsif value.is_a?(Hash)
|
|
226
|
+
{}.tap do |hash|
|
|
227
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
228
|
+
end
|
|
229
|
+
elsif value.respond_to? :to_hash
|
|
230
|
+
value.to_hash
|
|
231
|
+
else
|
|
232
|
+
value
|
|
233
|
+
end
|
|
234
|
+
end
|
|
348
235
|
end
|
|
349
|
-
|
|
350
236
|
end
|
data/lib/daytona_api_client/models/{regenerate_api_key_response.rb → region_screenshot_response.rb}
RENAMED
|
@@ -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,14 +14,22 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class
|
|
18
|
-
#
|
|
19
|
-
attr_accessor :
|
|
17
|
+
class RegionScreenshotResponse
|
|
18
|
+
# Base64 encoded screenshot image data of the specified region
|
|
19
|
+
attr_accessor :screenshot
|
|
20
|
+
|
|
21
|
+
# The current cursor position when the region screenshot was taken
|
|
22
|
+
attr_accessor :cursor_position
|
|
23
|
+
|
|
24
|
+
# The size of the screenshot data in bytes
|
|
25
|
+
attr_accessor :size_bytes
|
|
20
26
|
|
|
21
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
28
|
def self.attribute_map
|
|
23
29
|
{
|
|
24
|
-
:'
|
|
30
|
+
:'screenshot' => :'screenshot',
|
|
31
|
+
:'cursor_position' => :'cursorPosition',
|
|
32
|
+
:'size_bytes' => :'sizeBytes'
|
|
25
33
|
}
|
|
26
34
|
end
|
|
27
35
|
|
|
@@ -38,7 +46,9 @@ module DaytonaApiClient
|
|
|
38
46
|
# Attribute type mapping.
|
|
39
47
|
def self.openapi_types
|
|
40
48
|
{
|
|
41
|
-
:'
|
|
49
|
+
:'screenshot' => :'String',
|
|
50
|
+
:'cursor_position' => :'Object',
|
|
51
|
+
:'size_bytes' => :'Float'
|
|
42
52
|
}
|
|
43
53
|
end
|
|
44
54
|
|
|
@@ -52,22 +62,30 @@ module DaytonaApiClient
|
|
|
52
62
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
63
|
def initialize(attributes = {})
|
|
54
64
|
if (!attributes.is_a?(Hash))
|
|
55
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::
|
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::RegionScreenshotResponse` initialize method"
|
|
56
66
|
end
|
|
57
67
|
|
|
58
68
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
69
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
70
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
71
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::
|
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::RegionScreenshotResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
73
|
end
|
|
64
74
|
h[k.to_sym] = v
|
|
65
75
|
}
|
|
66
76
|
|
|
67
|
-
if attributes.key?(:'
|
|
68
|
-
self.
|
|
77
|
+
if attributes.key?(:'screenshot')
|
|
78
|
+
self.screenshot = attributes[:'screenshot']
|
|
69
79
|
else
|
|
70
|
-
self.
|
|
80
|
+
self.screenshot = nil
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'cursor_position')
|
|
84
|
+
self.cursor_position = attributes[:'cursor_position']
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'size_bytes')
|
|
88
|
+
self.size_bytes = attributes[:'size_bytes']
|
|
71
89
|
end
|
|
72
90
|
end
|
|
73
91
|
|
|
@@ -76,8 +94,8 @@ module DaytonaApiClient
|
|
|
76
94
|
def list_invalid_properties
|
|
77
95
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
78
96
|
invalid_properties = Array.new
|
|
79
|
-
if @
|
|
80
|
-
invalid_properties.push('invalid value for "
|
|
97
|
+
if @screenshot.nil?
|
|
98
|
+
invalid_properties.push('invalid value for "screenshot", screenshot cannot be nil.')
|
|
81
99
|
end
|
|
82
100
|
|
|
83
101
|
invalid_properties
|
|
@@ -87,18 +105,18 @@ module DaytonaApiClient
|
|
|
87
105
|
# @return true if the model is valid
|
|
88
106
|
def valid?
|
|
89
107
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
90
|
-
return false if @
|
|
108
|
+
return false if @screenshot.nil?
|
|
91
109
|
true
|
|
92
110
|
end
|
|
93
111
|
|
|
94
112
|
# Custom attribute writer method with validation
|
|
95
|
-
# @param [Object]
|
|
96
|
-
def
|
|
97
|
-
if
|
|
98
|
-
fail ArgumentError, '
|
|
113
|
+
# @param [Object] screenshot Value to be assigned
|
|
114
|
+
def screenshot=(screenshot)
|
|
115
|
+
if screenshot.nil?
|
|
116
|
+
fail ArgumentError, 'screenshot cannot be nil'
|
|
99
117
|
end
|
|
100
118
|
|
|
101
|
-
@
|
|
119
|
+
@screenshot = screenshot
|
|
102
120
|
end
|
|
103
121
|
|
|
104
122
|
# Checks equality by comparing each attribute.
|
|
@@ -106,7 +124,9 @@ module DaytonaApiClient
|
|
|
106
124
|
def ==(o)
|
|
107
125
|
return true if self.equal?(o)
|
|
108
126
|
self.class == o.class &&
|
|
109
|
-
|
|
127
|
+
screenshot == o.screenshot &&
|
|
128
|
+
cursor_position == o.cursor_position &&
|
|
129
|
+
size_bytes == o.size_bytes
|
|
110
130
|
end
|
|
111
131
|
|
|
112
132
|
# @see the `==` method
|
|
@@ -118,7 +138,7 @@ module DaytonaApiClient
|
|
|
118
138
|
# Calculates hash code according to all attributes.
|
|
119
139
|
# @return [Integer] Hash code
|
|
120
140
|
def hash
|
|
121
|
-
[
|
|
141
|
+
[screenshot, cursor_position, size_bytes].hash
|
|
122
142
|
end
|
|
123
143
|
|
|
124
144
|
# Builds the object from hash
|
|
@@ -144,6 +164,61 @@ module DaytonaApiClient
|
|
|
144
164
|
new(transformed_hash)
|
|
145
165
|
end
|
|
146
166
|
|
|
167
|
+
# Deserializes the data based on type
|
|
168
|
+
# @param string type Data type
|
|
169
|
+
# @param string value Value to be deserialized
|
|
170
|
+
# @return [Object] Deserialized data
|
|
171
|
+
def self._deserialize(type, value)
|
|
172
|
+
case type.to_sym
|
|
173
|
+
when :Time
|
|
174
|
+
Time.parse(value)
|
|
175
|
+
when :Date
|
|
176
|
+
Date.parse(value)
|
|
177
|
+
when :String
|
|
178
|
+
value.to_s
|
|
179
|
+
when :Integer
|
|
180
|
+
value.to_i
|
|
181
|
+
when :Float
|
|
182
|
+
value.to_f
|
|
183
|
+
when :Boolean
|
|
184
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
185
|
+
true
|
|
186
|
+
else
|
|
187
|
+
false
|
|
188
|
+
end
|
|
189
|
+
when :Object
|
|
190
|
+
# generic object (usually a Hash), return directly
|
|
191
|
+
value
|
|
192
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
193
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
194
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
195
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
196
|
+
k_type = Regexp.last_match[:k_type]
|
|
197
|
+
v_type = Regexp.last_match[:v_type]
|
|
198
|
+
{}.tap do |hash|
|
|
199
|
+
value.each do |k, v|
|
|
200
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
else # model
|
|
204
|
+
# models (e.g. Pet) or oneOf
|
|
205
|
+
klass = DaytonaApiClient.const_get(type)
|
|
206
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Returns the string representation of the object
|
|
211
|
+
# @return [String] String presentation of the object
|
|
212
|
+
def to_s
|
|
213
|
+
to_hash.to_s
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
217
|
+
# @return [Hash] Returns the object in the form of hash
|
|
218
|
+
def to_body
|
|
219
|
+
to_hash
|
|
220
|
+
end
|
|
221
|
+
|
|
147
222
|
# Returns the object in the form of hash
|
|
148
223
|
# @return [Hash] Returns the object in the form of hash
|
|
149
224
|
def to_hash
|
|
@@ -160,6 +235,22 @@ module DaytonaApiClient
|
|
|
160
235
|
hash
|
|
161
236
|
end
|
|
162
237
|
|
|
238
|
+
# Outputs non-array value in the form of hash
|
|
239
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
240
|
+
# @param [Object] value Any valid value
|
|
241
|
+
# @return [Hash] Returns the value in the form of hash
|
|
242
|
+
def _to_hash(value)
|
|
243
|
+
if value.is_a?(Array)
|
|
244
|
+
value.compact.map { |v| _to_hash(v) }
|
|
245
|
+
elsif value.is_a?(Hash)
|
|
246
|
+
{}.tap do |hash|
|
|
247
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
248
|
+
end
|
|
249
|
+
elsif value.respond_to? :to_hash
|
|
250
|
+
value.to_hash
|
|
251
|
+
else
|
|
252
|
+
value
|
|
253
|
+
end
|
|
254
|
+
end
|
|
163
255
|
end
|
|
164
|
-
|
|
165
256
|
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 RegistryPushAccessDto
|
|
17
|
+
class RegistryPushAccessDto
|
|
18
18
|
# Temporary username for registry authentication
|
|
19
19
|
attr_accessor :username
|
|
20
20
|
|
|
@@ -279,6 +279,61 @@ module DaytonaApiClient
|
|
|
279
279
|
new(transformed_hash)
|
|
280
280
|
end
|
|
281
281
|
|
|
282
|
+
# Deserializes the data based on type
|
|
283
|
+
# @param string type Data type
|
|
284
|
+
# @param string value Value to be deserialized
|
|
285
|
+
# @return [Object] Deserialized data
|
|
286
|
+
def self._deserialize(type, value)
|
|
287
|
+
case type.to_sym
|
|
288
|
+
when :Time
|
|
289
|
+
Time.parse(value)
|
|
290
|
+
when :Date
|
|
291
|
+
Date.parse(value)
|
|
292
|
+
when :String
|
|
293
|
+
value.to_s
|
|
294
|
+
when :Integer
|
|
295
|
+
value.to_i
|
|
296
|
+
when :Float
|
|
297
|
+
value.to_f
|
|
298
|
+
when :Boolean
|
|
299
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
300
|
+
true
|
|
301
|
+
else
|
|
302
|
+
false
|
|
303
|
+
end
|
|
304
|
+
when :Object
|
|
305
|
+
# generic object (usually a Hash), return directly
|
|
306
|
+
value
|
|
307
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
308
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
309
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
310
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
311
|
+
k_type = Regexp.last_match[:k_type]
|
|
312
|
+
v_type = Regexp.last_match[:v_type]
|
|
313
|
+
{}.tap do |hash|
|
|
314
|
+
value.each do |k, v|
|
|
315
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
316
|
+
end
|
|
317
|
+
end
|
|
318
|
+
else # model
|
|
319
|
+
# models (e.g. Pet) or oneOf
|
|
320
|
+
klass = DaytonaApiClient.const_get(type)
|
|
321
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
322
|
+
end
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
# Returns the string representation of the object
|
|
326
|
+
# @return [String] String presentation of the object
|
|
327
|
+
def to_s
|
|
328
|
+
to_hash.to_s
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
332
|
+
# @return [Hash] Returns the object in the form of hash
|
|
333
|
+
def to_body
|
|
334
|
+
to_hash
|
|
335
|
+
end
|
|
336
|
+
|
|
282
337
|
# Returns the object in the form of hash
|
|
283
338
|
# @return [Hash] Returns the object in the form of hash
|
|
284
339
|
def to_hash
|
|
@@ -295,6 +350,22 @@ module DaytonaApiClient
|
|
|
295
350
|
hash
|
|
296
351
|
end
|
|
297
352
|
|
|
353
|
+
# Outputs non-array value in the form of hash
|
|
354
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
355
|
+
# @param [Object] value Any valid value
|
|
356
|
+
# @return [Hash] Returns the value in the form of hash
|
|
357
|
+
def _to_hash(value)
|
|
358
|
+
if value.is_a?(Array)
|
|
359
|
+
value.compact.map { |v| _to_hash(v) }
|
|
360
|
+
elsif value.is_a?(Hash)
|
|
361
|
+
{}.tap do |hash|
|
|
362
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
363
|
+
end
|
|
364
|
+
elsif value.respond_to? :to_hash
|
|
365
|
+
value.to_hash
|
|
366
|
+
else
|
|
367
|
+
value
|
|
368
|
+
end
|
|
369
|
+
end
|
|
298
370
|
end
|
|
299
|
-
|
|
300
371
|
end
|