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,369 @@
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 AuditLog < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :actor_id
21
+
22
+ attr_accessor :actor_email
23
+
24
+ attr_accessor :actor_api_key_prefix
25
+
26
+ attr_accessor :actor_api_key_suffix
27
+
28
+ attr_accessor :organization_id
29
+
30
+ attr_accessor :action
31
+
32
+ attr_accessor :target_type
33
+
34
+ attr_accessor :target_id
35
+
36
+ attr_accessor :status_code
37
+
38
+ attr_accessor :error_message
39
+
40
+ attr_accessor :ip_address
41
+
42
+ attr_accessor :user_agent
43
+
44
+ attr_accessor :source
45
+
46
+ attr_accessor :metadata
47
+
48
+ attr_accessor :created_at
49
+
50
+ # Attribute mapping from ruby-style variable name to JSON key.
51
+ def self.attribute_map
52
+ {
53
+ :'id' => :'id',
54
+ :'actor_id' => :'actorId',
55
+ :'actor_email' => :'actorEmail',
56
+ :'actor_api_key_prefix' => :'actorApiKeyPrefix',
57
+ :'actor_api_key_suffix' => :'actorApiKeySuffix',
58
+ :'organization_id' => :'organizationId',
59
+ :'action' => :'action',
60
+ :'target_type' => :'targetType',
61
+ :'target_id' => :'targetId',
62
+ :'status_code' => :'statusCode',
63
+ :'error_message' => :'errorMessage',
64
+ :'ip_address' => :'ipAddress',
65
+ :'user_agent' => :'userAgent',
66
+ :'source' => :'source',
67
+ :'metadata' => :'metadata',
68
+ :'created_at' => :'createdAt'
69
+ }
70
+ end
71
+
72
+ # Returns attribute mapping this model knows about
73
+ def self.acceptable_attribute_map
74
+ attribute_map
75
+ end
76
+
77
+ # Returns all the JSON keys this model knows about
78
+ def self.acceptable_attributes
79
+ acceptable_attribute_map.values
80
+ end
81
+
82
+ # Attribute type mapping.
83
+ def self.openapi_types
84
+ {
85
+ :'id' => :'String',
86
+ :'actor_id' => :'String',
87
+ :'actor_email' => :'String',
88
+ :'actor_api_key_prefix' => :'String',
89
+ :'actor_api_key_suffix' => :'String',
90
+ :'organization_id' => :'String',
91
+ :'action' => :'String',
92
+ :'target_type' => :'String',
93
+ :'target_id' => :'String',
94
+ :'status_code' => :'Float',
95
+ :'error_message' => :'String',
96
+ :'ip_address' => :'String',
97
+ :'user_agent' => :'String',
98
+ :'source' => :'String',
99
+ :'metadata' => :'Hash<String, Object>',
100
+ :'created_at' => :'Time'
101
+ }
102
+ end
103
+
104
+ # List of attributes with nullable: true
105
+ def self.openapi_nullable
106
+ Set.new([
107
+ ])
108
+ end
109
+
110
+ # Initializes the object
111
+ # @param [Hash] attributes Model attributes in the form of hash
112
+ def initialize(attributes = {})
113
+ if (!attributes.is_a?(Hash))
114
+ fail ArgumentError, "The input argument (attributes) must be a hash in `NightonaApiClient::AuditLog` initialize method"
115
+ end
116
+
117
+ # check to see if the attribute exists and convert string to symbol for hash key
118
+ acceptable_attribute_map = self.class.acceptable_attribute_map
119
+ attributes = attributes.each_with_object({}) { |(k, v), h|
120
+ if (!acceptable_attribute_map.key?(k.to_sym))
121
+ fail ArgumentError, "`#{k}` is not a valid attribute in `NightonaApiClient::AuditLog`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
122
+ end
123
+ h[k.to_sym] = v
124
+ }
125
+
126
+ if attributes.key?(:'id')
127
+ self.id = attributes[:'id']
128
+ else
129
+ self.id = nil
130
+ end
131
+
132
+ if attributes.key?(:'actor_id')
133
+ self.actor_id = attributes[:'actor_id']
134
+ else
135
+ self.actor_id = nil
136
+ end
137
+
138
+ if attributes.key?(:'actor_email')
139
+ self.actor_email = attributes[:'actor_email']
140
+ else
141
+ self.actor_email = nil
142
+ end
143
+
144
+ if attributes.key?(:'actor_api_key_prefix')
145
+ self.actor_api_key_prefix = attributes[:'actor_api_key_prefix']
146
+ end
147
+
148
+ if attributes.key?(:'actor_api_key_suffix')
149
+ self.actor_api_key_suffix = attributes[:'actor_api_key_suffix']
150
+ end
151
+
152
+ if attributes.key?(:'organization_id')
153
+ self.organization_id = attributes[:'organization_id']
154
+ end
155
+
156
+ if attributes.key?(:'action')
157
+ self.action = attributes[:'action']
158
+ else
159
+ self.action = nil
160
+ end
161
+
162
+ if attributes.key?(:'target_type')
163
+ self.target_type = attributes[:'target_type']
164
+ end
165
+
166
+ if attributes.key?(:'target_id')
167
+ self.target_id = attributes[:'target_id']
168
+ end
169
+
170
+ if attributes.key?(:'status_code')
171
+ self.status_code = attributes[:'status_code']
172
+ end
173
+
174
+ if attributes.key?(:'error_message')
175
+ self.error_message = attributes[:'error_message']
176
+ end
177
+
178
+ if attributes.key?(:'ip_address')
179
+ self.ip_address = attributes[:'ip_address']
180
+ end
181
+
182
+ if attributes.key?(:'user_agent')
183
+ self.user_agent = attributes[:'user_agent']
184
+ end
185
+
186
+ if attributes.key?(:'source')
187
+ self.source = attributes[:'source']
188
+ end
189
+
190
+ if attributes.key?(:'metadata')
191
+ if (value = attributes[:'metadata']).is_a?(Hash)
192
+ self.metadata = value
193
+ end
194
+ end
195
+
196
+ if attributes.key?(:'created_at')
197
+ self.created_at = attributes[:'created_at']
198
+ else
199
+ self.created_at = nil
200
+ end
201
+ end
202
+
203
+ # Show invalid properties with the reasons. Usually used together with valid?
204
+ # @return Array for valid properties with the reasons
205
+ def list_invalid_properties
206
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
207
+ invalid_properties = Array.new
208
+ if @id.nil?
209
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
210
+ end
211
+
212
+ if @actor_id.nil?
213
+ invalid_properties.push('invalid value for "actor_id", actor_id cannot be nil.')
214
+ end
215
+
216
+ if @actor_email.nil?
217
+ invalid_properties.push('invalid value for "actor_email", actor_email cannot be nil.')
218
+ end
219
+
220
+ if @action.nil?
221
+ invalid_properties.push('invalid value for "action", action cannot be nil.')
222
+ end
223
+
224
+ if @created_at.nil?
225
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
226
+ end
227
+
228
+ invalid_properties
229
+ end
230
+
231
+ # Check to see if the all the properties in the model are valid
232
+ # @return true if the model is valid
233
+ def valid?
234
+ warn '[DEPRECATED] the `valid?` method is obsolete'
235
+ return false if @id.nil?
236
+ return false if @actor_id.nil?
237
+ return false if @actor_email.nil?
238
+ return false if @action.nil?
239
+ return false if @created_at.nil?
240
+ true
241
+ end
242
+
243
+ # Custom attribute writer method with validation
244
+ # @param [Object] id Value to be assigned
245
+ def id=(id)
246
+ if id.nil?
247
+ fail ArgumentError, 'id cannot be nil'
248
+ end
249
+
250
+ @id = id
251
+ end
252
+
253
+ # Custom attribute writer method with validation
254
+ # @param [Object] actor_id Value to be assigned
255
+ def actor_id=(actor_id)
256
+ if actor_id.nil?
257
+ fail ArgumentError, 'actor_id cannot be nil'
258
+ end
259
+
260
+ @actor_id = actor_id
261
+ end
262
+
263
+ # Custom attribute writer method with validation
264
+ # @param [Object] actor_email Value to be assigned
265
+ def actor_email=(actor_email)
266
+ if actor_email.nil?
267
+ fail ArgumentError, 'actor_email cannot be nil'
268
+ end
269
+
270
+ @actor_email = actor_email
271
+ end
272
+
273
+ # Custom attribute writer method with validation
274
+ # @param [Object] action Value to be assigned
275
+ def action=(action)
276
+ if action.nil?
277
+ fail ArgumentError, 'action cannot be nil'
278
+ end
279
+
280
+ @action = action
281
+ end
282
+
283
+ # Custom attribute writer method with validation
284
+ # @param [Object] created_at Value to be assigned
285
+ def created_at=(created_at)
286
+ if created_at.nil?
287
+ fail ArgumentError, 'created_at cannot be nil'
288
+ end
289
+
290
+ @created_at = created_at
291
+ end
292
+
293
+ # Checks equality by comparing each attribute.
294
+ # @param [Object] Object to be compared
295
+ def ==(o)
296
+ return true if self.equal?(o)
297
+ self.class == o.class &&
298
+ id == o.id &&
299
+ actor_id == o.actor_id &&
300
+ actor_email == o.actor_email &&
301
+ actor_api_key_prefix == o.actor_api_key_prefix &&
302
+ actor_api_key_suffix == o.actor_api_key_suffix &&
303
+ organization_id == o.organization_id &&
304
+ action == o.action &&
305
+ target_type == o.target_type &&
306
+ target_id == o.target_id &&
307
+ status_code == o.status_code &&
308
+ error_message == o.error_message &&
309
+ ip_address == o.ip_address &&
310
+ user_agent == o.user_agent &&
311
+ source == o.source &&
312
+ metadata == o.metadata &&
313
+ created_at == o.created_at
314
+ end
315
+
316
+ # @see the `==` method
317
+ # @param [Object] Object to be compared
318
+ def eql?(o)
319
+ self == o
320
+ end
321
+
322
+ # Calculates hash code according to all attributes.
323
+ # @return [Integer] Hash code
324
+ def hash
325
+ [id, actor_id, actor_email, actor_api_key_prefix, actor_api_key_suffix, organization_id, action, target_type, target_id, status_code, error_message, ip_address, user_agent, source, metadata, created_at].hash
326
+ end
327
+
328
+ # Builds the object from hash
329
+ # @param [Hash] attributes Model attributes in the form of hash
330
+ # @return [Object] Returns the model itself
331
+ def self.build_from_hash(attributes)
332
+ return nil unless attributes.is_a?(Hash)
333
+ attributes = attributes.transform_keys(&:to_sym)
334
+ transformed_hash = {}
335
+ openapi_types.each_pair do |key, type|
336
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
337
+ transformed_hash["#{key}"] = nil
338
+ elsif type =~ /\AArray<(.*)>/i
339
+ # check to ensure the input is an array given that the attribute
340
+ # is documented as an array but the input is not
341
+ if attributes[attribute_map[key]].is_a?(Array)
342
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
343
+ end
344
+ elsif !attributes[attribute_map[key]].nil?
345
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
346
+ end
347
+ end
348
+ new(transformed_hash)
349
+ end
350
+
351
+ # Returns the object in the form of hash
352
+ # @return [Hash] Returns the object in the form of hash
353
+ def to_hash
354
+ hash = {}
355
+ self.class.attribute_map.each_pair do |attr, param|
356
+ value = self.send(attr)
357
+ if value.nil?
358
+ is_nullable = self.class.openapi_nullable.include?(attr)
359
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
360
+ end
361
+
362
+ hash[param] = _to_hash(value)
363
+ end
364
+ hash
365
+ end
366
+
367
+ end
368
+
369
+ end
@@ -0,0 +1,241 @@
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 BuildInfo < ApiModelBase
18
+ # The Dockerfile content used for the build
19
+ attr_accessor :dockerfile_content
20
+
21
+ # The context hashes used for the build
22
+ attr_accessor :context_hashes
23
+
24
+ # The creation timestamp
25
+ attr_accessor :created_at
26
+
27
+ # The last update timestamp
28
+ attr_accessor :updated_at
29
+
30
+ # The snapshot reference
31
+ attr_accessor :snapshot_ref
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'dockerfile_content' => :'dockerfileContent',
37
+ :'context_hashes' => :'contextHashes',
38
+ :'created_at' => :'createdAt',
39
+ :'updated_at' => :'updatedAt',
40
+ :'snapshot_ref' => :'snapshotRef'
41
+ }
42
+ end
43
+
44
+ # Returns attribute mapping this model knows about
45
+ def self.acceptable_attribute_map
46
+ attribute_map
47
+ end
48
+
49
+ # Returns all the JSON keys this model knows about
50
+ def self.acceptable_attributes
51
+ acceptable_attribute_map.values
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.openapi_types
56
+ {
57
+ :'dockerfile_content' => :'String',
58
+ :'context_hashes' => :'Array<String>',
59
+ :'created_at' => :'Time',
60
+ :'updated_at' => :'Time',
61
+ :'snapshot_ref' => :'String'
62
+ }
63
+ end
64
+
65
+ # List of attributes with nullable: true
66
+ def self.openapi_nullable
67
+ Set.new([
68
+ ])
69
+ end
70
+
71
+ # Initializes the object
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `NightonaApiClient::BuildInfo` initialize method"
76
+ end
77
+
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ acceptable_attribute_map = self.class.acceptable_attribute_map
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ if (!acceptable_attribute_map.key?(k.to_sym))
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `NightonaApiClient::BuildInfo`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
83
+ end
84
+ h[k.to_sym] = v
85
+ }
86
+
87
+ if attributes.key?(:'dockerfile_content')
88
+ self.dockerfile_content = attributes[:'dockerfile_content']
89
+ end
90
+
91
+ if attributes.key?(:'context_hashes')
92
+ if (value = attributes[:'context_hashes']).is_a?(Array)
93
+ self.context_hashes = value
94
+ end
95
+ end
96
+
97
+ if attributes.key?(:'created_at')
98
+ self.created_at = attributes[:'created_at']
99
+ else
100
+ self.created_at = nil
101
+ end
102
+
103
+ if attributes.key?(:'updated_at')
104
+ self.updated_at = attributes[:'updated_at']
105
+ else
106
+ self.updated_at = nil
107
+ end
108
+
109
+ if attributes.key?(:'snapshot_ref')
110
+ self.snapshot_ref = attributes[:'snapshot_ref']
111
+ else
112
+ self.snapshot_ref = nil
113
+ end
114
+ end
115
+
116
+ # Show invalid properties with the reasons. Usually used together with valid?
117
+ # @return Array for valid properties with the reasons
118
+ def list_invalid_properties
119
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
120
+ invalid_properties = Array.new
121
+ if @created_at.nil?
122
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
123
+ end
124
+
125
+ if @updated_at.nil?
126
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
127
+ end
128
+
129
+ if @snapshot_ref.nil?
130
+ invalid_properties.push('invalid value for "snapshot_ref", snapshot_ref cannot be nil.')
131
+ end
132
+
133
+ invalid_properties
134
+ end
135
+
136
+ # Check to see if the all the properties in the model are valid
137
+ # @return true if the model is valid
138
+ def valid?
139
+ warn '[DEPRECATED] the `valid?` method is obsolete'
140
+ return false if @created_at.nil?
141
+ return false if @updated_at.nil?
142
+ return false if @snapshot_ref.nil?
143
+ true
144
+ end
145
+
146
+ # Custom attribute writer method with validation
147
+ # @param [Object] created_at Value to be assigned
148
+ def created_at=(created_at)
149
+ if created_at.nil?
150
+ fail ArgumentError, 'created_at cannot be nil'
151
+ end
152
+
153
+ @created_at = created_at
154
+ end
155
+
156
+ # Custom attribute writer method with validation
157
+ # @param [Object] updated_at Value to be assigned
158
+ def updated_at=(updated_at)
159
+ if updated_at.nil?
160
+ fail ArgumentError, 'updated_at cannot be nil'
161
+ end
162
+
163
+ @updated_at = updated_at
164
+ end
165
+
166
+ # Custom attribute writer method with validation
167
+ # @param [Object] snapshot_ref Value to be assigned
168
+ def snapshot_ref=(snapshot_ref)
169
+ if snapshot_ref.nil?
170
+ fail ArgumentError, 'snapshot_ref cannot be nil'
171
+ end
172
+
173
+ @snapshot_ref = snapshot_ref
174
+ end
175
+
176
+ # Checks equality by comparing each attribute.
177
+ # @param [Object] Object to be compared
178
+ def ==(o)
179
+ return true if self.equal?(o)
180
+ self.class == o.class &&
181
+ dockerfile_content == o.dockerfile_content &&
182
+ context_hashes == o.context_hashes &&
183
+ created_at == o.created_at &&
184
+ updated_at == o.updated_at &&
185
+ snapshot_ref == o.snapshot_ref
186
+ end
187
+
188
+ # @see the `==` method
189
+ # @param [Object] Object to be compared
190
+ def eql?(o)
191
+ self == o
192
+ end
193
+
194
+ # Calculates hash code according to all attributes.
195
+ # @return [Integer] Hash code
196
+ def hash
197
+ [dockerfile_content, context_hashes, created_at, updated_at, snapshot_ref].hash
198
+ end
199
+
200
+ # Builds the object from hash
201
+ # @param [Hash] attributes Model attributes in the form of hash
202
+ # @return [Object] Returns the model itself
203
+ def self.build_from_hash(attributes)
204
+ return nil unless attributes.is_a?(Hash)
205
+ attributes = attributes.transform_keys(&:to_sym)
206
+ transformed_hash = {}
207
+ openapi_types.each_pair do |key, type|
208
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
209
+ transformed_hash["#{key}"] = nil
210
+ elsif type =~ /\AArray<(.*)>/i
211
+ # check to ensure the input is an array given that the attribute
212
+ # is documented as an array but the input is not
213
+ if attributes[attribute_map[key]].is_a?(Array)
214
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
215
+ end
216
+ elsif !attributes[attribute_map[key]].nil?
217
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
218
+ end
219
+ end
220
+ new(transformed_hash)
221
+ end
222
+
223
+ # Returns the object in the form of hash
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_hash
226
+ hash = {}
227
+ self.class.attribute_map.each_pair do |attr, param|
228
+ value = self.send(attr)
229
+ if value.nil?
230
+ is_nullable = self.class.openapi_nullable.include?(attr)
231
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
232
+ end
233
+
234
+ hash[param] = _to_hash(value)
235
+ end
236
+ hash
237
+ end
238
+
239
+ end
240
+
241
+ end