daytona_api_client 0.178.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +9 -0
- data/Gemfile.lock +101 -0
- data/daytona_api_client.gemspec +2 -2
- data/lib/daytona_api_client/api/api_keys_api.rb +2 -2
- data/lib/daytona_api_client/api/audit_api.rb +140 -10
- data/lib/daytona_api_client/api/config_api.rb +1 -1
- data/lib/daytona_api_client/api/docker_registry_api.rb +67 -6
- data/lib/daytona_api_client/api/health_api.rb +3 -54
- data/lib/daytona_api_client/api/object_storage_api.rb +1 -1
- data/lib/daytona_api_client/api/organizations_api.rb +155 -1075
- data/lib/daytona_api_client/api/preview_api.rb +8 -77
- data/lib/daytona_api_client/api/runners_api.rb +22 -412
- data/lib/daytona_api_client/api/sandbox_api.rb +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 +217 -16
- 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 +386 -43
- 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 -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.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 -138
- 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 -326
- 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 -764
- 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 SnapshotDto
|
|
17
|
+
class SnapshotDto
|
|
18
18
|
attr_accessor :id
|
|
19
19
|
|
|
20
20
|
attr_accessor :organization_id
|
|
@@ -50,15 +50,6 @@ module DaytonaApiClient
|
|
|
50
50
|
# Build information for the snapshot
|
|
51
51
|
attr_accessor :build_info
|
|
52
52
|
|
|
53
|
-
# IDs of regions where the snapshot is available
|
|
54
|
-
attr_accessor :region_ids
|
|
55
|
-
|
|
56
|
-
# The initial runner ID of the snapshot
|
|
57
|
-
attr_accessor :initial_runner_id
|
|
58
|
-
|
|
59
|
-
# The snapshot reference
|
|
60
|
-
attr_accessor :ref
|
|
61
|
-
|
|
62
53
|
class EnumAttributeValidator
|
|
63
54
|
attr_reader :datatype
|
|
64
55
|
attr_reader :allowable_values
|
|
@@ -100,10 +91,7 @@ module DaytonaApiClient
|
|
|
100
91
|
:'created_at' => :'createdAt',
|
|
101
92
|
:'updated_at' => :'updatedAt',
|
|
102
93
|
:'last_used_at' => :'lastUsedAt',
|
|
103
|
-
:'build_info' => :'buildInfo'
|
|
104
|
-
:'region_ids' => :'regionIds',
|
|
105
|
-
:'initial_runner_id' => :'initialRunnerId',
|
|
106
|
-
:'ref' => :'ref'
|
|
94
|
+
:'build_info' => :'buildInfo'
|
|
107
95
|
}
|
|
108
96
|
end
|
|
109
97
|
|
|
@@ -136,10 +124,7 @@ module DaytonaApiClient
|
|
|
136
124
|
:'created_at' => :'Time',
|
|
137
125
|
:'updated_at' => :'Time',
|
|
138
126
|
:'last_used_at' => :'Time',
|
|
139
|
-
:'build_info' => :'BuildInfo'
|
|
140
|
-
:'region_ids' => :'Array<String>',
|
|
141
|
-
:'initial_runner_id' => :'String',
|
|
142
|
-
:'ref' => :'String'
|
|
127
|
+
:'build_info' => :'BuildInfo'
|
|
143
128
|
}
|
|
144
129
|
end
|
|
145
130
|
|
|
@@ -266,20 +251,6 @@ module DaytonaApiClient
|
|
|
266
251
|
if attributes.key?(:'build_info')
|
|
267
252
|
self.build_info = attributes[:'build_info']
|
|
268
253
|
end
|
|
269
|
-
|
|
270
|
-
if attributes.key?(:'region_ids')
|
|
271
|
-
if (value = attributes[:'region_ids']).is_a?(Array)
|
|
272
|
-
self.region_ids = value
|
|
273
|
-
end
|
|
274
|
-
end
|
|
275
|
-
|
|
276
|
-
if attributes.key?(:'initial_runner_id')
|
|
277
|
-
self.initial_runner_id = attributes[:'initial_runner_id']
|
|
278
|
-
end
|
|
279
|
-
|
|
280
|
-
if attributes.key?(:'ref')
|
|
281
|
-
self.ref = attributes[:'ref']
|
|
282
|
-
end
|
|
283
254
|
end
|
|
284
255
|
|
|
285
256
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -468,10 +439,7 @@ module DaytonaApiClient
|
|
|
468
439
|
created_at == o.created_at &&
|
|
469
440
|
updated_at == o.updated_at &&
|
|
470
441
|
last_used_at == o.last_used_at &&
|
|
471
|
-
build_info == o.build_info
|
|
472
|
-
region_ids == o.region_ids &&
|
|
473
|
-
initial_runner_id == o.initial_runner_id &&
|
|
474
|
-
ref == o.ref
|
|
442
|
+
build_info == o.build_info
|
|
475
443
|
end
|
|
476
444
|
|
|
477
445
|
# @see the `==` method
|
|
@@ -483,7 +451,7 @@ module DaytonaApiClient
|
|
|
483
451
|
# Calculates hash code according to all attributes.
|
|
484
452
|
# @return [Integer] Hash code
|
|
485
453
|
def hash
|
|
486
|
-
[id, organization_id, general, name, image_name, state, size, entrypoint, cpu, gpu, mem, disk, error_reason, created_at, updated_at, last_used_at, build_info
|
|
454
|
+
[id, organization_id, general, name, image_name, state, size, entrypoint, cpu, gpu, mem, disk, error_reason, created_at, updated_at, last_used_at, build_info].hash
|
|
487
455
|
end
|
|
488
456
|
|
|
489
457
|
# Builds the object from hash
|
|
@@ -509,6 +477,61 @@ module DaytonaApiClient
|
|
|
509
477
|
new(transformed_hash)
|
|
510
478
|
end
|
|
511
479
|
|
|
480
|
+
# Deserializes the data based on type
|
|
481
|
+
# @param string type Data type
|
|
482
|
+
# @param string value Value to be deserialized
|
|
483
|
+
# @return [Object] Deserialized data
|
|
484
|
+
def self._deserialize(type, value)
|
|
485
|
+
case type.to_sym
|
|
486
|
+
when :Time
|
|
487
|
+
Time.parse(value)
|
|
488
|
+
when :Date
|
|
489
|
+
Date.parse(value)
|
|
490
|
+
when :String
|
|
491
|
+
value.to_s
|
|
492
|
+
when :Integer
|
|
493
|
+
value.to_i
|
|
494
|
+
when :Float
|
|
495
|
+
value.to_f
|
|
496
|
+
when :Boolean
|
|
497
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
498
|
+
true
|
|
499
|
+
else
|
|
500
|
+
false
|
|
501
|
+
end
|
|
502
|
+
when :Object
|
|
503
|
+
# generic object (usually a Hash), return directly
|
|
504
|
+
value
|
|
505
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
506
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
507
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
508
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
509
|
+
k_type = Regexp.last_match[:k_type]
|
|
510
|
+
v_type = Regexp.last_match[:v_type]
|
|
511
|
+
{}.tap do |hash|
|
|
512
|
+
value.each do |k, v|
|
|
513
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
514
|
+
end
|
|
515
|
+
end
|
|
516
|
+
else # model
|
|
517
|
+
# models (e.g. Pet) or oneOf
|
|
518
|
+
klass = DaytonaApiClient.const_get(type)
|
|
519
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
520
|
+
end
|
|
521
|
+
end
|
|
522
|
+
|
|
523
|
+
# Returns the string representation of the object
|
|
524
|
+
# @return [String] String presentation of the object
|
|
525
|
+
def to_s
|
|
526
|
+
to_hash.to_s
|
|
527
|
+
end
|
|
528
|
+
|
|
529
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
530
|
+
# @return [Hash] Returns the object in the form of hash
|
|
531
|
+
def to_body
|
|
532
|
+
to_hash
|
|
533
|
+
end
|
|
534
|
+
|
|
512
535
|
# Returns the object in the form of hash
|
|
513
536
|
# @return [Hash] Returns the object in the form of hash
|
|
514
537
|
def to_hash
|
|
@@ -525,6 +548,22 @@ module DaytonaApiClient
|
|
|
525
548
|
hash
|
|
526
549
|
end
|
|
527
550
|
|
|
551
|
+
# Outputs non-array value in the form of hash
|
|
552
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
553
|
+
# @param [Object] value Any valid value
|
|
554
|
+
# @return [Hash] Returns the value in the form of hash
|
|
555
|
+
def _to_hash(value)
|
|
556
|
+
if value.is_a?(Array)
|
|
557
|
+
value.compact.map { |v| _to_hash(v) }
|
|
558
|
+
elsif value.is_a?(Hash)
|
|
559
|
+
{}.tap do |hash|
|
|
560
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
561
|
+
end
|
|
562
|
+
elsif value.respond_to? :to_hash
|
|
563
|
+
value.to_hash
|
|
564
|
+
else
|
|
565
|
+
value
|
|
566
|
+
end
|
|
567
|
+
end
|
|
528
568
|
end
|
|
529
|
-
|
|
530
569
|
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
|
|
|
@@ -15,18 +15,20 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
17
|
class SnapshotState
|
|
18
|
+
BUILD_PENDING = "build_pending".freeze
|
|
18
19
|
BUILDING = "building".freeze
|
|
19
20
|
PENDING = "pending".freeze
|
|
20
21
|
PULLING = "pulling".freeze
|
|
22
|
+
PENDING_VALIDATION = "pending_validation".freeze
|
|
23
|
+
VALIDATING = "validating".freeze
|
|
21
24
|
ACTIVE = "active".freeze
|
|
22
25
|
INACTIVE = "inactive".freeze
|
|
23
26
|
ERROR = "error".freeze
|
|
24
27
|
BUILD_FAILED = "build_failed".freeze
|
|
25
28
|
REMOVING = "removing".freeze
|
|
26
|
-
UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze
|
|
27
29
|
|
|
28
30
|
def self.all_vars
|
|
29
|
-
@all_vars ||= [BUILDING, PENDING, PULLING, ACTIVE, INACTIVE, ERROR, BUILD_FAILED, REMOVING
|
|
31
|
+
@all_vars ||= [BUILD_PENDING, BUILDING, PENDING, PULLING, PENDING_VALIDATION, VALIDATING, ACTIVE, INACTIVE, ERROR, BUILD_FAILED, REMOVING].freeze
|
|
30
32
|
end
|
|
31
33
|
|
|
32
34
|
# Builds the enum from string
|
|
@@ -41,7 +43,7 @@ module DaytonaApiClient
|
|
|
41
43
|
# @return [String] The enum value
|
|
42
44
|
def build_from_hash(value)
|
|
43
45
|
return value if SnapshotState.all_vars.include?(value)
|
|
44
|
-
|
|
46
|
+
raise "Invalid ENUM value #{value} for class #SnapshotState"
|
|
45
47
|
end
|
|
46
48
|
end
|
|
47
49
|
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 SshAccessDto
|
|
17
|
+
class SshAccessDto
|
|
18
18
|
# Unique identifier for the SSH access
|
|
19
19
|
attr_accessor :id
|
|
20
20
|
|
|
@@ -33,9 +33,6 @@ module DaytonaApiClient
|
|
|
33
33
|
# When the SSH access was last updated
|
|
34
34
|
attr_accessor :updated_at
|
|
35
35
|
|
|
36
|
-
# SSH command to connect to the sandbox
|
|
37
|
-
attr_accessor :ssh_command
|
|
38
|
-
|
|
39
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
40
37
|
def self.attribute_map
|
|
41
38
|
{
|
|
@@ -44,8 +41,7 @@ module DaytonaApiClient
|
|
|
44
41
|
:'token' => :'token',
|
|
45
42
|
:'expires_at' => :'expiresAt',
|
|
46
43
|
:'created_at' => :'createdAt',
|
|
47
|
-
:'updated_at' => :'updatedAt'
|
|
48
|
-
:'ssh_command' => :'sshCommand'
|
|
44
|
+
:'updated_at' => :'updatedAt'
|
|
49
45
|
}
|
|
50
46
|
end
|
|
51
47
|
|
|
@@ -67,8 +63,7 @@ module DaytonaApiClient
|
|
|
67
63
|
:'token' => :'String',
|
|
68
64
|
:'expires_at' => :'Time',
|
|
69
65
|
:'created_at' => :'Time',
|
|
70
|
-
:'updated_at' => :'Time'
|
|
71
|
-
:'ssh_command' => :'String'
|
|
66
|
+
:'updated_at' => :'Time'
|
|
72
67
|
}
|
|
73
68
|
end
|
|
74
69
|
|
|
@@ -129,12 +124,6 @@ module DaytonaApiClient
|
|
|
129
124
|
else
|
|
130
125
|
self.updated_at = nil
|
|
131
126
|
end
|
|
132
|
-
|
|
133
|
-
if attributes.key?(:'ssh_command')
|
|
134
|
-
self.ssh_command = attributes[:'ssh_command']
|
|
135
|
-
else
|
|
136
|
-
self.ssh_command = nil
|
|
137
|
-
end
|
|
138
127
|
end
|
|
139
128
|
|
|
140
129
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -166,10 +155,6 @@ module DaytonaApiClient
|
|
|
166
155
|
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
167
156
|
end
|
|
168
157
|
|
|
169
|
-
if @ssh_command.nil?
|
|
170
|
-
invalid_properties.push('invalid value for "ssh_command", ssh_command cannot be nil.')
|
|
171
|
-
end
|
|
172
|
-
|
|
173
158
|
invalid_properties
|
|
174
159
|
end
|
|
175
160
|
|
|
@@ -183,7 +168,6 @@ module DaytonaApiClient
|
|
|
183
168
|
return false if @expires_at.nil?
|
|
184
169
|
return false if @created_at.nil?
|
|
185
170
|
return false if @updated_at.nil?
|
|
186
|
-
return false if @ssh_command.nil?
|
|
187
171
|
true
|
|
188
172
|
end
|
|
189
173
|
|
|
@@ -247,16 +231,6 @@ module DaytonaApiClient
|
|
|
247
231
|
@updated_at = updated_at
|
|
248
232
|
end
|
|
249
233
|
|
|
250
|
-
# Custom attribute writer method with validation
|
|
251
|
-
# @param [Object] ssh_command Value to be assigned
|
|
252
|
-
def ssh_command=(ssh_command)
|
|
253
|
-
if ssh_command.nil?
|
|
254
|
-
fail ArgumentError, 'ssh_command cannot be nil'
|
|
255
|
-
end
|
|
256
|
-
|
|
257
|
-
@ssh_command = ssh_command
|
|
258
|
-
end
|
|
259
|
-
|
|
260
234
|
# Checks equality by comparing each attribute.
|
|
261
235
|
# @param [Object] Object to be compared
|
|
262
236
|
def ==(o)
|
|
@@ -267,8 +241,7 @@ module DaytonaApiClient
|
|
|
267
241
|
token == o.token &&
|
|
268
242
|
expires_at == o.expires_at &&
|
|
269
243
|
created_at == o.created_at &&
|
|
270
|
-
updated_at == o.updated_at
|
|
271
|
-
ssh_command == o.ssh_command
|
|
244
|
+
updated_at == o.updated_at
|
|
272
245
|
end
|
|
273
246
|
|
|
274
247
|
# @see the `==` method
|
|
@@ -280,7 +253,7 @@ module DaytonaApiClient
|
|
|
280
253
|
# Calculates hash code according to all attributes.
|
|
281
254
|
# @return [Integer] Hash code
|
|
282
255
|
def hash
|
|
283
|
-
[id, sandbox_id, token, expires_at, created_at, updated_at
|
|
256
|
+
[id, sandbox_id, token, expires_at, created_at, updated_at].hash
|
|
284
257
|
end
|
|
285
258
|
|
|
286
259
|
# Builds the object from hash
|
|
@@ -306,6 +279,61 @@ module DaytonaApiClient
|
|
|
306
279
|
new(transformed_hash)
|
|
307
280
|
end
|
|
308
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
|
+
|
|
309
337
|
# Returns the object in the form of hash
|
|
310
338
|
# @return [Hash] Returns the object in the form of hash
|
|
311
339
|
def to_hash
|
|
@@ -322,6 +350,22 @@ module DaytonaApiClient
|
|
|
322
350
|
hash
|
|
323
351
|
end
|
|
324
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
|
|
325
370
|
end
|
|
326
|
-
|
|
327
371
|
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,18 +14,26 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class SshAccessValidationDto
|
|
17
|
+
class SshAccessValidationDto
|
|
18
18
|
# Whether the SSH access token is valid
|
|
19
19
|
attr_accessor :valid
|
|
20
20
|
|
|
21
21
|
# ID of the sandbox this SSH access is for
|
|
22
22
|
attr_accessor :sandbox_id
|
|
23
23
|
|
|
24
|
+
# ID of the runner hosting the sandbox
|
|
25
|
+
attr_accessor :runner_id
|
|
26
|
+
|
|
27
|
+
# Domain of the runner hosting the sandbox
|
|
28
|
+
attr_accessor :runner_domain
|
|
29
|
+
|
|
24
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
31
|
def self.attribute_map
|
|
26
32
|
{
|
|
27
33
|
:'valid' => :'valid',
|
|
28
|
-
:'sandbox_id' => :'sandboxId'
|
|
34
|
+
:'sandbox_id' => :'sandboxId',
|
|
35
|
+
:'runner_id' => :'runnerId',
|
|
36
|
+
:'runner_domain' => :'runnerDomain'
|
|
29
37
|
}
|
|
30
38
|
end
|
|
31
39
|
|
|
@@ -43,7 +51,9 @@ module DaytonaApiClient
|
|
|
43
51
|
def self.openapi_types
|
|
44
52
|
{
|
|
45
53
|
:'valid' => :'Boolean',
|
|
46
|
-
:'sandbox_id' => :'String'
|
|
54
|
+
:'sandbox_id' => :'String',
|
|
55
|
+
:'runner_id' => :'String',
|
|
56
|
+
:'runner_domain' => :'String'
|
|
47
57
|
}
|
|
48
58
|
end
|
|
49
59
|
|
|
@@ -80,6 +90,14 @@ module DaytonaApiClient
|
|
|
80
90
|
else
|
|
81
91
|
self.sandbox_id = nil
|
|
82
92
|
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'runner_id')
|
|
95
|
+
self.runner_id = attributes[:'runner_id']
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'runner_domain')
|
|
99
|
+
self.runner_domain = attributes[:'runner_domain']
|
|
100
|
+
end
|
|
83
101
|
end
|
|
84
102
|
|
|
85
103
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -133,7 +151,9 @@ module DaytonaApiClient
|
|
|
133
151
|
return true if self.equal?(o)
|
|
134
152
|
self.class == o.class &&
|
|
135
153
|
valid == o.valid &&
|
|
136
|
-
sandbox_id == o.sandbox_id
|
|
154
|
+
sandbox_id == o.sandbox_id &&
|
|
155
|
+
runner_id == o.runner_id &&
|
|
156
|
+
runner_domain == o.runner_domain
|
|
137
157
|
end
|
|
138
158
|
|
|
139
159
|
# @see the `==` method
|
|
@@ -145,7 +165,7 @@ module DaytonaApiClient
|
|
|
145
165
|
# Calculates hash code according to all attributes.
|
|
146
166
|
# @return [Integer] Hash code
|
|
147
167
|
def hash
|
|
148
|
-
[valid, sandbox_id].hash
|
|
168
|
+
[valid, sandbox_id, runner_id, runner_domain].hash
|
|
149
169
|
end
|
|
150
170
|
|
|
151
171
|
# Builds the object from hash
|
|
@@ -171,6 +191,61 @@ module DaytonaApiClient
|
|
|
171
191
|
new(transformed_hash)
|
|
172
192
|
end
|
|
173
193
|
|
|
194
|
+
# Deserializes the data based on type
|
|
195
|
+
# @param string type Data type
|
|
196
|
+
# @param string value Value to be deserialized
|
|
197
|
+
# @return [Object] Deserialized data
|
|
198
|
+
def self._deserialize(type, value)
|
|
199
|
+
case type.to_sym
|
|
200
|
+
when :Time
|
|
201
|
+
Time.parse(value)
|
|
202
|
+
when :Date
|
|
203
|
+
Date.parse(value)
|
|
204
|
+
when :String
|
|
205
|
+
value.to_s
|
|
206
|
+
when :Integer
|
|
207
|
+
value.to_i
|
|
208
|
+
when :Float
|
|
209
|
+
value.to_f
|
|
210
|
+
when :Boolean
|
|
211
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
212
|
+
true
|
|
213
|
+
else
|
|
214
|
+
false
|
|
215
|
+
end
|
|
216
|
+
when :Object
|
|
217
|
+
# generic object (usually a Hash), return directly
|
|
218
|
+
value
|
|
219
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
220
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
221
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
222
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
223
|
+
k_type = Regexp.last_match[:k_type]
|
|
224
|
+
v_type = Regexp.last_match[:v_type]
|
|
225
|
+
{}.tap do |hash|
|
|
226
|
+
value.each do |k, v|
|
|
227
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
else # model
|
|
231
|
+
# models (e.g. Pet) or oneOf
|
|
232
|
+
klass = DaytonaApiClient.const_get(type)
|
|
233
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Returns the string representation of the object
|
|
238
|
+
# @return [String] String presentation of the object
|
|
239
|
+
def to_s
|
|
240
|
+
to_hash.to_s
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
244
|
+
# @return [Hash] Returns the object in the form of hash
|
|
245
|
+
def to_body
|
|
246
|
+
to_hash
|
|
247
|
+
end
|
|
248
|
+
|
|
174
249
|
# Returns the object in the form of hash
|
|
175
250
|
# @return [Hash] Returns the object in the form of hash
|
|
176
251
|
def to_hash
|
|
@@ -187,6 +262,22 @@ module DaytonaApiClient
|
|
|
187
262
|
hash
|
|
188
263
|
end
|
|
189
264
|
|
|
265
|
+
# Outputs non-array value in the form of hash
|
|
266
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
267
|
+
# @param [Object] value Any valid value
|
|
268
|
+
# @return [Hash] Returns the value in the form of hash
|
|
269
|
+
def _to_hash(value)
|
|
270
|
+
if value.is_a?(Array)
|
|
271
|
+
value.compact.map { |v| _to_hash(v) }
|
|
272
|
+
elsif value.is_a?(Hash)
|
|
273
|
+
{}.tap do |hash|
|
|
274
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
275
|
+
end
|
|
276
|
+
elsif value.respond_to? :to_hash
|
|
277
|
+
value.to_hash
|
|
278
|
+
else
|
|
279
|
+
value
|
|
280
|
+
end
|
|
281
|
+
end
|
|
190
282
|
end
|
|
191
|
-
|
|
192
283
|
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 StorageAccessDto
|
|
17
|
+
class StorageAccessDto
|
|
18
18
|
# Access key for storage authentication
|
|
19
19
|
attr_accessor :access_key
|
|
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
|