daytona_api_client 0.158.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 +2 -2
- data/lib/daytona_api_client/api/api_keys_api.rb +1 -1
- data/lib/daytona_api_client/api/audit_api.rb +66 -18
- data/lib/daytona_api_client/api/docker_registry_api.rb +2 -5
- data/lib/daytona_api_client/api/health_api.rb +1 -52
- data/lib/daytona_api_client/api/organizations_api.rb +130 -982
- data/lib/daytona_api_client/api/preview_api.rb +5 -74
- data/lib/daytona_api_client/api/runners_api.rb +21 -408
- data/lib/daytona_api_client/api/sandbox_api.rb +192 -967
- data/lib/daytona_api_client/api/snapshots_api.rb +2 -68
- data/lib/daytona_api_client/api/toolbox_api.rb +740 -740
- data/lib/daytona_api_client/api/users_api.rb +2 -2
- data/lib/daytona_api_client/api/volumes_api.rb +1 -1
- data/lib/daytona_api_client/api/webhooks_api.rb +3 -3
- data/lib/daytona_api_client/api/workspace_api.rb +5 -5
- data/lib/daytona_api_client/configuration.rb +1 -4
- data/lib/daytona_api_client/models/account_provider.rb +0 -2
- data/lib/daytona_api_client/models/announcement.rb +0 -2
- data/lib/daytona_api_client/models/api_key_list.rb +0 -2
- data/lib/daytona_api_client/models/api_key_response.rb +0 -2
- data/lib/daytona_api_client/models/audit_log.rb +0 -2
- data/lib/daytona_api_client/models/build_info.rb +4 -33
- data/lib/daytona_api_client/models/command.rb +0 -2
- data/lib/daytona_api_client/models/completion_context.rb +0 -2
- data/lib/daytona_api_client/models/completion_item.rb +0 -2
- data/lib/daytona_api_client/models/completion_list.rb +0 -2
- data/lib/daytona_api_client/models/compressed_screenshot_response.rb +0 -2
- data/lib/daytona_api_client/models/computer_use_start_response.rb +0 -2
- data/lib/daytona_api_client/models/computer_use_status_response.rb +0 -2
- data/lib/daytona_api_client/models/computer_use_stop_response.rb +0 -2
- data/lib/daytona_api_client/models/create_api_key.rb +1 -3
- data/lib/daytona_api_client/models/{job.rb → create_audit_log.rb} +79 -168
- data/lib/daytona_api_client/models/create_build_info.rb +0 -2
- data/lib/daytona_api_client/models/create_docker_registry.rb +0 -2
- data/lib/daytona_api_client/models/create_linked_account.rb +0 -2
- data/lib/daytona_api_client/models/create_organization.rb +4 -33
- data/lib/daytona_api_client/models/create_organization_invitation.rb +0 -2
- data/lib/daytona_api_client/models/create_organization_quota.rb +0 -2
- data/lib/daytona_api_client/models/create_organization_role.rb +0 -2
- data/lib/daytona_api_client/models/create_runner.rb +315 -33
- data/lib/daytona_api_client/models/create_sandbox.rb +1 -13
- data/lib/daytona_api_client/models/create_session_request.rb +0 -2
- data/lib/daytona_api_client/models/create_snapshot.rb +4 -16
- data/lib/daytona_api_client/models/create_user.rb +1 -12
- data/lib/daytona_api_client/models/create_volume.rb +0 -2
- data/lib/daytona_api_client/models/create_workspace.rb +0 -2
- data/lib/daytona_api_client/models/daytona_configuration.rb +4 -53
- data/lib/daytona_api_client/models/display_info_response.rb +0 -2
- data/lib/daytona_api_client/models/docker_registry.rb +0 -2
- data/lib/daytona_api_client/models/download_files.rb +0 -2
- data/lib/daytona_api_client/models/execute_request.rb +0 -2
- data/lib/daytona_api_client/models/execute_response.rb +0 -2
- data/lib/daytona_api_client/models/file_info.rb +0 -2
- data/lib/daytona_api_client/models/file_status.rb +0 -2
- data/lib/daytona_api_client/models/git_add_request.rb +0 -2
- data/lib/daytona_api_client/models/git_branch_request.rb +0 -2
- data/lib/daytona_api_client/models/git_checkout_request.rb +0 -2
- data/lib/daytona_api_client/models/git_clone_request.rb +0 -2
- data/lib/daytona_api_client/models/git_commit_info.rb +0 -2
- data/lib/daytona_api_client/models/git_commit_request.rb +0 -2
- data/lib/daytona_api_client/models/git_commit_response.rb +0 -2
- data/lib/daytona_api_client/models/git_delete_branch_request.rb +0 -2
- data/lib/daytona_api_client/models/git_repo_request.rb +0 -2
- data/lib/daytona_api_client/models/git_status.rb +0 -2
- data/lib/daytona_api_client/models/health_controller_check200_response.rb +0 -2
- data/lib/daytona_api_client/models/health_controller_check200_response_info_value.rb +0 -2
- data/lib/daytona_api_client/models/health_controller_check503_response.rb +0 -2
- data/lib/daytona_api_client/models/keyboard_hotkey_request.rb +0 -2
- data/lib/daytona_api_client/models/keyboard_press_request.rb +0 -2
- data/lib/daytona_api_client/models/keyboard_type_request.rb +0 -2
- data/lib/daytona_api_client/models/list_branch_response.rb +0 -2
- data/lib/daytona_api_client/models/lsp_completion_params.rb +0 -2
- data/lib/daytona_api_client/models/lsp_document_request.rb +0 -2
- data/lib/daytona_api_client/models/lsp_location.rb +0 -2
- data/lib/daytona_api_client/models/lsp_server_request.rb +0 -2
- data/lib/daytona_api_client/models/lsp_symbol.rb +0 -2
- data/lib/daytona_api_client/models/match.rb +0 -2
- data/lib/daytona_api_client/models/mouse_click_request.rb +0 -2
- data/lib/daytona_api_client/models/mouse_click_response.rb +0 -2
- data/lib/daytona_api_client/models/mouse_drag_request.rb +0 -2
- data/lib/daytona_api_client/models/mouse_drag_response.rb +0 -2
- data/lib/daytona_api_client/models/mouse_move_request.rb +0 -2
- data/lib/daytona_api_client/models/mouse_move_response.rb +0 -2
- data/lib/daytona_api_client/models/mouse_position.rb +0 -2
- data/lib/daytona_api_client/models/mouse_scroll_request.rb +0 -2
- data/lib/daytona_api_client/models/mouse_scroll_response.rb +0 -2
- data/lib/daytona_api_client/models/oidc_config.rb +0 -2
- data/lib/daytona_api_client/models/organization.rb +85 -148
- data/lib/daytona_api_client/models/organization_invitation.rb +0 -2
- data/lib/daytona_api_client/models/organization_role.rb +0 -2
- data/lib/daytona_api_client/models/organization_sandbox_default_limited_network_egress.rb +0 -2
- data/lib/daytona_api_client/models/organization_suspension.rb +5 -9
- data/lib/daytona_api_client/models/organization_usage_overview.rb +146 -20
- data/lib/daytona_api_client/models/organization_user.rb +0 -2
- data/lib/daytona_api_client/models/paginated_audit_logs.rb +4 -16
- data/lib/daytona_api_client/models/paginated_sandboxes.rb +0 -2
- data/lib/daytona_api_client/models/paginated_snapshots.rb +0 -2
- data/lib/daytona_api_client/models/{paginated_jobs.rb → paginated_snapshots_dto.rb} +4 -6
- data/lib/daytona_api_client/models/port_preview_url.rb +14 -33
- data/lib/daytona_api_client/models/position.rb +0 -2
- data/lib/daytona_api_client/models/posthog_config.rb +0 -2
- data/lib/daytona_api_client/models/process_errors_response.rb +0 -2
- data/lib/daytona_api_client/models/process_logs_response.rb +0 -2
- data/lib/daytona_api_client/models/process_restart_response.rb +0 -2
- data/lib/daytona_api_client/models/process_status_response.rb +0 -2
- data/lib/daytona_api_client/models/project_dir_response.rb +0 -2
- data/lib/daytona_api_client/models/pty_create_request.rb +0 -2
- data/lib/daytona_api_client/models/pty_create_response.rb +0 -2
- data/lib/daytona_api_client/models/pty_list_response.rb +0 -2
- data/lib/daytona_api_client/models/pty_resize_request.rb +0 -2
- data/lib/daytona_api_client/models/pty_session_info.rb +0 -2
- data/lib/daytona_api_client/models/range.rb +0 -2
- data/lib/daytona_api_client/models/region.rb +4 -180
- data/lib/daytona_api_client/models/region_screenshot_response.rb +0 -2
- data/lib/daytona_api_client/models/registry_push_access_dto.rb +0 -2
- data/lib/daytona_api_client/models/replace_request.rb +0 -2
- data/lib/daytona_api_client/models/replace_result.rb +0 -2
- data/lib/daytona_api_client/models/runner.rb +117 -81
- data/lib/daytona_api_client/models/runner_snapshot_dto.rb +17 -2
- data/lib/daytona_api_client/models/sandbox.rb +14 -80
- data/lib/daytona_api_client/models/sandbox_info.rb +0 -2
- data/lib/daytona_api_client/models/sandbox_labels.rb +0 -2
- data/lib/daytona_api_client/models/sandbox_state.rb +1 -2
- data/lib/daytona_api_client/models/sandbox_volume.rb +4 -16
- data/lib/daytona_api_client/models/screenshot_response.rb +0 -2
- data/lib/daytona_api_client/models/search_files_response.rb +0 -2
- data/lib/daytona_api_client/models/send_webhook_dto.rb +1 -25
- data/lib/daytona_api_client/models/session.rb +0 -2
- data/lib/daytona_api_client/models/session_execute_request.rb +0 -2
- data/lib/daytona_api_client/models/session_execute_response.rb +0 -2
- data/lib/daytona_api_client/models/set_snapshot_general_status_dto.rb +0 -2
- data/lib/daytona_api_client/models/snapshot_dto.rb +4 -38
- data/lib/daytona_api_client/models/snapshot_state.rb +4 -1
- data/lib/daytona_api_client/models/ssh_access_dto.rb +4 -33
- data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +24 -6
- data/lib/daytona_api_client/models/storage_access_dto.rb +0 -2
- data/lib/daytona_api_client/models/update_docker_registry.rb +0 -2
- data/lib/daytona_api_client/models/update_organization_invitation.rb +0 -2
- data/lib/daytona_api_client/models/update_organization_member_access.rb +0 -2
- data/lib/daytona_api_client/models/update_organization_quota.rb +41 -92
- data/lib/daytona_api_client/models/update_organization_role.rb +0 -2
- data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +6 -28
- data/lib/daytona_api_client/models/user.rb +0 -2
- data/lib/daytona_api_client/models/user_home_dir_response.rb +0 -2
- data/lib/daytona_api_client/models/user_public_key.rb +0 -2
- data/lib/daytona_api_client/models/volume_dto.rb +0 -2
- data/lib/daytona_api_client/models/webhook_app_portal_access.rb +1 -30
- data/lib/daytona_api_client/models/webhook_controller_get_status200_response.rb +0 -2
- data/lib/daytona_api_client/models/webhook_initialization_status.rb +0 -2
- data/lib/daytona_api_client/models/windows_response.rb +0 -2
- data/lib/daytona_api_client/models/work_dir_response.rb +0 -2
- data/lib/daytona_api_client/models/workspace.rb +27 -66
- data/lib/daytona_api_client/version.rb +1 -1
- data/lib/daytona_api_client.rb +1 -42
- data/project.json +11 -37
- metadata +5 -50
- data/.gitignore +0 -39
- data/.openapi-generator/FILES +0 -206
- 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 -386
- 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/models/admin_create_runner.rb +0 -387
- data/lib/daytona_api_client/models/create_region.rb +0 -271
- data/lib/daytona_api_client/models/create_region_response.rb +0 -282
- data/lib/daytona_api_client/models/create_runner_response.rb +0 -265
- data/lib/daytona_api_client/models/job_status.rb +0 -42
- data/lib/daytona_api_client/models/job_type.rb +0 -50
- data/lib/daytona_api_client/models/log_entry.rb +0 -407
- data/lib/daytona_api_client/models/metric_data_point.rb +0 -265
- data/lib/daytona_api_client/models/metric_series.rb +0 -267
- data/lib/daytona_api_client/models/metrics_response.rb +0 -240
- data/lib/daytona_api_client/models/otel_config.rb +0 -251
- data/lib/daytona_api_client/models/paginated_logs.rb +0 -321
- data/lib/daytona_api_client/models/paginated_traces.rb +0 -321
- data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -240
- data/lib/daytona_api_client/models/rate_limit_config.rb +0 -251
- data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -231
- data/lib/daytona_api_client/models/regenerate_api_key_response.rb +0 -238
- data/lib/daytona_api_client/models/region_quota.rb +0 -341
- data/lib/daytona_api_client/models/region_type.rb +0 -41
- data/lib/daytona_api_client/models/region_usage_overview.rb +0 -393
- data/lib/daytona_api_client/models/resize_sandbox.rb +0 -298
- data/lib/daytona_api_client/models/runner_full.rb +0 -781
- data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -535
- data/lib/daytona_api_client/models/runner_healthcheck.rb +0 -290
- data/lib/daytona_api_client/models/runner_service_health.rb +0 -275
- data/lib/daytona_api_client/models/signed_port_preview_url.rb +0 -319
- data/lib/daytona_api_client/models/snapshot_manager_credentials.rb +0 -265
- data/lib/daytona_api_client/models/toolbox_proxy_url.rb +0 -238
- data/lib/daytona_api_client/models/trace_span.rb +0 -405
- data/lib/daytona_api_client/models/trace_summary.rb +0 -383
- data/lib/daytona_api_client/models/update_job_status.rb +0 -280
- data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -238
- data/lib/daytona_api_client/models/update_organization_region_quota.rb +0 -247
- data/lib/daytona_api_client/models/update_region.rb +0 -244
- data/lib/daytona_api_client/models/url.rb +0 -238
- data/lib/daytona_api_client/models/webhook_event.rb +0 -45
- data/lib/daytona_api_client/models/workspace_port_preview_url.rb +0 -265
|
@@ -1,407 +0,0 @@
|
|
|
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 LogEntry
|
|
18
|
-
# Timestamp of the log entry
|
|
19
|
-
attr_accessor :timestamp
|
|
20
|
-
|
|
21
|
-
# Log message body
|
|
22
|
-
attr_accessor :body
|
|
23
|
-
|
|
24
|
-
# Severity level text (e.g., INFO, WARN, ERROR)
|
|
25
|
-
attr_accessor :severity_text
|
|
26
|
-
|
|
27
|
-
# Severity level number
|
|
28
|
-
attr_accessor :severity_number
|
|
29
|
-
|
|
30
|
-
# Service name that generated the log
|
|
31
|
-
attr_accessor :service_name
|
|
32
|
-
|
|
33
|
-
# Resource attributes from OTEL
|
|
34
|
-
attr_accessor :resource_attributes
|
|
35
|
-
|
|
36
|
-
# Log-specific attributes
|
|
37
|
-
attr_accessor :log_attributes
|
|
38
|
-
|
|
39
|
-
# Associated trace ID if available
|
|
40
|
-
attr_accessor :trace_id
|
|
41
|
-
|
|
42
|
-
# Associated span ID if available
|
|
43
|
-
attr_accessor :span_id
|
|
44
|
-
|
|
45
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
46
|
-
def self.attribute_map
|
|
47
|
-
{
|
|
48
|
-
:'timestamp' => :'timestamp',
|
|
49
|
-
:'body' => :'body',
|
|
50
|
-
:'severity_text' => :'severityText',
|
|
51
|
-
:'severity_number' => :'severityNumber',
|
|
52
|
-
:'service_name' => :'serviceName',
|
|
53
|
-
:'resource_attributes' => :'resourceAttributes',
|
|
54
|
-
:'log_attributes' => :'logAttributes',
|
|
55
|
-
:'trace_id' => :'traceId',
|
|
56
|
-
:'span_id' => :'spanId'
|
|
57
|
-
}
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
# Returns attribute mapping this model knows about
|
|
61
|
-
def self.acceptable_attribute_map
|
|
62
|
-
attribute_map
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
# Returns all the JSON keys this model knows about
|
|
66
|
-
def self.acceptable_attributes
|
|
67
|
-
acceptable_attribute_map.values
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
# Attribute type mapping.
|
|
71
|
-
def self.openapi_types
|
|
72
|
-
{
|
|
73
|
-
:'timestamp' => :'String',
|
|
74
|
-
:'body' => :'String',
|
|
75
|
-
:'severity_text' => :'String',
|
|
76
|
-
:'severity_number' => :'Float',
|
|
77
|
-
:'service_name' => :'String',
|
|
78
|
-
:'resource_attributes' => :'Hash<String, String>',
|
|
79
|
-
:'log_attributes' => :'Hash<String, String>',
|
|
80
|
-
:'trace_id' => :'String',
|
|
81
|
-
:'span_id' => :'String'
|
|
82
|
-
}
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
# List of attributes with nullable: true
|
|
86
|
-
def self.openapi_nullable
|
|
87
|
-
Set.new([
|
|
88
|
-
])
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
# Initializes the object
|
|
92
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
93
|
-
def initialize(attributes = {})
|
|
94
|
-
if (!attributes.is_a?(Hash))
|
|
95
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::LogEntry` initialize method"
|
|
96
|
-
end
|
|
97
|
-
|
|
98
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
99
|
-
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
100
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
101
|
-
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
102
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::LogEntry`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
103
|
-
end
|
|
104
|
-
h[k.to_sym] = v
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if attributes.key?(:'timestamp')
|
|
108
|
-
self.timestamp = attributes[:'timestamp']
|
|
109
|
-
else
|
|
110
|
-
self.timestamp = nil
|
|
111
|
-
end
|
|
112
|
-
|
|
113
|
-
if attributes.key?(:'body')
|
|
114
|
-
self.body = attributes[:'body']
|
|
115
|
-
else
|
|
116
|
-
self.body = nil
|
|
117
|
-
end
|
|
118
|
-
|
|
119
|
-
if attributes.key?(:'severity_text')
|
|
120
|
-
self.severity_text = attributes[:'severity_text']
|
|
121
|
-
else
|
|
122
|
-
self.severity_text = nil
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
if attributes.key?(:'severity_number')
|
|
126
|
-
self.severity_number = attributes[:'severity_number']
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
if attributes.key?(:'service_name')
|
|
130
|
-
self.service_name = attributes[:'service_name']
|
|
131
|
-
else
|
|
132
|
-
self.service_name = nil
|
|
133
|
-
end
|
|
134
|
-
|
|
135
|
-
if attributes.key?(:'resource_attributes')
|
|
136
|
-
if (value = attributes[:'resource_attributes']).is_a?(Hash)
|
|
137
|
-
self.resource_attributes = value
|
|
138
|
-
end
|
|
139
|
-
else
|
|
140
|
-
self.resource_attributes = nil
|
|
141
|
-
end
|
|
142
|
-
|
|
143
|
-
if attributes.key?(:'log_attributes')
|
|
144
|
-
if (value = attributes[:'log_attributes']).is_a?(Hash)
|
|
145
|
-
self.log_attributes = value
|
|
146
|
-
end
|
|
147
|
-
else
|
|
148
|
-
self.log_attributes = nil
|
|
149
|
-
end
|
|
150
|
-
|
|
151
|
-
if attributes.key?(:'trace_id')
|
|
152
|
-
self.trace_id = attributes[:'trace_id']
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
if attributes.key?(:'span_id')
|
|
156
|
-
self.span_id = attributes[:'span_id']
|
|
157
|
-
end
|
|
158
|
-
end
|
|
159
|
-
|
|
160
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
161
|
-
# @return Array for valid properties with the reasons
|
|
162
|
-
def list_invalid_properties
|
|
163
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
164
|
-
invalid_properties = Array.new
|
|
165
|
-
if @timestamp.nil?
|
|
166
|
-
invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
|
|
167
|
-
end
|
|
168
|
-
|
|
169
|
-
if @body.nil?
|
|
170
|
-
invalid_properties.push('invalid value for "body", body cannot be nil.')
|
|
171
|
-
end
|
|
172
|
-
|
|
173
|
-
if @severity_text.nil?
|
|
174
|
-
invalid_properties.push('invalid value for "severity_text", severity_text cannot be nil.')
|
|
175
|
-
end
|
|
176
|
-
|
|
177
|
-
if @service_name.nil?
|
|
178
|
-
invalid_properties.push('invalid value for "service_name", service_name cannot be nil.')
|
|
179
|
-
end
|
|
180
|
-
|
|
181
|
-
if @resource_attributes.nil?
|
|
182
|
-
invalid_properties.push('invalid value for "resource_attributes", resource_attributes cannot be nil.')
|
|
183
|
-
end
|
|
184
|
-
|
|
185
|
-
if @log_attributes.nil?
|
|
186
|
-
invalid_properties.push('invalid value for "log_attributes", log_attributes cannot be nil.')
|
|
187
|
-
end
|
|
188
|
-
|
|
189
|
-
invalid_properties
|
|
190
|
-
end
|
|
191
|
-
|
|
192
|
-
# Check to see if the all the properties in the model are valid
|
|
193
|
-
# @return true if the model is valid
|
|
194
|
-
def valid?
|
|
195
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
196
|
-
return false if @timestamp.nil?
|
|
197
|
-
return false if @body.nil?
|
|
198
|
-
return false if @severity_text.nil?
|
|
199
|
-
return false if @service_name.nil?
|
|
200
|
-
return false if @resource_attributes.nil?
|
|
201
|
-
return false if @log_attributes.nil?
|
|
202
|
-
true
|
|
203
|
-
end
|
|
204
|
-
|
|
205
|
-
# Custom attribute writer method with validation
|
|
206
|
-
# @param [Object] timestamp Value to be assigned
|
|
207
|
-
def timestamp=(timestamp)
|
|
208
|
-
if timestamp.nil?
|
|
209
|
-
fail ArgumentError, 'timestamp cannot be nil'
|
|
210
|
-
end
|
|
211
|
-
|
|
212
|
-
@timestamp = timestamp
|
|
213
|
-
end
|
|
214
|
-
|
|
215
|
-
# Custom attribute writer method with validation
|
|
216
|
-
# @param [Object] body Value to be assigned
|
|
217
|
-
def body=(body)
|
|
218
|
-
if body.nil?
|
|
219
|
-
fail ArgumentError, 'body cannot be nil'
|
|
220
|
-
end
|
|
221
|
-
|
|
222
|
-
@body = body
|
|
223
|
-
end
|
|
224
|
-
|
|
225
|
-
# Custom attribute writer method with validation
|
|
226
|
-
# @param [Object] severity_text Value to be assigned
|
|
227
|
-
def severity_text=(severity_text)
|
|
228
|
-
if severity_text.nil?
|
|
229
|
-
fail ArgumentError, 'severity_text cannot be nil'
|
|
230
|
-
end
|
|
231
|
-
|
|
232
|
-
@severity_text = severity_text
|
|
233
|
-
end
|
|
234
|
-
|
|
235
|
-
# Custom attribute writer method with validation
|
|
236
|
-
# @param [Object] service_name Value to be assigned
|
|
237
|
-
def service_name=(service_name)
|
|
238
|
-
if service_name.nil?
|
|
239
|
-
fail ArgumentError, 'service_name cannot be nil'
|
|
240
|
-
end
|
|
241
|
-
|
|
242
|
-
@service_name = service_name
|
|
243
|
-
end
|
|
244
|
-
|
|
245
|
-
# Custom attribute writer method with validation
|
|
246
|
-
# @param [Object] resource_attributes Value to be assigned
|
|
247
|
-
def resource_attributes=(resource_attributes)
|
|
248
|
-
if resource_attributes.nil?
|
|
249
|
-
fail ArgumentError, 'resource_attributes cannot be nil'
|
|
250
|
-
end
|
|
251
|
-
|
|
252
|
-
@resource_attributes = resource_attributes
|
|
253
|
-
end
|
|
254
|
-
|
|
255
|
-
# Custom attribute writer method with validation
|
|
256
|
-
# @param [Object] log_attributes Value to be assigned
|
|
257
|
-
def log_attributes=(log_attributes)
|
|
258
|
-
if log_attributes.nil?
|
|
259
|
-
fail ArgumentError, 'log_attributes cannot be nil'
|
|
260
|
-
end
|
|
261
|
-
|
|
262
|
-
@log_attributes = log_attributes
|
|
263
|
-
end
|
|
264
|
-
|
|
265
|
-
# Checks equality by comparing each attribute.
|
|
266
|
-
# @param [Object] Object to be compared
|
|
267
|
-
def ==(o)
|
|
268
|
-
return true if self.equal?(o)
|
|
269
|
-
self.class == o.class &&
|
|
270
|
-
timestamp == o.timestamp &&
|
|
271
|
-
body == o.body &&
|
|
272
|
-
severity_text == o.severity_text &&
|
|
273
|
-
severity_number == o.severity_number &&
|
|
274
|
-
service_name == o.service_name &&
|
|
275
|
-
resource_attributes == o.resource_attributes &&
|
|
276
|
-
log_attributes == o.log_attributes &&
|
|
277
|
-
trace_id == o.trace_id &&
|
|
278
|
-
span_id == o.span_id
|
|
279
|
-
end
|
|
280
|
-
|
|
281
|
-
# @see the `==` method
|
|
282
|
-
# @param [Object] Object to be compared
|
|
283
|
-
def eql?(o)
|
|
284
|
-
self == o
|
|
285
|
-
end
|
|
286
|
-
|
|
287
|
-
# Calculates hash code according to all attributes.
|
|
288
|
-
# @return [Integer] Hash code
|
|
289
|
-
def hash
|
|
290
|
-
[timestamp, body, severity_text, severity_number, service_name, resource_attributes, log_attributes, trace_id, span_id].hash
|
|
291
|
-
end
|
|
292
|
-
|
|
293
|
-
# Builds the object from hash
|
|
294
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
295
|
-
# @return [Object] Returns the model itself
|
|
296
|
-
def self.build_from_hash(attributes)
|
|
297
|
-
return nil unless attributes.is_a?(Hash)
|
|
298
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
299
|
-
transformed_hash = {}
|
|
300
|
-
openapi_types.each_pair do |key, type|
|
|
301
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
302
|
-
transformed_hash["#{key}"] = nil
|
|
303
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
304
|
-
# check to ensure the input is an array given that the attribute
|
|
305
|
-
# is documented as an array but the input is not
|
|
306
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
307
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
308
|
-
end
|
|
309
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
310
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
311
|
-
end
|
|
312
|
-
end
|
|
313
|
-
new(transformed_hash)
|
|
314
|
-
end
|
|
315
|
-
|
|
316
|
-
# Deserializes the data based on type
|
|
317
|
-
# @param string type Data type
|
|
318
|
-
# @param string value Value to be deserialized
|
|
319
|
-
# @return [Object] Deserialized data
|
|
320
|
-
def self._deserialize(type, value)
|
|
321
|
-
case type.to_sym
|
|
322
|
-
when :Time
|
|
323
|
-
Time.parse(value)
|
|
324
|
-
when :Date
|
|
325
|
-
Date.parse(value)
|
|
326
|
-
when :String
|
|
327
|
-
value.to_s
|
|
328
|
-
when :Integer
|
|
329
|
-
value.to_i
|
|
330
|
-
when :Float
|
|
331
|
-
value.to_f
|
|
332
|
-
when :Boolean
|
|
333
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
334
|
-
true
|
|
335
|
-
else
|
|
336
|
-
false
|
|
337
|
-
end
|
|
338
|
-
when :Object
|
|
339
|
-
# generic object (usually a Hash), return directly
|
|
340
|
-
value
|
|
341
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
342
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
343
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
344
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
345
|
-
k_type = Regexp.last_match[:k_type]
|
|
346
|
-
v_type = Regexp.last_match[:v_type]
|
|
347
|
-
{}.tap do |hash|
|
|
348
|
-
value.each do |k, v|
|
|
349
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
350
|
-
end
|
|
351
|
-
end
|
|
352
|
-
else # model
|
|
353
|
-
# models (e.g. Pet) or oneOf
|
|
354
|
-
klass = DaytonaApiClient.const_get(type)
|
|
355
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
356
|
-
end
|
|
357
|
-
end
|
|
358
|
-
|
|
359
|
-
# Returns the string representation of the object
|
|
360
|
-
# @return [String] String presentation of the object
|
|
361
|
-
def to_s
|
|
362
|
-
to_hash.to_s
|
|
363
|
-
end
|
|
364
|
-
|
|
365
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
366
|
-
# @return [Hash] Returns the object in the form of hash
|
|
367
|
-
def to_body
|
|
368
|
-
to_hash
|
|
369
|
-
end
|
|
370
|
-
|
|
371
|
-
# Returns the object in the form of hash
|
|
372
|
-
# @return [Hash] Returns the object in the form of hash
|
|
373
|
-
def to_hash
|
|
374
|
-
hash = {}
|
|
375
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
376
|
-
value = self.send(attr)
|
|
377
|
-
if value.nil?
|
|
378
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
379
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
380
|
-
end
|
|
381
|
-
|
|
382
|
-
hash[param] = _to_hash(value)
|
|
383
|
-
end
|
|
384
|
-
hash
|
|
385
|
-
end
|
|
386
|
-
|
|
387
|
-
# Outputs non-array value in the form of hash
|
|
388
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
389
|
-
# @param [Object] value Any valid value
|
|
390
|
-
# @return [Hash] Returns the value in the form of hash
|
|
391
|
-
def _to_hash(value)
|
|
392
|
-
if value.is_a?(Array)
|
|
393
|
-
value.compact.map { |v| _to_hash(v) }
|
|
394
|
-
elsif value.is_a?(Hash)
|
|
395
|
-
{}.tap do |hash|
|
|
396
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
397
|
-
end
|
|
398
|
-
elsif value.respond_to? :to_hash
|
|
399
|
-
value.to_hash
|
|
400
|
-
else
|
|
401
|
-
value
|
|
402
|
-
end
|
|
403
|
-
end
|
|
404
|
-
|
|
405
|
-
end
|
|
406
|
-
|
|
407
|
-
end
|
|
@@ -1,265 +0,0 @@
|
|
|
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 MetricDataPoint
|
|
18
|
-
# Timestamp of the data point
|
|
19
|
-
attr_accessor :timestamp
|
|
20
|
-
|
|
21
|
-
# Value at this timestamp
|
|
22
|
-
attr_accessor :value
|
|
23
|
-
|
|
24
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
-
def self.attribute_map
|
|
26
|
-
{
|
|
27
|
-
:'timestamp' => :'timestamp',
|
|
28
|
-
:'value' => :'value'
|
|
29
|
-
}
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
# Returns attribute mapping this model knows about
|
|
33
|
-
def self.acceptable_attribute_map
|
|
34
|
-
attribute_map
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
# Returns all the JSON keys this model knows about
|
|
38
|
-
def self.acceptable_attributes
|
|
39
|
-
acceptable_attribute_map.values
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
# Attribute type mapping.
|
|
43
|
-
def self.openapi_types
|
|
44
|
-
{
|
|
45
|
-
:'timestamp' => :'String',
|
|
46
|
-
:'value' => :'Float'
|
|
47
|
-
}
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
# List of attributes with nullable: true
|
|
51
|
-
def self.openapi_nullable
|
|
52
|
-
Set.new([
|
|
53
|
-
])
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
# Initializes the object
|
|
57
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
-
def initialize(attributes = {})
|
|
59
|
-
if (!attributes.is_a?(Hash))
|
|
60
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::MetricDataPoint` initialize method"
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
-
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
-
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::MetricDataPoint`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
|
-
end
|
|
69
|
-
h[k.to_sym] = v
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if attributes.key?(:'timestamp')
|
|
73
|
-
self.timestamp = attributes[:'timestamp']
|
|
74
|
-
else
|
|
75
|
-
self.timestamp = nil
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
if attributes.key?(:'value')
|
|
79
|
-
self.value = attributes[:'value']
|
|
80
|
-
else
|
|
81
|
-
self.value = nil
|
|
82
|
-
end
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
-
# @return Array for valid properties with the reasons
|
|
87
|
-
def list_invalid_properties
|
|
88
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
-
invalid_properties = Array.new
|
|
90
|
-
if @timestamp.nil?
|
|
91
|
-
invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
if @value.nil?
|
|
95
|
-
invalid_properties.push('invalid value for "value", value cannot be nil.')
|
|
96
|
-
end
|
|
97
|
-
|
|
98
|
-
invalid_properties
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
# Check to see if the all the properties in the model are valid
|
|
102
|
-
# @return true if the model is valid
|
|
103
|
-
def valid?
|
|
104
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
105
|
-
return false if @timestamp.nil?
|
|
106
|
-
return false if @value.nil?
|
|
107
|
-
true
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
# Custom attribute writer method with validation
|
|
111
|
-
# @param [Object] timestamp Value to be assigned
|
|
112
|
-
def timestamp=(timestamp)
|
|
113
|
-
if timestamp.nil?
|
|
114
|
-
fail ArgumentError, 'timestamp cannot be nil'
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
@timestamp = timestamp
|
|
118
|
-
end
|
|
119
|
-
|
|
120
|
-
# Custom attribute writer method with validation
|
|
121
|
-
# @param [Object] value Value to be assigned
|
|
122
|
-
def value=(value)
|
|
123
|
-
if value.nil?
|
|
124
|
-
fail ArgumentError, 'value cannot be nil'
|
|
125
|
-
end
|
|
126
|
-
|
|
127
|
-
@value = value
|
|
128
|
-
end
|
|
129
|
-
|
|
130
|
-
# Checks equality by comparing each attribute.
|
|
131
|
-
# @param [Object] Object to be compared
|
|
132
|
-
def ==(o)
|
|
133
|
-
return true if self.equal?(o)
|
|
134
|
-
self.class == o.class &&
|
|
135
|
-
timestamp == o.timestamp &&
|
|
136
|
-
value == o.value
|
|
137
|
-
end
|
|
138
|
-
|
|
139
|
-
# @see the `==` method
|
|
140
|
-
# @param [Object] Object to be compared
|
|
141
|
-
def eql?(o)
|
|
142
|
-
self == o
|
|
143
|
-
end
|
|
144
|
-
|
|
145
|
-
# Calculates hash code according to all attributes.
|
|
146
|
-
# @return [Integer] Hash code
|
|
147
|
-
def hash
|
|
148
|
-
[timestamp, value].hash
|
|
149
|
-
end
|
|
150
|
-
|
|
151
|
-
# Builds the object from hash
|
|
152
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
153
|
-
# @return [Object] Returns the model itself
|
|
154
|
-
def self.build_from_hash(attributes)
|
|
155
|
-
return nil unless attributes.is_a?(Hash)
|
|
156
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
157
|
-
transformed_hash = {}
|
|
158
|
-
openapi_types.each_pair do |key, type|
|
|
159
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
160
|
-
transformed_hash["#{key}"] = nil
|
|
161
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
162
|
-
# check to ensure the input is an array given that the attribute
|
|
163
|
-
# is documented as an array but the input is not
|
|
164
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
165
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
166
|
-
end
|
|
167
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
168
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
169
|
-
end
|
|
170
|
-
end
|
|
171
|
-
new(transformed_hash)
|
|
172
|
-
end
|
|
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
|
-
|
|
229
|
-
# Returns the object in the form of hash
|
|
230
|
-
# @return [Hash] Returns the object in the form of hash
|
|
231
|
-
def to_hash
|
|
232
|
-
hash = {}
|
|
233
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
234
|
-
value = self.send(attr)
|
|
235
|
-
if value.nil?
|
|
236
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
237
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
238
|
-
end
|
|
239
|
-
|
|
240
|
-
hash[param] = _to_hash(value)
|
|
241
|
-
end
|
|
242
|
-
hash
|
|
243
|
-
end
|
|
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
|
|
262
|
-
|
|
263
|
-
end
|
|
264
|
-
|
|
265
|
-
end
|