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
|
@@ -0,0 +1,289 @@
|
|
|
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.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module DaytonaApiClient
|
|
17
|
+
class CompletionItem
|
|
18
|
+
attr_accessor :label
|
|
19
|
+
|
|
20
|
+
attr_accessor :kind
|
|
21
|
+
|
|
22
|
+
attr_accessor :detail
|
|
23
|
+
|
|
24
|
+
attr_accessor :documentation
|
|
25
|
+
|
|
26
|
+
attr_accessor :sort_text
|
|
27
|
+
|
|
28
|
+
attr_accessor :filter_text
|
|
29
|
+
|
|
30
|
+
attr_accessor :insert_text
|
|
31
|
+
|
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
|
+
def self.attribute_map
|
|
34
|
+
{
|
|
35
|
+
:'label' => :'label',
|
|
36
|
+
:'kind' => :'kind',
|
|
37
|
+
:'detail' => :'detail',
|
|
38
|
+
:'documentation' => :'documentation',
|
|
39
|
+
:'sort_text' => :'sortText',
|
|
40
|
+
:'filter_text' => :'filterText',
|
|
41
|
+
:'insert_text' => :'insertText'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns attribute mapping this model knows about
|
|
46
|
+
def self.acceptable_attribute_map
|
|
47
|
+
attribute_map
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Returns all the JSON keys this model knows about
|
|
51
|
+
def self.acceptable_attributes
|
|
52
|
+
acceptable_attribute_map.values
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Attribute type mapping.
|
|
56
|
+
def self.openapi_types
|
|
57
|
+
{
|
|
58
|
+
:'label' => :'String',
|
|
59
|
+
:'kind' => :'Float',
|
|
60
|
+
:'detail' => :'String',
|
|
61
|
+
:'documentation' => :'Object',
|
|
62
|
+
:'sort_text' => :'String',
|
|
63
|
+
:'filter_text' => :'String',
|
|
64
|
+
:'insert_text' => :'String'
|
|
65
|
+
}
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# List of attributes with nullable: true
|
|
69
|
+
def self.openapi_nullable
|
|
70
|
+
Set.new([
|
|
71
|
+
])
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Initializes the object
|
|
75
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
76
|
+
def initialize(attributes = {})
|
|
77
|
+
if (!attributes.is_a?(Hash))
|
|
78
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::CompletionItem` initialize method"
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
82
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
83
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
84
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
85
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::CompletionItem`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
86
|
+
end
|
|
87
|
+
h[k.to_sym] = v
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'label')
|
|
91
|
+
self.label = attributes[:'label']
|
|
92
|
+
else
|
|
93
|
+
self.label = nil
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'kind')
|
|
97
|
+
self.kind = attributes[:'kind']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'detail')
|
|
101
|
+
self.detail = attributes[:'detail']
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'documentation')
|
|
105
|
+
self.documentation = attributes[:'documentation']
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'sort_text')
|
|
109
|
+
self.sort_text = attributes[:'sort_text']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'filter_text')
|
|
113
|
+
self.filter_text = attributes[:'filter_text']
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'insert_text')
|
|
117
|
+
self.insert_text = attributes[:'insert_text']
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
122
|
+
# @return Array for valid properties with the reasons
|
|
123
|
+
def list_invalid_properties
|
|
124
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
125
|
+
invalid_properties = Array.new
|
|
126
|
+
if @label.nil?
|
|
127
|
+
invalid_properties.push('invalid value for "label", label cannot be nil.')
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
invalid_properties
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Check to see if the all the properties in the model are valid
|
|
134
|
+
# @return true if the model is valid
|
|
135
|
+
def valid?
|
|
136
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
137
|
+
return false if @label.nil?
|
|
138
|
+
true
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Custom attribute writer method with validation
|
|
142
|
+
# @param [Object] label Value to be assigned
|
|
143
|
+
def label=(label)
|
|
144
|
+
if label.nil?
|
|
145
|
+
fail ArgumentError, 'label cannot be nil'
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
@label = label
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Checks equality by comparing each attribute.
|
|
152
|
+
# @param [Object] Object to be compared
|
|
153
|
+
def ==(o)
|
|
154
|
+
return true if self.equal?(o)
|
|
155
|
+
self.class == o.class &&
|
|
156
|
+
label == o.label &&
|
|
157
|
+
kind == o.kind &&
|
|
158
|
+
detail == o.detail &&
|
|
159
|
+
documentation == o.documentation &&
|
|
160
|
+
sort_text == o.sort_text &&
|
|
161
|
+
filter_text == o.filter_text &&
|
|
162
|
+
insert_text == o.insert_text
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# @see the `==` method
|
|
166
|
+
# @param [Object] Object to be compared
|
|
167
|
+
def eql?(o)
|
|
168
|
+
self == o
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Calculates hash code according to all attributes.
|
|
172
|
+
# @return [Integer] Hash code
|
|
173
|
+
def hash
|
|
174
|
+
[label, kind, detail, documentation, sort_text, filter_text, insert_text].hash
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Builds the object from hash
|
|
178
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
179
|
+
# @return [Object] Returns the model itself
|
|
180
|
+
def self.build_from_hash(attributes)
|
|
181
|
+
return nil unless attributes.is_a?(Hash)
|
|
182
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
183
|
+
transformed_hash = {}
|
|
184
|
+
openapi_types.each_pair do |key, type|
|
|
185
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
186
|
+
transformed_hash["#{key}"] = nil
|
|
187
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
188
|
+
# check to ensure the input is an array given that the attribute
|
|
189
|
+
# is documented as an array but the input is not
|
|
190
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
191
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
192
|
+
end
|
|
193
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
194
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
new(transformed_hash)
|
|
198
|
+
end
|
|
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
|
+
|
|
255
|
+
# Returns the object in the form of hash
|
|
256
|
+
# @return [Hash] Returns the object in the form of hash
|
|
257
|
+
def to_hash
|
|
258
|
+
hash = {}
|
|
259
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
260
|
+
value = self.send(attr)
|
|
261
|
+
if value.nil?
|
|
262
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
263
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
hash[param] = _to_hash(value)
|
|
267
|
+
end
|
|
268
|
+
hash
|
|
269
|
+
end
|
|
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
|
|
288
|
+
end
|
|
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,26 +14,16 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class
|
|
18
|
-
|
|
19
|
-
attr_accessor :items
|
|
20
|
-
|
|
21
|
-
# Total number of traces matching the query
|
|
22
|
-
attr_accessor :total
|
|
17
|
+
class CompletionList
|
|
18
|
+
attr_accessor :is_incomplete
|
|
23
19
|
|
|
24
|
-
|
|
25
|
-
attr_accessor :page
|
|
26
|
-
|
|
27
|
-
# Total number of pages
|
|
28
|
-
attr_accessor :total_pages
|
|
20
|
+
attr_accessor :items
|
|
29
21
|
|
|
30
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
23
|
def self.attribute_map
|
|
32
24
|
{
|
|
33
|
-
:'
|
|
34
|
-
:'
|
|
35
|
-
:'page' => :'page',
|
|
36
|
-
:'total_pages' => :'totalPages'
|
|
25
|
+
:'is_incomplete' => :'isIncomplete',
|
|
26
|
+
:'items' => :'items'
|
|
37
27
|
}
|
|
38
28
|
end
|
|
39
29
|
|
|
@@ -50,10 +40,8 @@ module DaytonaApiClient
|
|
|
50
40
|
# Attribute type mapping.
|
|
51
41
|
def self.openapi_types
|
|
52
42
|
{
|
|
53
|
-
:'
|
|
54
|
-
:'
|
|
55
|
-
:'page' => :'Float',
|
|
56
|
-
:'total_pages' => :'Float'
|
|
43
|
+
:'is_incomplete' => :'Boolean',
|
|
44
|
+
:'items' => :'Array<CompletionItem>'
|
|
57
45
|
}
|
|
58
46
|
end
|
|
59
47
|
|
|
@@ -67,18 +55,24 @@ module DaytonaApiClient
|
|
|
67
55
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
56
|
def initialize(attributes = {})
|
|
69
57
|
if (!attributes.is_a?(Hash))
|
|
70
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::CompletionList` initialize method"
|
|
71
59
|
end
|
|
72
60
|
|
|
73
61
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
62
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
75
63
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
64
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
77
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::CompletionList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
78
66
|
end
|
|
79
67
|
h[k.to_sym] = v
|
|
80
68
|
}
|
|
81
69
|
|
|
70
|
+
if attributes.key?(:'is_incomplete')
|
|
71
|
+
self.is_incomplete = attributes[:'is_incomplete']
|
|
72
|
+
else
|
|
73
|
+
self.is_incomplete = nil
|
|
74
|
+
end
|
|
75
|
+
|
|
82
76
|
if attributes.key?(:'items')
|
|
83
77
|
if (value = attributes[:'items']).is_a?(Array)
|
|
84
78
|
self.items = value
|
|
@@ -86,24 +80,6 @@ module DaytonaApiClient
|
|
|
86
80
|
else
|
|
87
81
|
self.items = nil
|
|
88
82
|
end
|
|
89
|
-
|
|
90
|
-
if attributes.key?(:'total')
|
|
91
|
-
self.total = attributes[:'total']
|
|
92
|
-
else
|
|
93
|
-
self.total = nil
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
if attributes.key?(:'page')
|
|
97
|
-
self.page = attributes[:'page']
|
|
98
|
-
else
|
|
99
|
-
self.page = nil
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
if attributes.key?(:'total_pages')
|
|
103
|
-
self.total_pages = attributes[:'total_pages']
|
|
104
|
-
else
|
|
105
|
-
self.total_pages = nil
|
|
106
|
-
end
|
|
107
83
|
end
|
|
108
84
|
|
|
109
85
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -111,20 +87,12 @@ module DaytonaApiClient
|
|
|
111
87
|
def list_invalid_properties
|
|
112
88
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
113
89
|
invalid_properties = Array.new
|
|
114
|
-
if @
|
|
115
|
-
invalid_properties.push('invalid value for "
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
if @total.nil?
|
|
119
|
-
invalid_properties.push('invalid value for "total", total cannot be nil.')
|
|
120
|
-
end
|
|
121
|
-
|
|
122
|
-
if @page.nil?
|
|
123
|
-
invalid_properties.push('invalid value for "page", page cannot be nil.')
|
|
90
|
+
if @is_incomplete.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "is_incomplete", is_incomplete cannot be nil.')
|
|
124
92
|
end
|
|
125
93
|
|
|
126
|
-
if @
|
|
127
|
-
invalid_properties.push('invalid value for "
|
|
94
|
+
if @items.nil?
|
|
95
|
+
invalid_properties.push('invalid value for "items", items cannot be nil.')
|
|
128
96
|
end
|
|
129
97
|
|
|
130
98
|
invalid_properties
|
|
@@ -134,51 +102,29 @@ module DaytonaApiClient
|
|
|
134
102
|
# @return true if the model is valid
|
|
135
103
|
def valid?
|
|
136
104
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
105
|
+
return false if @is_incomplete.nil?
|
|
137
106
|
return false if @items.nil?
|
|
138
|
-
return false if @total.nil?
|
|
139
|
-
return false if @page.nil?
|
|
140
|
-
return false if @total_pages.nil?
|
|
141
107
|
true
|
|
142
108
|
end
|
|
143
109
|
|
|
144
110
|
# Custom attribute writer method with validation
|
|
145
|
-
# @param [Object]
|
|
146
|
-
def
|
|
147
|
-
if
|
|
148
|
-
fail ArgumentError, '
|
|
149
|
-
end
|
|
150
|
-
|
|
151
|
-
@items = items
|
|
152
|
-
end
|
|
153
|
-
|
|
154
|
-
# Custom attribute writer method with validation
|
|
155
|
-
# @param [Object] total Value to be assigned
|
|
156
|
-
def total=(total)
|
|
157
|
-
if total.nil?
|
|
158
|
-
fail ArgumentError, 'total cannot be nil'
|
|
111
|
+
# @param [Object] is_incomplete Value to be assigned
|
|
112
|
+
def is_incomplete=(is_incomplete)
|
|
113
|
+
if is_incomplete.nil?
|
|
114
|
+
fail ArgumentError, 'is_incomplete cannot be nil'
|
|
159
115
|
end
|
|
160
116
|
|
|
161
|
-
@
|
|
117
|
+
@is_incomplete = is_incomplete
|
|
162
118
|
end
|
|
163
119
|
|
|
164
120
|
# Custom attribute writer method with validation
|
|
165
|
-
# @param [Object]
|
|
166
|
-
def
|
|
167
|
-
if
|
|
168
|
-
fail ArgumentError, '
|
|
169
|
-
end
|
|
170
|
-
|
|
171
|
-
@page = page
|
|
172
|
-
end
|
|
173
|
-
|
|
174
|
-
# Custom attribute writer method with validation
|
|
175
|
-
# @param [Object] total_pages Value to be assigned
|
|
176
|
-
def total_pages=(total_pages)
|
|
177
|
-
if total_pages.nil?
|
|
178
|
-
fail ArgumentError, 'total_pages cannot be nil'
|
|
121
|
+
# @param [Object] items Value to be assigned
|
|
122
|
+
def items=(items)
|
|
123
|
+
if items.nil?
|
|
124
|
+
fail ArgumentError, 'items cannot be nil'
|
|
179
125
|
end
|
|
180
126
|
|
|
181
|
-
@
|
|
127
|
+
@items = items
|
|
182
128
|
end
|
|
183
129
|
|
|
184
130
|
# Checks equality by comparing each attribute.
|
|
@@ -186,10 +132,8 @@ module DaytonaApiClient
|
|
|
186
132
|
def ==(o)
|
|
187
133
|
return true if self.equal?(o)
|
|
188
134
|
self.class == o.class &&
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
page == o.page &&
|
|
192
|
-
total_pages == o.total_pages
|
|
135
|
+
is_incomplete == o.is_incomplete &&
|
|
136
|
+
items == o.items
|
|
193
137
|
end
|
|
194
138
|
|
|
195
139
|
# @see the `==` method
|
|
@@ -201,7 +145,7 @@ module DaytonaApiClient
|
|
|
201
145
|
# Calculates hash code according to all attributes.
|
|
202
146
|
# @return [Integer] Hash code
|
|
203
147
|
def hash
|
|
204
|
-
[
|
|
148
|
+
[is_incomplete, items].hash
|
|
205
149
|
end
|
|
206
150
|
|
|
207
151
|
# Builds the object from hash
|
|
@@ -227,6 +171,61 @@ module DaytonaApiClient
|
|
|
227
171
|
new(transformed_hash)
|
|
228
172
|
end
|
|
229
173
|
|
|
174
|
+
# Deserializes the data based on type
|
|
175
|
+
# @param string type Data type
|
|
176
|
+
# @param string value Value to be deserialized
|
|
177
|
+
# @return [Object] Deserialized data
|
|
178
|
+
def self._deserialize(type, value)
|
|
179
|
+
case type.to_sym
|
|
180
|
+
when :Time
|
|
181
|
+
Time.parse(value)
|
|
182
|
+
when :Date
|
|
183
|
+
Date.parse(value)
|
|
184
|
+
when :String
|
|
185
|
+
value.to_s
|
|
186
|
+
when :Integer
|
|
187
|
+
value.to_i
|
|
188
|
+
when :Float
|
|
189
|
+
value.to_f
|
|
190
|
+
when :Boolean
|
|
191
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
192
|
+
true
|
|
193
|
+
else
|
|
194
|
+
false
|
|
195
|
+
end
|
|
196
|
+
when :Object
|
|
197
|
+
# generic object (usually a Hash), return directly
|
|
198
|
+
value
|
|
199
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
200
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
201
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
202
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
203
|
+
k_type = Regexp.last_match[:k_type]
|
|
204
|
+
v_type = Regexp.last_match[:v_type]
|
|
205
|
+
{}.tap do |hash|
|
|
206
|
+
value.each do |k, v|
|
|
207
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
else # model
|
|
211
|
+
# models (e.g. Pet) or oneOf
|
|
212
|
+
klass = DaytonaApiClient.const_get(type)
|
|
213
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Returns the string representation of the object
|
|
218
|
+
# @return [String] String presentation of the object
|
|
219
|
+
def to_s
|
|
220
|
+
to_hash.to_s
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
224
|
+
# @return [Hash] Returns the object in the form of hash
|
|
225
|
+
def to_body
|
|
226
|
+
to_hash
|
|
227
|
+
end
|
|
228
|
+
|
|
230
229
|
# Returns the object in the form of hash
|
|
231
230
|
# @return [Hash] Returns the object in the form of hash
|
|
232
231
|
def to_hash
|
|
@@ -243,6 +242,22 @@ module DaytonaApiClient
|
|
|
243
242
|
hash
|
|
244
243
|
end
|
|
245
244
|
|
|
245
|
+
# Outputs non-array value in the form of hash
|
|
246
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
247
|
+
# @param [Object] value Any valid value
|
|
248
|
+
# @return [Hash] Returns the value in the form of hash
|
|
249
|
+
def _to_hash(value)
|
|
250
|
+
if value.is_a?(Array)
|
|
251
|
+
value.compact.map { |v| _to_hash(v) }
|
|
252
|
+
elsif value.is_a?(Hash)
|
|
253
|
+
{}.tap do |hash|
|
|
254
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
255
|
+
end
|
|
256
|
+
elsif value.respond_to? :to_hash
|
|
257
|
+
value.to_hash
|
|
258
|
+
else
|
|
259
|
+
value
|
|
260
|
+
end
|
|
261
|
+
end
|
|
246
262
|
end
|
|
247
|
-
|
|
248
263
|
end
|