daytona_api_client 0.202.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 (219) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +101 -0
  4. data/daytona_api_client.gemspec +4 -4
  5. data/lib/daytona_api_client/api/api_keys_api.rb +2 -2
  6. data/lib/daytona_api_client/api/audit_api.rb +140 -40
  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 +265 -1316
  12. data/lib/daytona_api_client/api/preview_api.rb +8 -202
  13. data/lib/daytona_api_client/api/runners_api.rb +22 -412
  14. data/lib/daytona_api_client/api/sandbox_api.rb +434 -2352
  15. data/lib/daytona_api_client/api/snapshots_api.rb +113 -39
  16. data/lib/daytona_api_client/api/toolbox_api.rb +5108 -0
  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 +164 -27
  20. data/lib/daytona_api_client/api/workspace_api.rb +955 -0
  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/{create_runner_response.rb → command.rb} +104 -23
  31. data/lib/daytona_api_client/models/completion_context.rb +244 -0
  32. data/lib/daytona_api_client/models/completion_item.rb +289 -0
  33. data/lib/daytona_api_client/models/{paginated_traces.rb → completion_list.rb} +106 -91
  34. data/lib/daytona_api_client/models/compressed_screenshot_response.rb +256 -0
  35. data/lib/daytona_api_client/models/computer_use_start_response.rb +263 -0
  36. data/lib/daytona_api_client/models/{available_sandbox_class.rb → computer_use_status_response.rb} +97 -86
  37. data/lib/daytona_api_client/models/computer_use_stop_response.rb +263 -0
  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 +78 -26
  46. data/lib/daytona_api_client/models/create_organization_role.rb +74 -3
  47. data/lib/daytona_api_client/models/create_runner.rb +386 -43
  48. data/lib/daytona_api_client/models/create_sandbox.rb +117 -76
  49. data/lib/daytona_api_client/models/{signed_port_preview_url.rb → create_session_request.rb} +93 -103
  50. data/lib/daytona_api_client/models/create_snapshot.rb +88 -61
  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 +411 -0
  54. data/lib/daytona_api_client/models/daytona_configuration.rb +78 -64
  55. data/lib/daytona_api_client/models/display_info_response.rb +238 -0
  56. data/lib/daytona_api_client/models/docker_registry.rb +76 -5
  57. data/lib/daytona_api_client/models/{paginated_jobs.rb → download_files.rb} +94 -100
  58. data/lib/daytona_api_client/models/{create_warm_pool.rb → execute_request.rb} +106 -62
  59. data/lib/daytona_api_client/models/execute_response.rb +263 -0
  60. data/lib/daytona_api_client/models/file_info.rb +417 -0
  61. data/lib/daytona_api_client/models/{secret.rb → file_status.rb} +122 -121
  62. data/lib/daytona_api_client/models/git_add_request.rb +264 -0
  63. data/lib/daytona_api_client/models/{admin_create_organization.rb → git_branch_request.rb} +95 -53
  64. data/lib/daytona_api_client/models/git_checkout_request.rb +261 -0
  65. data/lib/daytona_api_client/models/{toolbox_proxy_url.rb → git_clone_request.rb} +142 -10
  66. data/lib/daytona_api_client/models/{trace_span.rb → git_commit_info.rb} +148 -141
  67. data/lib/daytona_api_client/models/git_commit_request.rb +325 -0
  68. data/lib/daytona_api_client/models/{runner_healthcheck.rb → git_commit_response.rb} +92 -74
  69. data/lib/daytona_api_client/models/{create_secret.rb → git_delete_branch_request.rb} +106 -59
  70. data/lib/daytona_api_client/models/{snapshot_manager_credentials.rb → git_repo_request.rb} +96 -35
  71. data/lib/daytona_api_client/models/git_status.rb +290 -0
  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/{create_sandbox_snapshot.rb → keyboard_hotkey_request.rb} +93 -34
  76. data/lib/daytona_api_client/models/{create_region_response.rb → keyboard_press_request.rb} +102 -63
  77. data/lib/daytona_api_client/models/keyboard_type_request.rb +246 -0
  78. data/lib/daytona_api_client/models/list_branch_response.rb +237 -0
  79. data/lib/daytona_api_client/models/lsp_completion_params.rb +325 -0
  80. data/lib/daytona_api_client/models/lsp_document_request.rb +290 -0
  81. data/lib/daytona_api_client/models/lsp_location.rb +261 -0
  82. data/lib/daytona_api_client/models/lsp_server_request.rb +263 -0
  83. data/lib/daytona_api_client/models/lsp_symbol.rb +287 -0
  84. data/lib/daytona_api_client/models/match.rb +287 -0
  85. data/lib/daytona_api_client/models/mouse_click_request.rb +283 -0
  86. data/lib/daytona_api_client/models/mouse_click_response.rb +263 -0
  87. data/lib/daytona_api_client/models/mouse_drag_request.rb +327 -0
  88. data/lib/daytona_api_client/models/mouse_drag_response.rb +263 -0
  89. data/lib/daytona_api_client/models/mouse_move_request.rb +263 -0
  90. data/lib/daytona_api_client/models/mouse_move_response.rb +263 -0
  91. data/lib/daytona_api_client/models/mouse_position.rb +263 -0
  92. data/lib/daytona_api_client/models/mouse_scroll_request.rb +300 -0
  93. data/lib/daytona_api_client/models/mouse_scroll_response.rb +236 -0
  94. data/lib/daytona_api_client/models/oidc_config.rb +74 -3
  95. data/lib/daytona_api_client/models/organization.rb +159 -243
  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_deprecated.rb → paginated_sandboxes.rb} +76 -5
  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 +261 -0
  108. data/lib/daytona_api_client/models/posthog_config.rb +74 -3
  109. data/lib/daytona_api_client/models/process_errors_response.rb +263 -0
  110. data/lib/daytona_api_client/models/process_logs_response.rb +263 -0
  111. data/lib/daytona_api_client/models/process_restart_response.rb +263 -0
  112. data/lib/daytona_api_client/models/process_status_response.rb +263 -0
  113. data/lib/daytona_api_client/models/{update_last_activity.rb → project_dir_response.rb} +83 -13
  114. data/lib/daytona_api_client/models/pty_create_request.rb +288 -0
  115. data/lib/daytona_api_client/models/pty_create_response.rb +236 -0
  116. data/lib/daytona_api_client/models/{metric_data_point.rb → pty_list_response.rb} +95 -49
  117. data/lib/daytona_api_client/models/pty_resize_request.rb +263 -0
  118. data/lib/daytona_api_client/models/pty_session_info.rb +425 -0
  119. data/lib/daytona_api_client/models/range.rb +261 -0
  120. data/lib/daytona_api_client/models/region.rb +78 -181
  121. data/lib/daytona_api_client/models/{regenerate_api_key_response.rb → region_screenshot_response.rb} +113 -22
  122. data/lib/daytona_api_client/models/registry_push_access_dto.rb +74 -3
  123. data/lib/daytona_api_client/models/replace_request.rb +289 -0
  124. data/lib/daytona_api_client/models/{resize_sandbox.rb → replace_result.rb} +95 -84
  125. data/lib/daytona_api_client/models/runner.rb +215 -155
  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 +101 -164
  129. data/lib/daytona_api_client/models/sandbox_class.rb +6 -8
  130. data/lib/daytona_api_client/models/sandbox_desired_state.rb +3 -5
  131. data/lib/daytona_api_client/models/{create_region.rb → sandbox_info.rb} +113 -38
  132. data/lib/daytona_api_client/models/sandbox_labels.rb +74 -3
  133. data/lib/daytona_api_client/models/sandbox_state.rb +3 -10
  134. data/lib/daytona_api_client/models/sandbox_volume.rb +79 -18
  135. data/lib/daytona_api_client/models/screenshot_response.rb +256 -0
  136. data/lib/daytona_api_client/models/{runner_service_health.rb → search_files_response.rb} +94 -59
  137. data/lib/daytona_api_client/models/send_webhook_dto.rb +75 -26
  138. data/lib/daytona_api_client/models/session.rb +251 -0
  139. data/lib/daytona_api_client/models/{list_sandboxes_response.rb → session_execute_request.rb} +110 -34
  140. data/lib/daytona_api_client/models/session_execute_response.rb +239 -0
  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 -71
  143. data/lib/daytona_api_client/models/snapshot_state.rb +6 -5
  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 +78 -34
  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 -131
  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/{list_secrets_response.rb → user_home_dir_response.rb} +83 -72
  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/{preview_warning.rb → webhook_controller_get_status200_response.rb} +76 -23
  160. data/lib/daytona_api_client/models/webhook_initialization_status.rb +74 -3
  161. data/lib/daytona_api_client/models/windows_response.rb +265 -0
  162. data/lib/daytona_api_client/models/{update_job_status.rb → work_dir_response.rb} +83 -72
  163. data/lib/daytona_api_client/models/{sandbox_list_item.rb → workspace.rb} +339 -193
  164. data/lib/daytona_api_client/version.rb +2 -2
  165. data/lib/daytona_api_client.rb +76 -74
  166. data/project.json +13 -38
  167. metadata +81 -83
  168. data/.gitignore +0 -39
  169. data/.openapi-generator/FILES +0 -163
  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 -1615
  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/secret_api.rb +0 -441
  179. data/lib/daytona_api_client/api/warm_pools_api.rb +0 -286
  180. data/lib/daytona_api_client/api_model_base.rb +0 -88
  181. data/lib/daytona_api_client/models/admin_create_runner.rb +0 -326
  182. data/lib/daytona_api_client/models/admin_get_webhook_status200_response.rb +0 -147
  183. data/lib/daytona_api_client/models/create_organization_region_quota.rb +0 -375
  184. data/lib/daytona_api_client/models/date_filter.rb +0 -178
  185. data/lib/daytona_api_client/models/fork_sandbox.rb +0 -148
  186. data/lib/daytona_api_client/models/gpu_type.rb +0 -44
  187. data/lib/daytona_api_client/models/int_filter.rb +0 -222
  188. data/lib/daytona_api_client/models/job.rb +0 -366
  189. data/lib/daytona_api_client/models/job_status.rb +0 -43
  190. data/lib/daytona_api_client/models/job_type.rb +0 -55
  191. data/lib/daytona_api_client/models/log_entry.rb +0 -334
  192. data/lib/daytona_api_client/models/metric_series.rb +0 -194
  193. data/lib/daytona_api_client/models/metrics_response.rb +0 -167
  194. data/lib/daytona_api_client/models/organization_preview_warning.rb +0 -165
  195. data/lib/daytona_api_client/models/otel_config.rb +0 -188
  196. data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -167
  197. data/lib/daytona_api_client/models/rate_limit_config.rb +0 -188
  198. data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -158
  199. data/lib/daytona_api_client/models/region_quota.rb +0 -440
  200. data/lib/daytona_api_client/models/region_type.rb +0 -42
  201. data/lib/daytona_api_client/models/region_usage_overview.rb +0 -518
  202. data/lib/daytona_api_client/models/resolve_sandbox_secrets200_response_inner.rb +0 -176
  203. data/lib/daytona_api_client/models/runner_class.rb +0 -40
  204. data/lib/daytona_api_client/models/runner_full.rb +0 -757
  205. data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -482
  206. data/lib/daytona_api_client/models/sandbox_list_sort_direction.rb +0 -41
  207. data/lib/daytona_api_client/models/sandbox_list_sort_field.rb +0 -45
  208. data/lib/daytona_api_client/models/string_filter.rb +0 -182
  209. data/lib/daytona_api_client/models/trace_summary.rb +0 -310
  210. data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -165
  211. data/lib/daytona_api_client/models/update_organization_region_quota.rb +0 -302
  212. data/lib/daytona_api_client/models/update_region.rb +0 -171
  213. data/lib/daytona_api_client/models/update_sandbox_network_settings.rb +0 -168
  214. data/lib/daytona_api_client/models/update_sandbox_secrets.rb +0 -167
  215. data/lib/daytona_api_client/models/update_secret.rb +0 -170
  216. data/lib/daytona_api_client/models/update_warm_pool.rb +0 -174
  217. data/lib/daytona_api_client/models/url.rb +0 -165
  218. data/lib/daytona_api_client/models/warm_pool.rb +0 -490
  219. data/lib/daytona_api_client/models/webhook_event.rb +0 -46
