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