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,295 @@
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 UpdateOrganizationQuota < ApiModelBase
18
+ attr_accessor :max_cpu_per_sandbox
19
+
20
+ attr_accessor :max_memory_per_sandbox
21
+
22
+ attr_accessor :max_disk_per_sandbox
23
+
24
+ attr_accessor :snapshot_quota
25
+
26
+ attr_accessor :max_snapshot_size
27
+
28
+ attr_accessor :volume_quota
29
+
30
+ attr_accessor :authenticated_rate_limit
31
+
32
+ attr_accessor :sandbox_create_rate_limit
33
+
34
+ attr_accessor :sandbox_lifecycle_rate_limit
35
+
36
+ attr_accessor :authenticated_rate_limit_ttl_seconds
37
+
38
+ attr_accessor :sandbox_create_rate_limit_ttl_seconds
39
+
40
+ attr_accessor :sandbox_lifecycle_rate_limit_ttl_seconds
41
+
42
+ # Time in minutes before an unused snapshot is deactivated
43
+ attr_accessor :snapshot_deactivation_timeout_minutes
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ :'max_cpu_per_sandbox' => :'maxCpuPerSandbox',
49
+ :'max_memory_per_sandbox' => :'maxMemoryPerSandbox',
50
+ :'max_disk_per_sandbox' => :'maxDiskPerSandbox',
51
+ :'snapshot_quota' => :'snapshotQuota',
52
+ :'max_snapshot_size' => :'maxSnapshotSize',
53
+ :'volume_quota' => :'volumeQuota',
54
+ :'authenticated_rate_limit' => :'authenticatedRateLimit',
55
+ :'sandbox_create_rate_limit' => :'sandboxCreateRateLimit',
56
+ :'sandbox_lifecycle_rate_limit' => :'sandboxLifecycleRateLimit',
57
+ :'authenticated_rate_limit_ttl_seconds' => :'authenticatedRateLimitTtlSeconds',
58
+ :'sandbox_create_rate_limit_ttl_seconds' => :'sandboxCreateRateLimitTtlSeconds',
59
+ :'sandbox_lifecycle_rate_limit_ttl_seconds' => :'sandboxLifecycleRateLimitTtlSeconds',
60
+ :'snapshot_deactivation_timeout_minutes' => :'snapshotDeactivationTimeoutMinutes'
61
+ }
62
+ end
63
+
64
+ # Returns attribute mapping this model knows about
65
+ def self.acceptable_attribute_map
66
+ attribute_map
67
+ end
68
+
69
+ # Returns all the JSON keys this model knows about
70
+ def self.acceptable_attributes
71
+ acceptable_attribute_map.values
72
+ end
73
+
74
+ # Attribute type mapping.
75
+ def self.openapi_types
76
+ {
77
+ :'max_cpu_per_sandbox' => :'Float',
78
+ :'max_memory_per_sandbox' => :'Float',
79
+ :'max_disk_per_sandbox' => :'Float',
80
+ :'snapshot_quota' => :'Float',
81
+ :'max_snapshot_size' => :'Float',
82
+ :'volume_quota' => :'Float',
83
+ :'authenticated_rate_limit' => :'Float',
84
+ :'sandbox_create_rate_limit' => :'Float',
85
+ :'sandbox_lifecycle_rate_limit' => :'Float',
86
+ :'authenticated_rate_limit_ttl_seconds' => :'Float',
87
+ :'sandbox_create_rate_limit_ttl_seconds' => :'Float',
88
+ :'sandbox_lifecycle_rate_limit_ttl_seconds' => :'Float',
89
+ :'snapshot_deactivation_timeout_minutes' => :'Float'
90
+ }
91
+ end
92
+
93
+ # List of attributes with nullable: true
94
+ def self.openapi_nullable
95
+ Set.new([
96
+ :'max_cpu_per_sandbox',
97
+ :'max_memory_per_sandbox',
98
+ :'max_disk_per_sandbox',
99
+ :'snapshot_quota',
100
+ :'max_snapshot_size',
101
+ :'volume_quota',
102
+ :'authenticated_rate_limit',
103
+ :'sandbox_create_rate_limit',
104
+ :'sandbox_lifecycle_rate_limit',
105
+ :'authenticated_rate_limit_ttl_seconds',
106
+ :'sandbox_create_rate_limit_ttl_seconds',
107
+ :'sandbox_lifecycle_rate_limit_ttl_seconds',
108
+ :'snapshot_deactivation_timeout_minutes'
109
+ ])
110
+ end
111
+
112
+ # Initializes the object
113
+ # @param [Hash] attributes Model attributes in the form of hash
114
+ def initialize(attributes = {})
115
+ if (!attributes.is_a?(Hash))
116
+ fail ArgumentError, "The input argument (attributes) must be a hash in `NightonaApiClient::UpdateOrganizationQuota` initialize method"
117
+ end
118
+
119
+ # check to see if the attribute exists and convert string to symbol for hash key
120
+ acceptable_attribute_map = self.class.acceptable_attribute_map
121
+ attributes = attributes.each_with_object({}) { |(k, v), h|
122
+ if (!acceptable_attribute_map.key?(k.to_sym))
123
+ fail ArgumentError, "`#{k}` is not a valid attribute in `NightonaApiClient::UpdateOrganizationQuota`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
124
+ end
125
+ h[k.to_sym] = v
126
+ }
127
+
128
+ if attributes.key?(:'max_cpu_per_sandbox')
129
+ self.max_cpu_per_sandbox = attributes[:'max_cpu_per_sandbox']
130
+ else
131
+ self.max_cpu_per_sandbox = nil
132
+ end
133
+
134
+ if attributes.key?(:'max_memory_per_sandbox')
135
+ self.max_memory_per_sandbox = attributes[:'max_memory_per_sandbox']
136
+ else
137
+ self.max_memory_per_sandbox = nil
138
+ end
139
+
140
+ if attributes.key?(:'max_disk_per_sandbox')
141
+ self.max_disk_per_sandbox = attributes[:'max_disk_per_sandbox']
142
+ else
143
+ self.max_disk_per_sandbox = nil
144
+ end
145
+
146
+ if attributes.key?(:'snapshot_quota')
147
+ self.snapshot_quota = attributes[:'snapshot_quota']
148
+ else
149
+ self.snapshot_quota = nil
150
+ end
151
+
152
+ if attributes.key?(:'max_snapshot_size')
153
+ self.max_snapshot_size = attributes[:'max_snapshot_size']
154
+ else
155
+ self.max_snapshot_size = nil
156
+ end
157
+
158
+ if attributes.key?(:'volume_quota')
159
+ self.volume_quota = attributes[:'volume_quota']
160
+ else
161
+ self.volume_quota = nil
162
+ end
163
+
164
+ if attributes.key?(:'authenticated_rate_limit')
165
+ self.authenticated_rate_limit = attributes[:'authenticated_rate_limit']
166
+ else
167
+ self.authenticated_rate_limit = nil
168
+ end
169
+
170
+ if attributes.key?(:'sandbox_create_rate_limit')
171
+ self.sandbox_create_rate_limit = attributes[:'sandbox_create_rate_limit']
172
+ else
173
+ self.sandbox_create_rate_limit = nil
174
+ end
175
+
176
+ if attributes.key?(:'sandbox_lifecycle_rate_limit')
177
+ self.sandbox_lifecycle_rate_limit = attributes[:'sandbox_lifecycle_rate_limit']
178
+ else
179
+ self.sandbox_lifecycle_rate_limit = nil
180
+ end
181
+
182
+ if attributes.key?(:'authenticated_rate_limit_ttl_seconds')
183
+ self.authenticated_rate_limit_ttl_seconds = attributes[:'authenticated_rate_limit_ttl_seconds']
184
+ else
185
+ self.authenticated_rate_limit_ttl_seconds = nil
186
+ end
187
+
188
+ if attributes.key?(:'sandbox_create_rate_limit_ttl_seconds')
189
+ self.sandbox_create_rate_limit_ttl_seconds = attributes[:'sandbox_create_rate_limit_ttl_seconds']
190
+ else
191
+ self.sandbox_create_rate_limit_ttl_seconds = nil
192
+ end
193
+
194
+ if attributes.key?(:'sandbox_lifecycle_rate_limit_ttl_seconds')
195
+ self.sandbox_lifecycle_rate_limit_ttl_seconds = attributes[:'sandbox_lifecycle_rate_limit_ttl_seconds']
196
+ else
197
+ self.sandbox_lifecycle_rate_limit_ttl_seconds = nil
198
+ end
199
+
200
+ if attributes.key?(:'snapshot_deactivation_timeout_minutes')
201
+ self.snapshot_deactivation_timeout_minutes = attributes[:'snapshot_deactivation_timeout_minutes']
202
+ else
203
+ self.snapshot_deactivation_timeout_minutes = nil
204
+ end
205
+ end
206
+
207
+ # Show invalid properties with the reasons. Usually used together with valid?
208
+ # @return Array for valid properties with the reasons
209
+ def list_invalid_properties
210
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
211
+ invalid_properties = Array.new
212
+ invalid_properties
213
+ end
214
+
215
+ # Check to see if the all the properties in the model are valid
216
+ # @return true if the model is valid
217
+ def valid?
218
+ warn '[DEPRECATED] the `valid?` method is obsolete'
219
+ true
220
+ end
221
+
222
+ # Checks equality by comparing each attribute.
223
+ # @param [Object] Object to be compared
224
+ def ==(o)
225
+ return true if self.equal?(o)
226
+ self.class == o.class &&
227
+ max_cpu_per_sandbox == o.max_cpu_per_sandbox &&
228
+ max_memory_per_sandbox == o.max_memory_per_sandbox &&
229
+ max_disk_per_sandbox == o.max_disk_per_sandbox &&
230
+ snapshot_quota == o.snapshot_quota &&
231
+ max_snapshot_size == o.max_snapshot_size &&
232
+ volume_quota == o.volume_quota &&
233
+ authenticated_rate_limit == o.authenticated_rate_limit &&
234
+ sandbox_create_rate_limit == o.sandbox_create_rate_limit &&
235
+ sandbox_lifecycle_rate_limit == o.sandbox_lifecycle_rate_limit &&
236
+ authenticated_rate_limit_ttl_seconds == o.authenticated_rate_limit_ttl_seconds &&
237
+ sandbox_create_rate_limit_ttl_seconds == o.sandbox_create_rate_limit_ttl_seconds &&
238
+ sandbox_lifecycle_rate_limit_ttl_seconds == o.sandbox_lifecycle_rate_limit_ttl_seconds &&
239
+ snapshot_deactivation_timeout_minutes == o.snapshot_deactivation_timeout_minutes
240
+ end
241
+
242
+ # @see the `==` method
243
+ # @param [Object] Object to be compared
244
+ def eql?(o)
245
+ self == o
246
+ end
247
+
248
+ # Calculates hash code according to all attributes.
249
+ # @return [Integer] Hash code
250
+ def hash
251
+ [max_cpu_per_sandbox, max_memory_per_sandbox, max_disk_per_sandbox, snapshot_quota, max_snapshot_size, volume_quota, authenticated_rate_limit, sandbox_create_rate_limit, sandbox_lifecycle_rate_limit, authenticated_rate_limit_ttl_seconds, sandbox_create_rate_limit_ttl_seconds, sandbox_lifecycle_rate_limit_ttl_seconds, snapshot_deactivation_timeout_minutes].hash
252
+ end
253
+
254
+ # Builds the object from hash
255
+ # @param [Hash] attributes Model attributes in the form of hash
256
+ # @return [Object] Returns the model itself
257
+ def self.build_from_hash(attributes)
258
+ return nil unless attributes.is_a?(Hash)
259
+ attributes = attributes.transform_keys(&:to_sym)
260
+ transformed_hash = {}
261
+ openapi_types.each_pair do |key, type|
262
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
263
+ transformed_hash["#{key}"] = nil
264
+ elsif type =~ /\AArray<(.*)>/i
265
+ # check to ensure the input is an array given that the attribute
266
+ # is documented as an array but the input is not
267
+ if attributes[attribute_map[key]].is_a?(Array)
268
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
269
+ end
270
+ elsif !attributes[attribute_map[key]].nil?
271
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
272
+ end
273
+ end
274
+ new(transformed_hash)
275
+ end
276
+
277
+ # Returns the object in the form of hash
278
+ # @return [Hash] Returns the object in the form of hash
279
+ def to_hash
280
+ hash = {}
281
+ self.class.attribute_map.each_pair do |attr, param|
282
+ value = self.send(attr)
283
+ if value.nil?
284
+ is_nullable = self.class.openapi_nullable.include?(attr)
285
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
286
+ end
287
+
288
+ hash[param] = _to_hash(value)
289
+ end
290
+ hash
291
+ end
292
+
293
+ end
294
+
295
+ end
@@ -0,0 +1,299 @@
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 UpdateOrganizationRegionQuota < ApiModelBase
18
+ attr_accessor :sandbox_class
19
+
20
+ attr_accessor :total_cpu_quota
21
+
22
+ attr_accessor :total_memory_quota
23
+
24
+ attr_accessor :total_disk_quota
25
+
26
+ attr_accessor :total_gpu_quota
27
+
28
+ attr_accessor :allowed_gpu_types
29
+
30
+ attr_accessor :max_cpu_per_sandbox
31
+
32
+ attr_accessor :max_memory_per_sandbox
33
+
34
+ attr_accessor :max_disk_per_sandbox
35
+
36
+ attr_accessor :max_disk_per_non_ephemeral_sandbox
37
+
38
+ attr_accessor :max_cpu_per_gpu_sandbox
39
+
40
+ attr_accessor :max_memory_per_gpu_sandbox
41
+
42
+ attr_accessor :max_disk_per_gpu_sandbox
43
+
44
+ class EnumAttributeValidator
45
+ attr_reader :datatype
46
+ attr_reader :allowable_values
47
+
48
+ def initialize(datatype, allowable_values)
49
+ @allowable_values = allowable_values.map do |value|
50
+ case datatype.to_s
51
+ when /Integer/i
52
+ value.to_i
53
+ when /Float/i
54
+ value.to_f
55
+ else
56
+ value
57
+ end
58
+ end
59
+ end
60
+
61
+ def valid?(value)
62
+ !value || allowable_values.include?(value)
63
+ end
64
+ end
65
+
66
+ # Attribute mapping from ruby-style variable name to JSON key.
67
+ def self.attribute_map
68
+ {
69
+ :'sandbox_class' => :'sandboxClass',
70
+ :'total_cpu_quota' => :'totalCpuQuota',
71
+ :'total_memory_quota' => :'totalMemoryQuota',
72
+ :'total_disk_quota' => :'totalDiskQuota',
73
+ :'total_gpu_quota' => :'totalGpuQuota',
74
+ :'allowed_gpu_types' => :'allowedGpuTypes',
75
+ :'max_cpu_per_sandbox' => :'maxCpuPerSandbox',
76
+ :'max_memory_per_sandbox' => :'maxMemoryPerSandbox',
77
+ :'max_disk_per_sandbox' => :'maxDiskPerSandbox',
78
+ :'max_disk_per_non_ephemeral_sandbox' => :'maxDiskPerNonEphemeralSandbox',
79
+ :'max_cpu_per_gpu_sandbox' => :'maxCpuPerGpuSandbox',
80
+ :'max_memory_per_gpu_sandbox' => :'maxMemoryPerGpuSandbox',
81
+ :'max_disk_per_gpu_sandbox' => :'maxDiskPerGpuSandbox'
82
+ }
83
+ end
84
+
85
+ # Returns attribute mapping this model knows about
86
+ def self.acceptable_attribute_map
87
+ attribute_map
88
+ end
89
+
90
+ # Returns all the JSON keys this model knows about
91
+ def self.acceptable_attributes
92
+ acceptable_attribute_map.values
93
+ end
94
+
95
+ # Attribute type mapping.
96
+ def self.openapi_types
97
+ {
98
+ :'sandbox_class' => :'SandboxClass',
99
+ :'total_cpu_quota' => :'Float',
100
+ :'total_memory_quota' => :'Float',
101
+ :'total_disk_quota' => :'Float',
102
+ :'total_gpu_quota' => :'Float',
103
+ :'allowed_gpu_types' => :'Array<GpuType>',
104
+ :'max_cpu_per_sandbox' => :'Float',
105
+ :'max_memory_per_sandbox' => :'Float',
106
+ :'max_disk_per_sandbox' => :'Float',
107
+ :'max_disk_per_non_ephemeral_sandbox' => :'Float',
108
+ :'max_cpu_per_gpu_sandbox' => :'Float',
109
+ :'max_memory_per_gpu_sandbox' => :'Float',
110
+ :'max_disk_per_gpu_sandbox' => :'Float'
111
+ }
112
+ end
113
+
114
+ # List of attributes with nullable: true
115
+ def self.openapi_nullable
116
+ Set.new([
117
+ :'total_cpu_quota',
118
+ :'total_memory_quota',
119
+ :'total_disk_quota',
120
+ :'total_gpu_quota',
121
+ :'allowed_gpu_types',
122
+ :'max_cpu_per_sandbox',
123
+ :'max_memory_per_sandbox',
124
+ :'max_disk_per_sandbox',
125
+ :'max_disk_per_non_ephemeral_sandbox',
126
+ :'max_cpu_per_gpu_sandbox',
127
+ :'max_memory_per_gpu_sandbox',
128
+ :'max_disk_per_gpu_sandbox'
129
+ ])
130
+ end
131
+
132
+ # Initializes the object
133
+ # @param [Hash] attributes Model attributes in the form of hash
134
+ def initialize(attributes = {})
135
+ if (!attributes.is_a?(Hash))
136
+ fail ArgumentError, "The input argument (attributes) must be a hash in `NightonaApiClient::UpdateOrganizationRegionQuota` initialize method"
137
+ end
138
+
139
+ # check to see if the attribute exists and convert string to symbol for hash key
140
+ acceptable_attribute_map = self.class.acceptable_attribute_map
141
+ attributes = attributes.each_with_object({}) { |(k, v), h|
142
+ if (!acceptable_attribute_map.key?(k.to_sym))
143
+ fail ArgumentError, "`#{k}` is not a valid attribute in `NightonaApiClient::UpdateOrganizationRegionQuota`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
144
+ end
145
+ h[k.to_sym] = v
146
+ }
147
+
148
+ if attributes.key?(:'sandbox_class')
149
+ self.sandbox_class = attributes[:'sandbox_class']
150
+ end
151
+
152
+ if attributes.key?(:'total_cpu_quota')
153
+ self.total_cpu_quota = attributes[:'total_cpu_quota']
154
+ else
155
+ self.total_cpu_quota = nil
156
+ end
157
+
158
+ if attributes.key?(:'total_memory_quota')
159
+ self.total_memory_quota = attributes[:'total_memory_quota']
160
+ else
161
+ self.total_memory_quota = nil
162
+ end
163
+
164
+ if attributes.key?(:'total_disk_quota')
165
+ self.total_disk_quota = attributes[:'total_disk_quota']
166
+ else
167
+ self.total_disk_quota = nil
168
+ end
169
+
170
+ if attributes.key?(:'total_gpu_quota')
171
+ self.total_gpu_quota = attributes[:'total_gpu_quota']
172
+ else
173
+ self.total_gpu_quota = nil
174
+ end
175
+
176
+ if attributes.key?(:'allowed_gpu_types')
177
+ if (value = attributes[:'allowed_gpu_types']).is_a?(Array)
178
+ self.allowed_gpu_types = value
179
+ end
180
+ end
181
+
182
+ if attributes.key?(:'max_cpu_per_sandbox')
183
+ self.max_cpu_per_sandbox = attributes[:'max_cpu_per_sandbox']
184
+ end
185
+
186
+ if attributes.key?(:'max_memory_per_sandbox')
187
+ self.max_memory_per_sandbox = attributes[:'max_memory_per_sandbox']
188
+ end
189
+
190
+ if attributes.key?(:'max_disk_per_sandbox')
191
+ self.max_disk_per_sandbox = attributes[:'max_disk_per_sandbox']
192
+ end
193
+
194
+ if attributes.key?(:'max_disk_per_non_ephemeral_sandbox')
195
+ self.max_disk_per_non_ephemeral_sandbox = attributes[:'max_disk_per_non_ephemeral_sandbox']
196
+ end
197
+
198
+ if attributes.key?(:'max_cpu_per_gpu_sandbox')
199
+ self.max_cpu_per_gpu_sandbox = attributes[:'max_cpu_per_gpu_sandbox']
200
+ end
201
+
202
+ if attributes.key?(:'max_memory_per_gpu_sandbox')
203
+ self.max_memory_per_gpu_sandbox = attributes[:'max_memory_per_gpu_sandbox']
204
+ end
205
+
206
+ if attributes.key?(:'max_disk_per_gpu_sandbox')
207
+ self.max_disk_per_gpu_sandbox = attributes[:'max_disk_per_gpu_sandbox']
208
+ end
209
+ end
210
+
211
+ # Show invalid properties with the reasons. Usually used together with valid?
212
+ # @return Array for valid properties with the reasons
213
+ def list_invalid_properties
214
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
215
+ invalid_properties = Array.new
216
+ invalid_properties
217
+ end
218
+
219
+ # Check to see if the all the properties in the model are valid
220
+ # @return true if the model is valid
221
+ def valid?
222
+ warn '[DEPRECATED] the `valid?` method is obsolete'
223
+ true
224
+ end
225
+
226
+ # Checks equality by comparing each attribute.
227
+ # @param [Object] Object to be compared
228
+ def ==(o)
229
+ return true if self.equal?(o)
230
+ self.class == o.class &&
231
+ sandbox_class == o.sandbox_class &&
232
+ total_cpu_quota == o.total_cpu_quota &&
233
+ total_memory_quota == o.total_memory_quota &&
234
+ total_disk_quota == o.total_disk_quota &&
235
+ total_gpu_quota == o.total_gpu_quota &&
236
+ allowed_gpu_types == o.allowed_gpu_types &&
237
+ max_cpu_per_sandbox == o.max_cpu_per_sandbox &&
238
+ max_memory_per_sandbox == o.max_memory_per_sandbox &&
239
+ max_disk_per_sandbox == o.max_disk_per_sandbox &&
240
+ max_disk_per_non_ephemeral_sandbox == o.max_disk_per_non_ephemeral_sandbox &&
241
+ max_cpu_per_gpu_sandbox == o.max_cpu_per_gpu_sandbox &&
242
+ max_memory_per_gpu_sandbox == o.max_memory_per_gpu_sandbox &&
243
+ max_disk_per_gpu_sandbox == o.max_disk_per_gpu_sandbox
244
+ end
245
+
246
+ # @see the `==` method
247
+ # @param [Object] Object to be compared
248
+ def eql?(o)
249
+ self == o
250
+ end
251
+
252
+ # Calculates hash code according to all attributes.
253
+ # @return [Integer] Hash code
254
+ def hash
255
+ [sandbox_class, total_cpu_quota, total_memory_quota, total_disk_quota, total_gpu_quota, allowed_gpu_types, max_cpu_per_sandbox, max_memory_per_sandbox, max_disk_per_sandbox, max_disk_per_non_ephemeral_sandbox, max_cpu_per_gpu_sandbox, max_memory_per_gpu_sandbox, max_disk_per_gpu_sandbox].hash
256
+ end
257
+
258
+ # Builds the object from hash
259
+ # @param [Hash] attributes Model attributes in the form of hash
260
+ # @return [Object] Returns the model itself
261
+ def self.build_from_hash(attributes)
262
+ return nil unless attributes.is_a?(Hash)
263
+ attributes = attributes.transform_keys(&:to_sym)
264
+ transformed_hash = {}
265
+ openapi_types.each_pair do |key, type|
266
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
267
+ transformed_hash["#{key}"] = nil
268
+ elsif type =~ /\AArray<(.*)>/i
269
+ # check to ensure the input is an array given that the attribute
270
+ # is documented as an array but the input is not
271
+ if attributes[attribute_map[key]].is_a?(Array)
272
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
273
+ end
274
+ elsif !attributes[attribute_map[key]].nil?
275
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
276
+ end
277
+ end
278
+ new(transformed_hash)
279
+ end
280
+
281
+ # Returns the object in the form of hash
282
+ # @return [Hash] Returns the object in the form of hash
283
+ def to_hash
284
+ hash = {}
285
+ self.class.attribute_map.each_pair do |attr, param|
286
+ value = self.send(attr)
287
+ if value.nil?
288
+ is_nullable = self.class.openapi_nullable.include?(attr)
289
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
290
+ end
291
+
292
+ hash[param] = _to_hash(value)
293
+ end
294
+ hash
295
+ end
296
+
297
+ end
298
+
299
+ end