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