@@ -0,0 +1,261 @@
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.12.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DaytonaApiClient
17
+ class Position
18
+ attr_accessor :line
19
+
20
+ attr_accessor :character
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'line' => :'line',
26
+ :'character' => :'character'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'line' => :'Float',
44
+ :'character' => :'Float'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::Position` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::Position`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'line')
71
+ self.line = attributes[:'line']
72
+ else
73
+ self.line = nil
74
+ end
75
+
76
+ if attributes.key?(:'character')
77
+ self.character = attributes[:'character']
78
+ else
79
+ self.character = nil
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
+ invalid_properties = Array.new
88
+ if @line.nil?
89
+ invalid_properties.push('invalid value for "line", line cannot be nil.')
90
+ end
91
+
92
+ if @character.nil?
93
+ invalid_properties.push('invalid value for "character", character cannot be nil.')
94
+ end
95
+
96
+ invalid_properties
97
+ end
98
+
99
+ # Check to see if the all the properties in the model are valid
100
+ # @return true if the model is valid
101
+ def valid?
102
+ warn '[DEPRECATED] the `valid?` method is obsolete'
103
+ return false if @line.nil?
104
+ return false if @character.nil?
105
+ true
106
+ end
107
+
108
+ # Custom attribute writer method with validation
109
+ # @param [Object] line Value to be assigned
110
+ def line=(line)
111
+ if line.nil?
112
+ fail ArgumentError, 'line cannot be nil'
113
+ end
114
+
115
+ @line = line
116
+ end
117
+
118
+ # Custom attribute writer method with validation
119
+ # @param [Object] character Value to be assigned
120
+ def character=(character)
121
+ if character.nil?
122
+ fail ArgumentError, 'character cannot be nil'
123
+ end
124
+
125
+ @character = character
126
+ end
127
+
128
+ # Checks equality by comparing each attribute.
129
+ # @param [Object] Object to be compared
130
+ def ==(o)
131
+ return true if self.equal?(o)
132
+ self.class == o.class &&
133
+ line == o.line &&
134
+ character == o.character
135
+ end
136
+
137
+ # @see the `==` method
138
+ # @param [Object] Object to be compared
139
+ def eql?(o)
140
+ self == o
141
+ end
142
+
143
+ # Calculates hash code according to all attributes.
144
+ # @return [Integer] Hash code
145
+ def hash
146
+ [line, character].hash
147
+ end
148
+
149
+ # Builds the object from hash
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ # @return [Object] Returns the model itself
152
+ def self.build_from_hash(attributes)
153
+ return nil unless attributes.is_a?(Hash)
154
+ attributes = attributes.transform_keys(&:to_sym)
155
+ transformed_hash = {}
156
+ openapi_types.each_pair do |key, type|
157
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
158
+ transformed_hash["#{key}"] = nil
159
+ elsif type =~ /\AArray<(.*)>/i
160
+ # check to ensure the input is an array given that the attribute
161
+ # is documented as an array but the input is not
162
+ if attributes[attribute_map[key]].is_a?(Array)
163
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
164
+ end
165
+ elsif !attributes[attribute_map[key]].nil?
166
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
167
+ end
168
+ end
169
+ new(transformed_hash)
170
+ end
171
+
172
+ # Deserializes the data based on type
173
+ # @param string type Data type
174
+ # @param string value Value to be deserialized
175
+ # @return [Object] Deserialized data
176
+ def self._deserialize(type, value)
177
+ case type.to_sym
178
+ when :Time
179
+ Time.parse(value)
180
+ when :Date
181
+ Date.parse(value)
182
+ when :String
183
+ value.to_s
184
+ when :Integer
185
+ value.to_i
186
+ when :Float
187
+ value.to_f
188
+ when :Boolean
189
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
190
+ true
191
+ else
192
+ false
193
+ end
194
+ when :Object
195
+ # generic object (usually a Hash), return directly
196
+ value
197
+ when /\AArray<(?<inner_type>.+)>\z/
198
+ inner_type = Regexp.last_match[:inner_type]
199
+ value.map { |v| _deserialize(inner_type, v) }
200
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
201
+ k_type = Regexp.last_match[:k_type]
202
+ v_type = Regexp.last_match[:v_type]
203
+ {}.tap do |hash|
204
+ value.each do |k, v|
205
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
206
+ end
207
+ end
208
+ else # model
209
+ # models (e.g. Pet) or oneOf
210
+ klass = DaytonaApiClient.const_get(type)
211
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
212
+ end
213
+ end
214
+
215
+ # Returns the string representation of the object
216
+ # @return [String] String presentation of the object
217
+ def to_s
218
+ to_hash.to_s
219
+ end
220
+
221
+ # to_body is an alias to to_hash (backward compatibility)
222
+ # @return [Hash] Returns the object in the form of hash
223
+ def to_body
224
+ to_hash
225
+ end
226
+
227
+ # Returns the object in the form of hash
228
+ # @return [Hash] Returns the object in the form of hash
229
+ def to_hash
230
+ hash = {}
231
+ self.class.attribute_map.each_pair do |attr, param|
232
+ value = self.send(attr)
233
+ if value.nil?
234
+ is_nullable = self.class.openapi_nullable.include?(attr)
235
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
236
+ end
237
+
238
+ hash[param] = _to_hash(value)
239
+ end
240
+ hash
241
+ end
242
+
243
+ # Outputs non-array value in the form of hash
244
+ # For object, use to_hash. Otherwise, just return the value
245
+ # @param [Object] value Any valid value
246
+ # @return [Hash] Returns the value in the form of hash
247
+ def _to_hash(value)
248
+ if value.is_a?(Array)
249
+ value.compact.map { |v| _to_hash(v) }
250
+ elsif value.is_a?(Hash)
251
+ {}.tap do |hash|
252
+ value.each { |k, v| hash[k] = _to_hash(v) }
253
+ end
254
+ elsif value.respond_to? :to_hash
255
+ value.to_hash
256
+ else
257
+ value
258
+ end
259
+ end
260
+ end
261
+ end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: support@daytona.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.21.0
9
+ Generator version: 7.12.0
10
10
 
