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.
Files changed (219) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +39 -0
  3. data/.openapi-generator/FILES +212 -0
  4. data/.openapi-generator/VERSION +1 -0
  5. data/.openapi-generator-ignore +31 -0
  6. data/.rspec +2 -0
  7. data/.rubocop.yml +148 -0
  8. data/Rakefile +10 -0
  9. data/fix-gemspec.sh +11 -0
  10. data/lib/nightona_api_client/api/admin_api.rb +1449 -0
  11. data/lib/nightona_api_client/api/api_keys_api.rb +401 -0
  12. data/lib/nightona_api_client/api/audit_api.rb +110 -0
  13. data/lib/nightona_api_client/api/config_api.rb +77 -0
  14. data/lib/nightona_api_client/api/docker_registry_api.rb +411 -0
  15. data/lib/nightona_api_client/api/health_api.rb +126 -0
  16. data/lib/nightona_api_client/api/jobs_api.rb +299 -0
  17. data/lib/nightona_api_client/api/object_storage_api.rb +80 -0
  18. data/lib/nightona_api_client/api/organizations_api.rb +2615 -0
  19. data/lib/nightona_api_client/api/preview_api.rb +278 -0
  20. data/lib/nightona_api_client/api/regions_api.rb +77 -0
  21. data/lib/nightona_api_client/api/runners_api.rb +711 -0
  22. data/lib/nightona_api_client/api/sandbox_api.rb +3064 -0
  23. data/lib/nightona_api_client/api/snapshots_api.rb +567 -0
  24. data/lib/nightona_api_client/api/toolbox_api.rb +5108 -0
  25. data/lib/nightona_api_client/api/users_api.rb +316 -0
  26. data/lib/nightona_api_client/api/volumes_api.rb +342 -0
  27. data/lib/nightona_api_client/api/webhooks_api.rb +276 -0
  28. data/lib/nightona_api_client/api_client.rb +397 -0
  29. data/lib/nightona_api_client/api_error.rb +58 -0
  30. data/lib/nightona_api_client/api_model_base.rb +88 -0
  31. data/lib/nightona_api_client/configuration.rb +309 -0
  32. data/lib/nightona_api_client/models/account_provider.rb +190 -0
  33. data/lib/nightona_api_client/models/admin_create_runner.rb +326 -0
  34. data/lib/nightona_api_client/models/admin_get_webhook_status200_response.rb +147 -0
  35. data/lib/nightona_api_client/models/announcement.rb +175 -0
  36. data/lib/nightona_api_client/models/api_key_list.rb +313 -0
  37. data/lib/nightona_api_client/models/api_key_response.rb +273 -0
  38. data/lib/nightona_api_client/models/audit_log.rb +369 -0
  39. data/lib/nightona_api_client/models/build_info.rb +241 -0
  40. data/lib/nightona_api_client/models/command.rb +202 -0
  41. data/lib/nightona_api_client/models/completion_context.rb +173 -0
  42. data/lib/nightona_api_client/models/completion_item.rb +218 -0
  43. data/lib/nightona_api_client/models/completion_list.rb +192 -0
  44. data/lib/nightona_api_client/models/compressed_screenshot_response.rb +185 -0
  45. data/lib/nightona_api_client/models/computer_use_start_response.rb +192 -0
  46. data/lib/nightona_api_client/models/computer_use_status_response.rb +189 -0
  47. data/lib/nightona_api_client/models/computer_use_stop_response.rb +192 -0
  48. data/lib/nightona_api_client/models/create_api_key.rb +217 -0
  49. data/lib/nightona_api_client/models/create_build_info.rb +177 -0
  50. data/lib/nightona_api_client/models/create_docker_registry.rb +256 -0
  51. data/lib/nightona_api_client/models/create_linked_account.rb +192 -0
  52. data/lib/nightona_api_client/models/create_organization.rb +192 -0
  53. data/lib/nightona_api_client/models/create_organization_invitation.rb +255 -0
  54. data/lib/nightona_api_client/models/create_organization_quota.rb +219 -0
  55. data/lib/nightona_api_client/models/create_organization_region_quota.rb +372 -0
  56. data/lib/nightona_api_client/models/create_organization_role.rb +233 -0
  57. data/lib/nightona_api_client/models/create_region.rb +198 -0
  58. data/lib/nightona_api_client/models/create_region_response.rb +209 -0
  59. data/lib/nightona_api_client/models/create_runner.rb +202 -0
  60. data/lib/nightona_api_client/models/create_runner_response.rb +192 -0
  61. data/lib/nightona_api_client/models/create_sandbox.rb +356 -0
  62. data/lib/nightona_api_client/models/create_sandbox_snapshot.rb +177 -0
  63. data/lib/nightona_api_client/models/create_session_request.rb +165 -0
  64. data/lib/nightona_api_client/models/create_snapshot.rb +291 -0
  65. data/lib/nightona_api_client/models/create_user.rb +269 -0
  66. data/lib/nightona_api_client/models/create_volume.rb +164 -0
  67. data/lib/nightona_api_client/models/display_info_response.rb +167 -0
  68. data/lib/nightona_api_client/models/docker_registry.rb +378 -0
  69. data/lib/nightona_api_client/models/download_files.rb +167 -0
  70. data/lib/nightona_api_client/models/execute_request.rb +184 -0
  71. data/lib/nightona_api_client/models/execute_response.rb +192 -0
  72. data/lib/nightona_api_client/models/file_info.rb +346 -0
  73. data/lib/nightona_api_client/models/file_status.rb +242 -0
  74. data/lib/nightona_api_client/models/fork_sandbox.rb +148 -0
  75. data/lib/nightona_api_client/models/git_add_request.rb +193 -0
  76. data/lib/nightona_api_client/models/git_branch_request.rb +190 -0
  77. data/lib/nightona_api_client/models/git_checkout_request.rb +190 -0
  78. data/lib/nightona_api_client/models/git_clone_request.rb +226 -0
  79. data/lib/nightona_api_client/models/git_commit_info.rb +268 -0
  80. data/lib/nightona_api_client/models/git_commit_request.rb +254 -0
  81. data/lib/nightona_api_client/models/git_commit_response.rb +164 -0
  82. data/lib/nightona_api_client/models/git_delete_branch_request.rb +190 -0
  83. data/lib/nightona_api_client/models/git_repo_request.rb +182 -0
  84. data/lib/nightona_api_client/models/git_status.rb +219 -0
  85. data/lib/nightona_api_client/models/gpu_type.rb +41 -0
  86. data/lib/nightona_api_client/models/health_controller_check200_response.rb +182 -0
  87. data/lib/nightona_api_client/models/health_controller_check200_response_info_value.rb +164 -0
  88. data/lib/nightona_api_client/models/health_controller_check503_response.rb +182 -0
  89. data/lib/nightona_api_client/models/job.rb +366 -0
  90. data/lib/nightona_api_client/models/job_status.rb +43 -0
  91. data/lib/nightona_api_client/models/job_type.rb +54 -0
  92. data/lib/nightona_api_client/models/keyboard_hotkey_request.rb +165 -0
  93. data/lib/nightona_api_client/models/keyboard_press_request.rb +177 -0
  94. data/lib/nightona_api_client/models/keyboard_type_request.rb +175 -0
  95. data/lib/nightona_api_client/models/list_branch_response.rb +166 -0
  96. data/lib/nightona_api_client/models/list_sandboxes_response.rb +180 -0
  97. data/lib/nightona_api_client/models/log_entry.rb +334 -0
  98. data/lib/nightona_api_client/models/lsp_completion_params.rb +254 -0
  99. data/lib/nightona_api_client/models/lsp_document_request.rb +219 -0
  100. data/lib/nightona_api_client/models/lsp_location.rb +190 -0
  101. data/lib/nightona_api_client/models/lsp_server_request.rb +192 -0
  102. data/lib/nightona_api_client/models/lsp_symbol.rb +216 -0
  103. data/lib/nightona_api_client/models/match.rb +216 -0
  104. data/lib/nightona_api_client/models/metric_data_point.rb +192 -0
  105. data/lib/nightona_api_client/models/metric_series.rb +194 -0
  106. data/lib/nightona_api_client/models/metrics_response.rb +167 -0
  107. data/lib/nightona_api_client/models/mouse_click_request.rb +212 -0
  108. data/lib/nightona_api_client/models/mouse_click_response.rb +192 -0
  109. data/lib/nightona_api_client/models/mouse_drag_request.rb +256 -0
  110. data/lib/nightona_api_client/models/mouse_drag_response.rb +192 -0
  111. data/lib/nightona_api_client/models/mouse_move_request.rb +192 -0
  112. data/lib/nightona_api_client/models/mouse_move_response.rb +192 -0
  113. data/lib/nightona_api_client/models/mouse_position.rb +192 -0
  114. data/lib/nightona_api_client/models/mouse_scroll_request.rb +229 -0
  115. data/lib/nightona_api_client/models/mouse_scroll_response.rb +165 -0
  116. data/lib/nightona_api_client/models/nightona_configuration.rb +507 -0
  117. data/lib/nightona_api_client/models/oidc_config.rb +219 -0
  118. data/lib/nightona_api_client/models/organization.rb +698 -0
  119. data/lib/nightona_api_client/models/organization_invitation.rb +463 -0
  120. data/lib/nightona_api_client/models/organization_role.rb +341 -0
  121. data/lib/nightona_api_client/models/organization_sandbox_default_limited_network_egress.rb +165 -0
  122. data/lib/nightona_api_client/models/organization_suspension.rb +221 -0
  123. data/lib/nightona_api_client/models/organization_usage_overview.rb +270 -0
  124. data/lib/nightona_api_client/models/organization_user.rb +380 -0
  125. data/lib/nightona_api_client/models/otel_config.rb +178 -0
  126. data/lib/nightona_api_client/models/paginated_audit_logs.rb +254 -0
  127. data/lib/nightona_api_client/models/paginated_jobs.rb +244 -0
  128. data/lib/nightona_api_client/models/paginated_logs.rb +248 -0
  129. data/lib/nightona_api_client/models/paginated_sandboxes_deprecated.rb +244 -0
  130. data/lib/nightona_api_client/models/paginated_snapshots.rb +244 -0
  131. data/lib/nightona_api_client/models/paginated_traces.rb +248 -0
  132. data/lib/nightona_api_client/models/poll_jobs_response.rb +167 -0
  133. data/lib/nightona_api_client/models/port_preview_url.rb +219 -0
  134. data/lib/nightona_api_client/models/position.rb +190 -0
  135. data/lib/nightona_api_client/models/posthog_config.rb +192 -0
  136. data/lib/nightona_api_client/models/process_errors_response.rb +192 -0
  137. data/lib/nightona_api_client/models/process_logs_response.rb +192 -0
  138. data/lib/nightona_api_client/models/process_restart_response.rb +192 -0
  139. data/lib/nightona_api_client/models/process_status_response.rb +192 -0
  140. data/lib/nightona_api_client/models/project_dir_response.rb +147 -0
  141. data/lib/nightona_api_client/models/pty_create_request.rb +217 -0
  142. data/lib/nightona_api_client/models/pty_create_response.rb +165 -0
  143. data/lib/nightona_api_client/models/pty_list_response.rb +167 -0
  144. data/lib/nightona_api_client/models/pty_resize_request.rb +192 -0
  145. data/lib/nightona_api_client/models/pty_session_info.rb +354 -0
  146. data/lib/nightona_api_client/models/range.rb +190 -0
  147. data/lib/nightona_api_client/models/rate_limit_config.rb +178 -0
  148. data/lib/nightona_api_client/models/rate_limit_entry.rb +158 -0
  149. data/lib/nightona_api_client/models/regenerate_api_key_response.rb +165 -0
  150. data/lib/nightona_api_client/models/region.rb +339 -0
  151. data/lib/nightona_api_client/models/region_quota.rb +437 -0
  152. data/lib/nightona_api_client/models/region_screenshot_response.rb +185 -0
  153. data/lib/nightona_api_client/models/region_type.rb +42 -0
  154. data/lib/nightona_api_client/models/region_usage_overview.rb +515 -0
  155. data/lib/nightona_api_client/models/registry_push_access_dto.rb +300 -0
  156. data/lib/nightona_api_client/models/replace_request.rb +218 -0
  157. data/lib/nightona_api_client/models/replace_result.rb +165 -0
  158. data/lib/nightona_api_client/models/resize_sandbox.rb +225 -0
  159. data/lib/nightona_api_client/models/runner.rb +710 -0
  160. data/lib/nightona_api_client/models/runner_class.rb +40 -0
  161. data/lib/nightona_api_client/models/runner_full.rb +747 -0
  162. data/lib/nightona_api_client/models/runner_health_metrics.rb +482 -0
  163. data/lib/nightona_api_client/models/runner_healthcheck.rb +217 -0
  164. data/lib/nightona_api_client/models/runner_service_health.rb +202 -0
  165. data/lib/nightona_api_client/models/runner_snapshot_dto.rb +202 -0
  166. data/lib/nightona_api_client/models/runner_state.rb +44 -0
  167. data/lib/nightona_api_client/models/sandbox.rb +788 -0
  168. data/lib/nightona_api_client/models/sandbox_class.rb +43 -0
  169. data/lib/nightona_api_client/models/sandbox_desired_state.rb +45 -0
  170. data/lib/nightona_api_client/models/sandbox_labels.rb +167 -0
  171. data/lib/nightona_api_client/models/sandbox_list_item.rb +658 -0
  172. data/lib/nightona_api_client/models/sandbox_list_sort_direction.rb +41 -0
  173. data/lib/nightona_api_client/models/sandbox_list_sort_field.rb +45 -0
  174. data/lib/nightona_api_client/models/sandbox_state.rb +61 -0
  175. data/lib/nightona_api_client/models/sandbox_volume.rb +202 -0
  176. data/lib/nightona_api_client/models/screenshot_response.rb +185 -0
  177. data/lib/nightona_api_client/models/search_files_response.rb +166 -0
  178. data/lib/nightona_api_client/models/send_webhook_dto.rb +224 -0
  179. data/lib/nightona_api_client/models/session.rb +180 -0
  180. data/lib/nightona_api_client/models/session_execute_request.rb +185 -0
  181. data/lib/nightona_api_client/models/session_execute_response.rb +168 -0
  182. data/lib/nightona_api_client/models/set_snapshot_general_status_dto.rb +165 -0
  183. data/lib/nightona_api_client/models/signed_port_preview_url.rb +246 -0
  184. data/lib/nightona_api_client/models/snapshot_dto.rb +562 -0
  185. data/lib/nightona_api_client/models/snapshot_manager_credentials.rb +192 -0
  186. data/lib/nightona_api_client/models/snapshot_state.rb +47 -0
  187. data/lib/nightona_api_client/models/ssh_access_dto.rb +327 -0
  188. data/lib/nightona_api_client/models/ssh_access_validation_dto.rb +192 -0
  189. data/lib/nightona_api_client/models/storage_access_dto.rb +300 -0
  190. data/lib/nightona_api_client/models/toolbox_proxy_url.rb +165 -0
  191. data/lib/nightona_api_client/models/trace_span.rb +332 -0
  192. data/lib/nightona_api_client/models/trace_summary.rb +310 -0
  193. data/lib/nightona_api_client/models/update_docker_registry.rb +239 -0
  194. data/lib/nightona_api_client/models/update_job_status.rb +207 -0
  195. data/lib/nightona_api_client/models/update_organization_default_region.rb +165 -0
  196. data/lib/nightona_api_client/models/update_organization_invitation.rb +228 -0
  197. data/lib/nightona_api_client/models/update_organization_member_access.rb +218 -0
  198. data/lib/nightona_api_client/models/update_organization_quota.rb +295 -0
  199. data/lib/nightona_api_client/models/update_organization_region_quota.rb +299 -0
  200. data/lib/nightona_api_client/models/update_organization_role.rb +233 -0
  201. data/lib/nightona_api_client/models/update_region.rb +171 -0
  202. data/lib/nightona_api_client/models/update_sandbox_network_settings.rb +168 -0
  203. data/lib/nightona_api_client/models/update_sandbox_state_dto.rb +209 -0
  204. data/lib/nightona_api_client/models/url.rb +165 -0
  205. data/lib/nightona_api_client/models/user.rb +275 -0
  206. data/lib/nightona_api_client/models/user_home_dir_response.rb +147 -0
  207. data/lib/nightona_api_client/models/user_public_key.rb +192 -0
  208. data/lib/nightona_api_client/models/volume_dto.rb +346 -0
  209. data/lib/nightona_api_client/models/volume_state.rb +46 -0
  210. data/lib/nightona_api_client/models/webhook_app_portal_access.rb +192 -0
  211. data/lib/nightona_api_client/models/webhook_event.rb +46 -0
  212. data/lib/nightona_api_client/models/webhook_initialization_status.rb +272 -0
  213. data/lib/nightona_api_client/models/windows_response.rb +194 -0
  214. data/lib/nightona_api_client/models/work_dir_response.rb +147 -0
  215. data/lib/nightona_api_client/version.rb +15 -0
  216. data/lib/nightona_api_client.rb +241 -0
  217. data/nightona_api_client.gemspec +39 -0
  218. data/project.json +68 -0
  219. metadata +299 -0
