daytona_api_client 0.171.0 → 1.0.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 (220) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +101 -0
  4. data/daytona_api_client.gemspec +2 -2
  5. data/lib/daytona_api_client/api/api_keys_api.rb +2 -2
  6. data/lib/daytona_api_client/api/audit_api.rb +140 -10
  7. data/lib/daytona_api_client/api/config_api.rb +1 -1
  8. data/lib/daytona_api_client/api/docker_registry_api.rb +67 -6
  9. data/lib/daytona_api_client/api/health_api.rb +3 -54
  10. data/lib/daytona_api_client/api/object_storage_api.rb +1 -1
  11. data/lib/daytona_api_client/api/organizations_api.rb +163 -954
  12. data/lib/daytona_api_client/api/preview_api.rb +8 -77
  13. data/lib/daytona_api_client/api/runners_api.rb +22 -412
  14. data/lib/daytona_api_client/api/sandbox_api.rb +292 -1620
  15. data/lib/daytona_api_client/api/snapshots_api.rb +113 -39
  16. data/lib/daytona_api_client/api/toolbox_api.rb +741 -741
  17. data/lib/daytona_api_client/api/users_api.rb +239 -2
  18. data/lib/daytona_api_client/api/volumes_api.rb +2 -2
  19. data/lib/daytona_api_client/api/webhooks_api.rb +268 -5
  20. data/lib/daytona_api_client/api/workspace_api.rb +6 -6
  21. data/lib/daytona_api_client/api_client.rb +4 -8
  22. data/lib/daytona_api_client/api_error.rb +1 -1
  23. data/lib/daytona_api_client/configuration.rb +2 -5
  24. data/lib/daytona_api_client/models/account_provider.rb +74 -3
  25. data/lib/daytona_api_client/models/announcement.rb +74 -3
  26. data/lib/daytona_api_client/models/api_key_list.rb +74 -3
  27. data/lib/daytona_api_client/models/api_key_response.rb +74 -3
  28. data/lib/daytona_api_client/models/audit_log.rb +75 -22
  29. data/lib/daytona_api_client/models/build_info.rb +78 -34
  30. data/lib/daytona_api_client/models/command.rb +74 -3
  31. data/lib/daytona_api_client/models/completion_context.rb +74 -3
  32. data/lib/daytona_api_client/models/completion_item.rb +74 -3
  33. data/lib/daytona_api_client/models/completion_list.rb +74 -3
  34. data/lib/daytona_api_client/models/compressed_screenshot_response.rb +74 -3
  35. data/lib/daytona_api_client/models/computer_use_start_response.rb +74 -3
  36. data/lib/daytona_api_client/models/computer_use_status_response.rb +76 -5
  37. data/lib/daytona_api_client/models/computer_use_stop_response.rb +74 -3
  38. data/lib/daytona_api_client/models/create_api_key.rb +75 -4
  39. data/lib/daytona_api_client/models/create_audit_log.rb +350 -0
  40. data/lib/daytona_api_client/models/create_build_info.rb +74 -3
  41. data/lib/daytona_api_client/models/create_docker_registry.rb +139 -7
  42. data/lib/daytona_api_client/models/create_linked_account.rb +74 -3
  43. data/lib/daytona_api_client/models/create_organization.rb +78 -34
  44. data/lib/daytona_api_client/models/create_organization_invitation.rb +76 -5
  45. data/lib/daytona_api_client/models/create_organization_quota.rb +74 -3
  46. data/lib/daytona_api_client/models/create_organization_role.rb +74 -3
  47. data/lib/daytona_api_client/models/create_runner.rb +389 -34
  48. data/lib/daytona_api_client/models/create_sandbox.rb +77 -16
  49. data/lib/daytona_api_client/models/create_session_request.rb +74 -3
  50. data/lib/daytona_api_client/models/create_snapshot.rb +88 -17
  51. data/lib/daytona_api_client/models/create_user.rb +77 -15
  52. data/lib/daytona_api_client/models/create_volume.rb +74 -3
  53. data/lib/daytona_api_client/models/create_workspace.rb +78 -7
  54. data/lib/daytona_api_client/models/daytona_configuration.rb +78 -54
  55. data/lib/daytona_api_client/models/display_info_response.rb +74 -3
  56. data/lib/daytona_api_client/models/docker_registry.rb +76 -5
  57. data/lib/daytona_api_client/models/download_files.rb +74 -3
  58. data/lib/daytona_api_client/models/execute_request.rb +74 -3
  59. data/lib/daytona_api_client/models/execute_response.rb +74 -3
  60. data/lib/daytona_api_client/models/file_info.rb +74 -3
  61. data/lib/daytona_api_client/models/file_status.rb +74 -3
  62. data/lib/daytona_api_client/models/git_add_request.rb +74 -3
  63. data/lib/daytona_api_client/models/git_branch_request.rb +74 -3
  64. data/lib/daytona_api_client/models/git_checkout_request.rb +74 -3
  65. data/lib/daytona_api_client/models/git_clone_request.rb +74 -3
  66. data/lib/daytona_api_client/models/git_commit_info.rb +74 -3
  67. data/lib/daytona_api_client/models/git_commit_request.rb +74 -3
  68. data/lib/daytona_api_client/models/git_commit_response.rb +74 -3
  69. data/lib/daytona_api_client/models/git_delete_branch_request.rb +74 -3
  70. data/lib/daytona_api_client/models/git_repo_request.rb +74 -3
  71. data/lib/daytona_api_client/models/git_status.rb +74 -3
  72. data/lib/daytona_api_client/models/health_controller_check200_response.rb +74 -3
  73. data/lib/daytona_api_client/models/health_controller_check200_response_info_value.rb +74 -3
  74. data/lib/daytona_api_client/models/health_controller_check503_response.rb +74 -3
  75. data/lib/daytona_api_client/models/keyboard_hotkey_request.rb +74 -3
  76. data/lib/daytona_api_client/models/keyboard_press_request.rb +74 -3
  77. data/lib/daytona_api_client/models/keyboard_type_request.rb +74 -3
  78. data/lib/daytona_api_client/models/list_branch_response.rb +74 -3
  79. data/lib/daytona_api_client/models/lsp_completion_params.rb +74 -3
  80. data/lib/daytona_api_client/models/lsp_document_request.rb +74 -3
  81. data/lib/daytona_api_client/models/lsp_location.rb +74 -3
  82. data/lib/daytona_api_client/models/lsp_server_request.rb +74 -3
  83. data/lib/daytona_api_client/models/lsp_symbol.rb +74 -3
  84. data/lib/daytona_api_client/models/match.rb +74 -3
  85. data/lib/daytona_api_client/models/mouse_click_request.rb +74 -3
  86. data/lib/daytona_api_client/models/mouse_click_response.rb +74 -3
  87. data/lib/daytona_api_client/models/mouse_drag_request.rb +74 -3
  88. data/lib/daytona_api_client/models/mouse_drag_response.rb +74 -3
  89. data/lib/daytona_api_client/models/mouse_move_request.rb +74 -3
  90. data/lib/daytona_api_client/models/mouse_move_response.rb +74 -3
  91. data/lib/daytona_api_client/models/mouse_position.rb +74 -3
  92. data/lib/daytona_api_client/models/mouse_scroll_request.rb +74 -3
  93. data/lib/daytona_api_client/models/mouse_scroll_response.rb +74 -3
  94. data/lib/daytona_api_client/models/oidc_config.rb +74 -3
  95. data/lib/daytona_api_client/models/organization.rb +159 -149
  96. data/lib/daytona_api_client/models/organization_invitation.rb +78 -7
  97. data/lib/daytona_api_client/models/organization_role.rb +74 -3
  98. data/lib/daytona_api_client/models/organization_sandbox_default_limited_network_egress.rb +74 -3
  99. data/lib/daytona_api_client/models/organization_suspension.rb +79 -10
  100. data/lib/daytona_api_client/models/organization_usage_overview.rb +220 -21
  101. data/lib/daytona_api_client/models/organization_user.rb +76 -5
  102. data/lib/daytona_api_client/models/paginated_audit_logs.rb +78 -17
  103. data/lib/daytona_api_client/models/paginated_sandboxes.rb +74 -3
  104. data/lib/daytona_api_client/models/paginated_snapshots.rb +74 -3
  105. data/lib/daytona_api_client/models/{paginated_logs.rb → paginated_snapshots_dto.rb} +77 -10
  106. data/lib/daytona_api_client/models/port_preview_url.rb +88 -34
  107. data/lib/daytona_api_client/models/position.rb +74 -3
  108. data/lib/daytona_api_client/models/posthog_config.rb +74 -3
  109. data/lib/daytona_api_client/models/process_errors_response.rb +74 -3
  110. data/lib/daytona_api_client/models/process_logs_response.rb +74 -3
  111. data/lib/daytona_api_client/models/process_restart_response.rb +74 -3
  112. data/lib/daytona_api_client/models/process_status_response.rb +74 -3
  113. data/lib/daytona_api_client/models/project_dir_response.rb +74 -3
  114. data/lib/daytona_api_client/models/pty_create_request.rb +74 -3
  115. data/lib/daytona_api_client/models/pty_create_response.rb +74 -3
  116. data/lib/daytona_api_client/models/pty_list_response.rb +74 -3
  117. data/lib/daytona_api_client/models/pty_resize_request.rb +74 -3
  118. data/lib/daytona_api_client/models/pty_session_info.rb +74 -3
  119. data/lib/daytona_api_client/models/range.rb +74 -3
  120. data/lib/daytona_api_client/models/region.rb +78 -181
  121. data/lib/daytona_api_client/models/region_screenshot_response.rb +74 -3
  122. data/lib/daytona_api_client/models/registry_push_access_dto.rb +74 -3
  123. data/lib/daytona_api_client/models/replace_request.rb +74 -3
  124. data/lib/daytona_api_client/models/replace_result.rb +74 -3
  125. data/lib/daytona_api_client/models/runner.rb +191 -109
  126. data/lib/daytona_api_client/models/runner_snapshot_dto.rb +91 -3
  127. data/lib/daytona_api_client/models/runner_state.rb +3 -4
  128. data/lib/daytona_api_client/models/sandbox.rb +92 -95
  129. data/lib/daytona_api_client/models/sandbox_class.rb +3 -4
  130. data/lib/daytona_api_client/models/sandbox_desired_state.rb +3 -4
  131. data/lib/daytona_api_client/models/sandbox_info.rb +74 -3
  132. data/lib/daytona_api_client/models/sandbox_labels.rb +74 -3
  133. data/lib/daytona_api_client/models/sandbox_state.rb +3 -7
  134. data/lib/daytona_api_client/models/sandbox_volume.rb +78 -17
  135. data/lib/daytona_api_client/models/screenshot_response.rb +74 -3
  136. data/lib/daytona_api_client/models/search_files_response.rb +74 -3
  137. data/lib/daytona_api_client/models/send_webhook_dto.rb +75 -26
  138. data/lib/daytona_api_client/models/session.rb +74 -3
  139. data/lib/daytona_api_client/models/session_execute_request.rb +74 -3
  140. data/lib/daytona_api_client/models/session_execute_response.rb +74 -3
  141. data/lib/daytona_api_client/models/set_snapshot_general_status_dto.rb +74 -3
  142. data/lib/daytona_api_client/models/snapshot_dto.rb +78 -39
  143. data/lib/daytona_api_client/models/snapshot_state.rb +6 -4
  144. data/lib/daytona_api_client/models/ssh_access_dto.rb +78 -34
  145. data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +98 -7
  146. data/lib/daytona_api_client/models/storage_access_dto.rb +74 -3
  147. data/lib/daytona_api_client/models/update_docker_registry.rb +74 -3
  148. data/lib/daytona_api_client/models/update_organization_invitation.rb +76 -5
  149. data/lib/daytona_api_client/models/update_organization_member_access.rb +76 -5
  150. data/lib/daytona_api_client/models/update_organization_quota.rb +115 -93
  151. data/lib/daytona_api_client/models/update_organization_role.rb +74 -3
  152. data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +80 -29
  153. data/lib/daytona_api_client/models/user.rb +74 -3
  154. data/lib/daytona_api_client/models/user_home_dir_response.rb +74 -3
  155. data/lib/daytona_api_client/models/user_public_key.rb +74 -3
  156. data/lib/daytona_api_client/models/volume_dto.rb +74 -3
  157. data/lib/daytona_api_client/models/volume_state.rb +3 -4
  158. data/lib/daytona_api_client/models/webhook_app_portal_access.rb +75 -31
  159. data/lib/daytona_api_client/models/{admin_get_webhook_status200_response.rb → webhook_controller_get_status200_response.rb} +76 -5
  160. data/lib/daytona_api_client/models/webhook_initialization_status.rb +74 -3
  161. data/lib/daytona_api_client/models/windows_response.rb +74 -3
  162. data/lib/daytona_api_client/models/work_dir_response.rb +74 -3
  163. data/lib/daytona_api_client/models/workspace.rb +107 -83
  164. data/lib/daytona_api_client/version.rb +2 -2
  165. data/lib/daytona_api_client.rb +3 -49
  166. data/project.json +11 -42
  167. metadata +6 -56
  168. data/.gitignore +0 -39
  169. data/.openapi-generator/FILES +0 -211
  170. data/.openapi-generator/VERSION +0 -1
  171. data/.openapi-generator-ignore +0 -31
  172. data/.rspec +0 -2
  173. data/.rubocop.yml +0 -148
  174. data/fix-gemspec.sh +0 -11
  175. data/lib/daytona_api_client/api/admin_api.rb +0 -1151
  176. data/lib/daytona_api_client/api/jobs_api.rb +0 -299
  177. data/lib/daytona_api_client/api/regions_api.rb +0 -77
  178. data/lib/daytona_api_client/api_model_base.rb +0 -88
  179. data/lib/daytona_api_client/models/admin_create_runner.rb +0 -314
  180. data/lib/daytona_api_client/models/create_region.rb +0 -198
  181. data/lib/daytona_api_client/models/create_region_response.rb +0 -209
  182. data/lib/daytona_api_client/models/create_runner_response.rb +0 -192
  183. data/lib/daytona_api_client/models/create_sandbox_snapshot.rb +0 -165
  184. data/lib/daytona_api_client/models/fork_sandbox.rb +0 -148
  185. data/lib/daytona_api_client/models/job.rb +0 -366
  186. data/lib/daytona_api_client/models/job_status.rb +0 -43
  187. data/lib/daytona_api_client/models/job_type.rb +0 -53
  188. data/lib/daytona_api_client/models/log_entry.rb +0 -334
  189. data/lib/daytona_api_client/models/metric_data_point.rb +0 -192
  190. data/lib/daytona_api_client/models/metric_series.rb +0 -194
  191. data/lib/daytona_api_client/models/metrics_response.rb +0 -167
  192. data/lib/daytona_api_client/models/otel_config.rb +0 -178
  193. data/lib/daytona_api_client/models/paginated_jobs.rb +0 -244
  194. data/lib/daytona_api_client/models/paginated_traces.rb +0 -248
  195. data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -167
  196. data/lib/daytona_api_client/models/rate_limit_config.rb +0 -178
  197. data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -158
  198. data/lib/daytona_api_client/models/regenerate_api_key_response.rb +0 -165
  199. data/lib/daytona_api_client/models/region_quota.rb +0 -316
  200. data/lib/daytona_api_client/models/region_type.rb +0 -42
  201. data/lib/daytona_api_client/models/region_usage_overview.rb +0 -368
  202. data/lib/daytona_api_client/models/resize_sandbox.rb +0 -225
  203. data/lib/daytona_api_client/models/runner_class.rb +0 -41
  204. data/lib/daytona_api_client/models/runner_full.rb +0 -735
  205. data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -462
  206. data/lib/daytona_api_client/models/runner_healthcheck.rb +0 -217
  207. data/lib/daytona_api_client/models/runner_service_health.rb +0 -202
  208. data/lib/daytona_api_client/models/signed_port_preview_url.rb +0 -246
  209. data/lib/daytona_api_client/models/snapshot_manager_credentials.rb +0 -192
  210. data/lib/daytona_api_client/models/toolbox_proxy_url.rb +0 -165
  211. data/lib/daytona_api_client/models/trace_span.rb +0 -332
  212. data/lib/daytona_api_client/models/trace_summary.rb +0 -310
  213. data/lib/daytona_api_client/models/update_job_status.rb +0 -207
  214. data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -165
  215. data/lib/daytona_api_client/models/update_organization_region_quota.rb +0 -214
  216. data/lib/daytona_api_client/models/update_region.rb +0 -171
  217. data/lib/daytona_api_client/models/update_sandbox_network_settings.rb +0 -158
  218. data/lib/daytona_api_client/models/url.rb +0 -165
  219. data/lib/daytona_api_client/models/webhook_event.rb +0 -46
  220. data/lib/daytona_api_client/models/workspace_port_preview_url.rb +0 -192