11
11
  =end
12
12
 
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module DaytonaApiClient
17
- class PosthogConfig < ApiModelBase
17
+ class PosthogConfig
18
18
  # PostHog API key
19
19
  attr_accessor :api_key
20
20
 
@@ -171,6 +171,61 @@ module DaytonaApiClient
171
171
  new(transformed_hash)
172
172
  end
173
173
 
174
+ # Deserializes the data based on type
175
+ # @param string type Data type
176
+ # @param string value Value to be deserialized
177
+ # @return [Object] Deserialized data
178
+ def self._deserialize(type, value)
179
+ case type.to_sym
180
+ when :Time
181
+ Time.parse(value)
182
+ when :Date
183
+ Date.parse(value)
184
+ when :String
185
+ value.to_s
186
+ when :Integer
187
+ value.to_i
188
+ when :Float
189
+ value.to_f
190
+ when :Boolean
191
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
192
+ true
193
+ else
194
+ false
195
+ end
196
+ when :Object
197
+ # generic object (usually a Hash), return directly
198
+ value
199
+ when /\AArray<(?<inner_type>.+)>\z/
200
+ inner_type = Regexp.last_match[:inner_type]
201
+ value.map { |v| _deserialize(inner_type, v) }
202
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
203
+ k_type = Regexp.last_match[:k_type]
204
+ v_type = Regexp.last_match[:v_type]
205
+ {}.tap do |hash|
206
+ value.each do |k, v|
207
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
208
+ end
209
+ end
210
+ else # model
211
+ # models (e.g. Pet) or oneOf
212
+ klass = DaytonaApiClient.const_get(type)
213
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
214
+ end
215
+ end
216
+
217
+ # Returns the string representation of the object
218
+ # @return [String] String presentation of the object
219
+ def to_s
220
+ to_hash.to_s
221
+ end
222
+
223
+ # to_body is an alias to to_hash (backward compatibility)
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_body
226
+ to_hash
227
+ end
228
+
174
229
  # Returns the object in the form of hash
