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,300 @@
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 RegistryPushAccessDto < ApiModelBase
18
+ # Temporary username for registry authentication
19
+ attr_accessor :username
20
+
21
+ # Temporary secret for registry authentication
22
+ attr_accessor :secret
23
+
24
+ # Registry URL
25
+ attr_accessor :registry_url
26
+
27
+ # Registry ID
28
+ attr_accessor :registry_id
29
+
30
+ # Registry project ID
31
+ attr_accessor :project
32
+
33
+ # Token expiration time in ISO format
34
+ attr_accessor :expires_at
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'username' => :'username',
40
+ :'secret' => :'secret',
41
+ :'registry_url' => :'registryUrl',
42
+ :'registry_id' => :'registryId',
43
+ :'project' => :'project',
44
+ :'expires_at' => :'expiresAt'
45
+ }
46
+ end
47
+
48
+ # Returns attribute mapping this model knows about
49
+ def self.acceptable_attribute_map
50
+ attribute_map
51
+ end
52
+
53
+ # Returns all the JSON keys this model knows about
54
+ def self.acceptable_attributes
55
+ acceptable_attribute_map.values
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.openapi_types
60
+ {
61
+ :'username' => :'String',
62
+ :'secret' => :'String',
63
+ :'registry_url' => :'String',
64
+ :'registry_id' => :'String',
65
+ :'project' => :'String',
66
+ :'expires_at' => :'String'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `NightonaApiClient::RegistryPushAccessDto` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ acceptable_attribute_map = self.class.acceptable_attribute_map
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!acceptable_attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `NightonaApiClient::RegistryPushAccessDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'username')
93
+ self.username = attributes[:'username']
94
+ else
95
+ self.username = nil
96
+ end
97
+
98
+ if attributes.key?(:'secret')
99
+ self.secret = attributes[:'secret']
100
+ else
101
+ self.secret = nil
102
+ end
103
+
104
+ if attributes.key?(:'registry_url')
105
+ self.registry_url = attributes[:'registry_url']
106
+ else
107
+ self.registry_url = nil
108
+ end
109
+
110
+ if attributes.key?(:'registry_id')
111
+ self.registry_id = attributes[:'registry_id']
112
+ else
113
+ self.registry_id = nil
114
+ end
115
+
116
+ if attributes.key?(:'project')
117
+ self.project = attributes[:'project']
118
+ else
119
+ self.project = nil
120
+ end
121
+
122
+ if attributes.key?(:'expires_at')
123
+ self.expires_at = attributes[:'expires_at']
124
+ else
125
+ self.expires_at = nil
126
+ end
127
+ end
128
+
129
+ # Show invalid properties with the reasons. Usually used together with valid?
130
+ # @return Array for valid properties with the reasons
131
+ def list_invalid_properties
132
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
133
+ invalid_properties = Array.new
134
+ if @username.nil?
135
+ invalid_properties.push('invalid value for "username", username cannot be nil.')
136
+ end
137
+
138
+ if @secret.nil?
139
+ invalid_properties.push('invalid value for "secret", secret cannot be nil.')
140
+ end
141
+
142
+ if @registry_url.nil?
143
+ invalid_properties.push('invalid value for "registry_url", registry_url cannot be nil.')
144
+ end
145
+
146
+ if @registry_id.nil?
147
+ invalid_properties.push('invalid value for "registry_id", registry_id cannot be nil.')
148
+ end
149
+
150
+ if @project.nil?
151
+ invalid_properties.push('invalid value for "project", project cannot be nil.')
152
+ end
153
+
154
+ if @expires_at.nil?
155
+ invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.')
156
+ end
157
+
158
+ invalid_properties
159
+ end
160
+
161
+ # Check to see if the all the properties in the model are valid
162
+ # @return true if the model is valid
163
+ def valid?
164
+ warn '[DEPRECATED] the `valid?` method is obsolete'
165
+ return false if @username.nil?
166
+ return false if @secret.nil?
167
+ return false if @registry_url.nil?
168
+ return false if @registry_id.nil?
169
+ return false if @project.nil?
170
+ return false if @expires_at.nil?
171
+ true
172
+ end
173
+
174
+ # Custom attribute writer method with validation
175
+ # @param [Object] username Value to be assigned
176
+ def username=(username)
177
+ if username.nil?
178
+ fail ArgumentError, 'username cannot be nil'
179
+ end
180
+
181
+ @username = username
182
+ end
183
+
184
+ # Custom attribute writer method with validation
185
+ # @param [Object] secret Value to be assigned
186
+ def secret=(secret)
187
+ if secret.nil?
188
+ fail ArgumentError, 'secret cannot be nil'
189
+ end
190
+
191
+ @secret = secret
192
+ end
193
+
194
+ # Custom attribute writer method with validation
195
+ # @param [Object] registry_url Value to be assigned
196
+ def registry_url=(registry_url)
197
+ if registry_url.nil?
198
+ fail ArgumentError, 'registry_url cannot be nil'
199
+ end
200
+
201
+ @registry_url = registry_url
202
+ end
203
+
204
+ # Custom attribute writer method with validation
205
+ # @param [Object] registry_id Value to be assigned
206
+ def registry_id=(registry_id)
207
+ if registry_id.nil?
208
+ fail ArgumentError, 'registry_id cannot be nil'
209
+ end
210
+
211
+ @registry_id = registry_id
212
+ end
213
+
214
+ # Custom attribute writer method with validation
215
+ # @param [Object] project Value to be assigned
216
+ def project=(project)
217
+ if project.nil?
218
+ fail ArgumentError, 'project cannot be nil'
219
+ end
220
+
221
+ @project = project
222
+ end
223
+
224
+ # Custom attribute writer method with validation
225
+ # @param [Object] expires_at Value to be assigned
226
+ def expires_at=(expires_at)
227
+ if expires_at.nil?
228
+ fail ArgumentError, 'expires_at cannot be nil'
229
+ end
230
+
231
+ @expires_at = expires_at
232
+ end
233
+
234
+ # Checks equality by comparing each attribute.
235
+ # @param [Object] Object to be compared
236
+ def ==(o)
237
+ return true if self.equal?(o)
238
+ self.class == o.class &&
239
+ username == o.username &&
240
+ secret == o.secret &&
241
+ registry_url == o.registry_url &&
242
+ registry_id == o.registry_id &&
243
+ project == o.project &&
244
+ expires_at == o.expires_at
245
+ end
246
+
247
+ # @see the `==` method
248
+ # @param [Object] Object to be compared
249
+ def eql?(o)
250
+ self == o
251
+ end
252
+
253
+ # Calculates hash code according to all attributes.
254
+ # @return [Integer] Hash code
255
+ def hash
256
+ [username, secret, registry_url, registry_id, project, expires_at].hash
257
+ end
258
+
259
+ # Builds the object from hash
260
+ # @param [Hash] attributes Model attributes in the form of hash
261
+ # @return [Object] Returns the model itself
262
+ def self.build_from_hash(attributes)
263
+ return nil unless attributes.is_a?(Hash)
264
+ attributes = attributes.transform_keys(&:to_sym)
265
+ transformed_hash = {}
266
+ openapi_types.each_pair do |key, type|
267
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
268
+ transformed_hash["#{key}"] = nil
269
+ elsif type =~ /\AArray<(.*)>/i
270
+ # check to ensure the input is an array given that the attribute
271
+ # is documented as an array but the input is not
272
+ if attributes[attribute_map[key]].is_a?(Array)
273
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
274
+ end
275
+ elsif !attributes[attribute_map[key]].nil?
276
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
277
+ end
278
+ end
279
+ new(transformed_hash)
280
+ end
281
+
282
+ # Returns the object in the form of hash
283
+ # @return [Hash] Returns the object in the form of hash
284
+ def to_hash
285
+ hash = {}
286
+ self.class.attribute_map.each_pair do |attr, param|
287
+ value = self.send(attr)
288
+ if value.nil?
289
+ is_nullable = self.class.openapi_nullable.include?(attr)
290
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
291
+ end
292
+
293
+ hash[param] = _to_hash(value)
294
+ end
295
+ hash
296
+ end
297
+
298
+ end
299
+
300
+ end
@@ -0,0 +1,218 @@
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 ReplaceRequest < ApiModelBase
18
+ attr_accessor :files
19
+
20
+ attr_accessor :pattern
21
+
22
+ attr_accessor :new_value
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'files' => :'files',
28
+ :'pattern' => :'pattern',
29
+ :'new_value' => :'newValue'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'files' => :'Array<String>',
47
+ :'pattern' => :'String',
48
+ :'new_value' => :'String'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `NightonaApiClient::ReplaceRequest` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `NightonaApiClient::ReplaceRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'files')
75
+ if (value = attributes[:'files']).is_a?(Array)
76
+ self.files = value
77
+ end
78
+ else
79
+ self.files = nil
80
+ end
81
+
82
+ if attributes.key?(:'pattern')
83
+ self.pattern = attributes[:'pattern']
84
+ else
85
+ self.pattern = nil
86
+ end
87
+
88
+ if attributes.key?(:'new_value')
89
+ self.new_value = attributes[:'new_value']
90
+ else
91
+ self.new_value = nil
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ if @files.nil?
101
+ invalid_properties.push('invalid value for "files", files cannot be nil.')
102
+ end
103
+
104
+ if @pattern.nil?
105
+ invalid_properties.push('invalid value for "pattern", pattern cannot be nil.')
106
+ end
107
+
108
+ if @new_value.nil?
109
+ invalid_properties.push('invalid value for "new_value", new_value cannot be nil.')
110
+ end
111
+
112
+ invalid_properties
113
+ end
114
+
115
+ # Check to see if the all the properties in the model are valid
116
+ # @return true if the model is valid
117
+ def valid?
118
+ warn '[DEPRECATED] the `valid?` method is obsolete'
119
+ return false if @files.nil?
120
+ return false if @pattern.nil?
121
+ return false if @new_value.nil?
122
+ true
123
+ end
124
+
125
+ # Custom attribute writer method with validation
126
+ # @param [Object] files Value to be assigned
127
+ def files=(files)
128
+ if files.nil?
129
+ fail ArgumentError, 'files cannot be nil'
130
+ end
131
+
132
+ @files = files
133
+ end
134
+
135
+ # Custom attribute writer method with validation
136
+ # @param [Object] pattern Value to be assigned
137
+ def pattern=(pattern)
138
+ if pattern.nil?
139
+ fail ArgumentError, 'pattern cannot be nil'
140
+ end
141
+
142
+ @pattern = pattern
143
+ end
144
+
145
+ # Custom attribute writer method with validation
146
+ # @param [Object] new_value Value to be assigned
147
+ def new_value=(new_value)
148
+ if new_value.nil?
149
+ fail ArgumentError, 'new_value cannot be nil'
150
+ end
151
+
152
+ @new_value = new_value
153
+ end
154
+
155
+ # Checks equality by comparing each attribute.
156
+ # @param [Object] Object to be compared
157
+ def ==(o)
158
+ return true if self.equal?(o)
159
+ self.class == o.class &&
160
+ files == o.files &&
161
+ pattern == o.pattern &&
162
+ new_value == o.new_value
163
+ end
164
+
165
+ # @see the `==` method
166
+ # @param [Object] Object to be compared
167
+ def eql?(o)
168
+ self == o
169
+ end
170
+
171
+ # Calculates hash code according to all attributes.
172
+ # @return [Integer] Hash code
173
+ def hash
174
+ [files, pattern, new_value].hash
175
+ end
176
+
177
+ # Builds the object from hash
178
+ # @param [Hash] attributes Model attributes in the form of hash
179
+ # @return [Object] Returns the model itself
180
+ def self.build_from_hash(attributes)
181
+ return nil unless attributes.is_a?(Hash)
182
+ attributes = attributes.transform_keys(&:to_sym)
183
+ transformed_hash = {}
184
+ openapi_types.each_pair do |key, type|
185
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
186
+ transformed_hash["#{key}"] = nil
187
+ elsif type =~ /\AArray<(.*)>/i
188
+ # check to ensure the input is an array given that the attribute
189
+ # is documented as an array but the input is not
190
+ if attributes[attribute_map[key]].is_a?(Array)
191
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
192
+ end
193
+ elsif !attributes[attribute_map[key]].nil?
194
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
195
+ end
196
+ end
197
+ new(transformed_hash)
198
+ end
199
+
200
+ # Returns the object in the form of hash
201
+ # @return [Hash] Returns the object in the form of hash
202
+ def to_hash
203
+ hash = {}
204
+ self.class.attribute_map.each_pair do |attr, param|
205
+ value = self.send(attr)
206
+ if value.nil?
207
+ is_nullable = self.class.openapi_nullable.include?(attr)
208
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
209
+ end
210
+
211
+ hash[param] = _to_hash(value)
212
+ end
213
+ hash
214
+ end
215
+
216
+ end
217
+
218
+ end
@@ -0,0 +1,165 @@
1
+ =begin
2
+ #Nightona
3
+
4
+ #Nightona AI platform API Docs
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: amaraaamka0404@gmail.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.21.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module NightonaApiClient
17
+ class ReplaceResult < ApiModelBase
18
+ attr_accessor :file
19
+
20
+ attr_accessor :success
21
+
22
+ attr_accessor :error
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'file' => :'file',
28
+ :'success' => :'success',
29
+ :'error' => :'error'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'file' => :'String',
47
+ :'success' => :'Boolean',
48
+ :'error' => :'String'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `NightonaApiClient::ReplaceResult` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `NightonaApiClient::ReplaceResult`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'file')
75
+ self.file = attributes[:'file']
76
+ end
77
+
78
+ if attributes.key?(:'success')
79
+ self.success = attributes[:'success']
80
+ end
81
+
82
+ if attributes.key?(:'error')
83
+ self.error = attributes[:'error']
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
91
+ invalid_properties = Array.new
92
+ invalid_properties
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ def valid?
98
+ warn '[DEPRECATED] the `valid?` method is obsolete'
99
+ true
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param [Object] Object to be compared
104
+ def ==(o)
105
+ return true if self.equal?(o)
106
+ self.class == o.class &&
107
+ file == o.file &&
108
+ success == o.success &&
109
+ error == o.error
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [file, success, error].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
134
+ elsif type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
+ end
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
+ end
143
+ end
144
+ new(transformed_hash)
145
+ end
146
+
147
+ # Returns the object in the form of hash
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_hash
150
+ hash = {}
151
+ self.class.attribute_map.each_pair do |attr, param|
152
+ value = self.send(attr)
153
+ if value.nil?
154
+ is_nullable = self.class.openapi_nullable.include?(attr)
155
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
156
+ end
157
+
158
+ hash[param] = _to_hash(value)
159
+ end
160
+ hash
161
+ end
162
+
163
+ end
164
+
165
+ end