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,14 +14,28 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class
|
|
18
|
-
# The toolbox proxy URL for the sandbox
|
|
17
|
+
class GitCloneRequest
|
|
19
18
|
attr_accessor :url
|
|
20
19
|
|
|
20
|
+
attr_accessor :path
|
|
21
|
+
|
|
22
|
+
attr_accessor :username
|
|
23
|
+
|
|
24
|
+
attr_accessor :password
|
|
25
|
+
|
|
26
|
+
attr_accessor :branch
|
|
27
|
+
|
|
28
|
+
attr_accessor :commit_id
|
|
29
|
+
|
|
21
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
31
|
def self.attribute_map
|
|
23
32
|
{
|
|
24
|
-
:'url' => :'url'
|
|
33
|
+
:'url' => :'url',
|
|
34
|
+
:'path' => :'path',
|
|
35
|
+
:'username' => :'username',
|
|
36
|
+
:'password' => :'password',
|
|
37
|
+
:'branch' => :'branch',
|
|
38
|
+
:'commit_id' => :'commit_id'
|
|
25
39
|
}
|
|
26
40
|
end
|
|
27
41
|
|
|
@@ -38,7 +52,12 @@ module DaytonaApiClient
|
|
|
38
52
|
# Attribute type mapping.
|
|
39
53
|
def self.openapi_types
|
|
40
54
|
{
|
|
41
|
-
:'url' => :'String'
|
|
55
|
+
:'url' => :'String',
|
|
56
|
+
:'path' => :'String',
|
|
57
|
+
:'username' => :'String',
|
|
58
|
+
:'password' => :'String',
|
|
59
|
+
:'branch' => :'String',
|
|
60
|
+
:'commit_id' => :'String'
|
|
42
61
|
}
|
|
43
62
|
end
|
|
44
63
|
|
|
@@ -52,14 +71,14 @@ module DaytonaApiClient
|
|
|
52
71
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
72
|
def initialize(attributes = {})
|
|
54
73
|
if (!attributes.is_a?(Hash))
|
|
55
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::
|
|
74
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::GitCloneRequest` initialize method"
|
|
56
75
|
end
|
|
57
76
|
|
|
58
77
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
78
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
79
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
80
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::
|
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::GitCloneRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
82
|
end
|
|
64
83
|
h[k.to_sym] = v
|
|
65
84
|
}
|
|
@@ -69,6 +88,28 @@ module DaytonaApiClient
|
|
|
69
88
|
else
|
|
70
89
|
self.url = nil
|
|
71
90
|
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'path')
|
|
93
|
+
self.path = attributes[:'path']
|
|
94
|
+
else
|
|
95
|
+
self.path = nil
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'username')
|
|
99
|
+
self.username = attributes[:'username']
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'password')
|
|
103
|
+
self.password = attributes[:'password']
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'branch')
|
|
107
|
+
self.branch = attributes[:'branch']
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'commit_id')
|
|
111
|
+
self.commit_id = attributes[:'commit_id']
|
|
112
|
+
end
|
|
72
113
|
end
|
|
73
114
|
|
|
74
115
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -80,6 +121,10 @@ module DaytonaApiClient
|
|
|
80
121
|
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
|
81
122
|
end
|
|
82
123
|
|
|
124
|
+
if @path.nil?
|
|
125
|
+
invalid_properties.push('invalid value for "path", path cannot be nil.')
|
|
126
|
+
end
|
|
127
|
+
|
|
83
128
|
invalid_properties
|
|
84
129
|
end
|
|
85
130
|
|
|
@@ -88,6 +133,7 @@ module DaytonaApiClient
|
|
|
88
133
|
def valid?
|
|
89
134
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
90
135
|
return false if @url.nil?
|
|
136
|
+
return false if @path.nil?
|
|
91
137
|
true
|
|
92
138
|
end
|
|
93
139
|
|
|
@@ -101,12 +147,27 @@ module DaytonaApiClient
|
|
|
101
147
|
@url = url
|
|
102
148
|
end
|
|
103
149
|
|
|
150
|
+
# Custom attribute writer method with validation
|
|
151
|
+
# @param [Object] path Value to be assigned
|
|
152
|
+
def path=(path)
|
|
153
|
+
if path.nil?
|
|
154
|
+
fail ArgumentError, 'path cannot be nil'
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
@path = path
|
|
158
|
+
end
|
|
159
|
+
|
|
104
160
|
# Checks equality by comparing each attribute.
|
|
105
161
|
# @param [Object] Object to be compared
|
|
106
162
|
def ==(o)
|
|
107
163
|
return true if self.equal?(o)
|
|
108
164
|
self.class == o.class &&
|
|
109
|
-
url == o.url
|
|
165
|
+
url == o.url &&
|
|
166
|
+
path == o.path &&
|
|
167
|
+
username == o.username &&
|
|
168
|
+
password == o.password &&
|
|
169
|
+
branch == o.branch &&
|
|
170
|
+
commit_id == o.commit_id
|
|
110
171
|
end
|
|
111
172
|
|
|
112
173
|
# @see the `==` method
|
|
@@ -118,7 +179,7 @@ module DaytonaApiClient
|
|
|
118
179
|
# Calculates hash code according to all attributes.
|
|
119
180
|
# @return [Integer] Hash code
|
|
120
181
|
def hash
|
|
121
|
-
[url].hash
|
|
182
|
+
[url, path, username, password, branch, commit_id].hash
|
|
122
183
|
end
|
|
123
184
|
|
|
124
185
|
# Builds the object from hash
|
|
@@ -144,6 +205,61 @@ module DaytonaApiClient
|
|
|
144
205
|
new(transformed_hash)
|
|
145
206
|
end
|
|
146
207
|
|
|
208
|
+
# Deserializes the data based on type
|
|
209
|
+
# @param string type Data type
|
|
210
|
+
# @param string value Value to be deserialized
|
|
211
|
+
# @return [Object] Deserialized data
|
|
212
|
+
def self._deserialize(type, value)
|
|
213
|
+
case type.to_sym
|
|
214
|
+
when :Time
|
|
215
|
+
Time.parse(value)
|
|
216
|
+
when :Date
|
|
217
|
+
Date.parse(value)
|
|
218
|
+
when :String
|
|
219
|
+
value.to_s
|
|
220
|
+
when :Integer
|
|
221
|
+
value.to_i
|
|
222
|
+
when :Float
|
|
223
|
+
value.to_f
|
|
224
|
+
when :Boolean
|
|
225
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
226
|
+
true
|
|
227
|
+
else
|
|
228
|
+
false
|
|
229
|
+
end
|
|
230
|
+
when :Object
|
|
231
|
+
# generic object (usually a Hash), return directly
|
|
232
|
+
value
|
|
233
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
234
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
235
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
236
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
237
|
+
k_type = Regexp.last_match[:k_type]
|
|
238
|
+
v_type = Regexp.last_match[:v_type]
|
|
239
|
+
{}.tap do |hash|
|
|
240
|
+
value.each do |k, v|
|
|
241
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
else # model
|
|
245
|
+
# models (e.g. Pet) or oneOf
|
|
246
|
+
klass = DaytonaApiClient.const_get(type)
|
|
247
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# Returns the string representation of the object
|
|
252
|
+
# @return [String] String presentation of the object
|
|
253
|
+
def to_s
|
|
254
|
+
to_hash.to_s
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
258
|
+
# @return [Hash] Returns the object in the form of hash
|
|
259
|
+
def to_body
|
|
260
|
+
to_hash
|
|
261
|
+
end
|
|
262
|
+
|
|
147
263
|
# Returns the object in the form of hash
|
|
148
264
|
# @return [Hash] Returns the object in the form of hash
|
|
149
265
|
def to_hash
|
|
@@ -160,6 +276,22 @@ module DaytonaApiClient
|
|
|
160
276
|
hash
|
|
161
277
|
end
|
|
162
278
|
|
|
279
|
+
# Outputs non-array value in the form of hash
|
|
280
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
281
|
+
# @param [Object] value Any valid value
|
|
282
|
+
# @return [Hash] Returns the value in the form of hash
|
|
283
|
+
def _to_hash(value)
|
|
284
|
+
if value.is_a?(Array)
|
|
285
|
+
value.compact.map { |v| _to_hash(v) }
|
|
286
|
+
elsif value.is_a?(Hash)
|
|
287
|
+
{}.tap do |hash|
|
|
288
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
289
|
+
end
|
|
290
|
+
elsif value.respond_to? :to_hash
|
|
291
|
+
value.to_hash
|
|
292
|
+
else
|
|
293
|
+
value
|
|
294
|
+
end
|
|
295
|
+
end
|
|
163
296
|
end
|
|
164
|
-
|
|
165
297
|
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,46 +14,25 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class
|
|
18
|
-
|
|
19
|
-
attr_accessor :trace_id
|
|
17
|
+
class GitCommitInfo
|
|
18
|
+
attr_accessor :hash
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
attr_accessor :span_id
|
|
20
|
+
attr_accessor :message
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
attr_accessor :parent_span_id
|
|
22
|
+
attr_accessor :author
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
attr_accessor :span_name
|
|
24
|
+
attr_accessor :email
|
|
29
25
|
|
|
30
|
-
# Span start timestamp
|
|
31
26
|
attr_accessor :timestamp
|
|
32
27
|
|
|
33
|
-
# Span duration in nanoseconds
|
|
34
|
-
attr_accessor :duration_ns
|
|
35
|
-
|
|
36
|
-
# Span attributes
|
|
37
|
-
attr_accessor :span_attributes
|
|
38
|
-
|
|
39
|
-
# Status code of the span
|
|
40
|
-
attr_accessor :status_code
|
|
41
|
-
|
|
42
|
-
# Status message
|
|
43
|
-
attr_accessor :status_message
|
|
44
|
-
|
|
45
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
46
29
|
def self.attribute_map
|
|
47
30
|
{
|
|
48
|
-
:'
|
|
49
|
-
:'
|
|
50
|
-
:'
|
|
51
|
-
:'
|
|
52
|
-
:'timestamp' => :'timestamp'
|
|
53
|
-
:'duration_ns' => :'durationNs',
|
|
54
|
-
:'span_attributes' => :'spanAttributes',
|
|
55
|
-
:'status_code' => :'statusCode',
|
|
56
|
-
:'status_message' => :'statusMessage'
|
|
31
|
+
:'hash' => :'hash',
|
|
32
|
+
:'message' => :'message',
|
|
33
|
+
:'author' => :'author',
|
|
34
|
+
:'email' => :'email',
|
|
35
|
+
:'timestamp' => :'timestamp'
|
|
57
36
|
}
|
|
58
37
|
end
|
|
59
38
|
|
|
@@ -70,15 +49,11 @@ module DaytonaApiClient
|
|
|
70
49
|
# Attribute type mapping.
|
|
71
50
|
def self.openapi_types
|
|
72
51
|
{
|
|
73
|
-
:'
|
|
74
|
-
:'
|
|
75
|
-
:'
|
|
76
|
-
:'
|
|
77
|
-
:'timestamp' => :'String'
|
|
78
|
-
:'duration_ns' => :'Float',
|
|
79
|
-
:'span_attributes' => :'Hash<String, String>',
|
|
80
|
-
:'status_code' => :'String',
|
|
81
|
-
:'status_message' => :'String'
|
|
52
|
+
:'hash' => :'String',
|
|
53
|
+
:'message' => :'String',
|
|
54
|
+
:'author' => :'String',
|
|
55
|
+
:'email' => :'String',
|
|
56
|
+
:'timestamp' => :'String'
|
|
82
57
|
}
|
|
83
58
|
end
|
|
84
59
|
|
|
@@ -92,38 +67,40 @@ module DaytonaApiClient
|
|
|
92
67
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
93
68
|
def initialize(attributes = {})
|
|
94
69
|
if (!attributes.is_a?(Hash))
|
|
95
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::GitCommitInfo` initialize method"
|
|
96
71
|
end
|
|
97
72
|
|
|
98
73
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
99
74
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
100
75
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
101
76
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
102
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::
|
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::GitCommitInfo`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
103
78
|
end
|
|
104
79
|
h[k.to_sym] = v
|
|
105
80
|
}
|
|
106
81
|
|
|
107
|
-
if attributes.key?(:'
|
|
108
|
-
self.
|
|
82
|
+
if attributes.key?(:'hash')
|
|
83
|
+
self.hash = attributes[:'hash']
|
|
109
84
|
else
|
|
110
|
-
self.
|
|
85
|
+
self.hash = nil
|
|
111
86
|
end
|
|
112
87
|
|
|
113
|
-
if attributes.key?(:'
|
|
114
|
-
self.
|
|
88
|
+
if attributes.key?(:'message')
|
|
89
|
+
self.message = attributes[:'message']
|
|
115
90
|
else
|
|
116
|
-
self.
|
|
91
|
+
self.message = nil
|
|
117
92
|
end
|
|
118
93
|
|
|
119
|
-
if attributes.key?(:'
|
|
120
|
-
self.
|
|
94
|
+
if attributes.key?(:'author')
|
|
95
|
+
self.author = attributes[:'author']
|
|
96
|
+
else
|
|
97
|
+
self.author = nil
|
|
121
98
|
end
|
|
122
99
|
|
|
123
|
-
if attributes.key?(:'
|
|
124
|
-
self.
|
|
100
|
+
if attributes.key?(:'email')
|
|
101
|
+
self.email = attributes[:'email']
|
|
125
102
|
else
|
|
126
|
-
self.
|
|
103
|
+
self.email = nil
|
|
127
104
|
end
|
|
128
105
|
|
|
129
106
|
if attributes.key?(:'timestamp')
|
|
@@ -131,28 +108,6 @@ module DaytonaApiClient
|
|
|
131
108
|
else
|
|
132
109
|
self.timestamp = nil
|
|
133
110
|
end
|
|
134
|
-
|
|
135
|
-
if attributes.key?(:'duration_ns')
|
|
136
|
-
self.duration_ns = attributes[:'duration_ns']
|
|
137
|
-
else
|
|
138
|
-
self.duration_ns = nil
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
if attributes.key?(:'span_attributes')
|
|
142
|
-
if (value = attributes[:'span_attributes']).is_a?(Hash)
|
|
143
|
-
self.span_attributes = value
|
|
144
|
-
end
|
|
145
|
-
else
|
|
146
|
-
self.span_attributes = nil
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
if attributes.key?(:'status_code')
|
|
150
|
-
self.status_code = attributes[:'status_code']
|
|
151
|
-
end
|
|
152
|
-
|
|
153
|
-
if attributes.key?(:'status_message')
|
|
154
|
-
self.status_message = attributes[:'status_message']
|
|
155
|
-
end
|
|
156
111
|
end
|
|
157
112
|
|
|
158
113
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -160,28 +115,24 @@ module DaytonaApiClient
|
|
|
160
115
|
def list_invalid_properties
|
|
161
116
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
162
117
|
invalid_properties = Array.new
|
|
163
|
-
if @
|
|
164
|
-
invalid_properties.push('invalid value for "
|
|
118
|
+
if @hash.nil?
|
|
119
|
+
invalid_properties.push('invalid value for "hash", hash cannot be nil.')
|
|
165
120
|
end
|
|
166
121
|
|
|
167
|
-
if @
|
|
168
|
-
invalid_properties.push('invalid value for "
|
|
122
|
+
if @message.nil?
|
|
123
|
+
invalid_properties.push('invalid value for "message", message cannot be nil.')
|
|
169
124
|
end
|
|
170
125
|
|
|
171
|
-
if @
|
|
172
|
-
invalid_properties.push('invalid value for "
|
|
126
|
+
if @author.nil?
|
|
127
|
+
invalid_properties.push('invalid value for "author", author cannot be nil.')
|
|
173
128
|
end
|
|
174
129
|
|
|
175
|
-
if @
|
|
176
|
-
invalid_properties.push('invalid value for "
|
|
130
|
+
if @email.nil?
|
|
131
|
+
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
|
177
132
|
end
|
|
178
133
|
|
|
179
|
-
if @
|
|
180
|
-
invalid_properties.push('invalid value for "
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
if @span_attributes.nil?
|
|
184
|
-
invalid_properties.push('invalid value for "span_attributes", span_attributes cannot be nil.')
|
|
134
|
+
if @timestamp.nil?
|
|
135
|
+
invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
|
|
185
136
|
end
|
|
186
137
|
|
|
187
138
|
invalid_properties
|
|
@@ -191,73 +142,62 @@ module DaytonaApiClient
|
|
|
191
142
|
# @return true if the model is valid
|
|
192
143
|
def valid?
|
|
193
144
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
194
|
-
return false if @
|
|
195
|
-
return false if @
|
|
196
|
-
return false if @
|
|
145
|
+
return false if @hash.nil?
|
|
146
|
+
return false if @message.nil?
|
|
147
|
+
return false if @author.nil?
|
|
148
|
+
return false if @email.nil?
|
|
197
149
|
return false if @timestamp.nil?
|
|
198
|
-
return false if @duration_ns.nil?
|
|
199
|
-
return false if @span_attributes.nil?
|
|
200
150
|
true
|
|
201
151
|
end
|
|
202
152
|
|
|
203
153
|
# Custom attribute writer method with validation
|
|
204
|
-
# @param [Object]
|
|
205
|
-
def
|
|
206
|
-
if
|
|
207
|
-
fail ArgumentError, '
|
|
154
|
+
# @param [Object] hash Value to be assigned
|
|
155
|
+
def hash=(hash)
|
|
156
|
+
if hash.nil?
|
|
157
|
+
fail ArgumentError, 'hash cannot be nil'
|
|
208
158
|
end
|
|
209
159
|
|
|
210
|
-
@
|
|
160
|
+
@hash = hash
|
|
211
161
|
end
|
|
212
162
|
|
|
213
163
|
# Custom attribute writer method with validation
|
|
214
|
-
# @param [Object]
|
|
215
|
-
def
|
|
216
|
-
if
|
|
217
|
-
fail ArgumentError, '
|
|
164
|
+
# @param [Object] message Value to be assigned
|
|
165
|
+
def message=(message)
|
|
166
|
+
if message.nil?
|
|
167
|
+
fail ArgumentError, 'message cannot be nil'
|
|
218
168
|
end
|
|
219
169
|
|
|
220
|
-
@
|
|
170
|
+
@message = message
|
|
221
171
|
end
|
|
222
172
|
|
|
223
173
|
# Custom attribute writer method with validation
|
|
224
|
-
# @param [Object]
|
|
225
|
-
def
|
|
226
|
-
if
|
|
227
|
-
fail ArgumentError, '
|
|
174
|
+
# @param [Object] author Value to be assigned
|
|
175
|
+
def author=(author)
|
|
176
|
+
if author.nil?
|
|
177
|
+
fail ArgumentError, 'author cannot be nil'
|
|
228
178
|
end
|
|
229
179
|
|
|
230
|
-
@
|
|
180
|
+
@author = author
|
|
231
181
|
end
|
|
232
182
|
|
|
233
183
|
# Custom attribute writer method with validation
|
|
234
|
-
# @param [Object]
|
|
235
|
-
def
|
|
236
|
-
if
|
|
237
|
-
fail ArgumentError, '
|
|
184
|
+
# @param [Object] email Value to be assigned
|
|
185
|
+
def email=(email)
|
|
186
|
+
if email.nil?
|
|
187
|
+
fail ArgumentError, 'email cannot be nil'
|
|
238
188
|
end
|
|
239
189
|
|
|
240
|
-
@
|
|
190
|
+
@email = email
|
|
241
191
|
end
|
|
242
192
|
|
|
243
193
|
# Custom attribute writer method with validation
|
|
244
|
-
# @param [Object]
|
|
245
|
-
def
|
|
246
|
-
if
|
|
247
|
-
fail ArgumentError, '
|
|
248
|
-
end
|
|
249
|
-
|
|
250
|
-
@duration_ns = duration_ns
|
|
251
|
-
end
|
|
252
|
-
|
|
253
|
-
# Custom attribute writer method with validation
|
|
254
|
-
# @param [Object] span_attributes Value to be assigned
|
|
255
|
-
def span_attributes=(span_attributes)
|
|
256
|
-
if span_attributes.nil?
|
|
257
|
-
fail ArgumentError, 'span_attributes cannot be nil'
|
|
194
|
+
# @param [Object] timestamp Value to be assigned
|
|
195
|
+
def timestamp=(timestamp)
|
|
196
|
+
if timestamp.nil?
|
|
197
|
+
fail ArgumentError, 'timestamp cannot be nil'
|
|
258
198
|
end
|
|
259
199
|
|
|
260
|
-
@
|
|
200
|
+
@timestamp = timestamp
|
|
261
201
|
end
|
|
262
202
|
|
|
263
203
|
# Checks equality by comparing each attribute.
|
|
@@ -265,15 +205,11 @@ module DaytonaApiClient
|
|
|
265
205
|
def ==(o)
|
|
266
206
|
return true if self.equal?(o)
|
|
267
207
|
self.class == o.class &&
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
timestamp == o.timestamp
|
|
273
|
-
duration_ns == o.duration_ns &&
|
|
274
|
-
span_attributes == o.span_attributes &&
|
|
275
|
-
status_code == o.status_code &&
|
|
276
|
-
status_message == o.status_message
|
|
208
|
+
hash == o.hash &&
|
|
209
|
+
message == o.message &&
|
|
210
|
+
author == o.author &&
|
|
211
|
+
email == o.email &&
|
|
212
|
+
timestamp == o.timestamp
|
|
277
213
|
end
|
|
278
214
|
|
|
279
215
|
# @see the `==` method
|
|
@@ -285,7 +221,7 @@ module DaytonaApiClient
|
|
|
285
221
|
# Calculates hash code according to all attributes.
|
|
286
222
|
# @return [Integer] Hash code
|
|
287
223
|
def hash
|
|
288
|
-
[
|
|
224
|
+
[hash, message, author, email, timestamp].hash
|
|
289
225
|
end
|
|
290
226
|
|
|
291
227
|
# Builds the object from hash
|
|
@@ -311,6 +247,61 @@ module DaytonaApiClient
|
|
|
311
247
|
new(transformed_hash)
|
|
312
248
|
end
|
|
313
249
|
|
|
250
|
+
# Deserializes the data based on type
|
|
251
|
+
# @param string type Data type
|
|
252
|
+
# @param string value Value to be deserialized
|
|
253
|
+
# @return [Object] Deserialized data
|
|
254
|
+
def self._deserialize(type, value)
|
|
255
|
+
case type.to_sym
|
|
256
|
+
when :Time
|
|
257
|
+
Time.parse(value)
|
|
258
|
+
when :Date
|
|
259
|
+
Date.parse(value)
|
|
260
|
+
when :String
|
|
261
|
+
value.to_s
|
|
262
|
+
when :Integer
|
|
263
|
+
value.to_i
|
|
264
|
+
when :Float
|
|
265
|
+
value.to_f
|
|
266
|
+
when :Boolean
|
|
267
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
268
|
+
true
|
|
269
|
+
else
|
|
270
|
+
false
|
|
271
|
+
end
|
|
272
|
+
when :Object
|
|
273
|
+
# generic object (usually a Hash), return directly
|
|
274
|
+
value
|
|
275
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
276
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
277
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
278
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
279
|
+
k_type = Regexp.last_match[:k_type]
|
|
280
|
+
v_type = Regexp.last_match[:v_type]
|
|
281
|
+
{}.tap do |hash|
|
|
282
|
+
value.each do |k, v|
|
|
283
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
284
|
+
end
|
|
285
|
+
end
|
|
286
|
+
else # model
|
|
287
|
+
# models (e.g. Pet) or oneOf
|
|
288
|
+
klass = DaytonaApiClient.const_get(type)
|
|
289
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
290
|
+
end
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# Returns the string representation of the object
|
|
294
|
+
# @return [String] String presentation of the object
|
|
295
|
+
def to_s
|
|
296
|
+
to_hash.to_s
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
300
|
+
# @return [Hash] Returns the object in the form of hash
|
|
301
|
+
def to_body
|
|
302
|
+
to_hash
|
|
303
|
+
end
|
|
304
|
+
|
|
314
305
|
# Returns the object in the form of hash
|
|
315
306
|
# @return [Hash] Returns the object in the form of hash
|
|
316
307
|
def to_hash
|
|
@@ -327,6 +318,22 @@ module DaytonaApiClient
|
|
|
327
318
|
hash
|
|
328
319
|
end
|
|
329
320
|
|
|
321
|
+
# Outputs non-array value in the form of hash
|
|
322
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
323
|
+
# @param [Object] value Any valid value
|
|
324
|
+
# @return [Hash] Returns the value in the form of hash
|
|
325
|
+
def _to_hash(value)
|
|
326
|
+
if value.is_a?(Array)
|
|
327
|
+
value.compact.map { |v| _to_hash(v) }
|
|
328
|
+
elsif value.is_a?(Hash)
|
|
329
|
+
{}.tap do |hash|
|
|
330
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
331
|
+
end
|
|
332
|
+
elsif value.respond_to? :to_hash
|
|
333
|
+
value.to_hash
|
|
334
|
+
else
|
|
335
|
+
value
|
|
336
|
+
end
|
|
337
|
+
end
|
|
330
338
|
end
|
|
331
|
-
|
|
332
339
|
end
|