175
230
  # @return [Hash] Returns the object in the form of hash
176
231
  def to_hash
@@ -187,6 +242,22 @@ module DaytonaApiClient
187
242
  hash
188
243
  end
189
244
 
245
+ # Outputs non-array value in the form of hash
246
+ # For object, use to_hash. Otherwise, just return the value
247
+ # @param [Object] value Any valid value
248
+ # @return [Hash] Returns the value in the form of hash
249
+ def _to_hash(value)
250
+ if value.is_a?(Array)
251
+ value.compact.map { |v| _to_hash(v) }
252
+ elsif value.is_a?(Hash)
253
+ {}.tap do |hash|
254
+ value.each { |k, v| hash[k] = _to_hash(v) }
255
+ end
256
+ elsif value.respond_to? :to_hash
257
+ value.to_hash
258
+ else
259
+ value
260
+ end
261
+ end
190
262
  end
191
-
192
263
  end
@@ -0,0 +1,263 @@
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.12.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DaytonaApiClient
17
+ class ProcessErrorsResponse
18
+ # The name of the VNC process whose error logs were retrieved
19
+ attr_accessor :process_name
20
+
21
+ # The error log output from the specified VNC process
22
+ attr_accessor :errors
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'process_name' => :'processName',
28
+ :'errors' => :'errors'
29
+ }
30
+ end
31
+
32
+ # Returns attribute mapping this model knows about
33
+ def self.acceptable_attribute_map
34
+ attribute_map
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ acceptable_attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'process_name' => :'String',
46
+ :'errors' => :'String'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::ProcessErrorsResponse` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ acceptable_attribute_map = self.class.acceptable_attribute_map
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!acceptable_attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::ProcessErrorsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'process_name')
73
+ self.process_name = attributes[:'process_name']
74
+ else
75
+ self.process_name = nil
76
+ end
77
+
78
+ if attributes.key?(:'errors')
79
+ self.errors = attributes[:'errors']
80
+ else
81
+ self.errors = nil
82
+ end
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
89
+ invalid_properties = Array.new
90
+ if @process_name.nil?
91
+ invalid_properties.push('invalid value for "process_name", process_name cannot be nil.')
92
+ end
93
+
94
+ if @errors.nil?
95
+ invalid_properties.push('invalid value for "errors", errors cannot be nil.')
96
+ end
97
+
98
+ invalid_properties
99
+ end
100
+
101
+ # Check to see if the all the properties in the model are valid
102
+ # @return true if the model is valid
103
+ def valid?
104
+ warn '[DEPRECATED] the `valid?` method is obsolete'
105
+ return false if @process_name.nil?
106
+ return false if @errors.nil?
107
+ true
108
+ end
109
+
110
+ # Custom attribute writer method with validation
111
+ # @param [Object] process_name Value to be assigned
112
+ def process_name=(process_name)
113
+ if process_name.nil?
114
+ fail ArgumentError, 'process_name cannot be nil'
115
+ end
116
+
117
+ @process_name = process_name
118
+ end
119
+
120
+ # Custom attribute writer method with validation
121
+ # @param [Object] errors Value to be assigned
122
+ def errors=(errors)
123
+ if errors.nil?
124
+ fail ArgumentError, 'errors cannot be nil'
125
+ end
126
+
127
+ @errors = errors
128
+ end
129
+
130
+ # Checks equality by comparing each attribute.
131
+ # @param [Object] Object to be compared
132
+ def ==(o)
133
+ return true if self.equal?(o)
134
+ self.class == o.class &&
135
+ process_name == o.process_name &&
136
+ errors == o.errors
137
+ end
138
+
139
+ # @see the `==` method
140
+ # @param [Object] Object to be compared
141
+ def eql?(o)
142
+ self == o
143
+ end
144
+
145
+ # Calculates hash code according to all attributes.
146
+ # @return [Integer] Hash code
147
+ def hash
148
+ [process_name, errors].hash
149
+ end
150
+
151
+ # Builds the object from hash
152
+ # @param [Hash] attributes Model attributes in the form of hash
153
+ # @return [Object] Returns the model itself
154
+ def self.build_from_hash(attributes)
155
+ return nil unless attributes.is_a?(Hash)
156
+ attributes = attributes.transform_keys(&:to_sym)
157
+ transformed_hash = {}
158
+ openapi_types.each_pair do |key, type|
159
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
160
+ transformed_hash["#{key}"] = nil
161
+ elsif type =~ /\AArray<(.*)>/i
162
+ # check to ensure the input is an array given that the attribute
163
+ # is documented as an array but the input is not
164
+ if attributes[attribute_map[key]].is_a?(Array)
165
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
166
+ end
167
+ elsif !attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
169
+ end
170
+ end
171
+ new(transformed_hash)
172
+ end
173
+
174
+ # Deserializes the data based on type
175
+ # @param string type Data type
176
+ # @param string value Value to be deserialized
177
+ # @return [Object] Deserialized data
178
+ def self._deserialize(type, value)
179
+ case type.to_sym
180
+ when :Time
181
+ Time.parse(value)
182
+ when :Date
183
+ Date.parse(value)
184
+ when :String
185
+ value.to_s
186
+ when :Integer
187
+ value.to_i
188
+ when :Float
189
+ value.to_f
190
+ when :Boolean
191
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
192
+ true
193
+ else
194
+ false
195
+ end
196
+ when :Object
197
+ # generic object (usually a Hash), return directly
198
+ value
199
+ when /\AArray<(?<inner_type>.+)>\z/
200
+ inner_type = Regexp.last_match[:inner_type]
201
+ value.map { |v| _deserialize(inner_type, v) }
202
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
203
+ k_type = Regexp.last_match[:k_type]
204
+ v_type = Regexp.last_match[:v_type]
205
+ {}.tap do |hash|
206
+ value.each do |k, v|
207
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
208
+ end
209
+ end
210
+ else # model
211
+ # models (e.g. Pet) or oneOf
212
+ klass = DaytonaApiClient.const_get(type)
213
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
214
+ end
215
+ end
216
+
217
+ # Returns the string representation of the object
218
+ # @return [String] String presentation of the object
219
+ def to_s
220
+ to_hash.to_s
221
+ end
222
+
223
+ # to_body is an alias to to_hash (backward compatibility)
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_body
226
+ to_hash
227
+ end
228
+
229
+ # Returns the object in the form of hash
230
+ # @return [Hash] Returns the object in the form of hash
231
+ def to_hash
232
+ hash = {}
233
+ self.class.attribute_map.each_pair do |attr, param|
234
+ value = self.send(attr)
235
+ if value.nil?
236
+ is_nullable = self.class.openapi_nullable.include?(attr)
237
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
238
+ end
239
+
240
+ hash[param] = _to_hash(value)
241
+ end
242
+ hash
243
+ end
244
+
245
+ # Outputs non-array value in the form of hash
246
+ # For object, use to_hash. Otherwise, just return the value
247
+ # @param [Object] value Any valid value
248
+ # @return [Hash] Returns the value in the form of hash
249
+ def _to_hash(value)
250
+ if value.is_a?(Array)
251
+ value.compact.map { |v| _to_hash(v) }
252
+ elsif value.is_a?(Hash)
253
+ {}.tap do |hash|
254
+ value.each { |k, v| hash[k] = _to_hash(v) }
255
+ end
256
+ elsif value.respond_to? :to_hash
257
+ value.to_hash
258
+ else
259
+ value
260
+ end
261
+ end
262
+ end
263
+ end