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,177 @@
|
|
|
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 CreateSandboxSnapshot < ApiModelBase
|
|
18
|
+
# Name for the new snapshot
|
|
19
|
+
attr_accessor :name
|
|
20
|
+
|
|
21
|
+
# Include the VM's memory in the snapshot. VM sandboxes only. When true the sandbox must be STARTED; when false (default) VM sandboxes must be STOPPED. Container sandboxes do not support memory snapshots.
|
|
22
|
+
attr_accessor :include_memory
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'name' => :'name',
|
|
28
|
+
:'include_memory' => :'includeMemory'
|
|
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
|
+
:'name' => :'String',
|
|
46
|
+
:'include_memory' => :'Boolean'
|
|
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 `NightonaApiClient::CreateSandboxSnapshot` 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 `NightonaApiClient::CreateSandboxSnapshot`. 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?(:'name')
|
|
73
|
+
self.name = attributes[:'name']
|
|
74
|
+
else
|
|
75
|
+
self.name = nil
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'include_memory')
|
|
79
|
+
self.include_memory = attributes[:'include_memory']
|
|
80
|
+
else
|
|
81
|
+
self.include_memory = false
|
|
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 @name.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
invalid_properties
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Check to see if the all the properties in the model are valid
|
|
98
|
+
# @return true if the model is valid
|
|
99
|
+
def valid?
|
|
100
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
101
|
+
return false if @name.nil?
|
|
102
|
+
true
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Custom attribute writer method with validation
|
|
106
|
+
# @param [Object] name Value to be assigned
|
|
107
|
+
def name=(name)
|
|
108
|
+
if name.nil?
|
|
109
|
+
fail ArgumentError, 'name cannot be nil'
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
@name = name
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Checks equality by comparing each attribute.
|
|
116
|
+
# @param [Object] Object to be compared
|
|
117
|
+
def ==(o)
|
|
118
|
+
return true if self.equal?(o)
|
|
119
|
+
self.class == o.class &&
|
|
120
|
+
name == o.name &&
|
|
121
|
+
include_memory == o.include_memory
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# @see the `==` method
|
|
125
|
+
# @param [Object] Object to be compared
|
|
126
|
+
def eql?(o)
|
|
127
|
+
self == o
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Calculates hash code according to all attributes.
|
|
131
|
+
# @return [Integer] Hash code
|
|
132
|
+
def hash
|
|
133
|
+
[name, include_memory].hash
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Builds the object from hash
|
|
137
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
138
|
+
# @return [Object] Returns the model itself
|
|
139
|
+
def self.build_from_hash(attributes)
|
|
140
|
+
return nil unless attributes.is_a?(Hash)
|
|
141
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
142
|
+
transformed_hash = {}
|
|
143
|
+
openapi_types.each_pair do |key, type|
|
|
144
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
145
|
+
transformed_hash["#{key}"] = nil
|
|
146
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
147
|
+
# check to ensure the input is an array given that the attribute
|
|
148
|
+
# is documented as an array but the input is not
|
|
149
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
150
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
151
|
+
end
|
|
152
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
153
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
new(transformed_hash)
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Returns the object in the form of hash
|
|
160
|
+
# @return [Hash] Returns the object in the form of hash
|
|
161
|
+
def to_hash
|
|
162
|
+
hash = {}
|
|
163
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
164
|
+
value = self.send(attr)
|
|
165
|
+
if value.nil?
|
|
166
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
167
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
hash[param] = _to_hash(value)
|
|
171
|
+
end
|
|
172
|
+
hash
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
end
|
|
@@ -0,0 +1,165 @@
|
|
|
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 CreateSessionRequest < ApiModelBase
|
|
18
|
+
# The ID of the session
|
|
19
|
+
attr_accessor :session_id
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'session_id' => :'sessionId'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
acceptable_attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'session_id' => :'String'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `NightonaApiClient::CreateSessionRequest` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `NightonaApiClient::CreateSessionRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'session_id')
|
|
68
|
+
self.session_id = attributes[:'session_id']
|
|
69
|
+
else
|
|
70
|
+
self.session_id = nil
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
75
|
+
# @return Array for valid properties with the reasons
|
|
76
|
+
def list_invalid_properties
|
|
77
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
78
|
+
invalid_properties = Array.new
|
|
79
|
+
if @session_id.nil?
|
|
80
|
+
invalid_properties.push('invalid value for "session_id", session_id cannot be nil.')
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
invalid_properties
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Check to see if the all the properties in the model are valid
|
|
87
|
+
# @return true if the model is valid
|
|
88
|
+
def valid?
|
|
89
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
90
|
+
return false if @session_id.nil?
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Custom attribute writer method with validation
|
|
95
|
+
# @param [Object] session_id Value to be assigned
|
|
96
|
+
def session_id=(session_id)
|
|
97
|
+
if session_id.nil?
|
|
98
|
+
fail ArgumentError, 'session_id cannot be nil'
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
@session_id = session_id
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Checks equality by comparing each attribute.
|
|
105
|
+
# @param [Object] Object to be compared
|
|
106
|
+
def ==(o)
|
|
107
|
+
return true if self.equal?(o)
|
|
108
|
+
self.class == o.class &&
|
|
109
|
+
session_id == o.session_id
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# @see the `==` method
|
|
113
|
+
# @param [Object] Object to be compared
|
|
114
|
+
def eql?(o)
|
|
115
|
+
self == o
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Calculates hash code according to all attributes.
|
|
119
|
+
# @return [Integer] Hash code
|
|
120
|
+
def hash
|
|
121
|
+
[session_id].hash
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Builds the object from hash
|
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
126
|
+
# @return [Object] Returns the model itself
|
|
127
|
+
def self.build_from_hash(attributes)
|
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
|
129
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
130
|
+
transformed_hash = {}
|
|
131
|
+
openapi_types.each_pair do |key, type|
|
|
132
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
133
|
+
transformed_hash["#{key}"] = nil
|
|
134
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
135
|
+
# check to ensure the input is an array given that the attribute
|
|
136
|
+
# is documented as an array but the input is not
|
|
137
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
138
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
139
|
+
end
|
|
140
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
141
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
new(transformed_hash)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Returns the object in the form of hash
|
|
148
|
+
# @return [Hash] Returns the object in the form of hash
|
|
149
|
+
def to_hash
|
|
150
|
+
hash = {}
|
|
151
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
152
|
+
value = self.send(attr)
|
|
153
|
+
if value.nil?
|
|
154
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
155
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
hash[param] = _to_hash(value)
|
|
159
|
+
end
|
|
160
|
+
hash
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
end
|
|
@@ -0,0 +1,291 @@
|
|
|
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 CreateSnapshot < ApiModelBase
|
|
18
|
+
# The name of the snapshot
|
|
19
|
+
attr_accessor :name
|
|
20
|
+
|
|
21
|
+
# The image name of the snapshot
|
|
22
|
+
attr_accessor :image_name
|
|
23
|
+
|
|
24
|
+
# The entrypoint command for the snapshot
|
|
25
|
+
attr_accessor :entrypoint
|
|
26
|
+
|
|
27
|
+
# CPU cores allocated to the resulting sandbox
|
|
28
|
+
attr_accessor :cpu
|
|
29
|
+
|
|
30
|
+
# GPU units allocated to the resulting sandbox
|
|
31
|
+
attr_accessor :gpu
|
|
32
|
+
|
|
33
|
+
# Preferred GPU type for the resulting sandbox.
|
|
34
|
+
attr_accessor :gpu_type
|
|
35
|
+
|
|
36
|
+
# Memory allocated to the resulting sandbox in GB
|
|
37
|
+
attr_accessor :memory
|
|
38
|
+
|
|
39
|
+
# Disk space allocated to the sandbox in GB
|
|
40
|
+
attr_accessor :disk
|
|
41
|
+
|
|
42
|
+
# Build information for the snapshot
|
|
43
|
+
attr_accessor :build_info
|
|
44
|
+
|
|
45
|
+
# ID of the region where the snapshot will be available. Defaults to organization default region if not specified.
|
|
46
|
+
attr_accessor :region_id
|
|
47
|
+
|
|
48
|
+
# Target sandbox class. Determines which runners can host sandboxes created from this snapshot.
|
|
49
|
+
attr_accessor :sandbox_class
|
|
50
|
+
|
|
51
|
+
class EnumAttributeValidator
|
|
52
|
+
attr_reader :datatype
|
|
53
|
+
attr_reader :allowable_values
|
|
54
|
+
|
|
55
|
+
def initialize(datatype, allowable_values)
|
|
56
|
+
@allowable_values = allowable_values.map do |value|
|
|
57
|
+
case datatype.to_s
|
|
58
|
+
when /Integer/i
|
|
59
|
+
value.to_i
|
|
60
|
+
when /Float/i
|
|
61
|
+
value.to_f
|
|
62
|
+
else
|
|
63
|
+
value
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def valid?(value)
|
|
69
|
+
!value || allowable_values.include?(value)
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
74
|
+
def self.attribute_map
|
|
75
|
+
{
|
|
76
|
+
:'name' => :'name',
|
|
77
|
+
:'image_name' => :'imageName',
|
|
78
|
+
:'entrypoint' => :'entrypoint',
|
|
79
|
+
:'cpu' => :'cpu',
|
|
80
|
+
:'gpu' => :'gpu',
|
|
81
|
+
:'gpu_type' => :'gpuType',
|
|
82
|
+
:'memory' => :'memory',
|
|
83
|
+
:'disk' => :'disk',
|
|
84
|
+
:'build_info' => :'buildInfo',
|
|
85
|
+
:'region_id' => :'regionId',
|
|
86
|
+
:'sandbox_class' => :'sandboxClass'
|
|
87
|
+
}
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Returns attribute mapping this model knows about
|
|
91
|
+
def self.acceptable_attribute_map
|
|
92
|
+
attribute_map
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Returns all the JSON keys this model knows about
|
|
96
|
+
def self.acceptable_attributes
|
|
97
|
+
acceptable_attribute_map.values
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Attribute type mapping.
|
|
101
|
+
def self.openapi_types
|
|
102
|
+
{
|
|
103
|
+
:'name' => :'String',
|
|
104
|
+
:'image_name' => :'String',
|
|
105
|
+
:'entrypoint' => :'Array<String>',
|
|
106
|
+
:'cpu' => :'Integer',
|
|
107
|
+
:'gpu' => :'Integer',
|
|
108
|
+
:'gpu_type' => :'Array<GpuType>',
|
|
109
|
+
:'memory' => :'Integer',
|
|
110
|
+
:'disk' => :'Integer',
|
|
111
|
+
:'build_info' => :'CreateBuildInfo',
|
|
112
|
+
:'region_id' => :'String',
|
|
113
|
+
:'sandbox_class' => :'SandboxClass'
|
|
114
|
+
}
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# List of attributes with nullable: true
|
|
118
|
+
def self.openapi_nullable
|
|
119
|
+
Set.new([
|
|
120
|
+
])
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Initializes the object
|
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
125
|
+
def initialize(attributes = {})
|
|
126
|
+
if (!attributes.is_a?(Hash))
|
|
127
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `NightonaApiClient::CreateSnapshot` initialize method"
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
131
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
132
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
133
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
134
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `NightonaApiClient::CreateSnapshot`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
135
|
+
end
|
|
136
|
+
h[k.to_sym] = v
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'name')
|
|
140
|
+
self.name = attributes[:'name']
|
|
141
|
+
else
|
|
142
|
+
self.name = nil
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'image_name')
|
|
146
|
+
self.image_name = attributes[:'image_name']
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if attributes.key?(:'entrypoint')
|
|
150
|
+
if (value = attributes[:'entrypoint']).is_a?(Array)
|
|
151
|
+
self.entrypoint = value
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if attributes.key?(:'cpu')
|
|
156
|
+
self.cpu = attributes[:'cpu']
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if attributes.key?(:'gpu')
|
|
160
|
+
self.gpu = attributes[:'gpu']
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if attributes.key?(:'gpu_type')
|
|
164
|
+
if (value = attributes[:'gpu_type']).is_a?(Array)
|
|
165
|
+
self.gpu_type = value
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if attributes.key?(:'memory')
|
|
170
|
+
self.memory = attributes[:'memory']
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if attributes.key?(:'disk')
|
|
174
|
+
self.disk = attributes[:'disk']
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
if attributes.key?(:'build_info')
|
|
178
|
+
self.build_info = attributes[:'build_info']
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
if attributes.key?(:'region_id')
|
|
182
|
+
self.region_id = attributes[:'region_id']
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
if attributes.key?(:'sandbox_class')
|
|
186
|
+
self.sandbox_class = attributes[:'sandbox_class']
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
191
|
+
# @return Array for valid properties with the reasons
|
|
192
|
+
def list_invalid_properties
|
|
193
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
194
|
+
invalid_properties = Array.new
|
|
195
|
+
if @name.nil?
|
|
196
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
invalid_properties
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Check to see if the all the properties in the model are valid
|
|
203
|
+
# @return true if the model is valid
|
|
204
|
+
def valid?
|
|
205
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
206
|
+
return false if @name.nil?
|
|
207
|
+
true
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Custom attribute writer method with validation
|
|
211
|
+
# @param [Object] name Value to be assigned
|
|
212
|
+
def name=(name)
|
|
213
|
+
if name.nil?
|
|
214
|
+
fail ArgumentError, 'name cannot be nil'
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
@name = name
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Checks equality by comparing each attribute.
|
|
221
|
+
# @param [Object] Object to be compared
|
|
222
|
+
def ==(o)
|
|
223
|
+
return true if self.equal?(o)
|
|
224
|
+
self.class == o.class &&
|
|
225
|
+
name == o.name &&
|
|
226
|
+
image_name == o.image_name &&
|
|
227
|
+
entrypoint == o.entrypoint &&
|
|
228
|
+
cpu == o.cpu &&
|
|
229
|
+
gpu == o.gpu &&
|
|
230
|
+
gpu_type == o.gpu_type &&
|
|
231
|
+
memory == o.memory &&
|
|
232
|
+
disk == o.disk &&
|
|
233
|
+
build_info == o.build_info &&
|
|
234
|
+
region_id == o.region_id &&
|
|
235
|
+
sandbox_class == o.sandbox_class
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# @see the `==` method
|
|
239
|
+
# @param [Object] Object to be compared
|
|
240
|
+
def eql?(o)
|
|
241
|
+
self == o
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Calculates hash code according to all attributes.
|
|
245
|
+
# @return [Integer] Hash code
|
|
246
|
+
def hash
|
|
247
|
+
[name, image_name, entrypoint, cpu, gpu, gpu_type, memory, disk, build_info, region_id, sandbox_class].hash
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Builds the object from hash
|
|
251
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
252
|
+
# @return [Object] Returns the model itself
|
|
253
|
+
def self.build_from_hash(attributes)
|
|
254
|
+
return nil unless attributes.is_a?(Hash)
|
|
255
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
256
|
+
transformed_hash = {}
|
|
257
|
+
openapi_types.each_pair do |key, type|
|
|
258
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
259
|
+
transformed_hash["#{key}"] = nil
|
|
260
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
261
|
+
# check to ensure the input is an array given that the attribute
|
|
262
|
+
# is documented as an array but the input is not
|
|
263
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
264
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
265
|
+
end
|
|
266
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
267
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
new(transformed_hash)
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# Returns the object in the form of hash
|
|
274
|
+
# @return [Hash] Returns the object in the form of hash
|
|
275
|
+
def to_hash
|
|
276
|
+
hash = {}
|
|
277
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
278
|
+
value = self.send(attr)
|
|
279
|
+
if value.nil?
|
|
280
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
281
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
hash[param] = _to_hash(value)
|
|
285
|
+
end
|
|
286
|
+
hash
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
end
|