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,658 @@
|
|
|
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 SandboxListItem < ApiModelBase
|
|
18
|
+
# The ID of the sandbox
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# The organization ID of the sandbox
|
|
22
|
+
attr_accessor :organization_id
|
|
23
|
+
|
|
24
|
+
# The name of the sandbox
|
|
25
|
+
attr_accessor :name
|
|
26
|
+
|
|
27
|
+
# The target environment for the sandbox
|
|
28
|
+
attr_accessor :target
|
|
29
|
+
|
|
30
|
+
# The runner ID of the sandbox
|
|
31
|
+
attr_accessor :runner_id
|
|
32
|
+
|
|
33
|
+
# The class of the sandbox
|
|
34
|
+
attr_accessor :sandbox_class
|
|
35
|
+
|
|
36
|
+
# The state of the sandbox
|
|
37
|
+
attr_accessor :state
|
|
38
|
+
|
|
39
|
+
# The desired state of the sandbox
|
|
40
|
+
attr_accessor :desired_state
|
|
41
|
+
|
|
42
|
+
# The snapshot used for the sandbox
|
|
43
|
+
attr_accessor :snapshot
|
|
44
|
+
|
|
45
|
+
# The user associated with the project
|
|
46
|
+
attr_accessor :user
|
|
47
|
+
|
|
48
|
+
# The error reason of the sandbox
|
|
49
|
+
attr_accessor :error_reason
|
|
50
|
+
|
|
51
|
+
# Whether the sandbox error is recoverable.
|
|
52
|
+
attr_accessor :recoverable
|
|
53
|
+
|
|
54
|
+
# Whether the sandbox http preview is public
|
|
55
|
+
attr_accessor :public
|
|
56
|
+
|
|
57
|
+
# The CPU quota for the sandbox
|
|
58
|
+
attr_accessor :cpu
|
|
59
|
+
|
|
60
|
+
# The GPU quota for the sandbox
|
|
61
|
+
attr_accessor :gpu
|
|
62
|
+
|
|
63
|
+
# The GPU type assigned to the sandbox
|
|
64
|
+
attr_accessor :gpu_type
|
|
65
|
+
|
|
66
|
+
# The memory quota for the sandbox
|
|
67
|
+
attr_accessor :memory
|
|
68
|
+
|
|
69
|
+
# The disk quota for the sandbox
|
|
70
|
+
attr_accessor :disk
|
|
71
|
+
|
|
72
|
+
# Labels for the sandbox
|
|
73
|
+
attr_accessor :labels
|
|
74
|
+
|
|
75
|
+
# The state of the backup
|
|
76
|
+
attr_accessor :backup_state
|
|
77
|
+
|
|
78
|
+
# Auto-stop interval in minutes (0 means disabled)
|
|
79
|
+
attr_accessor :auto_stop_interval
|
|
80
|
+
|
|
81
|
+
# Auto-archive interval in minutes
|
|
82
|
+
attr_accessor :auto_archive_interval
|
|
83
|
+
|
|
84
|
+
# Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
85
|
+
attr_accessor :auto_delete_interval
|
|
86
|
+
|
|
87
|
+
# The creation timestamp of the sandbox
|
|
88
|
+
attr_accessor :created_at
|
|
89
|
+
|
|
90
|
+
# The last update timestamp of the sandbox
|
|
91
|
+
attr_accessor :updated_at
|
|
92
|
+
|
|
93
|
+
# The last activity timestamp of the sandbox
|
|
94
|
+
attr_accessor :last_activity_at
|
|
95
|
+
|
|
96
|
+
# The version of the daemon running in the sandbox
|
|
97
|
+
attr_accessor :daemon_version
|
|
98
|
+
|
|
99
|
+
# The toolbox proxy URL for the sandbox
|
|
100
|
+
attr_accessor :toolbox_proxy_url
|
|
101
|
+
|
|
102
|
+
class EnumAttributeValidator
|
|
103
|
+
attr_reader :datatype
|
|
104
|
+
attr_reader :allowable_values
|
|
105
|
+
|
|
106
|
+
def initialize(datatype, allowable_values)
|
|
107
|
+
@allowable_values = allowable_values.map do |value|
|
|
108
|
+
case datatype.to_s
|
|
109
|
+
when /Integer/i
|
|
110
|
+
value.to_i
|
|
111
|
+
when /Float/i
|
|
112
|
+
value.to_f
|
|
113
|
+
else
|
|
114
|
+
value
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
def valid?(value)
|
|
120
|
+
!value || allowable_values.include?(value)
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
125
|
+
def self.attribute_map
|
|
126
|
+
{
|
|
127
|
+
:'id' => :'id',
|
|
128
|
+
:'organization_id' => :'organizationId',
|
|
129
|
+
:'name' => :'name',
|
|
130
|
+
:'target' => :'target',
|
|
131
|
+
:'runner_id' => :'runnerId',
|
|
132
|
+
:'sandbox_class' => :'sandboxClass',
|
|
133
|
+
:'state' => :'state',
|
|
134
|
+
:'desired_state' => :'desiredState',
|
|
135
|
+
:'snapshot' => :'snapshot',
|
|
136
|
+
:'user' => :'user',
|
|
137
|
+
:'error_reason' => :'errorReason',
|
|
138
|
+
:'recoverable' => :'recoverable',
|
|
139
|
+
:'public' => :'public',
|
|
140
|
+
:'cpu' => :'cpu',
|
|
141
|
+
:'gpu' => :'gpu',
|
|
142
|
+
:'gpu_type' => :'gpuType',
|
|
143
|
+
:'memory' => :'memory',
|
|
144
|
+
:'disk' => :'disk',
|
|
145
|
+
:'labels' => :'labels',
|
|
146
|
+
:'backup_state' => :'backupState',
|
|
147
|
+
:'auto_stop_interval' => :'autoStopInterval',
|
|
148
|
+
:'auto_archive_interval' => :'autoArchiveInterval',
|
|
149
|
+
:'auto_delete_interval' => :'autoDeleteInterval',
|
|
150
|
+
:'created_at' => :'createdAt',
|
|
151
|
+
:'updated_at' => :'updatedAt',
|
|
152
|
+
:'last_activity_at' => :'lastActivityAt',
|
|
153
|
+
:'daemon_version' => :'daemonVersion',
|
|
154
|
+
:'toolbox_proxy_url' => :'toolboxProxyUrl'
|
|
155
|
+
}
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Returns attribute mapping this model knows about
|
|
159
|
+
def self.acceptable_attribute_map
|
|
160
|
+
attribute_map
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Returns all the JSON keys this model knows about
|
|
164
|
+
def self.acceptable_attributes
|
|
165
|
+
acceptable_attribute_map.values
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Attribute type mapping.
|
|
169
|
+
def self.openapi_types
|
|
170
|
+
{
|
|
171
|
+
:'id' => :'String',
|
|
172
|
+
:'organization_id' => :'String',
|
|
173
|
+
:'name' => :'String',
|
|
174
|
+
:'target' => :'String',
|
|
175
|
+
:'runner_id' => :'String',
|
|
176
|
+
:'sandbox_class' => :'SandboxClass',
|
|
177
|
+
:'state' => :'SandboxState',
|
|
178
|
+
:'desired_state' => :'SandboxDesiredState',
|
|
179
|
+
:'snapshot' => :'String',
|
|
180
|
+
:'user' => :'String',
|
|
181
|
+
:'error_reason' => :'String',
|
|
182
|
+
:'recoverable' => :'Boolean',
|
|
183
|
+
:'public' => :'Boolean',
|
|
184
|
+
:'cpu' => :'Float',
|
|
185
|
+
:'gpu' => :'Float',
|
|
186
|
+
:'gpu_type' => :'GpuType',
|
|
187
|
+
:'memory' => :'Float',
|
|
188
|
+
:'disk' => :'Float',
|
|
189
|
+
:'labels' => :'Hash<String, String>',
|
|
190
|
+
:'backup_state' => :'String',
|
|
191
|
+
:'auto_stop_interval' => :'Float',
|
|
192
|
+
:'auto_archive_interval' => :'Float',
|
|
193
|
+
:'auto_delete_interval' => :'Float',
|
|
194
|
+
:'created_at' => :'String',
|
|
195
|
+
:'updated_at' => :'String',
|
|
196
|
+
:'last_activity_at' => :'String',
|
|
197
|
+
:'daemon_version' => :'String',
|
|
198
|
+
:'toolbox_proxy_url' => :'String'
|
|
199
|
+
}
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# List of attributes with nullable: true
|
|
203
|
+
def self.openapi_nullable
|
|
204
|
+
Set.new([
|
|
205
|
+
])
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Initializes the object
|
|
209
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
210
|
+
def initialize(attributes = {})
|
|
211
|
+
if (!attributes.is_a?(Hash))
|
|
212
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `NightonaApiClient::SandboxListItem` initialize method"
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
216
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
217
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
218
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
219
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `NightonaApiClient::SandboxListItem`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
220
|
+
end
|
|
221
|
+
h[k.to_sym] = v
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
if attributes.key?(:'id')
|
|
225
|
+
self.id = attributes[:'id']
|
|
226
|
+
else
|
|
227
|
+
self.id = nil
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
if attributes.key?(:'organization_id')
|
|
231
|
+
self.organization_id = attributes[:'organization_id']
|
|
232
|
+
else
|
|
233
|
+
self.organization_id = nil
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
if attributes.key?(:'name')
|
|
237
|
+
self.name = attributes[:'name']
|
|
238
|
+
else
|
|
239
|
+
self.name = nil
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
if attributes.key?(:'target')
|
|
243
|
+
self.target = attributes[:'target']
|
|
244
|
+
else
|
|
245
|
+
self.target = nil
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
if attributes.key?(:'runner_id')
|
|
249
|
+
self.runner_id = attributes[:'runner_id']
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
if attributes.key?(:'sandbox_class')
|
|
253
|
+
self.sandbox_class = attributes[:'sandbox_class']
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
if attributes.key?(:'state')
|
|
257
|
+
self.state = attributes[:'state']
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
if attributes.key?(:'desired_state')
|
|
261
|
+
self.desired_state = attributes[:'desired_state']
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
if attributes.key?(:'snapshot')
|
|
265
|
+
self.snapshot = attributes[:'snapshot']
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
if attributes.key?(:'user')
|
|
269
|
+
self.user = attributes[:'user']
|
|
270
|
+
else
|
|
271
|
+
self.user = nil
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
if attributes.key?(:'error_reason')
|
|
275
|
+
self.error_reason = attributes[:'error_reason']
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
if attributes.key?(:'recoverable')
|
|
279
|
+
self.recoverable = attributes[:'recoverable']
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
if attributes.key?(:'public')
|
|
283
|
+
self.public = attributes[:'public']
|
|
284
|
+
else
|
|
285
|
+
self.public = nil
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
if attributes.key?(:'cpu')
|
|
289
|
+
self.cpu = attributes[:'cpu']
|
|
290
|
+
else
|
|
291
|
+
self.cpu = nil
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
if attributes.key?(:'gpu')
|
|
295
|
+
self.gpu = attributes[:'gpu']
|
|
296
|
+
else
|
|
297
|
+
self.gpu = nil
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
if attributes.key?(:'gpu_type')
|
|
301
|
+
self.gpu_type = attributes[:'gpu_type']
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
if attributes.key?(:'memory')
|
|
305
|
+
self.memory = attributes[:'memory']
|
|
306
|
+
else
|
|
307
|
+
self.memory = nil
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
if attributes.key?(:'disk')
|
|
311
|
+
self.disk = attributes[:'disk']
|
|
312
|
+
else
|
|
313
|
+
self.disk = nil
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
if attributes.key?(:'labels')
|
|
317
|
+
if (value = attributes[:'labels']).is_a?(Hash)
|
|
318
|
+
self.labels = value
|
|
319
|
+
end
|
|
320
|
+
else
|
|
321
|
+
self.labels = nil
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
if attributes.key?(:'backup_state')
|
|
325
|
+
self.backup_state = attributes[:'backup_state']
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
if attributes.key?(:'auto_stop_interval')
|
|
329
|
+
self.auto_stop_interval = attributes[:'auto_stop_interval']
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
if attributes.key?(:'auto_archive_interval')
|
|
333
|
+
self.auto_archive_interval = attributes[:'auto_archive_interval']
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
if attributes.key?(:'auto_delete_interval')
|
|
337
|
+
self.auto_delete_interval = attributes[:'auto_delete_interval']
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
if attributes.key?(:'created_at')
|
|
341
|
+
self.created_at = attributes[:'created_at']
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
if attributes.key?(:'updated_at')
|
|
345
|
+
self.updated_at = attributes[:'updated_at']
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
if attributes.key?(:'last_activity_at')
|
|
349
|
+
self.last_activity_at = attributes[:'last_activity_at']
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
if attributes.key?(:'daemon_version')
|
|
353
|
+
self.daemon_version = attributes[:'daemon_version']
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
if attributes.key?(:'toolbox_proxy_url')
|
|
357
|
+
self.toolbox_proxy_url = attributes[:'toolbox_proxy_url']
|
|
358
|
+
else
|
|
359
|
+
self.toolbox_proxy_url = nil
|
|
360
|
+
end
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
364
|
+
# @return Array for valid properties with the reasons
|
|
365
|
+
def list_invalid_properties
|
|
366
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
367
|
+
invalid_properties = Array.new
|
|
368
|
+
if @id.nil?
|
|
369
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
if @organization_id.nil?
|
|
373
|
+
invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
if @name.nil?
|
|
377
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
if @target.nil?
|
|
381
|
+
invalid_properties.push('invalid value for "target", target cannot be nil.')
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
if @user.nil?
|
|
385
|
+
invalid_properties.push('invalid value for "user", user cannot be nil.')
|
|
386
|
+
end
|
|
387
|
+
|
|
388
|
+
if @public.nil?
|
|
389
|
+
invalid_properties.push('invalid value for "public", public cannot be nil.')
|
|
390
|
+
end
|
|
391
|
+
|
|
392
|
+
if @cpu.nil?
|
|
393
|
+
invalid_properties.push('invalid value for "cpu", cpu cannot be nil.')
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
if @gpu.nil?
|
|
397
|
+
invalid_properties.push('invalid value for "gpu", gpu cannot be nil.')
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
if @memory.nil?
|
|
401
|
+
invalid_properties.push('invalid value for "memory", memory cannot be nil.')
|
|
402
|
+
end
|
|
403
|
+
|
|
404
|
+
if @disk.nil?
|
|
405
|
+
invalid_properties.push('invalid value for "disk", disk cannot be nil.')
|
|
406
|
+
end
|
|
407
|
+
|
|
408
|
+
if @labels.nil?
|
|
409
|
+
invalid_properties.push('invalid value for "labels", labels cannot be nil.')
|
|
410
|
+
end
|
|
411
|
+
|
|
412
|
+
if @toolbox_proxy_url.nil?
|
|
413
|
+
invalid_properties.push('invalid value for "toolbox_proxy_url", toolbox_proxy_url cannot be nil.')
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
invalid_properties
|
|
417
|
+
end
|
|
418
|
+
|
|
419
|
+
# Check to see if the all the properties in the model are valid
|
|
420
|
+
# @return true if the model is valid
|
|
421
|
+
def valid?
|
|
422
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
423
|
+
return false if @id.nil?
|
|
424
|
+
return false if @organization_id.nil?
|
|
425
|
+
return false if @name.nil?
|
|
426
|
+
return false if @target.nil?
|
|
427
|
+
return false if @user.nil?
|
|
428
|
+
return false if @public.nil?
|
|
429
|
+
return false if @cpu.nil?
|
|
430
|
+
return false if @gpu.nil?
|
|
431
|
+
return false if @memory.nil?
|
|
432
|
+
return false if @disk.nil?
|
|
433
|
+
return false if @labels.nil?
|
|
434
|
+
backup_state_validator = EnumAttributeValidator.new('String', ["None", "Pending", "InProgress", "Completed", "Error", "unknown_default_open_api"])
|
|
435
|
+
return false unless backup_state_validator.valid?(@backup_state)
|
|
436
|
+
return false if @toolbox_proxy_url.nil?
|
|
437
|
+
true
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
# Custom attribute writer method with validation
|
|
441
|
+
# @param [Object] id Value to be assigned
|
|
442
|
+
def id=(id)
|
|
443
|
+
if id.nil?
|
|
444
|
+
fail ArgumentError, 'id cannot be nil'
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
@id = id
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
# Custom attribute writer method with validation
|
|
451
|
+
# @param [Object] organization_id Value to be assigned
|
|
452
|
+
def organization_id=(organization_id)
|
|
453
|
+
if organization_id.nil?
|
|
454
|
+
fail ArgumentError, 'organization_id cannot be nil'
|
|
455
|
+
end
|
|
456
|
+
|
|
457
|
+
@organization_id = organization_id
|
|
458
|
+
end
|
|
459
|
+
|
|
460
|
+
# Custom attribute writer method with validation
|
|
461
|
+
# @param [Object] name Value to be assigned
|
|
462
|
+
def name=(name)
|
|
463
|
+
if name.nil?
|
|
464
|
+
fail ArgumentError, 'name cannot be nil'
|
|
465
|
+
end
|
|
466
|
+
|
|
467
|
+
@name = name
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
# Custom attribute writer method with validation
|
|
471
|
+
# @param [Object] target Value to be assigned
|
|
472
|
+
def target=(target)
|
|
473
|
+
if target.nil?
|
|
474
|
+
fail ArgumentError, 'target cannot be nil'
|
|
475
|
+
end
|
|
476
|
+
|
|
477
|
+
@target = target
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
# Custom attribute writer method with validation
|
|
481
|
+
# @param [Object] user Value to be assigned
|
|
482
|
+
def user=(user)
|
|
483
|
+
if user.nil?
|
|
484
|
+
fail ArgumentError, 'user cannot be nil'
|
|
485
|
+
end
|
|
486
|
+
|
|
487
|
+
@user = user
|
|
488
|
+
end
|
|
489
|
+
|
|
490
|
+
# Custom attribute writer method with validation
|
|
491
|
+
# @param [Object] public Value to be assigned
|
|
492
|
+
def public=(public)
|
|
493
|
+
if public.nil?
|
|
494
|
+
fail ArgumentError, 'public cannot be nil'
|
|
495
|
+
end
|
|
496
|
+
|
|
497
|
+
@public = public
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
# Custom attribute writer method with validation
|
|
501
|
+
# @param [Object] cpu Value to be assigned
|
|
502
|
+
def cpu=(cpu)
|
|
503
|
+
if cpu.nil?
|
|
504
|
+
fail ArgumentError, 'cpu cannot be nil'
|
|
505
|
+
end
|
|
506
|
+
|
|
507
|
+
@cpu = cpu
|
|
508
|
+
end
|
|
509
|
+
|
|
510
|
+
# Custom attribute writer method with validation
|
|
511
|
+
# @param [Object] gpu Value to be assigned
|
|
512
|
+
def gpu=(gpu)
|
|
513
|
+
if gpu.nil?
|
|
514
|
+
fail ArgumentError, 'gpu cannot be nil'
|
|
515
|
+
end
|
|
516
|
+
|
|
517
|
+
@gpu = gpu
|
|
518
|
+
end
|
|
519
|
+
|
|
520
|
+
# Custom attribute writer method with validation
|
|
521
|
+
# @param [Object] memory Value to be assigned
|
|
522
|
+
def memory=(memory)
|
|
523
|
+
if memory.nil?
|
|
524
|
+
fail ArgumentError, 'memory cannot be nil'
|
|
525
|
+
end
|
|
526
|
+
|
|
527
|
+
@memory = memory
|
|
528
|
+
end
|
|
529
|
+
|
|
530
|
+
# Custom attribute writer method with validation
|
|
531
|
+
# @param [Object] disk Value to be assigned
|
|
532
|
+
def disk=(disk)
|
|
533
|
+
if disk.nil?
|
|
534
|
+
fail ArgumentError, 'disk cannot be nil'
|
|
535
|
+
end
|
|
536
|
+
|
|
537
|
+
@disk = disk
|
|
538
|
+
end
|
|
539
|
+
|
|
540
|
+
# Custom attribute writer method with validation
|
|
541
|
+
# @param [Object] labels Value to be assigned
|
|
542
|
+
def labels=(labels)
|
|
543
|
+
if labels.nil?
|
|
544
|
+
fail ArgumentError, 'labels cannot be nil'
|
|
545
|
+
end
|
|
546
|
+
|
|
547
|
+
@labels = labels
|
|
548
|
+
end
|
|
549
|
+
|
|
550
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
551
|
+
# @param [Object] backup_state Object to be assigned
|
|
552
|
+
def backup_state=(backup_state)
|
|
553
|
+
validator = EnumAttributeValidator.new('String', ["None", "Pending", "InProgress", "Completed", "Error", "unknown_default_open_api"])
|
|
554
|
+
unless validator.valid?(backup_state)
|
|
555
|
+
fail ArgumentError, "invalid value for \"backup_state\", must be one of #{validator.allowable_values}."
|
|
556
|
+
end
|
|
557
|
+
@backup_state = backup_state
|
|
558
|
+
end
|
|
559
|
+
|
|
560
|
+
# Custom attribute writer method with validation
|
|
561
|
+
# @param [Object] toolbox_proxy_url Value to be assigned
|
|
562
|
+
def toolbox_proxy_url=(toolbox_proxy_url)
|
|
563
|
+
if toolbox_proxy_url.nil?
|
|
564
|
+
fail ArgumentError, 'toolbox_proxy_url cannot be nil'
|
|
565
|
+
end
|
|
566
|
+
|
|
567
|
+
@toolbox_proxy_url = toolbox_proxy_url
|
|
568
|
+
end
|
|
569
|
+
|
|
570
|
+
# Checks equality by comparing each attribute.
|
|
571
|
+
# @param [Object] Object to be compared
|
|
572
|
+
def ==(o)
|
|
573
|
+
return true if self.equal?(o)
|
|
574
|
+
self.class == o.class &&
|
|
575
|
+
id == o.id &&
|
|
576
|
+
organization_id == o.organization_id &&
|
|
577
|
+
name == o.name &&
|
|
578
|
+
target == o.target &&
|
|
579
|
+
runner_id == o.runner_id &&
|
|
580
|
+
sandbox_class == o.sandbox_class &&
|
|
581
|
+
state == o.state &&
|
|
582
|
+
desired_state == o.desired_state &&
|
|
583
|
+
snapshot == o.snapshot &&
|
|
584
|
+
user == o.user &&
|
|
585
|
+
error_reason == o.error_reason &&
|
|
586
|
+
recoverable == o.recoverable &&
|
|
587
|
+
public == o.public &&
|
|
588
|
+
cpu == o.cpu &&
|
|
589
|
+
gpu == o.gpu &&
|
|
590
|
+
gpu_type == o.gpu_type &&
|
|
591
|
+
memory == o.memory &&
|
|
592
|
+
disk == o.disk &&
|
|
593
|
+
labels == o.labels &&
|
|
594
|
+
backup_state == o.backup_state &&
|
|
595
|
+
auto_stop_interval == o.auto_stop_interval &&
|
|
596
|
+
auto_archive_interval == o.auto_archive_interval &&
|
|
597
|
+
auto_delete_interval == o.auto_delete_interval &&
|
|
598
|
+
created_at == o.created_at &&
|
|
599
|
+
updated_at == o.updated_at &&
|
|
600
|
+
last_activity_at == o.last_activity_at &&
|
|
601
|
+
daemon_version == o.daemon_version &&
|
|
602
|
+
toolbox_proxy_url == o.toolbox_proxy_url
|
|
603
|
+
end
|
|
604
|
+
|
|
605
|
+
# @see the `==` method
|
|
606
|
+
# @param [Object] Object to be compared
|
|
607
|
+
def eql?(o)
|
|
608
|
+
self == o
|
|
609
|
+
end
|
|
610
|
+
|
|
611
|
+
# Calculates hash code according to all attributes.
|
|
612
|
+
# @return [Integer] Hash code
|
|
613
|
+
def hash
|
|
614
|
+
[id, organization_id, name, target, runner_id, sandbox_class, state, desired_state, snapshot, user, error_reason, recoverable, public, cpu, gpu, gpu_type, memory, disk, labels, backup_state, auto_stop_interval, auto_archive_interval, auto_delete_interval, created_at, updated_at, last_activity_at, daemon_version, toolbox_proxy_url].hash
|
|
615
|
+
end
|
|
616
|
+
|
|
617
|
+
# Builds the object from hash
|
|
618
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
619
|
+
# @return [Object] Returns the model itself
|
|
620
|
+
def self.build_from_hash(attributes)
|
|
621
|
+
return nil unless attributes.is_a?(Hash)
|
|
622
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
623
|
+
transformed_hash = {}
|
|
624
|
+
openapi_types.each_pair do |key, type|
|
|
625
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
626
|
+
transformed_hash["#{key}"] = nil
|
|
627
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
628
|
+
# check to ensure the input is an array given that the attribute
|
|
629
|
+
# is documented as an array but the input is not
|
|
630
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
631
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
632
|
+
end
|
|
633
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
634
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
635
|
+
end
|
|
636
|
+
end
|
|
637
|
+
new(transformed_hash)
|
|
638
|
+
end
|
|
639
|
+
|
|
640
|
+
# Returns the object in the form of hash
|
|
641
|
+
# @return [Hash] Returns the object in the form of hash
|
|
642
|
+
def to_hash
|
|
643
|
+
hash = {}
|
|
644
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
645
|
+
value = self.send(attr)
|
|
646
|
+
if value.nil?
|
|
647
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
648
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
649
|
+
end
|
|
650
|
+
|
|
651
|
+
hash[param] = _to_hash(value)
|
|
652
|
+
end
|
|
653
|
+
hash
|
|
654
|
+
end
|
|
655
|
+
|
|
656
|
+
end
|
|
657
|
+
|
|
658
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
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 SandboxListSortDirection
|
|
18
|
+
ASC = "asc".freeze
|
|
19
|
+
DESC = "desc".freeze
|
|
20
|
+
UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze
|
|
21
|
+
|
|
22
|
+
def self.all_vars
|
|
23
|
+
@all_vars ||= [ASC, DESC, UNKNOWN_DEFAULT_OPEN_API].freeze
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Builds the enum from string
|
|
27
|
+
# @param [String] The enum value in the form of the string
|
|
28
|
+
# @return [String] The enum value
|
|
29
|
+
def self.build_from_hash(value)
|
|
30
|
+
new.build_from_hash(value)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Builds the enum from string
|
|
34
|
+
# @param [String] The enum value in the form of the string
|
|
35
|
+
# @return [String] The enum value
|
|
36
|
+
def build_from_hash(value)
|
|
37
|
+
return value if SandboxListSortDirection.all_vars.include?(value)
|
|
38
|
+
UNKNOWN_DEFAULT_OPEN_API
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|