@@ -0,0 +1,710 @@
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 Runner < ApiModelBase
18
+ # The ID of the runner
19
+ attr_accessor :id
20
+
21
+ # The domain of the runner
22
+ attr_accessor :domain
23
+
24
+ # The API URL of the runner
25
+ attr_accessor :api_url
26
+
27
+ # The proxy URL of the runner
28
+ attr_accessor :proxy_url
29
+
30
+ # The CPU capacity of the runner
31
+ attr_accessor :cpu
32
+
33
+ # The memory capacity of the runner in GiB
34
+ attr_accessor :memory
35
+
36
+ # The disk capacity of the runner in GiB
37
+ attr_accessor :disk
38
+
39
+ # The GPU capacity of the runner
40
+ attr_accessor :gpu
41
+
42
+ # The type of GPU
43
+ attr_accessor :gpu_type
44
+
45
+ # The sandbox class supported by this runner
46
+ attr_accessor :sandbox_class
47
+
48
+ # Current CPU usage percentage
49
+ attr_accessor :current_cpu_usage_percentage
50
+
51
+ # Current RAM usage percentage
52
+ attr_accessor :current_memory_usage_percentage
53
+
54
+ # Current disk usage percentage
55
+ attr_accessor :current_disk_usage_percentage
56
+
57
+ # Current allocated CPU
58
+ attr_accessor :current_allocated_cpu
59
+
60
+ # Current allocated memory in GiB
61
+ attr_accessor :current_allocated_memory_gi_b
62
+
63
+ # Current allocated disk in GiB
64
+ attr_accessor :current_allocated_disk_gi_b
65
+
66
+ # Current snapshot count
67
+ attr_accessor :current_snapshot_count
68
+
69
+ # Current number of started sandboxes
70
+ attr_accessor :current_started_sandboxes
71
+
72
+ # Runner availability score
73
+ attr_accessor :availability_score
74
+
75
+ # The region of the runner
76
+ attr_accessor :region
77
+
78
+ # The name of the runner
79
+ attr_accessor :name
80
+
81
+ # The state of the runner
82
+ attr_accessor :state
83
+
84
+ # The last time the runner was checked
85
+ attr_accessor :last_checked
86
+
87
+ # Whether the runner is unschedulable
88
+ attr_accessor :unschedulable
89
+
90
+ # Tags associated with the runner
91
+ attr_accessor :tags
92
+
93
+ # The creation timestamp of the runner
94
+ attr_accessor :created_at
95
+
96
+ # The last update timestamp of the runner
97
+ attr_accessor :updated_at
98
+
99
+ # The version of the runner (deprecated in favor of apiVersion)
100
+ attr_accessor :version
101
+
102
+ # The api version of the runner
103
+ attr_accessor :api_version
104
+
105
+ # The class of the runner. Deprecated and always returns \"container\" for backward compatibility - use sandboxClass instead.
106
+ attr_accessor :runner_class
107
+
108
+ # The app version of the runner
109
+ attr_accessor :app_version
110
+
111
+ class EnumAttributeValidator
112
+ attr_reader :datatype
113
+ attr_reader :allowable_values
114
+
115
+ def initialize(datatype, allowable_values)
116
+ @allowable_values = allowable_values.map do |value|
117
+ case datatype.to_s
118
+ when /Integer/i
119
+ value.to_i
120
+ when /Float/i
121
+ value.to_f
122
+ else
123
+ value
124
+ end
125
+ end
126
+ end
127
+
128
+ def valid?(value)
129
+ !value || allowable_values.include?(value)
130
+ end
131
+ end
132
+
133
+ # Attribute mapping from ruby-style variable name to JSON key.
134
+ def self.attribute_map
135
+ {
136
+ :'id' => :'id',
137
+ :'domain' => :'domain',
138
+ :'api_url' => :'apiUrl',
139
+ :'proxy_url' => :'proxyUrl',
140
+ :'cpu' => :'cpu',
141
+ :'memory' => :'memory',
142
+ :'disk' => :'disk',
143
+ :'gpu' => :'gpu',
144
+ :'gpu_type' => :'gpuType',
145
+ :'sandbox_class' => :'sandboxClass',
146
+ :'current_cpu_usage_percentage' => :'currentCpuUsagePercentage',
147
+ :'current_memory_usage_percentage' => :'currentMemoryUsagePercentage',
148
+ :'current_disk_usage_percentage' => :'currentDiskUsagePercentage',
149
+ :'current_allocated_cpu' => :'currentAllocatedCpu',
150
+ :'current_allocated_memory_gi_b' => :'currentAllocatedMemoryGiB',
151
+ :'current_allocated_disk_gi_b' => :'currentAllocatedDiskGiB',
152
+ :'current_snapshot_count' => :'currentSnapshotCount',
153
+ :'current_started_sandboxes' => :'currentStartedSandboxes',
154
+ :'availability_score' => :'availabilityScore',
155
+ :'region' => :'region',
156
+ :'name' => :'name',
157
+ :'state' => :'state',
158
+ :'last_checked' => :'lastChecked',
159
+ :'unschedulable' => :'unschedulable',
160
+ :'tags' => :'tags',
161
+ :'created_at' => :'createdAt',
162
+ :'updated_at' => :'updatedAt',
163
+ :'version' => :'version',
164
+ :'api_version' => :'apiVersion',
165
+ :'runner_class' => :'runnerClass',
166
+ :'app_version' => :'appVersion'
167
+ }
168
+ end
169
+
170
+ # Returns attribute mapping this model knows about
171
+ def self.acceptable_attribute_map
172
+ attribute_map
173
+ end
174
+
175
+ # Returns all the JSON keys this model knows about
176
+ def self.acceptable_attributes
177
+ acceptable_attribute_map.values
178
+ end
179
+
180
+ # Attribute type mapping.
181
+ def self.openapi_types
182
+ {
183
+ :'id' => :'String',
184
+ :'domain' => :'String',
185
+ :'api_url' => :'String',
186
+ :'proxy_url' => :'String',
187
+ :'cpu' => :'Float',
188
+ :'memory' => :'Float',
189
+ :'disk' => :'Float',
190
+ :'gpu' => :'Float',
191
+ :'gpu_type' => :'String',
192
+ :'sandbox_class' => :'SandboxClass',
193
+ :'current_cpu_usage_percentage' => :'Float',
194
+ :'current_memory_usage_percentage' => :'Float',
195
+ :'current_disk_usage_percentage' => :'Float',
196
+ :'current_allocated_cpu' => :'Float',
197
+ :'current_allocated_memory_gi_b' => :'Float',
198
+ :'current_allocated_disk_gi_b' => :'Float',
199
+ :'current_snapshot_count' => :'Float',
200
+ :'current_started_sandboxes' => :'Float',
201
+ :'availability_score' => :'Float',
202
+ :'region' => :'String',
203
+ :'name' => :'String',
204
+ :'state' => :'RunnerState',
205
+ :'last_checked' => :'String',
206
+ :'unschedulable' => :'Boolean',
207
+ :'tags' => :'Array<String>',
208
+ :'created_at' => :'String',
209
+ :'updated_at' => :'String',
210
+ :'version' => :'String',
211
+ :'api_version' => :'String',
212
+ :'runner_class' => :'RunnerClass',
213
+ :'app_version' => :'String'
214
+ }
215
+ end
216
+
217
+ # List of attributes with nullable: true
218
+ def self.openapi_nullable
219
+ Set.new([
220
+ ])
221
+ end
222
+
223
+ # Initializes the object
224
+ # @param [Hash] attributes Model attributes in the form of hash
225
+ def initialize(attributes = {})
226
+ if (!attributes.is_a?(Hash))
227
+ fail ArgumentError, "The input argument (attributes) must be a hash in `NightonaApiClient::Runner` initialize method"
228
+ end
229
+
230
+ # check to see if the attribute exists and convert string to symbol for hash key
231
+ acceptable_attribute_map = self.class.acceptable_attribute_map
232
+ attributes = attributes.each_with_object({}) { |(k, v), h|
233
+ if (!acceptable_attribute_map.key?(k.to_sym))
234
+ fail ArgumentError, "`#{k}` is not a valid attribute in `NightonaApiClient::Runner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
235
+ end
236
+ h[k.to_sym] = v
237
+ }
238
+
239
+ if attributes.key?(:'id')
240
+ self.id = attributes[:'id']
241
+ else
242
+ self.id = nil
243
+ end
244
+
245
+ if attributes.key?(:'domain')
246
+ self.domain = attributes[:'domain']
247
+ end
248
+
249
+ if attributes.key?(:'api_url')
250
+ self.api_url = attributes[:'api_url']
251
+ end
252
+
253
+ if attributes.key?(:'proxy_url')
254
+ self.proxy_url = attributes[:'proxy_url']
255
+ end
256
+
257
+ if attributes.key?(:'cpu')
258
+ self.cpu = attributes[:'cpu']
259
+ else
260
+ self.cpu = nil
261
+ end
262
+
263
+ if attributes.key?(:'memory')
264
+ self.memory = attributes[:'memory']
265
+ else
266
+ self.memory = nil
267
+ end
268
+
269
+ if attributes.key?(:'disk')
270
+ self.disk = attributes[:'disk']
271
+ else
272
+ self.disk = nil
273
+ end
274
+
275
+ if attributes.key?(:'gpu')
276
+ self.gpu = attributes[:'gpu']
277
+ end
278
+
279
+ if attributes.key?(:'gpu_type')
280
+ self.gpu_type = attributes[:'gpu_type']
281
+ end
282
+
283
+ if attributes.key?(:'sandbox_class')
284
+ self.sandbox_class = attributes[:'sandbox_class']
285
+ end
286
+
287
+ if attributes.key?(:'current_cpu_usage_percentage')
288
+ self.current_cpu_usage_percentage = attributes[:'current_cpu_usage_percentage']
289
+ end
290
+
291
+ if attributes.key?(:'current_memory_usage_percentage')
292
+ self.current_memory_usage_percentage = attributes[:'current_memory_usage_percentage']
293
+ end
294
+
295
+ if attributes.key?(:'current_disk_usage_percentage')
296
+ self.current_disk_usage_percentage = attributes[:'current_disk_usage_percentage']
297
+ end
298
+
299
+ if attributes.key?(:'current_allocated_cpu')
300
+ self.current_allocated_cpu = attributes[:'current_allocated_cpu']
301
+ end
302
+
303
+ if attributes.key?(:'current_allocated_memory_gi_b')
304
+ self.current_allocated_memory_gi_b = attributes[:'current_allocated_memory_gi_b']
305
+ end
306
+
307
+ if attributes.key?(:'current_allocated_disk_gi_b')
308
+ self.current_allocated_disk_gi_b = attributes[:'current_allocated_disk_gi_b']
309
+ end
310
+
311
+ if attributes.key?(:'current_snapshot_count')
312
+ self.current_snapshot_count = attributes[:'current_snapshot_count']
313
+ end
314
+
315
+ if attributes.key?(:'current_started_sandboxes')
316
+ self.current_started_sandboxes = attributes[:'current_started_sandboxes']
317
+ end
318
+
319
+ if attributes.key?(:'availability_score')
320
+ self.availability_score = attributes[:'availability_score']
321
+ end
322
+
323
+ if attributes.key?(:'region')
324
+ self.region = attributes[:'region']
325
+ else
326
+ self.region = nil
327
+ end
328
+
329
+ if attributes.key?(:'name')
330
+ self.name = attributes[:'name']
331
+ else
332
+ self.name = nil
333
+ end
334
+
335
+ if attributes.key?(:'state')
336
+ self.state = attributes[:'state']
337
+ else
338
+ self.state = nil
339
+ end
340
+
341
+ if attributes.key?(:'last_checked')
342
+ self.last_checked = attributes[:'last_checked']
343
+ end
344
+
345
+ if attributes.key?(:'unschedulable')
346
+ self.unschedulable = attributes[:'unschedulable']
347
+ else
348
+ self.unschedulable = nil
349
+ end
350
+
351
+ if attributes.key?(:'tags')
352
+ if (value = attributes[:'tags']).is_a?(Array)
353
+ self.tags = value
354
+ end
355
+ else
356
+ self.tags = nil
357
+ end
358
+
359
+ if attributes.key?(:'created_at')
360
+ self.created_at = attributes[:'created_at']
361
+ else
362
+ self.created_at = nil
363
+ end
364
+
365
+ if attributes.key?(:'updated_at')
366
+ self.updated_at = attributes[:'updated_at']
367
+ else
368
+ self.updated_at = nil
369
+ end
370
+
371
+ if attributes.key?(:'version')
372
+ self.version = attributes[:'version']
373
+ else
374
+ self.version = nil
375
+ end
376
+
377
+ if attributes.key?(:'api_version')
378
+ self.api_version = attributes[:'api_version']
379
+ else
380
+ self.api_version = nil
381
+ end
382
+
383
+ if attributes.key?(:'runner_class')
384
+ self.runner_class = attributes[:'runner_class']
385
+ else
386
+ self.runner_class = nil
387
+ end
388
+
389
+ if attributes.key?(:'app_version')
390
+ self.app_version = attributes[:'app_version']
391
+ end
392
+ end
393
+
394
+ # Show invalid properties with the reasons. Usually used together with valid?
395
+ # @return Array for valid properties with the reasons
396
+ def list_invalid_properties
397
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
398
+ invalid_properties = Array.new
399
+ if @id.nil?
400
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
401
+ end
402
+
403
+ if @cpu.nil?
404
+ invalid_properties.push('invalid value for "cpu", cpu cannot be nil.')
405
+ end
406
+
407
+ if @memory.nil?
408
+ invalid_properties.push('invalid value for "memory", memory cannot be nil.')
409
+ end
410
+
411
+ if @disk.nil?
412
+ invalid_properties.push('invalid value for "disk", disk cannot be nil.')
413
+ end
414
+
415
+ if @region.nil?
416
+ invalid_properties.push('invalid value for "region", region cannot be nil.')
417
+ end
418
+
419
+ if @name.nil?
420
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
421
+ end
422
+
423
+ if @state.nil?
424
+ invalid_properties.push('invalid value for "state", state cannot be nil.')
425
+ end
426
+
427
+ if @unschedulable.nil?
428
+ invalid_properties.push('invalid value for "unschedulable", unschedulable cannot be nil.')
429
+ end
430
+
431
+ if @tags.nil?
432
+ invalid_properties.push('invalid value for "tags", tags cannot be nil.')
433
+ end
434
+
435
+ if @created_at.nil?
436
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
437
+ end
438
+
439
+ if @updated_at.nil?
440
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
441
+ end
442
+
443
+ if @version.nil?
444
+ invalid_properties.push('invalid value for "version", version cannot be nil.')
445
+ end
446
+
447
+ if @api_version.nil?
448
+ invalid_properties.push('invalid value for "api_version", api_version cannot be nil.')
449
+ end
450
+
451
+ if @runner_class.nil?
452
+ invalid_properties.push('invalid value for "runner_class", runner_class cannot be nil.')
453
+ end
454
+
455
+ invalid_properties
456
+ end
457
+
458
+ # Check to see if the all the properties in the model are valid
459
+ # @return true if the model is valid
460
+ def valid?
461
+ warn '[DEPRECATED] the `valid?` method is obsolete'
462
+ return false if @id.nil?
463
+ return false if @cpu.nil?
464
+ return false if @memory.nil?
465
+ return false if @disk.nil?
466
+ return false if @region.nil?
467
+ return false if @name.nil?
468
+ return false if @state.nil?
469
+ return false if @unschedulable.nil?
470
+ return false if @tags.nil?
471
+ return false if @created_at.nil?
472
+ return false if @updated_at.nil?
473
+ return false if @version.nil?
474
+ return false if @api_version.nil?
475
+ return false if @runner_class.nil?
476
+ true
477
+ end
478
+
479
+ # Custom attribute writer method with validation
480
+ # @param [Object] id Value to be assigned
481
+ def id=(id)
482
+ if id.nil?
483
+ fail ArgumentError, 'id cannot be nil'
484
+ end
485
+
486
+ @id = id
487
+ end
488
+
489
+ # Custom attribute writer method with validation
490
+ # @param [Object] cpu Value to be assigned
491
+ def cpu=(cpu)
492
+ if cpu.nil?
493
+ fail ArgumentError, 'cpu cannot be nil'
494
+ end
495
+
496
+ @cpu = cpu
497
+ end
498
+
499
+ # Custom attribute writer method with validation
500
+ # @param [Object] memory Value to be assigned
501
+ def memory=(memory)
502
+ if memory.nil?
503
+ fail ArgumentError, 'memory cannot be nil'
504
+ end
505
+
506
+ @memory = memory
507
+ end
508
+
509
+ # Custom attribute writer method with validation
510
+ # @param [Object] disk Value to be assigned
511
+ def disk=(disk)
512
+ if disk.nil?
513
+ fail ArgumentError, 'disk cannot be nil'
514
+ end
515
+
516
+ @disk = disk
517
+ end
518
+
519
+ # Custom attribute writer method with validation
520
+ # @param [Object] region Value to be assigned
521
+ def region=(region)
522
+ if region.nil?
523
+ fail ArgumentError, 'region cannot be nil'
524
+ end
525
+
526
+ @region = region
527
+ end
528
+
529
+ # Custom attribute writer method with validation
530
+ # @param [Object] name Value to be assigned
531
+ def name=(name)
532
+ if name.nil?
533
+ fail ArgumentError, 'name cannot be nil'
534
+ end
535
+
536
+ @name = name
537
+ end
538
+
539
+ # Custom attribute writer method with validation
540
+ # @param [Object] state Value to be assigned
541
+ def state=(state)
542
+ if state.nil?
543
+ fail ArgumentError, 'state cannot be nil'
544
+ end
545
+
546
+ @state = state
547
+ end
548
+
549
+ # Custom attribute writer method with validation
550
+ # @param [Object] unschedulable Value to be assigned
551
+ def unschedulable=(unschedulable)
552
+ if unschedulable.nil?
553
+ fail ArgumentError, 'unschedulable cannot be nil'
554
+ end
555
+
556
+ @unschedulable = unschedulable
557
+ end
558
+
559
+ # Custom attribute writer method with validation
560
+ # @param [Object] tags Value to be assigned
561
+ def tags=(tags)
562
+ if tags.nil?
563
+ fail ArgumentError, 'tags cannot be nil'
564
+ end
565
+
566
+ @tags = tags
567
+ end
568
+
569
+ # Custom attribute writer method with validation
570
+ # @param [Object] created_at Value to be assigned
571
+ def created_at=(created_at)
572
+ if created_at.nil?
573
+ fail ArgumentError, 'created_at cannot be nil'
574
+ end
575
+
576
+ @created_at = created_at
577
+ end
578
+
579
+ # Custom attribute writer method with validation
580
+ # @param [Object] updated_at Value to be assigned
581
+ def updated_at=(updated_at)
582
+ if updated_at.nil?
583
+ fail ArgumentError, 'updated_at cannot be nil'
584
+ end
585
+
586
+ @updated_at = updated_at
587
+ end
588
+
589
+ # Custom attribute writer method with validation
590
+ # @param [Object] version Value to be assigned
591
+ def version=(version)
592
+ if version.nil?
593
+ fail ArgumentError, 'version cannot be nil'
594
+ end
595
+
596
+ @version = version
597
+ end
598
+
599
+ # Custom attribute writer method with validation
600
+ # @param [Object] api_version Value to be assigned
601
+ def api_version=(api_version)
602
+ if api_version.nil?
603
+ fail ArgumentError, 'api_version cannot be nil'
604
+ end
605
+
606
+ @api_version = api_version
607
+ end
608
+
609
+ # Custom attribute writer method with validation
610
+ # @param [Object] runner_class Value to be assigned
611
+ def runner_class=(runner_class)
612
+ if runner_class.nil?
613
+ fail ArgumentError, 'runner_class cannot be nil'
614
+ end
615
+
616
+ @runner_class = runner_class
617
+ end
618
+
619
+ # Checks equality by comparing each attribute.
620
+ # @param [Object] Object to be compared
621
+ def ==(o)
622
+ return true if self.equal?(o)
623
+ self.class == o.class &&
624
+ id == o.id &&
625
+ domain == o.domain &&
626
+ api_url == o.api_url &&
627
+ proxy_url == o.proxy_url &&
628
+ cpu == o.cpu &&
629
+ memory == o.memory &&
630
+ disk == o.disk &&
631
+ gpu == o.gpu &&
632
+ gpu_type == o.gpu_type &&
633
+ sandbox_class == o.sandbox_class &&
634
+ current_cpu_usage_percentage == o.current_cpu_usage_percentage &&
635
+ current_memory_usage_percentage == o.current_memory_usage_percentage &&
636
+ current_disk_usage_percentage == o.current_disk_usage_percentage &&
637
+ current_allocated_cpu == o.current_allocated_cpu &&
638
+ current_allocated_memory_gi_b == o.current_allocated_memory_gi_b &&
639
+ current_allocated_disk_gi_b == o.current_allocated_disk_gi_b &&
640
+ current_snapshot_count == o.current_snapshot_count &&
641
+ current_started_sandboxes == o.current_started_sandboxes &&
642
+ availability_score == o.availability_score &&
643
+ region == o.region &&
644
+ name == o.name &&
645
+ state == o.state &&
646
+ last_checked == o.last_checked &&
647
+ unschedulable == o.unschedulable &&
648
+ tags == o.tags &&
649
+ created_at == o.created_at &&
650
+ updated_at == o.updated_at &&
651
+ version == o.version &&
652
+ api_version == o.api_version &&
653
+ runner_class == o.runner_class &&
654
+ app_version == o.app_version
655
+ end
656
+
657
+ # @see the `==` method
658
+ # @param [Object] Object to be compared
659
+ def eql?(o)
660
+ self == o
661
+ end
662
+
663
+ # Calculates hash code according to all attributes.
664
+ # @return [Integer] Hash code
665
+ def hash
666
+ [id, domain, api_url, proxy_url, cpu, memory, disk, gpu, gpu_type, sandbox_class, current_cpu_usage_percentage, current_memory_usage_percentage, current_disk_usage_percentage, current_allocated_cpu, current_allocated_memory_gi_b, current_allocated_disk_gi_b, current_snapshot_count, current_started_sandboxes, availability_score, region, name, state, last_checked, unschedulable, tags, created_at, updated_at, version, api_version, runner_class, app_version].hash
667
+ end
668
+
669
+ # Builds the object from hash
670
+ # @param [Hash] attributes Model attributes in the form of hash
671
+ # @return [Object] Returns the model itself
672
+ def self.build_from_hash(attributes)
673
+ return nil unless attributes.is_a?(Hash)
674
+ attributes = attributes.transform_keys(&:to_sym)
675
+ transformed_hash = {}
676
+ openapi_types.each_pair do |key, type|
677
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
678
+ transformed_hash["#{key}"] = nil
679
+ elsif type =~ /\AArray<(.*)>/i
680
+ # check to ensure the input is an array given that the attribute
681
+ # is documented as an array but the input is not
682
+ if attributes[attribute_map[key]].is_a?(Array)
683
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
684
+ end
685
+ elsif !attributes[attribute_map[key]].nil?
686
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
687
+ end
688
+ end
689
+ new(transformed_hash)
690
+ end
691
+
692
+ # Returns the object in the form of hash
693
+ # @return [Hash] Returns the object in the form of hash
694
+ def to_hash
695
+ hash = {}
696
+ self.class.attribute_map.each_pair do |attr, param|
697
+ value = self.send(attr)
698
+ if value.nil?
699
+ is_nullable = self.class.openapi_nullable.include?(attr)
700
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
701
+ end
702
+
703
+ hash[param] = _to_hash(value)
704
+ end
705
+ hash
706
+ end
707
+
708
+ end
709
+
710
+ end