@@ -1,244 +0,0 @@
1
- =begin
2
- #Daytona
3
-
4
- #Daytona AI platform API Docs
5
-
6
- The version of the OpenAPI document: 1.0
7
- Contact: support@daytona.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 DaytonaApiClient
17
- class PaginatedJobs < ApiModelBase
18
- attr_accessor :items
19
-
20
- attr_accessor :total
21
-
22
- attr_accessor :page
23
-
24
- attr_accessor :total_pages
25
-
26
- # Attribute mapping from ruby-style variable name to JSON key.
27
- def self.attribute_map
28
- {
29
- :'items' => :'items',
30
- :'total' => :'total',
31
- :'page' => :'page',
32
- :'total_pages' => :'totalPages'
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
- :'items' => :'Array<Job>',
50
- :'total' => :'Float',
51
- :'page' => :'Float',
52
- :'total_pages' => :'Float'
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 `DaytonaApiClient::PaginatedJobs` 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 `DaytonaApiClient::PaginatedJobs`. 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?(:'items')
79
- if (value = attributes[:'items']).is_a?(Array)
80
- self.items = value
81
- end
82
- else
83
- self.items = nil
84
- end
85
-
86
- if attributes.key?(:'total')
87
- self.total = attributes[:'total']
88
- else
89
- self.total = nil
90
- end
91
-
92
- if attributes.key?(:'page')
93
- self.page = attributes[:'page']
94
- else
95
- self.page = nil
96
- end
97
-
98
- if attributes.key?(:'total_pages')
99
- self.total_pages = attributes[:'total_pages']
100
- else
101
- self.total_pages = nil
102
- end
103
- end
104
-
105
- # Show invalid properties with the reasons. Usually used together with valid?
106
- # @return Array for valid properties with the reasons
107
- def list_invalid_properties
108
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
109
- invalid_properties = Array.new
110
- if @items.nil?
111
- invalid_properties.push('invalid value for "items", items cannot be nil.')
112
- end
113
-
114
- if @total.nil?
115
- invalid_properties.push('invalid value for "total", total cannot be nil.')
116
- end
117
-
118
- if @page.nil?
119
- invalid_properties.push('invalid value for "page", page cannot be nil.')
120
- end
121
-
122
- if @total_pages.nil?
123
- invalid_properties.push('invalid value for "total_pages", total_pages cannot be nil.')
124
- end
125
-
126
- invalid_properties
127
- end
128
-
129
- # Check to see if the all the properties in the model are valid
130
- # @return true if the model is valid
131
- def valid?
132
- warn '[DEPRECATED] the `valid?` method is obsolete'
133
- return false if @items.nil?
134
- return false if @total.nil?
135
- return false if @page.nil?
136
- return false if @total_pages.nil?
137
- true
138
- end
139
-
140
- # Custom attribute writer method with validation
141
- # @param [Object] items Value to be assigned
142
- def items=(items)
143
- if items.nil?
144
- fail ArgumentError, 'items cannot be nil'
145
- end
146
-
147
- @items = items
148
- end
149
-
150
- # Custom attribute writer method with validation
151
- # @param [Object] total Value to be assigned
152
- def total=(total)
153
- if total.nil?
154
- fail ArgumentError, 'total cannot be nil'
155
- end
156
-
157
- @total = total
158
- end
159
-
160
- # Custom attribute writer method with validation
161
- # @param [Object] page Value to be assigned
162
- def page=(page)
163
- if page.nil?
164
- fail ArgumentError, 'page cannot be nil'
165
- end
166
-
167
- @page = page
168
- end
169
-
170
- # Custom attribute writer method with validation
171
- # @param [Object] total_pages Value to be assigned
172
- def total_pages=(total_pages)
173
- if total_pages.nil?
174
- fail ArgumentError, 'total_pages cannot be nil'
175
- end
176
-
177
- @total_pages = total_pages
178
- end
179
-
180
- # Checks equality by comparing each attribute.
181
- # @param [Object] Object to be compared
182
- def ==(o)
183
- return true if self.equal?(o)
184
- self.class == o.class &&
185
- items == o.items &&
186
- total == o.total &&
187
- page == o.page &&
188
- total_pages == o.total_pages
189
- end
190
-
191
- # @see the `==` method
192
- # @param [Object] Object to be compared
193
- def eql?(o)
194
- self == o
195
- end
196
-
197
- # Calculates hash code according to all attributes.
198
- # @return [Integer] Hash code
199
- def hash
200
- [items, total, page, total_pages].hash
201
- end
202
-
203
- # Builds the object from hash
204
- # @param [Hash] attributes Model attributes in the form of hash
205
- # @return [Object] Returns the model itself
206
- def self.build_from_hash(attributes)
207
- return nil unless attributes.is_a?(Hash)
208
- attributes = attributes.transform_keys(&:to_sym)
209
- transformed_hash = {}
210
- openapi_types.each_pair do |key, type|
211
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
212
- transformed_hash["#{key}"] = nil
213
- elsif type =~ /\AArray<(.*)>/i
214
- # check to ensure the input is an array given that the attribute
215
- # is documented as an array but the input is not
216
- if attributes[attribute_map[key]].is_a?(Array)
217
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
218
- end
219
- elsif !attributes[attribute_map[key]].nil?
220
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
221
- end
222
- end
223
- new(transformed_hash)
224
- end
225
-
226
- # Returns the object in the form of hash
227
- # @return [Hash] Returns the object in the form of hash
228
- def to_hash
229
- hash = {}
230
- self.class.attribute_map.each_pair do |attr, param|
231
- value = self.send(attr)
232
- if value.nil?
233
- is_nullable = self.class.openapi_nullable.include?(attr)
234
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
235
- end
236
-
237
- hash[param] = _to_hash(value)
238
- end
239
- hash
240
- end
241
-
242
- end
243
-
244
- end
@@ -1,248 +0,0 @@
1
- =begin
2
- #Daytona
3
-
4
- #Daytona AI platform API Docs
5
-
6
- The version of the OpenAPI document: 1.0
7
- Contact: support@daytona.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 DaytonaApiClient
17
- class PaginatedTraces < ApiModelBase
18
- # List of trace summaries
19
- attr_accessor :items
20
-
21
- # Total number of traces matching the query
22
- attr_accessor :total
23
-
24
- # Current page number
25
- attr_accessor :page
26
-
27
- # Total number of pages
28
- attr_accessor :total_pages
29
-
30
- # Attribute mapping from ruby-style variable name to JSON key.
31
- def self.attribute_map
32
- {
33
- :'items' => :'items',
34
- :'total' => :'total',
35
- :'page' => :'page',
36
- :'total_pages' => :'totalPages'
37
- }
38
- end
39
-
40
- # Returns attribute mapping this model knows about
41
- def self.acceptable_attribute_map
42
- attribute_map
43
- end
44
-
45
- # Returns all the JSON keys this model knows about
46
- def self.acceptable_attributes
47
- acceptable_attribute_map.values
48
- end
49
-
50
- # Attribute type mapping.
51
- def self.openapi_types
52
- {
53
- :'items' => :'Array<TraceSummary>',
54
- :'total' => :'Float',
55
- :'page' => :'Float',
56
- :'total_pages' => :'Float'
57
- }
58
- end
59
-
60
- # List of attributes with nullable: true
61
- def self.openapi_nullable
62
- Set.new([
63
- ])
64
- end
65
-
66
- # Initializes the object
67
- # @param [Hash] attributes Model attributes in the form of hash
68
- def initialize(attributes = {})
69
- if (!attributes.is_a?(Hash))
70
- fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::PaginatedTraces` initialize method"
71
- end
72
-
73
- # check to see if the attribute exists and convert string to symbol for hash key
74
- acceptable_attribute_map = self.class.acceptable_attribute_map
75
- attributes = attributes.each_with_object({}) { |(k, v), h|
76
- if (!acceptable_attribute_map.key?(k.to_sym))
77
- fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::PaginatedTraces`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
78
- end
79
- h[k.to_sym] = v
80
- }
81
-
82
- if attributes.key?(:'items')
83
- if (value = attributes[:'items']).is_a?(Array)
84
- self.items = value
85
- end
86
- else
87
- self.items = nil
88
- end
89
-
90
- if attributes.key?(:'total')
91
- self.total = attributes[:'total']
92
- else
93
- self.total = nil
94
- end
95
-
96
- if attributes.key?(:'page')
97
- self.page = attributes[:'page']
98
- else
99
- self.page = nil
100
- end
101
-
102
- if attributes.key?(:'total_pages')
103
- self.total_pages = attributes[:'total_pages']
104
- else
105
- self.total_pages = nil
106
- end
107
- end
108
-
109
- # Show invalid properties with the reasons. Usually used together with valid?
110
- # @return Array for valid properties with the reasons
111
- def list_invalid_properties
112
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
113
- invalid_properties = Array.new
114
- if @items.nil?
115
- invalid_properties.push('invalid value for "items", items cannot be nil.')
116
- end
117
-
118
- if @total.nil?
119
- invalid_properties.push('invalid value for "total", total cannot be nil.')
120
- end
121
-
122
- if @page.nil?
123
- invalid_properties.push('invalid value for "page", page cannot be nil.')
124
- end
125
-
126
- if @total_pages.nil?
127
- invalid_properties.push('invalid value for "total_pages", total_pages cannot be nil.')
128
- end
129
-
130
- invalid_properties
131
- end
132
-
133
- # Check to see if the all the properties in the model are valid
134
- # @return true if the model is valid
135
- def valid?
136
- warn '[DEPRECATED] the `valid?` method is obsolete'
137
- return false if @items.nil?
138
- return false if @total.nil?
139
- return false if @page.nil?
140
- return false if @total_pages.nil?
141
- true
142
- end
143
-
144
- # Custom attribute writer method with validation
145
- # @param [Object] items Value to be assigned
146
- def items=(items)
147
- if items.nil?
148
- fail ArgumentError, 'items cannot be nil'
149
- end
150
-
151
- @items = items
152
- end
153
-
154
- # Custom attribute writer method with validation
155
- # @param [Object] total Value to be assigned
156
- def total=(total)
157
- if total.nil?
158
- fail ArgumentError, 'total cannot be nil'
159
- end
160
-
161
- @total = total
162
- end
163
-
164
- # Custom attribute writer method with validation
165
- # @param [Object] page Value to be assigned
166
- def page=(page)
167
- if page.nil?
168
- fail ArgumentError, 'page cannot be nil'
169
- end
170
-
171
- @page = page
172
- end
173
-
174
- # Custom attribute writer method with validation
175
- # @param [Object] total_pages Value to be assigned
176
- def total_pages=(total_pages)
177
- if total_pages.nil?
178
- fail ArgumentError, 'total_pages cannot be nil'
179
- end
180
-
181
- @total_pages = total_pages
182
- end
183
-
184
- # Checks equality by comparing each attribute.
185
- # @param [Object] Object to be compared
186
- def ==(o)
187
- return true if self.equal?(o)
188
- self.class == o.class &&
189
- items == o.items &&
190
- total == o.total &&
191
- page == o.page &&
192
- total_pages == o.total_pages
193
- end
194
-
195
- # @see the `==` method
196
- # @param [Object] Object to be compared
197
- def eql?(o)
198
- self == o
199
- end
200
-
201
- # Calculates hash code according to all attributes.
202
- # @return [Integer] Hash code
203
- def hash
204
- [items, total, page, total_pages].hash
205
- end
206
-
207
- # Builds the object from hash
208
- # @param [Hash] attributes Model attributes in the form of hash
209
- # @return [Object] Returns the model itself
210
- def self.build_from_hash(attributes)
211
- return nil unless attributes.is_a?(Hash)
212
- attributes = attributes.transform_keys(&:to_sym)
213
- transformed_hash = {}
214
- openapi_types.each_pair do |key, type|
215
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
216
- transformed_hash["#{key}"] = nil
217
- elsif type =~ /\AArray<(.*)>/i
218
- # check to ensure the input is an array given that the attribute
219
- # is documented as an array but the input is not
220
- if attributes[attribute_map[key]].is_a?(Array)
221
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
222
- end
223
- elsif !attributes[attribute_map[key]].nil?
224
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
225
- end
226
- end
227
- new(transformed_hash)
228
- end
229
-
230
- # Returns the object in the form of hash
231
- # @return [Hash] Returns the object in the form of hash
232
- def to_hash
233
- hash = {}
234
- self.class.attribute_map.each_pair do |attr, param|
235
- value = self.send(attr)
236
- if value.nil?
237
- is_nullable = self.class.openapi_nullable.include?(attr)
238
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
239
- end
240
-
241
- hash[param] = _to_hash(value)
242
- end
243
- hash
244
- end
245
-
246
- end
247
-
248
- end
@@ -1,167 +0,0 @@
1
- =begin
2
- #Daytona
3
-
4
- #Daytona AI platform API Docs
5
-
6
- The version of the OpenAPI document: 1.0
7
- Contact: support@daytona.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 DaytonaApiClient
17
- class PollJobsResponse < ApiModelBase
18
- # List of jobs
19
- attr_accessor :jobs
20
-
21
- # Attribute mapping from ruby-style variable name to JSON key.
22
- def self.attribute_map
23
- {
24
- :'jobs' => :'jobs'
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
- :'jobs' => :'Array<Job>'
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 `DaytonaApiClient::PollJobsResponse` 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 `DaytonaApiClient::PollJobsResponse`. 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?(:'jobs')
68
- if (value = attributes[:'jobs']).is_a?(Array)
69
- self.jobs = value
70
- end
71
- else
72
- self.jobs = nil
73
- end
74
- end
75
-
76
- # Show invalid properties with the reasons. Usually used together with valid?
77
- # @return Array for valid properties with the reasons
78
- def list_invalid_properties
79
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
80
- invalid_properties = Array.new
81
- if @jobs.nil?
82
- invalid_properties.push('invalid value for "jobs", jobs cannot be nil.')
83
- end
84
-
85
- invalid_properties
86
- end
87
-
88
- # Check to see if the all the properties in the model are valid
89
- # @return true if the model is valid
90
- def valid?
91
- warn '[DEPRECATED] the `valid?` method is obsolete'
92
- return false if @jobs.nil?
93
- true
94
- end
95
-
96
- # Custom attribute writer method with validation
97
- # @param [Object] jobs Value to be assigned
98
- def jobs=(jobs)
99
- if jobs.nil?
100
- fail ArgumentError, 'jobs cannot be nil'
101
- end
102
-
103
- @jobs = jobs
104
- end
105
-
106
- # Checks equality by comparing each attribute.
107
- # @param [Object] Object to be compared
108
- def ==(o)
109
- return true if self.equal?(o)
110
- self.class == o.class &&
111
- jobs == o.jobs
112
- end
113
-
114
- # @see the `==` method
115
- # @param [Object] Object to be compared
116
- def eql?(o)
117
- self == o
118
- end
119
-
120
- # Calculates hash code according to all attributes.
121
- # @return [Integer] Hash code
122
- def hash
123
- [jobs].hash
124
- end
125
-
126
- # Builds the object from hash
127
- # @param [Hash] attributes Model attributes in the form of hash
128
- # @return [Object] Returns the model itself
129
- def self.build_from_hash(attributes)
130
- return nil unless attributes.is_a?(Hash)
131
- attributes = attributes.transform_keys(&:to_sym)
132
- transformed_hash = {}
133
- openapi_types.each_pair do |key, type|
134
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
135
- transformed_hash["#{key}"] = nil
136
- elsif type =~ /\AArray<(.*)>/i
137
- # check to ensure the input is an array given that the attribute
138
- # is documented as an array but the input is not
139
- if attributes[attribute_map[key]].is_a?(Array)
140
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
141
- end
142
- elsif !attributes[attribute_map[key]].nil?
143
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
144
- end
145
- end
146
- new(transformed_hash)
147
- end
148
-
149
- # Returns the object in the form of hash
150
- # @return [Hash] Returns the object in the form of hash
151
- def to_hash
152
- hash = {}
153
- self.class.attribute_map.each_pair do |attr, param|
154
- value = self.send(attr)
155
- if value.nil?
156
- is_nullable = self.class.openapi_nullable.include?(attr)
157
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
158
- end
159
-
160
- hash[param] = _to_hash(value)
161
- end
162
- hash
163
- end
164
-
165
- end
166
-
167
- end