daytona_api_client 0.168.0 → 0.170.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/.openapi-generator/FILES +2 -0
- data/.openapi-generator/VERSION +1 -1
- data/lib/daytona_api_client/api/admin_api.rb +1 -1
- data/lib/daytona_api_client/api/api_keys_api.rb +1 -1
- data/lib/daytona_api_client/api/audit_api.rb +1 -1
- data/lib/daytona_api_client/api/config_api.rb +1 -1
- data/lib/daytona_api_client/api/docker_registry_api.rb +1 -1
- data/lib/daytona_api_client/api/health_api.rb +1 -1
- data/lib/daytona_api_client/api/jobs_api.rb +1 -1
- data/lib/daytona_api_client/api/object_storage_api.rb +1 -1
- data/lib/daytona_api_client/api/organizations_api.rb +1 -1
- data/lib/daytona_api_client/api/preview_api.rb +1 -1
- data/lib/daytona_api_client/api/regions_api.rb +1 -1
- data/lib/daytona_api_client/api/runners_api.rb +1 -1
- data/lib/daytona_api_client/api/sandbox_api.rb +81 -4
- data/lib/daytona_api_client/api/snapshots_api.rb +3 -3
- data/lib/daytona_api_client/api/toolbox_api.rb +1 -1
- data/lib/daytona_api_client/api/users_api.rb +1 -1
- data/lib/daytona_api_client/api/volumes_api.rb +1 -1
- data/lib/daytona_api_client/api/webhooks_api.rb +1 -1
- data/lib/daytona_api_client/api/workspace_api.rb +1 -1
- data/lib/daytona_api_client/api_client.rb +7 -3
- data/lib/daytona_api_client/api_error.rb +1 -1
- data/lib/daytona_api_client/api_model_base.rb +88 -0
- data/lib/daytona_api_client/configuration.rb +1 -1
- data/lib/daytona_api_client/models/account_provider.rb +2 -75
- data/lib/daytona_api_client/models/admin_create_runner.rb +2 -75
- data/lib/daytona_api_client/models/admin_get_webhook_status200_response.rb +2 -75
- data/lib/daytona_api_client/models/announcement.rb +2 -75
- data/lib/daytona_api_client/models/api_key_list.rb +2 -75
- data/lib/daytona_api_client/models/api_key_response.rb +2 -75
- data/lib/daytona_api_client/models/audit_log.rb +2 -75
- data/lib/daytona_api_client/models/build_info.rb +2 -75
- data/lib/daytona_api_client/models/command.rb +2 -75
- data/lib/daytona_api_client/models/completion_context.rb +2 -75
- data/lib/daytona_api_client/models/completion_item.rb +2 -75
- data/lib/daytona_api_client/models/completion_list.rb +2 -75
- data/lib/daytona_api_client/models/compressed_screenshot_response.rb +2 -75
- data/lib/daytona_api_client/models/computer_use_start_response.rb +2 -75
- data/lib/daytona_api_client/models/computer_use_status_response.rb +4 -77
- data/lib/daytona_api_client/models/computer_use_stop_response.rb +2 -75
- data/lib/daytona_api_client/models/create_api_key.rb +2 -75
- data/lib/daytona_api_client/models/create_build_info.rb +2 -75
- data/lib/daytona_api_client/models/create_docker_registry.rb +2 -75
- data/lib/daytona_api_client/models/create_linked_account.rb +2 -75
- data/lib/daytona_api_client/models/create_organization.rb +2 -75
- data/lib/daytona_api_client/models/create_organization_invitation.rb +4 -77
- data/lib/daytona_api_client/models/create_organization_quota.rb +2 -75
- data/lib/daytona_api_client/models/create_organization_role.rb +2 -75
- data/lib/daytona_api_client/models/create_region.rb +2 -75
- data/lib/daytona_api_client/models/create_region_response.rb +2 -75
- data/lib/daytona_api_client/models/create_runner.rb +2 -75
- data/lib/daytona_api_client/models/create_runner_response.rb +2 -75
- data/lib/daytona_api_client/models/create_sandbox.rb +4 -77
- data/lib/daytona_api_client/models/create_sandbox_snapshot.rb +2 -75
- data/lib/daytona_api_client/models/create_session_request.rb +2 -75
- data/lib/daytona_api_client/models/create_snapshot.rb +2 -75
- data/lib/daytona_api_client/models/create_user.rb +4 -77
- data/lib/daytona_api_client/models/create_volume.rb +2 -75
- data/lib/daytona_api_client/models/create_workspace.rb +6 -79
- data/lib/daytona_api_client/models/daytona_configuration.rb +2 -75
- data/lib/daytona_api_client/models/display_info_response.rb +2 -75
- data/lib/daytona_api_client/models/docker_registry.rb +4 -77
- data/lib/daytona_api_client/models/download_files.rb +2 -75
- data/lib/daytona_api_client/models/execute_request.rb +2 -75
- data/lib/daytona_api_client/models/execute_response.rb +2 -75
- data/lib/daytona_api_client/models/file_info.rb +2 -75
- data/lib/daytona_api_client/models/file_status.rb +2 -75
- data/lib/daytona_api_client/models/fork_sandbox.rb +2 -75
- data/lib/daytona_api_client/models/git_add_request.rb +2 -75
- data/lib/daytona_api_client/models/git_branch_request.rb +2 -75
- data/lib/daytona_api_client/models/git_checkout_request.rb +2 -75
- data/lib/daytona_api_client/models/git_clone_request.rb +2 -75
- data/lib/daytona_api_client/models/git_commit_info.rb +2 -75
- data/lib/daytona_api_client/models/git_commit_request.rb +2 -75
- data/lib/daytona_api_client/models/git_commit_response.rb +2 -75
- data/lib/daytona_api_client/models/git_delete_branch_request.rb +2 -75
- data/lib/daytona_api_client/models/git_repo_request.rb +2 -75
- data/lib/daytona_api_client/models/git_status.rb +2 -75
- data/lib/daytona_api_client/models/health_controller_check200_response.rb +2 -75
- data/lib/daytona_api_client/models/health_controller_check200_response_info_value.rb +2 -75
- data/lib/daytona_api_client/models/health_controller_check503_response.rb +2 -75
- data/lib/daytona_api_client/models/job.rb +4 -77
- data/lib/daytona_api_client/models/job_status.rb +4 -3
- data/lib/daytona_api_client/models/job_type.rb +4 -3
- data/lib/daytona_api_client/models/keyboard_hotkey_request.rb +2 -75
- data/lib/daytona_api_client/models/keyboard_press_request.rb +2 -75
- data/lib/daytona_api_client/models/keyboard_type_request.rb +2 -75
- data/lib/daytona_api_client/models/list_branch_response.rb +2 -75
- data/lib/daytona_api_client/models/log_entry.rb +2 -75
- data/lib/daytona_api_client/models/lsp_completion_params.rb +2 -75
- data/lib/daytona_api_client/models/lsp_document_request.rb +2 -75
- data/lib/daytona_api_client/models/lsp_location.rb +2 -75
- data/lib/daytona_api_client/models/lsp_server_request.rb +2 -75
- data/lib/daytona_api_client/models/lsp_symbol.rb +2 -75
- data/lib/daytona_api_client/models/match.rb +2 -75
- data/lib/daytona_api_client/models/metric_data_point.rb +2 -75
- data/lib/daytona_api_client/models/metric_series.rb +2 -75
- data/lib/daytona_api_client/models/metrics_response.rb +2 -75
- data/lib/daytona_api_client/models/mouse_click_request.rb +2 -75
- data/lib/daytona_api_client/models/mouse_click_response.rb +2 -75
- data/lib/daytona_api_client/models/mouse_drag_request.rb +2 -75
- data/lib/daytona_api_client/models/mouse_drag_response.rb +2 -75
- data/lib/daytona_api_client/models/mouse_move_request.rb +2 -75
- data/lib/daytona_api_client/models/mouse_move_response.rb +2 -75
- data/lib/daytona_api_client/models/mouse_position.rb +2 -75
- data/lib/daytona_api_client/models/mouse_scroll_request.rb +2 -75
- data/lib/daytona_api_client/models/mouse_scroll_response.rb +2 -75
- data/lib/daytona_api_client/models/oidc_config.rb +2 -75
- data/lib/daytona_api_client/models/organization.rb +2 -75
- data/lib/daytona_api_client/models/organization_invitation.rb +6 -79
- data/lib/daytona_api_client/models/organization_role.rb +2 -75
- data/lib/daytona_api_client/models/organization_sandbox_default_limited_network_egress.rb +2 -75
- data/lib/daytona_api_client/models/organization_suspension.rb +2 -75
- data/lib/daytona_api_client/models/organization_usage_overview.rb +2 -75
- data/lib/daytona_api_client/models/organization_user.rb +4 -77
- data/lib/daytona_api_client/models/otel_config.rb +2 -75
- data/lib/daytona_api_client/models/paginated_audit_logs.rb +2 -75
- data/lib/daytona_api_client/models/paginated_jobs.rb +2 -75
- data/lib/daytona_api_client/models/paginated_logs.rb +2 -75
- data/lib/daytona_api_client/models/paginated_sandboxes.rb +2 -75
- data/lib/daytona_api_client/models/paginated_snapshots.rb +2 -75
- data/lib/daytona_api_client/models/paginated_traces.rb +2 -75
- data/lib/daytona_api_client/models/poll_jobs_response.rb +2 -75
- data/lib/daytona_api_client/models/port_preview_url.rb +2 -75
- data/lib/daytona_api_client/models/position.rb +2 -75
- data/lib/daytona_api_client/models/posthog_config.rb +2 -75
- data/lib/daytona_api_client/models/process_errors_response.rb +2 -75
- data/lib/daytona_api_client/models/process_logs_response.rb +2 -75
- data/lib/daytona_api_client/models/process_restart_response.rb +2 -75
- data/lib/daytona_api_client/models/process_status_response.rb +2 -75
- data/lib/daytona_api_client/models/project_dir_response.rb +2 -75
- data/lib/daytona_api_client/models/pty_create_request.rb +2 -75
- data/lib/daytona_api_client/models/pty_create_response.rb +2 -75
- data/lib/daytona_api_client/models/pty_list_response.rb +2 -75
- data/lib/daytona_api_client/models/pty_resize_request.rb +2 -75
- data/lib/daytona_api_client/models/pty_session_info.rb +2 -75
- data/lib/daytona_api_client/models/range.rb +2 -75
- data/lib/daytona_api_client/models/rate_limit_config.rb +2 -75
- data/lib/daytona_api_client/models/rate_limit_entry.rb +2 -75
- data/lib/daytona_api_client/models/regenerate_api_key_response.rb +2 -75
- data/lib/daytona_api_client/models/region.rb +2 -75
- data/lib/daytona_api_client/models/region_quota.rb +2 -75
- data/lib/daytona_api_client/models/region_screenshot_response.rb +2 -75
- data/lib/daytona_api_client/models/region_type.rb +4 -3
- data/lib/daytona_api_client/models/region_usage_overview.rb +2 -75
- data/lib/daytona_api_client/models/registry_push_access_dto.rb +2 -75
- data/lib/daytona_api_client/models/replace_request.rb +2 -75
- data/lib/daytona_api_client/models/replace_result.rb +2 -75
- data/lib/daytona_api_client/models/resize_sandbox.rb +2 -75
- data/lib/daytona_api_client/models/runner.rb +2 -75
- data/lib/daytona_api_client/models/runner_class.rb +4 -3
- data/lib/daytona_api_client/models/runner_full.rb +2 -75
- data/lib/daytona_api_client/models/runner_health_metrics.rb +2 -75
- data/lib/daytona_api_client/models/runner_healthcheck.rb +2 -75
- data/lib/daytona_api_client/models/runner_service_health.rb +2 -75
- data/lib/daytona_api_client/models/runner_snapshot_dto.rb +2 -75
- data/lib/daytona_api_client/models/runner_state.rb +4 -3
- data/lib/daytona_api_client/models/sandbox.rb +6 -79
- data/lib/daytona_api_client/models/sandbox_class.rb +4 -3
- data/lib/daytona_api_client/models/sandbox_desired_state.rb +4 -3
- data/lib/daytona_api_client/models/sandbox_info.rb +2 -75
- data/lib/daytona_api_client/models/sandbox_labels.rb +2 -75
- data/lib/daytona_api_client/models/sandbox_state.rb +4 -3
- data/lib/daytona_api_client/models/sandbox_volume.rb +2 -75
- data/lib/daytona_api_client/models/screenshot_response.rb +2 -75
- data/lib/daytona_api_client/models/search_files_response.rb +2 -75
- data/lib/daytona_api_client/models/send_webhook_dto.rb +2 -75
- data/lib/daytona_api_client/models/session.rb +2 -75
- data/lib/daytona_api_client/models/session_execute_request.rb +2 -75
- data/lib/daytona_api_client/models/session_execute_response.rb +2 -75
- data/lib/daytona_api_client/models/set_snapshot_general_status_dto.rb +2 -75
- data/lib/daytona_api_client/models/signed_port_preview_url.rb +2 -75
- data/lib/daytona_api_client/models/snapshot_dto.rb +2 -75
- data/lib/daytona_api_client/models/snapshot_manager_credentials.rb +2 -75
- data/lib/daytona_api_client/models/snapshot_state.rb +4 -3
- data/lib/daytona_api_client/models/ssh_access_dto.rb +2 -75
- data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +2 -75
- data/lib/daytona_api_client/models/storage_access_dto.rb +2 -75
- data/lib/daytona_api_client/models/toolbox_proxy_url.rb +2 -75
- data/lib/daytona_api_client/models/trace_span.rb +2 -75
- data/lib/daytona_api_client/models/trace_summary.rb +2 -75
- data/lib/daytona_api_client/models/update_docker_registry.rb +2 -75
- data/lib/daytona_api_client/models/update_job_status.rb +2 -75
- data/lib/daytona_api_client/models/update_organization_default_region.rb +2 -75
- data/lib/daytona_api_client/models/update_organization_invitation.rb +4 -77
- data/lib/daytona_api_client/models/update_organization_member_access.rb +4 -77
- data/lib/daytona_api_client/models/update_organization_quota.rb +2 -75
- data/lib/daytona_api_client/models/update_organization_region_quota.rb +2 -75
- data/lib/daytona_api_client/models/update_organization_role.rb +2 -75
- data/lib/daytona_api_client/models/update_region.rb +2 -75
- data/lib/daytona_api_client/models/update_sandbox_network_settings.rb +158 -0
- data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +4 -77
- data/lib/daytona_api_client/models/url.rb +2 -75
- data/lib/daytona_api_client/models/user.rb +2 -75
- data/lib/daytona_api_client/models/user_home_dir_response.rb +2 -75
- data/lib/daytona_api_client/models/user_public_key.rb +2 -75
- data/lib/daytona_api_client/models/volume_dto.rb +2 -75
- data/lib/daytona_api_client/models/volume_state.rb +4 -3
- data/lib/daytona_api_client/models/webhook_app_portal_access.rb +2 -75
- data/lib/daytona_api_client/models/webhook_event.rb +4 -3
- data/lib/daytona_api_client/models/webhook_initialization_status.rb +2 -75
- data/lib/daytona_api_client/models/windows_response.rb +2 -75
- data/lib/daytona_api_client/models/work_dir_response.rb +2 -75
- data/lib/daytona_api_client/models/workspace.rb +8 -81
- data/lib/daytona_api_client/models/workspace_port_preview_url.rb +2 -75
- data/lib/daytona_api_client/version.rb +2 -2
- data/lib/daytona_api_client.rb +3 -1
- data/project.json +6 -2
- metadata +3 -1
|
@@ -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.21.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 UpdateRegion
|
|
17
|
+
class UpdateRegion < ApiModelBase
|
|
18
18
|
# Proxy URL for the region
|
|
19
19
|
attr_accessor :proxy_url
|
|
20
20
|
|
|
@@ -150,61 +150,6 @@ module DaytonaApiClient
|
|
|
150
150
|
new(transformed_hash)
|
|
151
151
|
end
|
|
152
152
|
|
|
153
|
-
# Deserializes the data based on type
|
|
154
|
-
# @param string type Data type
|
|
155
|
-
# @param string value Value to be deserialized
|
|
156
|
-
# @return [Object] Deserialized data
|
|
157
|
-
def self._deserialize(type, value)
|
|
158
|
-
case type.to_sym
|
|
159
|
-
when :Time
|
|
160
|
-
Time.parse(value)
|
|
161
|
-
when :Date
|
|
162
|
-
Date.parse(value)
|
|
163
|
-
when :String
|
|
164
|
-
value.to_s
|
|
165
|
-
when :Integer
|
|
166
|
-
value.to_i
|
|
167
|
-
when :Float
|
|
168
|
-
value.to_f
|
|
169
|
-
when :Boolean
|
|
170
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
171
|
-
true
|
|
172
|
-
else
|
|
173
|
-
false
|
|
174
|
-
end
|
|
175
|
-
when :Object
|
|
176
|
-
# generic object (usually a Hash), return directly
|
|
177
|
-
value
|
|
178
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
179
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
180
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
181
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
182
|
-
k_type = Regexp.last_match[:k_type]
|
|
183
|
-
v_type = Regexp.last_match[:v_type]
|
|
184
|
-
{}.tap do |hash|
|
|
185
|
-
value.each do |k, v|
|
|
186
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
187
|
-
end
|
|
188
|
-
end
|
|
189
|
-
else # model
|
|
190
|
-
# models (e.g. Pet) or oneOf
|
|
191
|
-
klass = DaytonaApiClient.const_get(type)
|
|
192
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
193
|
-
end
|
|
194
|
-
end
|
|
195
|
-
|
|
196
|
-
# Returns the string representation of the object
|
|
197
|
-
# @return [String] String presentation of the object
|
|
198
|
-
def to_s
|
|
199
|
-
to_hash.to_s
|
|
200
|
-
end
|
|
201
|
-
|
|
202
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
203
|
-
# @return [Hash] Returns the object in the form of hash
|
|
204
|
-
def to_body
|
|
205
|
-
to_hash
|
|
206
|
-
end
|
|
207
|
-
|
|
208
153
|
# Returns the object in the form of hash
|
|
209
154
|
# @return [Hash] Returns the object in the form of hash
|
|
210
155
|
def to_hash
|
|
@@ -221,24 +166,6 @@ module DaytonaApiClient
|
|
|
221
166
|
hash
|
|
222
167
|
end
|
|
223
168
|
|
|
224
|
-
# Outputs non-array value in the form of hash
|
|
225
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
226
|
-
# @param [Object] value Any valid value
|
|
227
|
-
# @return [Hash] Returns the value in the form of hash
|
|
228
|
-
def _to_hash(value)
|
|
229
|
-
if value.is_a?(Array)
|
|
230
|
-
value.compact.map { |v| _to_hash(v) }
|
|
231
|
-
elsif value.is_a?(Hash)
|
|
232
|
-
{}.tap do |hash|
|
|
233
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
234
|
-
end
|
|
235
|
-
elsif value.respond_to? :to_hash
|
|
236
|
-
value.to_hash
|
|
237
|
-
else
|
|
238
|
-
value
|
|
239
|
-
end
|
|
240
|
-
end
|
|
241
|
-
|
|
242
169
|
end
|
|
243
170
|
|
|
244
171
|
end
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Daytona
|
|
3
|
+
|
|
4
|
+
#Daytona AI platform API Docs
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@daytona.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module DaytonaApiClient
|
|
17
|
+
class UpdateSandboxNetworkSettings < ApiModelBase
|
|
18
|
+
# Whether to block all network access for the sandbox
|
|
19
|
+
attr_accessor :network_block_all
|
|
20
|
+
|
|
21
|
+
# Comma-separated list of allowed CIDR network addresses for the sandbox
|
|
22
|
+
attr_accessor :network_allow_list
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'network_block_all' => :'networkBlockAll',
|
|
28
|
+
:'network_allow_list' => :'networkAllowList'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
acceptable_attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'network_block_all' => :'Boolean',
|
|
46
|
+
:'network_allow_list' => :'String'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::UpdateSandboxNetworkSettings` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::UpdateSandboxNetworkSettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
|
+
end
|
|
69
|
+
h[k.to_sym] = v
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'network_block_all')
|
|
73
|
+
self.network_block_all = attributes[:'network_block_all']
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'network_allow_list')
|
|
77
|
+
self.network_allow_list = attributes[:'network_allow_list']
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
82
|
+
# @return Array for valid properties with the reasons
|
|
83
|
+
def list_invalid_properties
|
|
84
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
85
|
+
invalid_properties = Array.new
|
|
86
|
+
invalid_properties
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Check to see if the all the properties in the model are valid
|
|
90
|
+
# @return true if the model is valid
|
|
91
|
+
def valid?
|
|
92
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
93
|
+
true
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Checks equality by comparing each attribute.
|
|
97
|
+
# @param [Object] Object to be compared
|
|
98
|
+
def ==(o)
|
|
99
|
+
return true if self.equal?(o)
|
|
100
|
+
self.class == o.class &&
|
|
101
|
+
network_block_all == o.network_block_all &&
|
|
102
|
+
network_allow_list == o.network_allow_list
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# @see the `==` method
|
|
106
|
+
# @param [Object] Object to be compared
|
|
107
|
+
def eql?(o)
|
|
108
|
+
self == o
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Calculates hash code according to all attributes.
|
|
112
|
+
# @return [Integer] Hash code
|
|
113
|
+
def hash
|
|
114
|
+
[network_block_all, network_allow_list].hash
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Builds the object from hash
|
|
118
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
119
|
+
# @return [Object] Returns the model itself
|
|
120
|
+
def self.build_from_hash(attributes)
|
|
121
|
+
return nil unless attributes.is_a?(Hash)
|
|
122
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
123
|
+
transformed_hash = {}
|
|
124
|
+
openapi_types.each_pair do |key, type|
|
|
125
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
126
|
+
transformed_hash["#{key}"] = nil
|
|
127
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
128
|
+
# check to ensure the input is an array given that the attribute
|
|
129
|
+
# is documented as an array but the input is not
|
|
130
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
131
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
132
|
+
end
|
|
133
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
134
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
new(transformed_hash)
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Returns the object in the form of hash
|
|
141
|
+
# @return [Hash] Returns the object in the form of hash
|
|
142
|
+
def to_hash
|
|
143
|
+
hash = {}
|
|
144
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
145
|
+
value = self.send(attr)
|
|
146
|
+
if value.nil?
|
|
147
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
148
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
hash[param] = _to_hash(value)
|
|
152
|
+
end
|
|
153
|
+
hash
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
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.21.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 UpdateSandboxStateDto
|
|
17
|
+
class UpdateSandboxStateDto < ApiModelBase
|
|
18
18
|
# The new state for the sandbox
|
|
19
19
|
attr_accessor :state
|
|
20
20
|
|
|
@@ -128,7 +128,7 @@ module DaytonaApiClient
|
|
|
128
128
|
def valid?
|
|
129
129
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
130
130
|
return false if @state.nil?
|
|
131
|
-
state_validator = EnumAttributeValidator.new('String', ["creating", "restoring", "destroyed", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving", "resizing", "snapshotting", "forking"])
|
|
131
|
+
state_validator = EnumAttributeValidator.new('String', ["creating", "restoring", "destroyed", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving", "resizing", "snapshotting", "forking", "unknown_default_open_api"])
|
|
132
132
|
return false unless state_validator.valid?(@state)
|
|
133
133
|
true
|
|
134
134
|
end
|
|
@@ -136,7 +136,7 @@ module DaytonaApiClient
|
|
|
136
136
|
# Custom attribute writer method checking allowed values (enum).
|
|
137
137
|
# @param [Object] state Object to be assigned
|
|
138
138
|
def state=(state)
|
|
139
|
-
validator = EnumAttributeValidator.new('String', ["creating", "restoring", "destroyed", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving", "resizing", "snapshotting", "forking"])
|
|
139
|
+
validator = EnumAttributeValidator.new('String', ["creating", "restoring", "destroyed", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving", "resizing", "snapshotting", "forking", "unknown_default_open_api"])
|
|
140
140
|
unless validator.valid?(state)
|
|
141
141
|
fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
|
|
142
142
|
end
|
|
@@ -188,61 +188,6 @@ module DaytonaApiClient
|
|
|
188
188
|
new(transformed_hash)
|
|
189
189
|
end
|
|
190
190
|
|
|
191
|
-
# Deserializes the data based on type
|
|
192
|
-
# @param string type Data type
|
|
193
|
-
# @param string value Value to be deserialized
|
|
194
|
-
# @return [Object] Deserialized data
|
|
195
|
-
def self._deserialize(type, value)
|
|
196
|
-
case type.to_sym
|
|
197
|
-
when :Time
|
|
198
|
-
Time.parse(value)
|
|
199
|
-
when :Date
|
|
200
|
-
Date.parse(value)
|
|
201
|
-
when :String
|
|
202
|
-
value.to_s
|
|
203
|
-
when :Integer
|
|
204
|
-
value.to_i
|
|
205
|
-
when :Float
|
|
206
|
-
value.to_f
|
|
207
|
-
when :Boolean
|
|
208
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
209
|
-
true
|
|
210
|
-
else
|
|
211
|
-
false
|
|
212
|
-
end
|
|
213
|
-
when :Object
|
|
214
|
-
# generic object (usually a Hash), return directly
|
|
215
|
-
value
|
|
216
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
217
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
218
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
219
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
220
|
-
k_type = Regexp.last_match[:k_type]
|
|
221
|
-
v_type = Regexp.last_match[:v_type]
|
|
222
|
-
{}.tap do |hash|
|
|
223
|
-
value.each do |k, v|
|
|
224
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
225
|
-
end
|
|
226
|
-
end
|
|
227
|
-
else # model
|
|
228
|
-
# models (e.g. Pet) or oneOf
|
|
229
|
-
klass = DaytonaApiClient.const_get(type)
|
|
230
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
231
|
-
end
|
|
232
|
-
end
|
|
233
|
-
|
|
234
|
-
# Returns the string representation of the object
|
|
235
|
-
# @return [String] String presentation of the object
|
|
236
|
-
def to_s
|
|
237
|
-
to_hash.to_s
|
|
238
|
-
end
|
|
239
|
-
|
|
240
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
241
|
-
# @return [Hash] Returns the object in the form of hash
|
|
242
|
-
def to_body
|
|
243
|
-
to_hash
|
|
244
|
-
end
|
|
245
|
-
|
|
246
191
|
# Returns the object in the form of hash
|
|
247
192
|
# @return [Hash] Returns the object in the form of hash
|
|
248
193
|
def to_hash
|
|
@@ -259,24 +204,6 @@ module DaytonaApiClient
|
|
|
259
204
|
hash
|
|
260
205
|
end
|
|
261
206
|
|
|
262
|
-
# Outputs non-array value in the form of hash
|
|
263
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
264
|
-
# @param [Object] value Any valid value
|
|
265
|
-
# @return [Hash] Returns the value in the form of hash
|
|
266
|
-
def _to_hash(value)
|
|
267
|
-
if value.is_a?(Array)
|
|
268
|
-
value.compact.map { |v| _to_hash(v) }
|
|
269
|
-
elsif value.is_a?(Hash)
|
|
270
|
-
{}.tap do |hash|
|
|
271
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
272
|
-
end
|
|
273
|
-
elsif value.respond_to? :to_hash
|
|
274
|
-
value.to_hash
|
|
275
|
-
else
|
|
276
|
-
value
|
|
277
|
-
end
|
|
278
|
-
end
|
|
279
|
-
|
|
280
207
|
end
|
|
281
208
|
|
|
282
209
|
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.21.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 Url
|
|
17
|
+
class Url < ApiModelBase
|
|
18
18
|
# URL response
|
|
19
19
|
attr_accessor :url
|
|
20
20
|
|
|
@@ -144,61 +144,6 @@ module DaytonaApiClient
|
|
|
144
144
|
new(transformed_hash)
|
|
145
145
|
end
|
|
146
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
|
-
|
|
202
147
|
# Returns the object in the form of hash
|
|
203
148
|
# @return [Hash] Returns the object in the form of hash
|
|
204
149
|
def to_hash
|
|
@@ -215,24 +160,6 @@ module DaytonaApiClient
|
|
|
215
160
|
hash
|
|
216
161
|
end
|
|
217
162
|
|
|
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
|
|
235
|
-
|
|
236
163
|
end
|
|
237
164
|
|
|
238
165
|
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.21.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class User
|
|
17
|
+
class User < ApiModelBase
|
|
18
18
|
# User ID
|
|
19
19
|
attr_accessor :id
|
|
20
20
|
|
|
@@ -254,61 +254,6 @@ module DaytonaApiClient
|
|
|
254
254
|
new(transformed_hash)
|
|
255
255
|
end
|
|
256
256
|
|
|
257
|
-
# Deserializes the data based on type
|
|
258
|
-
# @param string type Data type
|
|
259
|
-
# @param string value Value to be deserialized
|
|
260
|
-
# @return [Object] Deserialized data
|
|
261
|
-
def self._deserialize(type, value)
|
|
262
|
-
case type.to_sym
|
|
263
|
-
when :Time
|
|
264
|
-
Time.parse(value)
|
|
265
|
-
when :Date
|
|
266
|
-
Date.parse(value)
|
|
267
|
-
when :String
|
|
268
|
-
value.to_s
|
|
269
|
-
when :Integer
|
|
270
|
-
value.to_i
|
|
271
|
-
when :Float
|
|
272
|
-
value.to_f
|
|
273
|
-
when :Boolean
|
|
274
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
275
|
-
true
|
|
276
|
-
else
|
|
277
|
-
false
|
|
278
|
-
end
|
|
279
|
-
when :Object
|
|
280
|
-
# generic object (usually a Hash), return directly
|
|
281
|
-
value
|
|
282
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
283
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
284
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
285
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
286
|
-
k_type = Regexp.last_match[:k_type]
|
|
287
|
-
v_type = Regexp.last_match[:v_type]
|
|
288
|
-
{}.tap do |hash|
|
|
289
|
-
value.each do |k, v|
|
|
290
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
291
|
-
end
|
|
292
|
-
end
|
|
293
|
-
else # model
|
|
294
|
-
# models (e.g. Pet) or oneOf
|
|
295
|
-
klass = DaytonaApiClient.const_get(type)
|
|
296
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
297
|
-
end
|
|
298
|
-
end
|
|
299
|
-
|
|
300
|
-
# Returns the string representation of the object
|
|
301
|
-
# @return [String] String presentation of the object
|
|
302
|
-
def to_s
|
|
303
|
-
to_hash.to_s
|
|
304
|
-
end
|
|
305
|
-
|
|
306
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
307
|
-
# @return [Hash] Returns the object in the form of hash
|
|
308
|
-
def to_body
|
|
309
|
-
to_hash
|
|
310
|
-
end
|
|
311
|
-
|
|
312
257
|
# Returns the object in the form of hash
|
|
313
258
|
# @return [Hash] Returns the object in the form of hash
|
|
314
259
|
def to_hash
|
|
@@ -325,24 +270,6 @@ module DaytonaApiClient
|
|
|
325
270
|
hash
|
|
326
271
|
end
|
|
327
272
|
|
|
328
|
-
# Outputs non-array value in the form of hash
|
|
329
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
330
|
-
# @param [Object] value Any valid value
|
|
331
|
-
# @return [Hash] Returns the value in the form of hash
|
|
332
|
-
def _to_hash(value)
|
|
333
|
-
if value.is_a?(Array)
|
|
334
|
-
value.compact.map { |v| _to_hash(v) }
|
|
335
|
-
elsif value.is_a?(Hash)
|
|
336
|
-
{}.tap do |hash|
|
|
337
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
338
|
-
end
|
|
339
|
-
elsif value.respond_to? :to_hash
|
|
340
|
-
value.to_hash
|
|
341
|
-
else
|
|
342
|
-
value
|
|
343
|
-
end
|
|
344
|
-
end
|
|
345
|
-
|
|
346
273
|
end
|
|
347
274
|
|
|
348
275
|
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.21.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 UserHomeDirResponse
|
|
17
|
+
class UserHomeDirResponse < ApiModelBase
|
|
18
18
|
attr_accessor :dir
|
|
19
19
|
|
|
20
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -126,61 +126,6 @@ module DaytonaApiClient
|
|
|
126
126
|
new(transformed_hash)
|
|
127
127
|
end
|
|
128
128
|
|
|
129
|
-
# Deserializes the data based on type
|
|
130
|
-
# @param string type Data type
|
|
131
|
-
# @param string value Value to be deserialized
|
|
132
|
-
# @return [Object] Deserialized data
|
|
133
|
-
def self._deserialize(type, value)
|
|
134
|
-
case type.to_sym
|
|
135
|
-
when :Time
|
|
136
|
-
Time.parse(value)
|
|
137
|
-
when :Date
|
|
138
|
-
Date.parse(value)
|
|
139
|
-
when :String
|
|
140
|
-
value.to_s
|
|
141
|
-
when :Integer
|
|
142
|
-
value.to_i
|
|
143
|
-
when :Float
|
|
144
|
-
value.to_f
|
|
145
|
-
when :Boolean
|
|
146
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
147
|
-
true
|
|
148
|
-
else
|
|
149
|
-
false
|
|
150
|
-
end
|
|
151
|
-
when :Object
|
|
152
|
-
# generic object (usually a Hash), return directly
|
|
153
|
-
value
|
|
154
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
155
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
156
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
157
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
158
|
-
k_type = Regexp.last_match[:k_type]
|
|
159
|
-
v_type = Regexp.last_match[:v_type]
|
|
160
|
-
{}.tap do |hash|
|
|
161
|
-
value.each do |k, v|
|
|
162
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
163
|
-
end
|
|
164
|
-
end
|
|
165
|
-
else # model
|
|
166
|
-
# models (e.g. Pet) or oneOf
|
|
167
|
-
klass = DaytonaApiClient.const_get(type)
|
|
168
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
169
|
-
end
|
|
170
|
-
end
|
|
171
|
-
|
|
172
|
-
# Returns the string representation of the object
|
|
173
|
-
# @return [String] String presentation of the object
|
|
174
|
-
def to_s
|
|
175
|
-
to_hash.to_s
|
|
176
|
-
end
|
|
177
|
-
|
|
178
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
179
|
-
# @return [Hash] Returns the object in the form of hash
|
|
180
|
-
def to_body
|
|
181
|
-
to_hash
|
|
182
|
-
end
|
|
183
|
-
|
|
184
129
|
# Returns the object in the form of hash
|
|
185
130
|
# @return [Hash] Returns the object in the form of hash
|
|
186
131
|
def to_hash
|
|
@@ -197,24 +142,6 @@ module DaytonaApiClient
|
|
|
197
142
|
hash
|
|
198
143
|
end
|
|
199
144
|
|
|
200
|
-
# Outputs non-array value in the form of hash
|
|
201
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
202
|
-
# @param [Object] value Any valid value
|
|
203
|
-
# @return [Hash] Returns the value in the form of hash
|
|
204
|
-
def _to_hash(value)
|
|
205
|
-
if value.is_a?(Array)
|
|
206
|
-
value.compact.map { |v| _to_hash(v) }
|
|
207
|
-
elsif value.is_a?(Hash)
|
|
208
|
-
{}.tap do |hash|
|
|
209
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
210
|
-
end
|
|
211
|
-
elsif value.respond_to? :to_hash
|
|
212
|
-
value.to_hash
|
|
213
|
-
else
|
|
214
|
-
value
|
|
215
|
-
end
|
|
216
|
-
end
|
|
217
|
-
|
|
218
145
|
end
|
|
219
146
|
|
|
220
147
|
end
|