nightona_api_client 0.191.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 +7 -0
- data/.gitignore +39 -0
- data/.openapi-generator/FILES +212 -0
- data/.openapi-generator/VERSION +1 -0
- data/.openapi-generator-ignore +31 -0
- data/.rspec +2 -0
- data/.rubocop.yml +148 -0
- data/Rakefile +10 -0
- data/fix-gemspec.sh +11 -0
- data/lib/nightona_api_client/api/admin_api.rb +1449 -0
- data/lib/nightona_api_client/api/api_keys_api.rb +401 -0
- data/lib/nightona_api_client/api/audit_api.rb +110 -0
- data/lib/nightona_api_client/api/config_api.rb +77 -0
- data/lib/nightona_api_client/api/docker_registry_api.rb +411 -0
- data/lib/nightona_api_client/api/health_api.rb +126 -0
- data/lib/nightona_api_client/api/jobs_api.rb +299 -0
- data/lib/nightona_api_client/api/object_storage_api.rb +80 -0
- data/lib/nightona_api_client/api/organizations_api.rb +2615 -0
- data/lib/nightona_api_client/api/preview_api.rb +278 -0
- data/lib/nightona_api_client/api/regions_api.rb +77 -0
- data/lib/nightona_api_client/api/runners_api.rb +711 -0
- data/lib/nightona_api_client/api/sandbox_api.rb +3064 -0
- data/lib/nightona_api_client/api/snapshots_api.rb +567 -0
- data/lib/nightona_api_client/api/toolbox_api.rb +5108 -0
- data/lib/nightona_api_client/api/users_api.rb +316 -0
- data/lib/nightona_api_client/api/volumes_api.rb +342 -0
- data/lib/nightona_api_client/api/webhooks_api.rb +276 -0
- data/lib/nightona_api_client/api_client.rb +397 -0
- data/lib/nightona_api_client/api_error.rb +58 -0
- data/lib/nightona_api_client/api_model_base.rb +88 -0
- data/lib/nightona_api_client/configuration.rb +309 -0
- data/lib/nightona_api_client/models/account_provider.rb +190 -0
- data/lib/nightona_api_client/models/admin_create_runner.rb +326 -0
- data/lib/nightona_api_client/models/admin_get_webhook_status200_response.rb +147 -0
- data/lib/nightona_api_client/models/announcement.rb +175 -0
- data/lib/nightona_api_client/models/api_key_list.rb +313 -0
- data/lib/nightona_api_client/models/api_key_response.rb +273 -0
- data/lib/nightona_api_client/models/audit_log.rb +369 -0
- data/lib/nightona_api_client/models/build_info.rb +241 -0
- data/lib/nightona_api_client/models/command.rb +202 -0
- data/lib/nightona_api_client/models/completion_context.rb +173 -0
- data/lib/nightona_api_client/models/completion_item.rb +218 -0
- data/lib/nightona_api_client/models/completion_list.rb +192 -0
- data/lib/nightona_api_client/models/compressed_screenshot_response.rb +185 -0
- data/lib/nightona_api_client/models/computer_use_start_response.rb +192 -0
- data/lib/nightona_api_client/models/computer_use_status_response.rb +189 -0
- data/lib/nightona_api_client/models/computer_use_stop_response.rb +192 -0
- data/lib/nightona_api_client/models/create_api_key.rb +217 -0
- data/lib/nightona_api_client/models/create_build_info.rb +177 -0
- data/lib/nightona_api_client/models/create_docker_registry.rb +256 -0
- data/lib/nightona_api_client/models/create_linked_account.rb +192 -0
- data/lib/nightona_api_client/models/create_organization.rb +192 -0
- data/lib/nightona_api_client/models/create_organization_invitation.rb +255 -0
- data/lib/nightona_api_client/models/create_organization_quota.rb +219 -0
- data/lib/nightona_api_client/models/create_organization_region_quota.rb +372 -0
- data/lib/nightona_api_client/models/create_organization_role.rb +233 -0
- data/lib/nightona_api_client/models/create_region.rb +198 -0
- data/lib/nightona_api_client/models/create_region_response.rb +209 -0
- data/lib/nightona_api_client/models/create_runner.rb +202 -0
- data/lib/nightona_api_client/models/create_runner_response.rb +192 -0
- data/lib/nightona_api_client/models/create_sandbox.rb +356 -0
- data/lib/nightona_api_client/models/create_sandbox_snapshot.rb +177 -0
- data/lib/nightona_api_client/models/create_session_request.rb +165 -0
- data/lib/nightona_api_client/models/create_snapshot.rb +291 -0
- data/lib/nightona_api_client/models/create_user.rb +269 -0
- data/lib/nightona_api_client/models/create_volume.rb +164 -0
- data/lib/nightona_api_client/models/display_info_response.rb +167 -0
- data/lib/nightona_api_client/models/docker_registry.rb +378 -0
- data/lib/nightona_api_client/models/download_files.rb +167 -0
- data/lib/nightona_api_client/models/execute_request.rb +184 -0
- data/lib/nightona_api_client/models/execute_response.rb +192 -0
- data/lib/nightona_api_client/models/file_info.rb +346 -0
- data/lib/nightona_api_client/models/file_status.rb +242 -0
- data/lib/nightona_api_client/models/fork_sandbox.rb +148 -0
- data/lib/nightona_api_client/models/git_add_request.rb +193 -0
- data/lib/nightona_api_client/models/git_branch_request.rb +190 -0
- data/lib/nightona_api_client/models/git_checkout_request.rb +190 -0
- data/lib/nightona_api_client/models/git_clone_request.rb +226 -0
- data/lib/nightona_api_client/models/git_commit_info.rb +268 -0
- data/lib/nightona_api_client/models/git_commit_request.rb +254 -0
- data/lib/nightona_api_client/models/git_commit_response.rb +164 -0
- data/lib/nightona_api_client/models/git_delete_branch_request.rb +190 -0
- data/lib/nightona_api_client/models/git_repo_request.rb +182 -0
- data/lib/nightona_api_client/models/git_status.rb +219 -0
- data/lib/nightona_api_client/models/gpu_type.rb +41 -0
- data/lib/nightona_api_client/models/health_controller_check200_response.rb +182 -0
- data/lib/nightona_api_client/models/health_controller_check200_response_info_value.rb +164 -0
- data/lib/nightona_api_client/models/health_controller_check503_response.rb +182 -0
- data/lib/nightona_api_client/models/job.rb +366 -0
- data/lib/nightona_api_client/models/job_status.rb +43 -0
- data/lib/nightona_api_client/models/job_type.rb +54 -0
- data/lib/nightona_api_client/models/keyboard_hotkey_request.rb +165 -0
- data/lib/nightona_api_client/models/keyboard_press_request.rb +177 -0
- data/lib/nightona_api_client/models/keyboard_type_request.rb +175 -0
- data/lib/nightona_api_client/models/list_branch_response.rb +166 -0
- data/lib/nightona_api_client/models/list_sandboxes_response.rb +180 -0
- data/lib/nightona_api_client/models/log_entry.rb +334 -0
- data/lib/nightona_api_client/models/lsp_completion_params.rb +254 -0
- data/lib/nightona_api_client/models/lsp_document_request.rb +219 -0
- data/lib/nightona_api_client/models/lsp_location.rb +190 -0
- data/lib/nightona_api_client/models/lsp_server_request.rb +192 -0
- data/lib/nightona_api_client/models/lsp_symbol.rb +216 -0
- data/lib/nightona_api_client/models/match.rb +216 -0
- data/lib/nightona_api_client/models/metric_data_point.rb +192 -0
- data/lib/nightona_api_client/models/metric_series.rb +194 -0
- data/lib/nightona_api_client/models/metrics_response.rb +167 -0
- data/lib/nightona_api_client/models/mouse_click_request.rb +212 -0
- data/lib/nightona_api_client/models/mouse_click_response.rb +192 -0
- data/lib/nightona_api_client/models/mouse_drag_request.rb +256 -0
- data/lib/nightona_api_client/models/mouse_drag_response.rb +192 -0
- data/lib/nightona_api_client/models/mouse_move_request.rb +192 -0
- data/lib/nightona_api_client/models/mouse_move_response.rb +192 -0
- data/lib/nightona_api_client/models/mouse_position.rb +192 -0
- data/lib/nightona_api_client/models/mouse_scroll_request.rb +229 -0
- data/lib/nightona_api_client/models/mouse_scroll_response.rb +165 -0
- data/lib/nightona_api_client/models/nightona_configuration.rb +507 -0
- data/lib/nightona_api_client/models/oidc_config.rb +219 -0
- data/lib/nightona_api_client/models/organization.rb +698 -0
- data/lib/nightona_api_client/models/organization_invitation.rb +463 -0
- data/lib/nightona_api_client/models/organization_role.rb +341 -0
- data/lib/nightona_api_client/models/organization_sandbox_default_limited_network_egress.rb +165 -0
- data/lib/nightona_api_client/models/organization_suspension.rb +221 -0
- data/lib/nightona_api_client/models/organization_usage_overview.rb +270 -0
- data/lib/nightona_api_client/models/organization_user.rb +380 -0
- data/lib/nightona_api_client/models/otel_config.rb +178 -0
- data/lib/nightona_api_client/models/paginated_audit_logs.rb +254 -0
- data/lib/nightona_api_client/models/paginated_jobs.rb +244 -0
- data/lib/nightona_api_client/models/paginated_logs.rb +248 -0
- data/lib/nightona_api_client/models/paginated_sandboxes_deprecated.rb +244 -0
- data/lib/nightona_api_client/models/paginated_snapshots.rb +244 -0
- data/lib/nightona_api_client/models/paginated_traces.rb +248 -0
- data/lib/nightona_api_client/models/poll_jobs_response.rb +167 -0
- data/lib/nightona_api_client/models/port_preview_url.rb +219 -0
- data/lib/nightona_api_client/models/position.rb +190 -0
- data/lib/nightona_api_client/models/posthog_config.rb +192 -0
- data/lib/nightona_api_client/models/process_errors_response.rb +192 -0
- data/lib/nightona_api_client/models/process_logs_response.rb +192 -0
- data/lib/nightona_api_client/models/process_restart_response.rb +192 -0
- data/lib/nightona_api_client/models/process_status_response.rb +192 -0
- data/lib/nightona_api_client/models/project_dir_response.rb +147 -0
- data/lib/nightona_api_client/models/pty_create_request.rb +217 -0
- data/lib/nightona_api_client/models/pty_create_response.rb +165 -0
- data/lib/nightona_api_client/models/pty_list_response.rb +167 -0
- data/lib/nightona_api_client/models/pty_resize_request.rb +192 -0
- data/lib/nightona_api_client/models/pty_session_info.rb +354 -0
- data/lib/nightona_api_client/models/range.rb +190 -0
- data/lib/nightona_api_client/models/rate_limit_config.rb +178 -0
- data/lib/nightona_api_client/models/rate_limit_entry.rb +158 -0
- data/lib/nightona_api_client/models/regenerate_api_key_response.rb +165 -0
- data/lib/nightona_api_client/models/region.rb +339 -0
- data/lib/nightona_api_client/models/region_quota.rb +437 -0
- data/lib/nightona_api_client/models/region_screenshot_response.rb +185 -0
- data/lib/nightona_api_client/models/region_type.rb +42 -0
- data/lib/nightona_api_client/models/region_usage_overview.rb +515 -0
- data/lib/nightona_api_client/models/registry_push_access_dto.rb +300 -0
- data/lib/nightona_api_client/models/replace_request.rb +218 -0
- data/lib/nightona_api_client/models/replace_result.rb +165 -0
- data/lib/nightona_api_client/models/resize_sandbox.rb +225 -0
- data/lib/nightona_api_client/models/runner.rb +710 -0
- data/lib/nightona_api_client/models/runner_class.rb +40 -0
- data/lib/nightona_api_client/models/runner_full.rb +747 -0
- data/lib/nightona_api_client/models/runner_health_metrics.rb +482 -0
- data/lib/nightona_api_client/models/runner_healthcheck.rb +217 -0
- data/lib/nightona_api_client/models/runner_service_health.rb +202 -0
- data/lib/nightona_api_client/models/runner_snapshot_dto.rb +202 -0
- data/lib/nightona_api_client/models/runner_state.rb +44 -0
- data/lib/nightona_api_client/models/sandbox.rb +788 -0
- data/lib/nightona_api_client/models/sandbox_class.rb +43 -0
- data/lib/nightona_api_client/models/sandbox_desired_state.rb +45 -0
- data/lib/nightona_api_client/models/sandbox_labels.rb +167 -0
- data/lib/nightona_api_client/models/sandbox_list_item.rb +658 -0
- data/lib/nightona_api_client/models/sandbox_list_sort_direction.rb +41 -0
- data/lib/nightona_api_client/models/sandbox_list_sort_field.rb +45 -0
- data/lib/nightona_api_client/models/sandbox_state.rb +61 -0
- data/lib/nightona_api_client/models/sandbox_volume.rb +202 -0
- data/lib/nightona_api_client/models/screenshot_response.rb +185 -0
- data/lib/nightona_api_client/models/search_files_response.rb +166 -0
- data/lib/nightona_api_client/models/send_webhook_dto.rb +224 -0
- data/lib/nightona_api_client/models/session.rb +180 -0
- data/lib/nightona_api_client/models/session_execute_request.rb +185 -0
- data/lib/nightona_api_client/models/session_execute_response.rb +168 -0
- data/lib/nightona_api_client/models/set_snapshot_general_status_dto.rb +165 -0
- data/lib/nightona_api_client/models/signed_port_preview_url.rb +246 -0
- data/lib/nightona_api_client/models/snapshot_dto.rb +562 -0
- data/lib/nightona_api_client/models/snapshot_manager_credentials.rb +192 -0
- data/lib/nightona_api_client/models/snapshot_state.rb +47 -0
- data/lib/nightona_api_client/models/ssh_access_dto.rb +327 -0
- data/lib/nightona_api_client/models/ssh_access_validation_dto.rb +192 -0
- data/lib/nightona_api_client/models/storage_access_dto.rb +300 -0
- data/lib/nightona_api_client/models/toolbox_proxy_url.rb +165 -0
- data/lib/nightona_api_client/models/trace_span.rb +332 -0
- data/lib/nightona_api_client/models/trace_summary.rb +310 -0
- data/lib/nightona_api_client/models/update_docker_registry.rb +239 -0
- data/lib/nightona_api_client/models/update_job_status.rb +207 -0
- data/lib/nightona_api_client/models/update_organization_default_region.rb +165 -0
- data/lib/nightona_api_client/models/update_organization_invitation.rb +228 -0
- data/lib/nightona_api_client/models/update_organization_member_access.rb +218 -0
- data/lib/nightona_api_client/models/update_organization_quota.rb +295 -0
- data/lib/nightona_api_client/models/update_organization_region_quota.rb +299 -0
- data/lib/nightona_api_client/models/update_organization_role.rb +233 -0
- data/lib/nightona_api_client/models/update_region.rb +171 -0
- data/lib/nightona_api_client/models/update_sandbox_network_settings.rb +168 -0
- data/lib/nightona_api_client/models/update_sandbox_state_dto.rb +209 -0
- data/lib/nightona_api_client/models/url.rb +165 -0
- data/lib/nightona_api_client/models/user.rb +275 -0
- data/lib/nightona_api_client/models/user_home_dir_response.rb +147 -0
- data/lib/nightona_api_client/models/user_public_key.rb +192 -0
- data/lib/nightona_api_client/models/volume_dto.rb +346 -0
- data/lib/nightona_api_client/models/volume_state.rb +46 -0
- data/lib/nightona_api_client/models/webhook_app_portal_access.rb +192 -0
- data/lib/nightona_api_client/models/webhook_event.rb +46 -0
- data/lib/nightona_api_client/models/webhook_initialization_status.rb +272 -0
- data/lib/nightona_api_client/models/windows_response.rb +194 -0
- data/lib/nightona_api_client/models/work_dir_response.rb +147 -0
- data/lib/nightona_api_client/version.rb +15 -0
- data/lib/nightona_api_client.rb +241 -0
- data/nightona_api_client.gemspec +39 -0
- data/project.json +68 -0
- metadata +299 -0
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Nightona
|
|
3
|
+
|
|
4
|
+
#Nightona AI platform API Docs
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: amaraaamka0404@gmail.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module NightonaApiClient
|
|
17
|
+
class TraceSpan < ApiModelBase
|
|
18
|
+
# Trace identifier
|
|
19
|
+
attr_accessor :trace_id
|
|
20
|
+
|
|
21
|
+
# Span identifier
|
|
22
|
+
attr_accessor :span_id
|
|
23
|
+
|
|
24
|
+
# Parent span identifier
|
|
25
|
+
attr_accessor :parent_span_id
|
|
26
|
+
|
|
27
|
+
# Span name
|
|
28
|
+
attr_accessor :span_name
|
|
29
|
+
|
|
30
|
+
# Span start timestamp
|
|
31
|
+
attr_accessor :timestamp
|
|
32
|
+
|
|
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
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
46
|
+
def self.attribute_map
|
|
47
|
+
{
|
|
48
|
+
:'trace_id' => :'traceId',
|
|
49
|
+
:'span_id' => :'spanId',
|
|
50
|
+
:'parent_span_id' => :'parentSpanId',
|
|
51
|
+
:'span_name' => :'spanName',
|
|
52
|
+
:'timestamp' => :'timestamp',
|
|
53
|
+
:'duration_ns' => :'durationNs',
|
|
54
|
+
:'span_attributes' => :'spanAttributes',
|
|
55
|
+
:'status_code' => :'statusCode',
|
|
56
|
+
:'status_message' => :'statusMessage'
|
|
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
|
+
:'trace_id' => :'String',
|
|
74
|
+
:'span_id' => :'String',
|
|
75
|
+
:'parent_span_id' => :'String',
|
|
76
|
+
:'span_name' => :'String',
|
|
77
|
+
:'timestamp' => :'String',
|
|
78
|
+
:'duration_ns' => :'Float',
|
|
79
|
+
:'span_attributes' => :'Hash<String, String>',
|
|
80
|
+
:'status_code' => :'String',
|
|
81
|
+
:'status_message' => :'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 `NightonaApiClient::TraceSpan` 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 `NightonaApiClient::TraceSpan`. 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?(:'trace_id')
|
|
108
|
+
self.trace_id = attributes[:'trace_id']
|
|
109
|
+
else
|
|
110
|
+
self.trace_id = nil
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'span_id')
|
|
114
|
+
self.span_id = attributes[:'span_id']
|
|
115
|
+
else
|
|
116
|
+
self.span_id = nil
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'parent_span_id')
|
|
120
|
+
self.parent_span_id = attributes[:'parent_span_id']
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'span_name')
|
|
124
|
+
self.span_name = attributes[:'span_name']
|
|
125
|
+
else
|
|
126
|
+
self.span_name = nil
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'timestamp')
|
|
130
|
+
self.timestamp = attributes[:'timestamp']
|
|
131
|
+
else
|
|
132
|
+
self.timestamp = nil
|
|
133
|
+
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
|
+
end
|
|
157
|
+
|
|
158
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
159
|
+
# @return Array for valid properties with the reasons
|
|
160
|
+
def list_invalid_properties
|
|
161
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
162
|
+
invalid_properties = Array.new
|
|
163
|
+
if @trace_id.nil?
|
|
164
|
+
invalid_properties.push('invalid value for "trace_id", trace_id cannot be nil.')
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if @span_id.nil?
|
|
168
|
+
invalid_properties.push('invalid value for "span_id", span_id cannot be nil.')
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if @span_name.nil?
|
|
172
|
+
invalid_properties.push('invalid value for "span_name", span_name cannot be nil.')
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
if @timestamp.nil?
|
|
176
|
+
invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
if @duration_ns.nil?
|
|
180
|
+
invalid_properties.push('invalid value for "duration_ns", duration_ns cannot be nil.')
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if @span_attributes.nil?
|
|
184
|
+
invalid_properties.push('invalid value for "span_attributes", span_attributes cannot be nil.')
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
invalid_properties
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Check to see if the all the properties in the model are valid
|
|
191
|
+
# @return true if the model is valid
|
|
192
|
+
def valid?
|
|
193
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
194
|
+
return false if @trace_id.nil?
|
|
195
|
+
return false if @span_id.nil?
|
|
196
|
+
return false if @span_name.nil?
|
|
197
|
+
return false if @timestamp.nil?
|
|
198
|
+
return false if @duration_ns.nil?
|
|
199
|
+
return false if @span_attributes.nil?
|
|
200
|
+
true
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Custom attribute writer method with validation
|
|
204
|
+
# @param [Object] trace_id Value to be assigned
|
|
205
|
+
def trace_id=(trace_id)
|
|
206
|
+
if trace_id.nil?
|
|
207
|
+
fail ArgumentError, 'trace_id cannot be nil'
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
@trace_id = trace_id
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Custom attribute writer method with validation
|
|
214
|
+
# @param [Object] span_id Value to be assigned
|
|
215
|
+
def span_id=(span_id)
|
|
216
|
+
if span_id.nil?
|
|
217
|
+
fail ArgumentError, 'span_id cannot be nil'
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
@span_id = span_id
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Custom attribute writer method with validation
|
|
224
|
+
# @param [Object] span_name Value to be assigned
|
|
225
|
+
def span_name=(span_name)
|
|
226
|
+
if span_name.nil?
|
|
227
|
+
fail ArgumentError, 'span_name cannot be nil'
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
@span_name = span_name
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Custom attribute writer method with validation
|
|
234
|
+
# @param [Object] timestamp Value to be assigned
|
|
235
|
+
def timestamp=(timestamp)
|
|
236
|
+
if timestamp.nil?
|
|
237
|
+
fail ArgumentError, 'timestamp cannot be nil'
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
@timestamp = timestamp
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# Custom attribute writer method with validation
|
|
244
|
+
# @param [Object] duration_ns Value to be assigned
|
|
245
|
+
def duration_ns=(duration_ns)
|
|
246
|
+
if duration_ns.nil?
|
|
247
|
+
fail ArgumentError, 'duration_ns cannot be nil'
|
|
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'
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
@span_attributes = span_attributes
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# Checks equality by comparing each attribute.
|
|
264
|
+
# @param [Object] Object to be compared
|
|
265
|
+
def ==(o)
|
|
266
|
+
return true if self.equal?(o)
|
|
267
|
+
self.class == o.class &&
|
|
268
|
+
trace_id == o.trace_id &&
|
|
269
|
+
span_id == o.span_id &&
|
|
270
|
+
parent_span_id == o.parent_span_id &&
|
|
271
|
+
span_name == o.span_name &&
|
|
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
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# @see the `==` method
|
|
280
|
+
# @param [Object] Object to be compared
|
|
281
|
+
def eql?(o)
|
|
282
|
+
self == o
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# Calculates hash code according to all attributes.
|
|
286
|
+
# @return [Integer] Hash code
|
|
287
|
+
def hash
|
|
288
|
+
[trace_id, span_id, parent_span_id, span_name, timestamp, duration_ns, span_attributes, status_code, status_message].hash
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# Builds the object from hash
|
|
292
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
293
|
+
# @return [Object] Returns the model itself
|
|
294
|
+
def self.build_from_hash(attributes)
|
|
295
|
+
return nil unless attributes.is_a?(Hash)
|
|
296
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
297
|
+
transformed_hash = {}
|
|
298
|
+
openapi_types.each_pair do |key, type|
|
|
299
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
300
|
+
transformed_hash["#{key}"] = nil
|
|
301
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
302
|
+
# check to ensure the input is an array given that the attribute
|
|
303
|
+
# is documented as an array but the input is not
|
|
304
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
305
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
306
|
+
end
|
|
307
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
308
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
309
|
+
end
|
|
310
|
+
end
|
|
311
|
+
new(transformed_hash)
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
# Returns the object in the form of hash
|
|
315
|
+
# @return [Hash] Returns the object in the form of hash
|
|
316
|
+
def to_hash
|
|
317
|
+
hash = {}
|
|
318
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
319
|
+
value = self.send(attr)
|
|
320
|
+
if value.nil?
|
|
321
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
322
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
hash[param] = _to_hash(value)
|
|
326
|
+
end
|
|
327
|
+
hash
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
end
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Nightona
|
|
3
|
+
|
|
4
|
+
#Nightona AI platform API Docs
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: amaraaamka0404@gmail.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module NightonaApiClient
|
|
17
|
+
class TraceSummary < ApiModelBase
|
|
18
|
+
# Unique trace identifier
|
|
19
|
+
attr_accessor :trace_id
|
|
20
|
+
|
|
21
|
+
# Name of the root span
|
|
22
|
+
attr_accessor :root_span_name
|
|
23
|
+
|
|
24
|
+
# Trace start time
|
|
25
|
+
attr_accessor :start_time
|
|
26
|
+
|
|
27
|
+
# Trace end time
|
|
28
|
+
attr_accessor :end_time
|
|
29
|
+
|
|
30
|
+
# Total duration in milliseconds
|
|
31
|
+
attr_accessor :duration_ms
|
|
32
|
+
|
|
33
|
+
# Number of spans in this trace
|
|
34
|
+
attr_accessor :span_count
|
|
35
|
+
|
|
36
|
+
# Status code of the trace
|
|
37
|
+
attr_accessor :status_code
|
|
38
|
+
|
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
40
|
+
def self.attribute_map
|
|
41
|
+
{
|
|
42
|
+
:'trace_id' => :'traceId',
|
|
43
|
+
:'root_span_name' => :'rootSpanName',
|
|
44
|
+
:'start_time' => :'startTime',
|
|
45
|
+
:'end_time' => :'endTime',
|
|
46
|
+
:'duration_ms' => :'durationMs',
|
|
47
|
+
:'span_count' => :'spanCount',
|
|
48
|
+
:'status_code' => :'statusCode'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Returns attribute mapping this model knows about
|
|
53
|
+
def self.acceptable_attribute_map
|
|
54
|
+
attribute_map
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Returns all the JSON keys this model knows about
|
|
58
|
+
def self.acceptable_attributes
|
|
59
|
+
acceptable_attribute_map.values
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Attribute type mapping.
|
|
63
|
+
def self.openapi_types
|
|
64
|
+
{
|
|
65
|
+
:'trace_id' => :'String',
|
|
66
|
+
:'root_span_name' => :'String',
|
|
67
|
+
:'start_time' => :'String',
|
|
68
|
+
:'end_time' => :'String',
|
|
69
|
+
:'duration_ms' => :'Float',
|
|
70
|
+
:'span_count' => :'Float',
|
|
71
|
+
:'status_code' => :'String'
|
|
72
|
+
}
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# List of attributes with nullable: true
|
|
76
|
+
def self.openapi_nullable
|
|
77
|
+
Set.new([
|
|
78
|
+
])
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Initializes the object
|
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
83
|
+
def initialize(attributes = {})
|
|
84
|
+
if (!attributes.is_a?(Hash))
|
|
85
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `NightonaApiClient::TraceSummary` initialize method"
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
89
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
90
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
91
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
92
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `NightonaApiClient::TraceSummary`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
93
|
+
end
|
|
94
|
+
h[k.to_sym] = v
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'trace_id')
|
|
98
|
+
self.trace_id = attributes[:'trace_id']
|
|
99
|
+
else
|
|
100
|
+
self.trace_id = nil
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'root_span_name')
|
|
104
|
+
self.root_span_name = attributes[:'root_span_name']
|
|
105
|
+
else
|
|
106
|
+
self.root_span_name = nil
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'start_time')
|
|
110
|
+
self.start_time = attributes[:'start_time']
|
|
111
|
+
else
|
|
112
|
+
self.start_time = nil
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'end_time')
|
|
116
|
+
self.end_time = attributes[:'end_time']
|
|
117
|
+
else
|
|
118
|
+
self.end_time = nil
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'duration_ms')
|
|
122
|
+
self.duration_ms = attributes[:'duration_ms']
|
|
123
|
+
else
|
|
124
|
+
self.duration_ms = nil
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'span_count')
|
|
128
|
+
self.span_count = attributes[:'span_count']
|
|
129
|
+
else
|
|
130
|
+
self.span_count = nil
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'status_code')
|
|
134
|
+
self.status_code = attributes[:'status_code']
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
139
|
+
# @return Array for valid properties with the reasons
|
|
140
|
+
def list_invalid_properties
|
|
141
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
142
|
+
invalid_properties = Array.new
|
|
143
|
+
if @trace_id.nil?
|
|
144
|
+
invalid_properties.push('invalid value for "trace_id", trace_id cannot be nil.')
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if @root_span_name.nil?
|
|
148
|
+
invalid_properties.push('invalid value for "root_span_name", root_span_name cannot be nil.')
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if @start_time.nil?
|
|
152
|
+
invalid_properties.push('invalid value for "start_time", start_time cannot be nil.')
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if @end_time.nil?
|
|
156
|
+
invalid_properties.push('invalid value for "end_time", end_time cannot be nil.')
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if @duration_ms.nil?
|
|
160
|
+
invalid_properties.push('invalid value for "duration_ms", duration_ms cannot be nil.')
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if @span_count.nil?
|
|
164
|
+
invalid_properties.push('invalid value for "span_count", span_count cannot be nil.')
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
invalid_properties
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Check to see if the all the properties in the model are valid
|
|
171
|
+
# @return true if the model is valid
|
|
172
|
+
def valid?
|
|
173
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
174
|
+
return false if @trace_id.nil?
|
|
175
|
+
return false if @root_span_name.nil?
|
|
176
|
+
return false if @start_time.nil?
|
|
177
|
+
return false if @end_time.nil?
|
|
178
|
+
return false if @duration_ms.nil?
|
|
179
|
+
return false if @span_count.nil?
|
|
180
|
+
true
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Custom attribute writer method with validation
|
|
184
|
+
# @param [Object] trace_id Value to be assigned
|
|
185
|
+
def trace_id=(trace_id)
|
|
186
|
+
if trace_id.nil?
|
|
187
|
+
fail ArgumentError, 'trace_id cannot be nil'
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
@trace_id = trace_id
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Custom attribute writer method with validation
|
|
194
|
+
# @param [Object] root_span_name Value to be assigned
|
|
195
|
+
def root_span_name=(root_span_name)
|
|
196
|
+
if root_span_name.nil?
|
|
197
|
+
fail ArgumentError, 'root_span_name cannot be nil'
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
@root_span_name = root_span_name
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Custom attribute writer method with validation
|
|
204
|
+
# @param [Object] start_time Value to be assigned
|
|
205
|
+
def start_time=(start_time)
|
|
206
|
+
if start_time.nil?
|
|
207
|
+
fail ArgumentError, 'start_time cannot be nil'
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
@start_time = start_time
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Custom attribute writer method with validation
|
|
214
|
+
# @param [Object] end_time Value to be assigned
|
|
215
|
+
def end_time=(end_time)
|
|
216
|
+
if end_time.nil?
|
|
217
|
+
fail ArgumentError, 'end_time cannot be nil'
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
@end_time = end_time
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Custom attribute writer method with validation
|
|
224
|
+
# @param [Object] duration_ms Value to be assigned
|
|
225
|
+
def duration_ms=(duration_ms)
|
|
226
|
+
if duration_ms.nil?
|
|
227
|
+
fail ArgumentError, 'duration_ms cannot be nil'
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
@duration_ms = duration_ms
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Custom attribute writer method with validation
|
|
234
|
+
# @param [Object] span_count Value to be assigned
|
|
235
|
+
def span_count=(span_count)
|
|
236
|
+
if span_count.nil?
|
|
237
|
+
fail ArgumentError, 'span_count cannot be nil'
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
@span_count = span_count
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# Checks equality by comparing each attribute.
|
|
244
|
+
# @param [Object] Object to be compared
|
|
245
|
+
def ==(o)
|
|
246
|
+
return true if self.equal?(o)
|
|
247
|
+
self.class == o.class &&
|
|
248
|
+
trace_id == o.trace_id &&
|
|
249
|
+
root_span_name == o.root_span_name &&
|
|
250
|
+
start_time == o.start_time &&
|
|
251
|
+
end_time == o.end_time &&
|
|
252
|
+
duration_ms == o.duration_ms &&
|
|
253
|
+
span_count == o.span_count &&
|
|
254
|
+
status_code == o.status_code
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# @see the `==` method
|
|
258
|
+
# @param [Object] Object to be compared
|
|
259
|
+
def eql?(o)
|
|
260
|
+
self == o
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# Calculates hash code according to all attributes.
|
|
264
|
+
# @return [Integer] Hash code
|
|
265
|
+
def hash
|
|
266
|
+
[trace_id, root_span_name, start_time, end_time, duration_ms, span_count, status_code].hash
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
# Builds the object from hash
|
|
270
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
271
|
+
# @return [Object] Returns the model itself
|
|
272
|
+
def self.build_from_hash(attributes)
|
|
273
|
+
return nil unless attributes.is_a?(Hash)
|
|
274
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
275
|
+
transformed_hash = {}
|
|
276
|
+
openapi_types.each_pair do |key, type|
|
|
277
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
278
|
+
transformed_hash["#{key}"] = nil
|
|
279
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
280
|
+
# check to ensure the input is an array given that the attribute
|
|
281
|
+
# is documented as an array but the input is not
|
|
282
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
283
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
284
|
+
end
|
|
285
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
286
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
287
|
+
end
|
|
288
|
+
end
|
|
289
|
+
new(transformed_hash)
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
# Returns the object in the form of hash
|
|
293
|
+
# @return [Hash] Returns the object in the form of hash
|
|
294
|
+
def to_hash
|
|
295
|
+
hash = {}
|
|
296
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
297
|
+
value = self.send(attr)
|
|
298
|
+
if value.nil?
|
|
299
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
300
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
hash[param] = _to_hash(value)
|
|
304
|
+
end
|
|
305
|
+
hash
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
end
|