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,242 @@
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 FileStatus < ApiModelBase
18
+ attr_accessor :name
19
+
20
+ attr_accessor :staging
21
+
22
+ attr_accessor :worktree
23
+
24
+ attr_accessor :extra
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'name' => :'name',
30
+ :'staging' => :'staging',
31
+ :'worktree' => :'worktree',
32
+ :'extra' => :'extra'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'name' => :'String',
50
+ :'staging' => :'String',
51
+ :'worktree' => :'String',
52
+ :'extra' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `NightonaApiClient::FileStatus` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `NightonaApiClient::FileStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'name')
79
+ self.name = attributes[:'name']
80
+ else
81
+ self.name = nil
82
+ end
83
+
84
+ if attributes.key?(:'staging')
85
+ self.staging = attributes[:'staging']
86
+ else
87
+ self.staging = nil
88
+ end
89
+
90
+ if attributes.key?(:'worktree')
91
+ self.worktree = attributes[:'worktree']
92
+ else
93
+ self.worktree = nil
94
+ end
95
+
96
+ if attributes.key?(:'extra')
97
+ self.extra = attributes[:'extra']
98
+ else
99
+ self.extra = nil
100
+ end
101
+ end
102
+
103
+ # Show invalid properties with the reasons. Usually used together with valid?
104
+ # @return Array for valid properties with the reasons
105
+ def list_invalid_properties
106
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
107
+ invalid_properties = Array.new
108
+ if @name.nil?
109
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
110
+ end
111
+
112
+ if @staging.nil?
113
+ invalid_properties.push('invalid value for "staging", staging cannot be nil.')
114
+ end
115
+
116
+ if @worktree.nil?
117
+ invalid_properties.push('invalid value for "worktree", worktree cannot be nil.')
118
+ end
119
+
120
+ if @extra.nil?
121
+ invalid_properties.push('invalid value for "extra", extra cannot be nil.')
122
+ end
123
+
124
+ invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+ warn '[DEPRECATED] the `valid?` method is obsolete'
131
+ return false if @name.nil?
132
+ return false if @staging.nil?
133
+ return false if @worktree.nil?
134
+ return false if @extra.nil?
135
+ true
136
+ end
137
+
138
+ # Custom attribute writer method with validation
139
+ # @param [Object] name Value to be assigned
140
+ def name=(name)
141
+ if name.nil?
142
+ fail ArgumentError, 'name cannot be nil'
143
+ end
144
+
145
+ @name = name
146
+ end
147
+
148
+ # Custom attribute writer method with validation
149
+ # @param [Object] staging Value to be assigned
150
+ def staging=(staging)
151
+ if staging.nil?
152
+ fail ArgumentError, 'staging cannot be nil'
153
+ end
154
+
155
+ @staging = staging
156
+ end
157
+
158
+ # Custom attribute writer method with validation
159
+ # @param [Object] worktree Value to be assigned
160
+ def worktree=(worktree)
161
+ if worktree.nil?
162
+ fail ArgumentError, 'worktree cannot be nil'
163
+ end
164
+
165
+ @worktree = worktree
166
+ end
167
+
168
+ # Custom attribute writer method with validation
169
+ # @param [Object] extra Value to be assigned
170
+ def extra=(extra)
171
+ if extra.nil?
172
+ fail ArgumentError, 'extra cannot be nil'
173
+ end
174
+
175
+ @extra = extra
176
+ end
177
+
178
+ # Checks equality by comparing each attribute.
179
+ # @param [Object] Object to be compared
180
+ def ==(o)
181
+ return true if self.equal?(o)
182
+ self.class == o.class &&
183
+ name == o.name &&
184
+ staging == o.staging &&
185
+ worktree == o.worktree &&
186
+ extra == o.extra
187
+ end
188
+
189
+ # @see the `==` method
190
+ # @param [Object] Object to be compared
191
+ def eql?(o)
192
+ self == o
193
+ end
194
+
195
+ # Calculates hash code according to all attributes.
196
+ # @return [Integer] Hash code
197
+ def hash
198
+ [name, staging, worktree, extra].hash
199
+ end
200
+
201
+ # Builds the object from hash
202
+ # @param [Hash] attributes Model attributes in the form of hash
203
+ # @return [Object] Returns the model itself
204
+ def self.build_from_hash(attributes)
205
+ return nil unless attributes.is_a?(Hash)
206
+ attributes = attributes.transform_keys(&:to_sym)
207
+ transformed_hash = {}
208
+ openapi_types.each_pair do |key, type|
209
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
210
+ transformed_hash["#{key}"] = nil
211
+ elsif type =~ /\AArray<(.*)>/i
212
+ # check to ensure the input is an array given that the attribute
213
+ # is documented as an array but the input is not
214
+ if attributes[attribute_map[key]].is_a?(Array)
215
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
216
+ end
217
+ elsif !attributes[attribute_map[key]].nil?
218
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
219
+ end
220
+ end
221
+ new(transformed_hash)
222
+ end
223
+
224
+ # Returns the object in the form of hash
225
+ # @return [Hash] Returns the object in the form of hash
226
+ def to_hash
227
+ hash = {}
228
+ self.class.attribute_map.each_pair do |attr, param|
229
+ value = self.send(attr)
230
+ if value.nil?
231
+ is_nullable = self.class.openapi_nullable.include?(attr)
232
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
233
+ end
234
+
235
+ hash[param] = _to_hash(value)
236
+ end
237
+ hash
238
+ end
239
+
240
+ end
241
+
242
+ end
@@ -0,0 +1,148 @@
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 ForkSandbox < ApiModelBase
18
+ # The name for the forked sandbox. If not provided, a unique name will be generated.
19
+ attr_accessor :name
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'name' => :'name'
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
+ :'name' => :'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::ForkSandbox` 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::ForkSandbox`. 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?(:'name')
68
+ self.name = attributes[:'name']
69
+ end
70
+ end
71
+
72
+ # Show invalid properties with the reasons. Usually used together with valid?
73
+ # @return Array for valid properties with the reasons
74
+ def list_invalid_properties
75
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ warn '[DEPRECATED] the `valid?` method is obsolete'
84
+ true
85
+ end
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ name == o.name
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [name].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def self.build_from_hash(attributes)
111
+ return nil unless attributes.is_a?(Hash)
112
+ attributes = attributes.transform_keys(&:to_sym)
113
+ transformed_hash = {}
114
+ openapi_types.each_pair do |key, type|
115
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
116
+ transformed_hash["#{key}"] = nil
117
+ elsif type =~ /\AArray<(.*)>/i
118
+ # check to ensure the input is an array given that the attribute
119
+ # is documented as an array but the input is not
120
+ if attributes[attribute_map[key]].is_a?(Array)
121
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
122
+ end
123
+ elsif !attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
125
+ end
126
+ end
127
+ new(transformed_hash)
128
+ end
129
+
130
+ # Returns the object in the form of hash
131
+ # @return [Hash] Returns the object in the form of hash
132
+ def to_hash
133
+ hash = {}
134
+ self.class.attribute_map.each_pair do |attr, param|
135
+ value = self.send(attr)
136
+ if value.nil?
137
+ is_nullable = self.class.openapi_nullable.include?(attr)
138
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
139
+ end
140
+
141
+ hash[param] = _to_hash(value)
142
+ end
143
+ hash
144
+ end
145
+
146
+ end
147
+
148
+ end
@@ -0,0 +1,193 @@
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 GitAddRequest < ApiModelBase
18
+ attr_accessor :path
19
+
20
+ # files to add (use . for all files)
21
+ attr_accessor :files
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'path' => :'path',
27
+ :'files' => :'files'
28
+ }
29
+ end
30
+
31
+ # Returns attribute mapping this model knows about
32
+ def self.acceptable_attribute_map
33
+ attribute_map
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ acceptable_attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'path' => :'String',
45
+ :'files' => :'Array<String>'
46
+ }
47
+ end
48
+
49
+ # List of attributes with nullable: true
50
+ def self.openapi_nullable
51
+ Set.new([
52
+ ])
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ if (!attributes.is_a?(Hash))
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `NightonaApiClient::GitAddRequest` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ acceptable_attribute_map = self.class.acceptable_attribute_map
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!acceptable_attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `NightonaApiClient::GitAddRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'path')
72
+ self.path = attributes[:'path']
73
+ else
74
+ self.path = nil
75
+ end
76
+
77
+ if attributes.key?(:'files')
78
+ if (value = attributes[:'files']).is_a?(Array)
79
+ self.files = value
80
+ end
81
+ else
82
+ self.files = nil
83
+ end
84
+ end
85
+
86
+ # Show invalid properties with the reasons. Usually used together with valid?
87
+ # @return Array for valid properties with the reasons
88
+ def list_invalid_properties
89
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
90
+ invalid_properties = Array.new
91
+ if @path.nil?
92
+ invalid_properties.push('invalid value for "path", path cannot be nil.')
93
+ end
94
+
95
+ if @files.nil?
96
+ invalid_properties.push('invalid value for "files", files cannot be nil.')
97
+ end
98
+
99
+ invalid_properties
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ def valid?
105
+ warn '[DEPRECATED] the `valid?` method is obsolete'
106
+ return false if @path.nil?
107
+ return false if @files.nil?
108
+ true
109
+ end
110
+
111
+ # Custom attribute writer method with validation
112
+ # @param [Object] path Value to be assigned
113
+ def path=(path)
114
+ if path.nil?
115
+ fail ArgumentError, 'path cannot be nil'
116
+ end
117
+
118
+ @path = path
119
+ end
120
+
121
+ # Custom attribute writer method with validation
122
+ # @param [Object] files Value to be assigned
123
+ def files=(files)
124
+ if files.nil?
125
+ fail ArgumentError, 'files cannot be nil'
126
+ end
127
+
128
+ @files = files
129
+ end
130
+
131
+ # Checks equality by comparing each attribute.
132
+ # @param [Object] Object to be compared
133
+ def ==(o)
134
+ return true if self.equal?(o)
135
+ self.class == o.class &&
136
+ path == o.path &&
137
+ files == o.files
138
+ end
139
+
140
+ # @see the `==` method
141
+ # @param [Object] Object to be compared
142
+ def eql?(o)
143
+ self == o
144
+ end
145
+
146
+ # Calculates hash code according to all attributes.
147
+ # @return [Integer] Hash code
148
+ def hash
149
+ [path, files].hash
150
+ end
151
+
152
+ # Builds the object from hash
153
+ # @param [Hash] attributes Model attributes in the form of hash
154
+ # @return [Object] Returns the model itself
155
+ def self.build_from_hash(attributes)
156
+ return nil unless attributes.is_a?(Hash)
157
+ attributes = attributes.transform_keys(&:to_sym)
158
+ transformed_hash = {}
159
+ openapi_types.each_pair do |key, type|
160
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
161
+ transformed_hash["#{key}"] = nil
162
+ elsif type =~ /\AArray<(.*)>/i
163
+ # check to ensure the input is an array given that the attribute
164
+ # is documented as an array but the input is not
165
+ if attributes[attribute_map[key]].is_a?(Array)
166
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
167
+ end
168
+ elsif !attributes[attribute_map[key]].nil?
169
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
170
+ end
171
+ end
172
+ new(transformed_hash)
173
+ end
174
+
175
+ # Returns the object in the form of hash
176
+ # @return [Hash] Returns the object in the form of hash
177
+ def to_hash
178
+ hash = {}
179
+ self.class.attribute_map.each_pair do |attr, param|
180
+ value = self.send(attr)
181
+ if value.nil?
182
+ is_nullable = self.class.openapi_nullable.include?(attr)
183
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
184
+ end
185
+
186
+ hash[param] = _to_hash(value)
187
+ end
188
+ hash
189
+ end
190
+
191
+ end
192
+
193
+ end