daytona_api_client 0.202.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +9 -0
- data/Gemfile.lock +101 -0
- data/daytona_api_client.gemspec +4 -4
- data/lib/daytona_api_client/api/api_keys_api.rb +2 -2
- data/lib/daytona_api_client/api/audit_api.rb +140 -40
- data/lib/daytona_api_client/api/config_api.rb +1 -1
- data/lib/daytona_api_client/api/docker_registry_api.rb +67 -6
- data/lib/daytona_api_client/api/health_api.rb +3 -54
- data/lib/daytona_api_client/api/object_storage_api.rb +1 -1
- data/lib/daytona_api_client/api/organizations_api.rb +265 -1316
- data/lib/daytona_api_client/api/preview_api.rb +8 -202
- data/lib/daytona_api_client/api/runners_api.rb +22 -412
- data/lib/daytona_api_client/api/sandbox_api.rb +434 -2352
- data/lib/daytona_api_client/api/snapshots_api.rb +113 -39
- data/lib/daytona_api_client/api/toolbox_api.rb +5108 -0
- data/lib/daytona_api_client/api/users_api.rb +239 -2
- data/lib/daytona_api_client/api/volumes_api.rb +2 -2
- data/lib/daytona_api_client/api/webhooks_api.rb +164 -27
- data/lib/daytona_api_client/api/workspace_api.rb +955 -0
- data/lib/daytona_api_client/api_client.rb +4 -8
- data/lib/daytona_api_client/api_error.rb +1 -1
- data/lib/daytona_api_client/configuration.rb +2 -5
- data/lib/daytona_api_client/models/account_provider.rb +74 -3
- data/lib/daytona_api_client/models/announcement.rb +74 -3
- data/lib/daytona_api_client/models/api_key_list.rb +74 -3
- data/lib/daytona_api_client/models/api_key_response.rb +74 -3
- data/lib/daytona_api_client/models/audit_log.rb +75 -22
- data/lib/daytona_api_client/models/build_info.rb +78 -34
- data/lib/daytona_api_client/models/{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 -76
- 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 +77 -15
- data/lib/daytona_api_client/models/create_volume.rb +74 -3
- data/lib/daytona_api_client/models/create_workspace.rb +411 -0
- data/lib/daytona_api_client/models/daytona_configuration.rb +78 -64
- data/lib/daytona_api_client/models/display_info_response.rb +238 -0
- 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/{create_sandbox_snapshot.rb → keyboard_hotkey_request.rb} +93 -34
- 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/lsp_symbol.rb +287 -0
- 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/mouse_scroll_response.rb +236 -0
- data/lib/daytona_api_client/models/oidc_config.rb +74 -3
- data/lib/daytona_api_client/models/organization.rb +159 -243
- 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/pty_create_request.rb +288 -0
- 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 -181
- 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/{resize_sandbox.rb → replace_result.rb} +95 -84
- 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 -164
- 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 -38
- 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/{runner_service_health.rb → search_files_response.rb} +94 -59
- 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/session_execute_response.rb +239 -0
- data/lib/daytona_api_client/models/set_snapshot_general_status_dto.rb +74 -3
- data/lib/daytona_api_client/models/snapshot_dto.rb +78 -71
- data/lib/daytona_api_client/models/snapshot_state.rb +6 -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 +74 -3
- 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} +339 -193
- data/lib/daytona_api_client/version.rb +2 -2
- data/lib/daytona_api_client.rb +76 -74
- data/project.json +13 -38
- metadata +81 -83
- data/.gitignore +0 -39
- data/.openapi-generator/FILES +0 -163
- 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 -1615
- 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/create_organization_region_quota.rb +0 -375
- 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 -44
- 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 -440
- 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/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/string_filter.rb +0 -182
- data/lib/daytona_api_client/models/trace_summary.rb +0 -310
- 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 -302
- data/lib/daytona_api_client/models/update_region.rb +0 -171
- data/lib/daytona_api_client/models/update_sandbox_network_settings.rb +0 -168
- data/lib/daytona_api_client/models/update_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,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class UpdateOrganizationInvitation
|
|
17
|
+
class UpdateOrganizationInvitation
|
|
18
18
|
# Organization member role
|
|
19
19
|
attr_accessor :role
|
|
20
20
|
|
|
@@ -136,7 +136,7 @@ module DaytonaApiClient
|
|
|
136
136
|
def valid?
|
|
137
137
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
138
138
|
return false if @role.nil?
|
|
139
|
-
role_validator = EnumAttributeValidator.new('String', ["owner", "member"
|
|
139
|
+
role_validator = EnumAttributeValidator.new('String', ["owner", "member"])
|
|
140
140
|
return false unless role_validator.valid?(@role)
|
|
141
141
|
return false if @assigned_role_ids.nil?
|
|
142
142
|
true
|
|
@@ -145,7 +145,7 @@ module DaytonaApiClient
|
|
|
145
145
|
# Custom attribute writer method checking allowed values (enum).
|
|
146
146
|
# @param [Object] role Object to be assigned
|
|
147
147
|
def role=(role)
|
|
148
|
-
validator = EnumAttributeValidator.new('String', ["owner", "member"
|
|
148
|
+
validator = EnumAttributeValidator.new('String', ["owner", "member"])
|
|
149
149
|
unless validator.valid?(role)
|
|
150
150
|
fail ArgumentError, "invalid value for \"role\", must be one of #{validator.allowable_values}."
|
|
151
151
|
end
|
|
@@ -207,6 +207,61 @@ module DaytonaApiClient
|
|
|
207
207
|
new(transformed_hash)
|
|
208
208
|
end
|
|
209
209
|
|
|
210
|
+
# Deserializes the data based on type
|
|
211
|
+
# @param string type Data type
|
|
212
|
+
# @param string value Value to be deserialized
|
|
213
|
+
# @return [Object] Deserialized data
|
|
214
|
+
def self._deserialize(type, value)
|
|
215
|
+
case type.to_sym
|
|
216
|
+
when :Time
|
|
217
|
+
Time.parse(value)
|
|
218
|
+
when :Date
|
|
219
|
+
Date.parse(value)
|
|
220
|
+
when :String
|
|
221
|
+
value.to_s
|
|
222
|
+
when :Integer
|
|
223
|
+
value.to_i
|
|
224
|
+
when :Float
|
|
225
|
+
value.to_f
|
|
226
|
+
when :Boolean
|
|
227
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
228
|
+
true
|
|
229
|
+
else
|
|
230
|
+
false
|
|
231
|
+
end
|
|
232
|
+
when :Object
|
|
233
|
+
# generic object (usually a Hash), return directly
|
|
234
|
+
value
|
|
235
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
236
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
237
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
238
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
239
|
+
k_type = Regexp.last_match[:k_type]
|
|
240
|
+
v_type = Regexp.last_match[:v_type]
|
|
241
|
+
{}.tap do |hash|
|
|
242
|
+
value.each do |k, v|
|
|
243
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
244
|
+
end
|
|
245
|
+
end
|
|
246
|
+
else # model
|
|
247
|
+
# models (e.g. Pet) or oneOf
|
|
248
|
+
klass = DaytonaApiClient.const_get(type)
|
|
249
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Returns the string representation of the object
|
|
254
|
+
# @return [String] String presentation of the object
|
|
255
|
+
def to_s
|
|
256
|
+
to_hash.to_s
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
260
|
+
# @return [Hash] Returns the object in the form of hash
|
|
261
|
+
def to_body
|
|
262
|
+
to_hash
|
|
263
|
+
end
|
|
264
|
+
|
|
210
265
|
# Returns the object in the form of hash
|
|
211
266
|
# @return [Hash] Returns the object in the form of hash
|
|
212
267
|
def to_hash
|
|
@@ -223,6 +278,22 @@ module DaytonaApiClient
|
|
|
223
278
|
hash
|
|
224
279
|
end
|
|
225
280
|
|
|
281
|
+
# Outputs non-array value in the form of hash
|
|
282
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
283
|
+
# @param [Object] value Any valid value
|
|
284
|
+
# @return [Hash] Returns the value in the form of hash
|
|
285
|
+
def _to_hash(value)
|
|
286
|
+
if value.is_a?(Array)
|
|
287
|
+
value.compact.map { |v| _to_hash(v) }
|
|
288
|
+
elsif value.is_a?(Hash)
|
|
289
|
+
{}.tap do |hash|
|
|
290
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
291
|
+
end
|
|
292
|
+
elsif value.respond_to? :to_hash
|
|
293
|
+
value.to_hash
|
|
294
|
+
else
|
|
295
|
+
value
|
|
296
|
+
end
|
|
297
|
+
end
|
|
226
298
|
end
|
|
227
|
-
|
|
228
299
|
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 UpdateOrganizationMemberAccess
|
|
17
|
+
class UpdateOrganizationMemberAccess
|
|
18
18
|
# Organization member role
|
|
19
19
|
attr_accessor :role
|
|
20
20
|
|
|
@@ -127,7 +127,7 @@ module DaytonaApiClient
|
|
|
127
127
|
def valid?
|
|
128
128
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
129
129
|
return false if @role.nil?
|
|
130
|
-
role_validator = EnumAttributeValidator.new('String', ["owner", "member"
|
|
130
|
+
role_validator = EnumAttributeValidator.new('String', ["owner", "member"])
|
|
131
131
|
return false unless role_validator.valid?(@role)
|
|
132
132
|
return false if @assigned_role_ids.nil?
|
|
133
133
|
true
|
|
@@ -136,7 +136,7 @@ module DaytonaApiClient
|
|
|
136
136
|
# Custom attribute writer method checking allowed values (enum).
|
|
137
137
|
# @param [Object] role Object to be assigned
|
|
138
138
|
def role=(role)
|
|
139
|
-
validator = EnumAttributeValidator.new('String', ["owner", "member"
|
|
139
|
+
validator = EnumAttributeValidator.new('String', ["owner", "member"])
|
|
140
140
|
unless validator.valid?(role)
|
|
141
141
|
fail ArgumentError, "invalid value for \"role\", must be one of #{validator.allowable_values}."
|
|
142
142
|
end
|
|
@@ -197,6 +197,61 @@ module DaytonaApiClient
|
|
|
197
197
|
new(transformed_hash)
|
|
198
198
|
end
|
|
199
199
|
|
|
200
|
+
# Deserializes the data based on type
|
|
201
|
+
# @param string type Data type
|
|
202
|
+
# @param string value Value to be deserialized
|
|
203
|
+
# @return [Object] Deserialized data
|
|
204
|
+
def self._deserialize(type, value)
|
|
205
|
+
case type.to_sym
|
|
206
|
+
when :Time
|
|
207
|
+
Time.parse(value)
|
|
208
|
+
when :Date
|
|
209
|
+
Date.parse(value)
|
|
210
|
+
when :String
|
|
211
|
+
value.to_s
|
|
212
|
+
when :Integer
|
|
213
|
+
value.to_i
|
|
214
|
+
when :Float
|
|
215
|
+
value.to_f
|
|
216
|
+
when :Boolean
|
|
217
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
218
|
+
true
|
|
219
|
+
else
|
|
220
|
+
false
|
|
221
|
+
end
|
|
222
|
+
when :Object
|
|
223
|
+
# generic object (usually a Hash), return directly
|
|
224
|
+
value
|
|
225
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
226
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
227
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
228
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
229
|
+
k_type = Regexp.last_match[:k_type]
|
|
230
|
+
v_type = Regexp.last_match[:v_type]
|
|
231
|
+
{}.tap do |hash|
|
|
232
|
+
value.each do |k, v|
|
|
233
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
else # model
|
|
237
|
+
# models (e.g. Pet) or oneOf
|
|
238
|
+
klass = DaytonaApiClient.const_get(type)
|
|
239
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
240
|
+
end
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# Returns the string representation of the object
|
|
244
|
+
# @return [String] String presentation of the object
|
|
245
|
+
def to_s
|
|
246
|
+
to_hash.to_s
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
250
|
+
# @return [Hash] Returns the object in the form of hash
|
|
251
|
+
def to_body
|
|
252
|
+
to_hash
|
|
253
|
+
end
|
|
254
|
+
|
|
200
255
|
# Returns the object in the form of hash
|
|
201
256
|
# @return [Hash] Returns the object in the form of hash
|
|
202
257
|
def to_hash
|
|
@@ -213,6 +268,22 @@ module DaytonaApiClient
|
|
|
213
268
|
hash
|
|
214
269
|
end
|
|
215
270
|
|
|
271
|
+
# Outputs non-array value in the form of hash
|
|
272
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
273
|
+
# @param [Object] value Any valid value
|
|
274
|
+
# @return [Hash] Returns the value in the form of hash
|
|
275
|
+
def _to_hash(value)
|
|
276
|
+
if value.is_a?(Array)
|
|
277
|
+
value.compact.map { |v| _to_hash(v) }
|
|
278
|
+
elsif value.is_a?(Hash)
|
|
279
|
+
{}.tap do |hash|
|
|
280
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
281
|
+
end
|
|
282
|
+
elsif value.respond_to? :to_hash
|
|
283
|
+
value.to_hash
|
|
284
|
+
else
|
|
285
|
+
value
|
|
286
|
+
end
|
|
287
|
+
end
|
|
216
288
|
end
|
|
217
|
-
|
|
218
289
|
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,13 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class UpdateOrganizationQuota
|
|
17
|
+
class UpdateOrganizationQuota
|
|
18
|
+
attr_accessor :total_cpu_quota
|
|
19
|
+
|
|
20
|
+
attr_accessor :total_memory_quota
|
|
21
|
+
|
|
22
|
+
attr_accessor :total_disk_quota
|
|
23
|
+
|
|
18
24
|
attr_accessor :max_cpu_per_sandbox
|
|
19
25
|
|
|
20
26
|
attr_accessor :max_memory_per_sandbox
|
|
@@ -27,48 +33,18 @@ module DaytonaApiClient
|
|
|
27
33
|
|
|
28
34
|
attr_accessor :volume_quota
|
|
29
35
|
|
|
30
|
-
attr_accessor :secret_quota
|
|
31
|
-
|
|
32
|
-
# Maximum number of secrets that can be mounted to a single sandbox
|
|
33
|
-
attr_accessor :max_secrets_per_sandbox
|
|
34
|
-
|
|
35
|
-
attr_accessor :authenticated_rate_limit
|
|
36
|
-
|
|
37
|
-
attr_accessor :sandbox_create_rate_limit
|
|
38
|
-
|
|
39
|
-
attr_accessor :sandbox_lifecycle_rate_limit
|
|
40
|
-
|
|
41
|
-
attr_accessor :authenticated_rate_limit_ttl_seconds
|
|
42
|
-
|
|
43
|
-
attr_accessor :sandbox_create_rate_limit_ttl_seconds
|
|
44
|
-
|
|
45
|
-
attr_accessor :sandbox_lifecycle_rate_limit_ttl_seconds
|
|
46
|
-
|
|
47
|
-
# Time in minutes before an unused snapshot is deactivated
|
|
48
|
-
attr_accessor :snapshot_deactivation_timeout_minutes
|
|
49
|
-
|
|
50
|
-
# Maximum number of snapshots an organization can process (building or pulling) concurrently. Excess are queued. <= 0 means unlimited.
|
|
51
|
-
attr_accessor :max_concurrent_snapshot_processing
|
|
52
|
-
|
|
53
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
54
37
|
def self.attribute_map
|
|
55
38
|
{
|
|
39
|
+
:'total_cpu_quota' => :'totalCpuQuota',
|
|
40
|
+
:'total_memory_quota' => :'totalMemoryQuota',
|
|
41
|
+
:'total_disk_quota' => :'totalDiskQuota',
|
|
56
42
|
:'max_cpu_per_sandbox' => :'maxCpuPerSandbox',
|
|
57
43
|
:'max_memory_per_sandbox' => :'maxMemoryPerSandbox',
|
|
58
44
|
:'max_disk_per_sandbox' => :'maxDiskPerSandbox',
|
|
59
45
|
:'snapshot_quota' => :'snapshotQuota',
|
|
60
46
|
:'max_snapshot_size' => :'maxSnapshotSize',
|
|
61
|
-
:'volume_quota' => :'volumeQuota'
|
|
62
|
-
:'secret_quota' => :'secretQuota',
|
|
63
|
-
:'max_secrets_per_sandbox' => :'maxSecretsPerSandbox',
|
|
64
|
-
:'authenticated_rate_limit' => :'authenticatedRateLimit',
|
|
65
|
-
:'sandbox_create_rate_limit' => :'sandboxCreateRateLimit',
|
|
66
|
-
:'sandbox_lifecycle_rate_limit' => :'sandboxLifecycleRateLimit',
|
|
67
|
-
:'authenticated_rate_limit_ttl_seconds' => :'authenticatedRateLimitTtlSeconds',
|
|
68
|
-
:'sandbox_create_rate_limit_ttl_seconds' => :'sandboxCreateRateLimitTtlSeconds',
|
|
69
|
-
:'sandbox_lifecycle_rate_limit_ttl_seconds' => :'sandboxLifecycleRateLimitTtlSeconds',
|
|
70
|
-
:'snapshot_deactivation_timeout_minutes' => :'snapshotDeactivationTimeoutMinutes',
|
|
71
|
-
:'max_concurrent_snapshot_processing' => :'maxConcurrentSnapshotProcessing'
|
|
47
|
+
:'volume_quota' => :'volumeQuota'
|
|
72
48
|
}
|
|
73
49
|
end
|
|
74
50
|
|
|
@@ -85,44 +61,30 @@ module DaytonaApiClient
|
|
|
85
61
|
# Attribute type mapping.
|
|
86
62
|
def self.openapi_types
|
|
87
63
|
{
|
|
64
|
+
:'total_cpu_quota' => :'Float',
|
|
65
|
+
:'total_memory_quota' => :'Float',
|
|
66
|
+
:'total_disk_quota' => :'Float',
|
|
88
67
|
:'max_cpu_per_sandbox' => :'Float',
|
|
89
68
|
:'max_memory_per_sandbox' => :'Float',
|
|
90
69
|
:'max_disk_per_sandbox' => :'Float',
|
|
91
70
|
:'snapshot_quota' => :'Float',
|
|
92
71
|
:'max_snapshot_size' => :'Float',
|
|
93
|
-
:'volume_quota' => :'Float'
|
|
94
|
-
:'secret_quota' => :'Float',
|
|
95
|
-
:'max_secrets_per_sandbox' => :'Float',
|
|
96
|
-
:'authenticated_rate_limit' => :'Float',
|
|
97
|
-
:'sandbox_create_rate_limit' => :'Float',
|
|
98
|
-
:'sandbox_lifecycle_rate_limit' => :'Float',
|
|
99
|
-
:'authenticated_rate_limit_ttl_seconds' => :'Float',
|
|
100
|
-
:'sandbox_create_rate_limit_ttl_seconds' => :'Float',
|
|
101
|
-
:'sandbox_lifecycle_rate_limit_ttl_seconds' => :'Float',
|
|
102
|
-
:'snapshot_deactivation_timeout_minutes' => :'Float',
|
|
103
|
-
:'max_concurrent_snapshot_processing' => :'Float'
|
|
72
|
+
:'volume_quota' => :'Float'
|
|
104
73
|
}
|
|
105
74
|
end
|
|
106
75
|
|
|
107
76
|
# List of attributes with nullable: true
|
|
108
77
|
def self.openapi_nullable
|
|
109
78
|
Set.new([
|
|
79
|
+
:'total_cpu_quota',
|
|
80
|
+
:'total_memory_quota',
|
|
81
|
+
:'total_disk_quota',
|
|
110
82
|
:'max_cpu_per_sandbox',
|
|
111
83
|
:'max_memory_per_sandbox',
|
|
112
84
|
:'max_disk_per_sandbox',
|
|
113
85
|
:'snapshot_quota',
|
|
114
86
|
:'max_snapshot_size',
|
|
115
|
-
:'volume_quota'
|
|
116
|
-
:'secret_quota',
|
|
117
|
-
:'max_secrets_per_sandbox',
|
|
118
|
-
:'authenticated_rate_limit',
|
|
119
|
-
:'sandbox_create_rate_limit',
|
|
120
|
-
:'sandbox_lifecycle_rate_limit',
|
|
121
|
-
:'authenticated_rate_limit_ttl_seconds',
|
|
122
|
-
:'sandbox_create_rate_limit_ttl_seconds',
|
|
123
|
-
:'sandbox_lifecycle_rate_limit_ttl_seconds',
|
|
124
|
-
:'snapshot_deactivation_timeout_minutes',
|
|
125
|
-
:'max_concurrent_snapshot_processing'
|
|
87
|
+
:'volume_quota'
|
|
126
88
|
])
|
|
127
89
|
end
|
|
128
90
|
|
|
@@ -142,6 +104,24 @@ module DaytonaApiClient
|
|
|
142
104
|
h[k.to_sym] = v
|
|
143
105
|
}
|
|
144
106
|
|
|
107
|
+
if attributes.key?(:'total_cpu_quota')
|
|
108
|
+
self.total_cpu_quota = attributes[:'total_cpu_quota']
|
|
109
|
+
else
|
|
110
|
+
self.total_cpu_quota = nil
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'total_memory_quota')
|
|
114
|
+
self.total_memory_quota = attributes[:'total_memory_quota']
|
|
115
|
+
else
|
|
116
|
+
self.total_memory_quota = nil
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'total_disk_quota')
|
|
120
|
+
self.total_disk_quota = attributes[:'total_disk_quota']
|
|
121
|
+
else
|
|
122
|
+
self.total_disk_quota = nil
|
|
123
|
+
end
|
|
124
|
+
|
|
145
125
|
if attributes.key?(:'max_cpu_per_sandbox')
|
|
146
126
|
self.max_cpu_per_sandbox = attributes[:'max_cpu_per_sandbox']
|
|
147
127
|
else
|
|
@@ -177,66 +157,6 @@ module DaytonaApiClient
|
|
|
177
157
|
else
|
|
178
158
|
self.volume_quota = nil
|
|
179
159
|
end
|
|
180
|
-
|
|
181
|
-
if attributes.key?(:'secret_quota')
|
|
182
|
-
self.secret_quota = attributes[:'secret_quota']
|
|
183
|
-
else
|
|
184
|
-
self.secret_quota = nil
|
|
185
|
-
end
|
|
186
|
-
|
|
187
|
-
if attributes.key?(:'max_secrets_per_sandbox')
|
|
188
|
-
self.max_secrets_per_sandbox = attributes[:'max_secrets_per_sandbox']
|
|
189
|
-
else
|
|
190
|
-
self.max_secrets_per_sandbox = nil
|
|
191
|
-
end
|
|
192
|
-
|
|
193
|
-
if attributes.key?(:'authenticated_rate_limit')
|
|
194
|
-
self.authenticated_rate_limit = attributes[:'authenticated_rate_limit']
|
|
195
|
-
else
|
|
196
|
-
self.authenticated_rate_limit = nil
|
|
197
|
-
end
|
|
198
|
-
|
|
199
|
-
if attributes.key?(:'sandbox_create_rate_limit')
|
|
200
|
-
self.sandbox_create_rate_limit = attributes[:'sandbox_create_rate_limit']
|
|
201
|
-
else
|
|
202
|
-
self.sandbox_create_rate_limit = nil
|
|
203
|
-
end
|
|
204
|
-
|
|
205
|
-
if attributes.key?(:'sandbox_lifecycle_rate_limit')
|
|
206
|
-
self.sandbox_lifecycle_rate_limit = attributes[:'sandbox_lifecycle_rate_limit']
|
|
207
|
-
else
|
|
208
|
-
self.sandbox_lifecycle_rate_limit = nil
|
|
209
|
-
end
|
|
210
|
-
|
|
211
|
-
if attributes.key?(:'authenticated_rate_limit_ttl_seconds')
|
|
212
|
-
self.authenticated_rate_limit_ttl_seconds = attributes[:'authenticated_rate_limit_ttl_seconds']
|
|
213
|
-
else
|
|
214
|
-
self.authenticated_rate_limit_ttl_seconds = nil
|
|
215
|
-
end
|
|
216
|
-
|
|
217
|
-
if attributes.key?(:'sandbox_create_rate_limit_ttl_seconds')
|
|
218
|
-
self.sandbox_create_rate_limit_ttl_seconds = attributes[:'sandbox_create_rate_limit_ttl_seconds']
|
|
219
|
-
else
|
|
220
|
-
self.sandbox_create_rate_limit_ttl_seconds = nil
|
|
221
|
-
end
|
|
222
|
-
|
|
223
|
-
if attributes.key?(:'sandbox_lifecycle_rate_limit_ttl_seconds')
|
|
224
|
-
self.sandbox_lifecycle_rate_limit_ttl_seconds = attributes[:'sandbox_lifecycle_rate_limit_ttl_seconds']
|
|
225
|
-
else
|
|
226
|
-
self.sandbox_lifecycle_rate_limit_ttl_seconds = nil
|
|
227
|
-
end
|
|
228
|
-
|
|
229
|
-
if attributes.key?(:'snapshot_deactivation_timeout_minutes')
|
|
230
|
-
self.snapshot_deactivation_timeout_minutes = attributes[:'snapshot_deactivation_timeout_minutes']
|
|
231
|
-
else
|
|
232
|
-
self.snapshot_deactivation_timeout_minutes = nil
|
|
233
|
-
end
|
|
234
|
-
|
|
235
|
-
if attributes.key?(:'max_concurrent_snapshot_processing')
|
|
236
|
-
self.max_concurrent_snapshot_processing = attributes[:'max_concurrent_snapshot_processing']
|
|
237
|
-
else
|
|
238
|
-
self.max_concurrent_snapshot_processing = nil
|
|
239
|
-
end
|
|
240
160
|
end
|
|
241
161
|
|
|
242
162
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -259,22 +179,15 @@ module DaytonaApiClient
|
|
|
259
179
|
def ==(o)
|
|
260
180
|
return true if self.equal?(o)
|
|
261
181
|
self.class == o.class &&
|
|
182
|
+
total_cpu_quota == o.total_cpu_quota &&
|
|
183
|
+
total_memory_quota == o.total_memory_quota &&
|
|
184
|
+
total_disk_quota == o.total_disk_quota &&
|
|
262
185
|
max_cpu_per_sandbox == o.max_cpu_per_sandbox &&
|
|
263
186
|
max_memory_per_sandbox == o.max_memory_per_sandbox &&
|
|
264
187
|
max_disk_per_sandbox == o.max_disk_per_sandbox &&
|
|
265
188
|
snapshot_quota == o.snapshot_quota &&
|
|
266
189
|
max_snapshot_size == o.max_snapshot_size &&
|
|
267
|
-
volume_quota == o.volume_quota
|
|
268
|
-
secret_quota == o.secret_quota &&
|
|
269
|
-
max_secrets_per_sandbox == o.max_secrets_per_sandbox &&
|
|
270
|
-
authenticated_rate_limit == o.authenticated_rate_limit &&
|
|
271
|
-
sandbox_create_rate_limit == o.sandbox_create_rate_limit &&
|
|
272
|
-
sandbox_lifecycle_rate_limit == o.sandbox_lifecycle_rate_limit &&
|
|
273
|
-
authenticated_rate_limit_ttl_seconds == o.authenticated_rate_limit_ttl_seconds &&
|
|
274
|
-
sandbox_create_rate_limit_ttl_seconds == o.sandbox_create_rate_limit_ttl_seconds &&
|
|
275
|
-
sandbox_lifecycle_rate_limit_ttl_seconds == o.sandbox_lifecycle_rate_limit_ttl_seconds &&
|
|
276
|
-
snapshot_deactivation_timeout_minutes == o.snapshot_deactivation_timeout_minutes &&
|
|
277
|
-
max_concurrent_snapshot_processing == o.max_concurrent_snapshot_processing
|
|
190
|
+
volume_quota == o.volume_quota
|
|
278
191
|
end
|
|
279
192
|
|
|
280
193
|
# @see the `==` method
|
|
@@ -286,7 +199,7 @@ module DaytonaApiClient
|
|
|
286
199
|
# Calculates hash code according to all attributes.
|
|
287
200
|
# @return [Integer] Hash code
|
|
288
201
|
def hash
|
|
289
|
-
[max_cpu_per_sandbox, max_memory_per_sandbox, max_disk_per_sandbox, snapshot_quota, max_snapshot_size, volume_quota
|
|
202
|
+
[total_cpu_quota, total_memory_quota, total_disk_quota, max_cpu_per_sandbox, max_memory_per_sandbox, max_disk_per_sandbox, snapshot_quota, max_snapshot_size, volume_quota].hash
|
|
290
203
|
end
|
|
291
204
|
|
|
292
205
|
# Builds the object from hash
|
|
@@ -312,6 +225,61 @@ module DaytonaApiClient
|
|
|
312
225
|
new(transformed_hash)
|
|
313
226
|
end
|
|
314
227
|
|
|
228
|
+
# Deserializes the data based on type
|
|
229
|
+
# @param string type Data type
|
|
230
|
+
# @param string value Value to be deserialized
|
|
231
|
+
# @return [Object] Deserialized data
|
|
232
|
+
def self._deserialize(type, value)
|
|
233
|
+
case type.to_sym
|
|
234
|
+
when :Time
|
|
235
|
+
Time.parse(value)
|
|
236
|
+
when :Date
|
|
237
|
+
Date.parse(value)
|
|
238
|
+
when :String
|
|
239
|
+
value.to_s
|
|
240
|
+
when :Integer
|
|
241
|
+
value.to_i
|
|
242
|
+
when :Float
|
|
243
|
+
value.to_f
|
|
244
|
+
when :Boolean
|
|
245
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
246
|
+
true
|
|
247
|
+
else
|
|
248
|
+
false
|
|
249
|
+
end
|
|
250
|
+
when :Object
|
|
251
|
+
# generic object (usually a Hash), return directly
|
|
252
|
+
value
|
|
253
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
254
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
255
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
256
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
257
|
+
k_type = Regexp.last_match[:k_type]
|
|
258
|
+
v_type = Regexp.last_match[:v_type]
|
|
259
|
+
{}.tap do |hash|
|
|
260
|
+
value.each do |k, v|
|
|
261
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
else # model
|
|
265
|
+
# models (e.g. Pet) or oneOf
|
|
266
|
+
klass = DaytonaApiClient.const_get(type)
|
|
267
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# Returns the string representation of the object
|
|
272
|
+
# @return [String] String presentation of the object
|
|
273
|
+
def to_s
|
|
274
|
+
to_hash.to_s
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
278
|
+
# @return [Hash] Returns the object in the form of hash
|
|
279
|
+
def to_body
|
|
280
|
+
to_hash
|
|
281
|
+
end
|
|
282
|
+
|
|
315
283
|
# Returns the object in the form of hash
|
|
316
284
|
# @return [Hash] Returns the object in the form of hash
|
|
317
285
|
def to_hash
|
|
@@ -328,6 +296,22 @@ module DaytonaApiClient
|
|
|
328
296
|
hash
|
|
329
297
|
end
|
|
330
298
|
|
|
299
|
+
# Outputs non-array value in the form of hash
|
|
300
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
301
|
+
# @param [Object] value Any valid value
|
|
302
|
+
# @return [Hash] Returns the value in the form of hash
|
|
303
|
+
def _to_hash(value)
|
|
304
|
+
if value.is_a?(Array)
|
|
305
|
+
value.compact.map { |v| _to_hash(v) }
|
|
306
|
+
elsif value.is_a?(Hash)
|
|
307
|
+
{}.tap do |hash|
|
|
308
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
309
|
+
end
|
|
310
|
+
elsif value.respond_to? :to_hash
|
|
311
|
+
value.to_hash
|
|
312
|
+
else
|
|
313
|
+
value
|
|
314
|
+
end
|
|
315
|
+
end
|
|
331
316
|
end
|
|
332
|
-
|
|
333
317
|
end
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
|
7
7
|
Contact: support@daytona.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.12.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class UpdateOrganizationRole
|
|
17
|
+
class UpdateOrganizationRole
|
|
18
18
|
# The name of the role
|
|
19
19
|
attr_accessor :name
|
|
20
20
|
|
|
@@ -212,6 +212,61 @@ module DaytonaApiClient
|
|
|
212
212
|
new(transformed_hash)
|
|
213
213
|
end
|
|
214
214
|
|
|
215
|
+
# Deserializes the data based on type
|
|
216
|
+
# @param string type Data type
|
|
217
|
+
# @param string value Value to be deserialized
|
|
218
|
+
# @return [Object] Deserialized data
|
|
219
|
+
def self._deserialize(type, value)
|
|
220
|
+
case type.to_sym
|
|
221
|
+
when :Time
|
|
222
|
+
Time.parse(value)
|
|
223
|
+
when :Date
|
|
224
|
+
Date.parse(value)
|
|
225
|
+
when :String
|
|
226
|
+
value.to_s
|
|
227
|
+
when :Integer
|
|
228
|
+
value.to_i
|
|
229
|
+
when :Float
|
|
230
|
+
value.to_f
|
|
231
|
+
when :Boolean
|
|
232
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
233
|
+
true
|
|
234
|
+
else
|
|
235
|
+
false
|
|
236
|
+
end
|
|
237
|
+
when :Object
|
|
238
|
+
# generic object (usually a Hash), return directly
|
|
239
|
+
value
|
|
240
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
241
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
242
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
243
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
244
|
+
k_type = Regexp.last_match[:k_type]
|
|
245
|
+
v_type = Regexp.last_match[:v_type]
|
|
246
|
+
{}.tap do |hash|
|
|
247
|
+
value.each do |k, v|
|
|
248
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
else # model
|
|
252
|
+
# models (e.g. Pet) or oneOf
|
|
253
|
+
klass = DaytonaApiClient.const_get(type)
|
|
254
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
255
|
+
end
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# Returns the string representation of the object
|
|
259
|
+
# @return [String] String presentation of the object
|
|
260
|
+
def to_s
|
|
261
|
+
to_hash.to_s
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
265
|
+
# @return [Hash] Returns the object in the form of hash
|
|
266
|
+
def to_body
|
|
267
|
+
to_hash
|
|
268
|
+
end
|
|
269
|
+
|
|
215
270
|
# Returns the object in the form of hash
|
|
216
271
|
# @return [Hash] Returns the object in the form of hash
|
|
217
272
|
def to_hash
|
|
@@ -228,6 +283,22 @@ module DaytonaApiClient
|
|
|
228
283
|
hash
|
|
229
284
|
end
|
|
230
285
|
|
|
286
|
+
# Outputs non-array value in the form of hash
|
|
287
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
288
|
+
# @param [Object] value Any valid value
|
|
289
|
+
# @return [Hash] Returns the value in the form of hash
|
|
290
|
+
def _to_hash(value)
|
|
291
|
+
if value.is_a?(Array)
|
|
292
|
+
value.compact.map { |v| _to_hash(v) }
|
|
293
|
+
elsif value.is_a?(Hash)
|
|
294
|
+
{}.tap do |hash|
|
|
295
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
296
|
+
end
|
|
297
|
+
elsif value.respond_to? :to_hash
|
|
298
|
+
value.to_hash
|
|
299
|
+
else
|
|
300
|
+
value
|
|
301
|
+
end
|
|
302
|
+
end
|
|
231
303
|
end
|
|
232
|
-
|
|
233
304
|
end
|