daytona_api_client 0.0.0.dev0__py3-none-any.whl

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 (202) hide show
  1. daytona_api_client/__init__.py +195 -0
  2. daytona_api_client/api/__init__.py +21 -0
  3. daytona_api_client/api/api_keys_api.py +1673 -0
  4. daytona_api_client/api/audit_api.py +750 -0
  5. daytona_api_client/api/config_api.py +279 -0
  6. daytona_api_client/api/default_api.py +1884 -0
  7. daytona_api_client/api/docker_registry_api.py +1965 -0
  8. daytona_api_client/api/health_api.py +282 -0
  9. daytona_api_client/api/object_storage_api.py +299 -0
  10. daytona_api_client/api/organizations_api.py +7836 -0
  11. daytona_api_client/api/preview_api.py +826 -0
  12. daytona_api_client/api/regions_api.py +316 -0
  13. daytona_api_client/api/runners_api.py +1560 -0
  14. daytona_api_client/api/sandbox_api.py +6927 -0
  15. daytona_api_client/api/snapshots_api.py +2630 -0
  16. daytona_api_client/api/toolbox_api.py +20759 -0
  17. daytona_api_client/api/users_api.py +2319 -0
  18. daytona_api_client/api/volumes_api.py +1419 -0
  19. daytona_api_client/api/webhooks_api.py +1704 -0
  20. daytona_api_client/api/workspace_api.py +4036 -0
  21. daytona_api_client/api_client.py +798 -0
  22. daytona_api_client/api_response.py +21 -0
  23. daytona_api_client/configuration.py +583 -0
  24. daytona_api_client/exceptions.py +217 -0
  25. daytona_api_client/models/__init__.py +162 -0
  26. daytona_api_client/models/account_provider.py +103 -0
  27. daytona_api_client/models/announcement.py +103 -0
  28. daytona_api_client/models/api_key_list.py +132 -0
  29. daytona_api_client/models/api_key_response.py +123 -0
  30. daytona_api_client/models/audit_log.py +128 -0
  31. daytona_api_client/models/build_info.py +108 -0
  32. daytona_api_client/models/command.py +105 -0
  33. daytona_api_client/models/completion_context.py +103 -0
  34. daytona_api_client/models/completion_item.py +113 -0
  35. daytona_api_client/models/completion_list.py +111 -0
  36. daytona_api_client/models/compressed_screenshot_response.py +105 -0
  37. daytona_api_client/models/computer_use_start_response.py +103 -0
  38. daytona_api_client/models/computer_use_status_response.py +108 -0
  39. daytona_api_client/models/computer_use_stop_response.py +103 -0
  40. daytona_api_client/models/create_api_key.py +119 -0
  41. daytona_api_client/models/create_audit_log.py +128 -0
  42. daytona_api_client/models/create_build_info.py +103 -0
  43. daytona_api_client/models/create_docker_registry.py +120 -0
  44. daytona_api_client/models/create_linked_account.py +103 -0
  45. daytona_api_client/models/create_organization.py +103 -0
  46. daytona_api_client/models/create_organization_invitation.py +115 -0
  47. daytona_api_client/models/create_organization_quota.py +117 -0
  48. daytona_api_client/models/create_organization_role.py +113 -0
  49. daytona_api_client/models/create_runner.py +130 -0
  50. daytona_api_client/models/create_sandbox.py +159 -0
  51. daytona_api_client/models/create_session_request.py +101 -0
  52. daytona_api_client/models/create_snapshot.py +121 -0
  53. daytona_api_client/models/create_user.py +127 -0
  54. daytona_api_client/models/create_volume.py +101 -0
  55. daytona_api_client/models/create_workspace.py +161 -0
  56. daytona_api_client/models/daytona_configuration.py +158 -0
  57. daytona_api_client/models/display_info_response.py +101 -0
  58. daytona_api_client/models/docker_registry.py +123 -0
  59. daytona_api_client/models/download_files.py +101 -0
  60. daytona_api_client/models/empty_response.py +101 -0
  61. daytona_api_client/models/execute_request.py +105 -0
  62. daytona_api_client/models/execute_response.py +103 -0
  63. daytona_api_client/models/file_info.py +115 -0
  64. daytona_api_client/models/file_status.py +107 -0
  65. daytona_api_client/models/git_add_request.py +103 -0
  66. daytona_api_client/models/git_branch_request.py +103 -0
  67. daytona_api_client/models/git_checkout_request.py +103 -0
  68. daytona_api_client/models/git_clone_request.py +111 -0
  69. daytona_api_client/models/git_commit_info.py +109 -0
  70. daytona_api_client/models/git_commit_request.py +109 -0
  71. daytona_api_client/models/git_commit_response.py +101 -0
  72. daytona_api_client/models/git_delete_branch_request.py +103 -0
  73. daytona_api_client/models/git_repo_request.py +105 -0
  74. daytona_api_client/models/git_status.py +117 -0
  75. daytona_api_client/models/health_controller_check200_response.py +154 -0
  76. daytona_api_client/models/health_controller_check200_response_info_value.py +101 -0
  77. daytona_api_client/models/health_controller_check503_response.py +154 -0
  78. daytona_api_client/models/keyboard_hotkey_request.py +101 -0
  79. daytona_api_client/models/keyboard_hotkey_response.py +103 -0
  80. daytona_api_client/models/keyboard_press_request.py +103 -0
  81. daytona_api_client/models/keyboard_press_response.py +105 -0
  82. daytona_api_client/models/keyboard_type_request.py +103 -0
  83. daytona_api_client/models/keyboard_type_response.py +103 -0
  84. daytona_api_client/models/list_branch_response.py +101 -0
  85. daytona_api_client/models/lsp_completion_params.py +117 -0
  86. daytona_api_client/models/lsp_document_request.py +105 -0
  87. daytona_api_client/models/lsp_location.py +107 -0
  88. daytona_api_client/models/lsp_server_request.py +103 -0
  89. daytona_api_client/models/lsp_symbol.py +109 -0
  90. daytona_api_client/models/match.py +105 -0
  91. daytona_api_client/models/mouse_click_request.py +107 -0
  92. daytona_api_client/models/mouse_click_response.py +103 -0
  93. daytona_api_client/models/mouse_drag_request.py +109 -0
  94. daytona_api_client/models/mouse_drag_response.py +103 -0
  95. daytona_api_client/models/mouse_move_request.py +103 -0
  96. daytona_api_client/models/mouse_move_response.py +103 -0
  97. daytona_api_client/models/mouse_position.py +103 -0
  98. daytona_api_client/models/mouse_scroll_request.py +107 -0
  99. daytona_api_client/models/mouse_scroll_response.py +101 -0
  100. daytona_api_client/models/oidc_config.py +105 -0
  101. daytona_api_client/models/organization.py +153 -0
  102. daytona_api_client/models/organization_invitation.py +144 -0
  103. daytona_api_client/models/organization_role.py +122 -0
  104. daytona_api_client/models/organization_sandbox_default_limited_network_egress.py +101 -0
  105. daytona_api_client/models/organization_sandbox_default_network_block_all.py +101 -0
  106. daytona_api_client/models/organization_suspension.py +106 -0
  107. daytona_api_client/models/organization_usage_overview.py +117 -0
  108. daytona_api_client/models/organization_user.py +131 -0
  109. daytona_api_client/models/paginated_audit_logs.py +117 -0
  110. daytona_api_client/models/paginated_sandboxes.py +115 -0
  111. daytona_api_client/models/paginated_snapshots.py +115 -0
  112. daytona_api_client/models/paginated_snapshots_dto.py +115 -0
  113. daytona_api_client/models/port_preview_url.py +105 -0
  114. daytona_api_client/models/position.py +103 -0
  115. daytona_api_client/models/posthog_config.py +103 -0
  116. daytona_api_client/models/process_errors_response.py +103 -0
  117. daytona_api_client/models/process_logs_response.py +103 -0
  118. daytona_api_client/models/process_restart_response.py +103 -0
  119. daytona_api_client/models/process_status_response.py +103 -0
  120. daytona_api_client/models/project_dir_response.py +101 -0
  121. daytona_api_client/models/pty_create_request.py +111 -0
  122. daytona_api_client/models/pty_create_response.py +101 -0
  123. daytona_api_client/models/pty_list_response.py +109 -0
  124. daytona_api_client/models/pty_resize_request.py +103 -0
  125. daytona_api_client/models/pty_session_info.py +115 -0
  126. daytona_api_client/models/range.py +110 -0
  127. daytona_api_client/models/rate_limit_config.py +120 -0
  128. daytona_api_client/models/rate_limit_entry.py +103 -0
  129. daytona_api_client/models/region.py +114 -0
  130. daytona_api_client/models/region_quota.py +109 -0
  131. daytona_api_client/models/region_screenshot_response.py +105 -0
  132. daytona_api_client/models/region_usage_overview.py +113 -0
  133. daytona_api_client/models/registry_push_access_dto.py +111 -0
  134. daytona_api_client/models/replace_request.py +105 -0
  135. daytona_api_client/models/replace_result.py +105 -0
  136. daytona_api_client/models/runner.py +153 -0
  137. daytona_api_client/models/runner_region.py +39 -0
  138. daytona_api_client/models/runner_snapshot_dto.py +105 -0
  139. daytona_api_client/models/runner_state.py +41 -0
  140. daytona_api_client/models/sandbox.py +193 -0
  141. daytona_api_client/models/sandbox_class.py +39 -0
  142. daytona_api_client/models/sandbox_created_post_request.py +110 -0
  143. daytona_api_client/models/sandbox_created_post_request_data.py +152 -0
  144. daytona_api_client/models/sandbox_desired_state.py +41 -0
  145. daytona_api_client/models/sandbox_info.py +105 -0
  146. daytona_api_client/models/sandbox_labels.py +101 -0
  147. daytona_api_client/models/sandbox_state.py +52 -0
  148. daytona_api_client/models/sandbox_state_updated_post_request.py +110 -0
  149. daytona_api_client/models/sandbox_state_updated_post_request_data.py +129 -0
  150. daytona_api_client/models/sandbox_state_updated_post_request_data_sandbox.py +115 -0
  151. daytona_api_client/models/sandbox_volume.py +105 -0
  152. daytona_api_client/models/screenshot_response.py +105 -0
  153. daytona_api_client/models/search_files_response.py +101 -0
  154. daytona_api_client/models/send_webhook_dto.py +105 -0
  155. daytona_api_client/models/session.py +116 -0
  156. daytona_api_client/models/session_command_logs_response.py +103 -0
  157. daytona_api_client/models/session_execute_request.py +105 -0
  158. daytona_api_client/models/session_execute_response.py +105 -0
  159. daytona_api_client/models/set_snapshot_general_status_dto.py +101 -0
  160. daytona_api_client/models/snapshot_created_post_request.py +110 -0
  161. daytona_api_client/models/snapshot_dto.py +159 -0
  162. daytona_api_client/models/snapshot_removed_post_request.py +106 -0
  163. daytona_api_client/models/snapshot_state.py +44 -0
  164. daytona_api_client/models/snapshot_state_updated_post_request.py +110 -0
  165. daytona_api_client/models/ssh_access_dto.py +112 -0
  166. daytona_api_client/models/ssh_access_validation_dto.py +103 -0
  167. daytona_api_client/models/storage_access_dto.py +111 -0
  168. daytona_api_client/models/update_docker_registry.py +109 -0
  169. daytona_api_client/models/update_organization_default_region.py +101 -0
  170. daytona_api_client/models/update_organization_invitation.py +113 -0
  171. daytona_api_client/models/update_organization_member_access.py +110 -0
  172. daytona_api_client/models/update_organization_quota.py +162 -0
  173. daytona_api_client/models/update_organization_region_quota.py +120 -0
  174. daytona_api_client/models/update_organization_role.py +113 -0
  175. daytona_api_client/models/update_sandbox_state_dto.py +110 -0
  176. daytona_api_client/models/user.py +118 -0
  177. daytona_api_client/models/user_home_dir_response.py +101 -0
  178. daytona_api_client/models/user_public_key.py +103 -0
  179. daytona_api_client/models/volume_created_post_request.py +110 -0
  180. daytona_api_client/models/volume_created_post_request_data.py +126 -0
  181. daytona_api_client/models/volume_dto.py +126 -0
  182. daytona_api_client/models/volume_state.py +43 -0
  183. daytona_api_client/models/volume_state_updated_post_request.py +110 -0
  184. daytona_api_client/models/volume_state_updated_post_request_data.py +129 -0
  185. daytona_api_client/models/volume_state_updated_post_request_data_volume.py +115 -0
  186. daytona_api_client/models/webhook_app_portal_access.py +101 -0
  187. daytona_api_client/models/webhook_controller_get_app_portal_access200_response.py +101 -0
  188. daytona_api_client/models/webhook_controller_get_initialization_status200_response.py +118 -0
  189. daytona_api_client/models/webhook_controller_get_status200_response.py +101 -0
  190. daytona_api_client/models/webhook_initialization_status.py +121 -0
  191. daytona_api_client/models/windows_response.py +103 -0
  192. daytona_api_client/models/work_dir_response.py +101 -0
  193. daytona_api_client/models/workdir_response.py +101 -0
  194. daytona_api_client/models/workspace.py +215 -0
  195. daytona_api_client/models/workspace_port_preview_url.py +103 -0
  196. daytona_api_client/py.typed +0 -0
  197. daytona_api_client/rest.py +259 -0
  198. daytona_api_client-0.0.0.dev0.dist-info/METADATA +25 -0
  199. daytona_api_client-0.0.0.dev0.dist-info/RECORD +202 -0
  200. daytona_api_client-0.0.0.dev0.dist-info/WHEEL +5 -0
  201. daytona_api_client-0.0.0.dev0.dist-info/licenses/LICENSE +190 -0
  202. daytona_api_client-0.0.0.dev0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,159 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Daytona
5
+
6
+ Daytona AI platform API Docs
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Contact: support@daytona.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from datetime import datetime
22
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr
23
+ from typing import Any, ClassVar, Dict, List, Optional, Union
24
+ from daytona_api_client.models.build_info import BuildInfo
25
+ from daytona_api_client.models.snapshot_state import SnapshotState
26
+ from typing import Optional, Set
27
+ from typing_extensions import Self
28
+
29
+ class SnapshotDto(BaseModel):
30
+ """
31
+ SnapshotDto
32
+ """ # noqa: E501
33
+ id: StrictStr
34
+ organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId")
35
+ general: StrictBool
36
+ name: StrictStr
37
+ image_name: Optional[StrictStr] = Field(default=None, alias="imageName")
38
+ state: SnapshotState
39
+ size: Optional[Union[StrictFloat, StrictInt]]
40
+ entrypoint: Optional[List[StrictStr]]
41
+ cpu: Union[StrictFloat, StrictInt]
42
+ gpu: Union[StrictFloat, StrictInt]
43
+ mem: Union[StrictFloat, StrictInt]
44
+ disk: Union[StrictFloat, StrictInt]
45
+ error_reason: Optional[StrictStr] = Field(alias="errorReason")
46
+ created_at: datetime = Field(alias="createdAt")
47
+ updated_at: datetime = Field(alias="updatedAt")
48
+ last_used_at: Optional[datetime] = Field(alias="lastUsedAt")
49
+ build_info: Optional[BuildInfo] = Field(default=None, description="Build information for the snapshot", alias="buildInfo")
50
+ additional_properties: Dict[str, Any] = {}
51
+ __properties: ClassVar[List[str]] = ["id", "organizationId", "general", "name", "imageName", "state", "size", "entrypoint", "cpu", "gpu", "mem", "disk", "errorReason", "createdAt", "updatedAt", "lastUsedAt", "buildInfo"]
52
+
53
+ model_config = ConfigDict(
54
+ populate_by_name=True,
55
+ validate_assignment=True,
56
+ protected_namespaces=(),
57
+ )
58
+
59
+
60
+ def to_str(self) -> str:
61
+ """Returns the string representation of the model using alias"""
62
+ return pprint.pformat(self.model_dump(by_alias=True))
63
+
64
+ def to_json(self) -> str:
65
+ """Returns the JSON representation of the model using alias"""
66
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
67
+ return json.dumps(self.to_dict())
68
+
69
+ @classmethod
70
+ def from_json(cls, json_str: str) -> Optional[Self]:
71
+ """Create an instance of SnapshotDto from a JSON string"""
72
+ return cls.from_dict(json.loads(json_str))
73
+
74
+ def to_dict(self) -> Dict[str, Any]:
75
+ """Return the dictionary representation of the model using alias.
76
+
77
+ This has the following differences from calling pydantic's
78
+ `self.model_dump(by_alias=True)`:
79
+
80
+ * `None` is only added to the output dict for nullable fields that
81
+ were set at model initialization. Other fields with value `None`
82
+ are ignored.
83
+ * Fields in `self.additional_properties` are added to the output dict.
84
+ """
85
+ excluded_fields: Set[str] = set([
86
+ "additional_properties",
87
+ ])
88
+
89
+ _dict = self.model_dump(
90
+ by_alias=True,
91
+ exclude=excluded_fields,
92
+ exclude_none=True,
93
+ )
94
+ # override the default output from pydantic by calling `to_dict()` of build_info
95
+ if self.build_info:
96
+ _dict['buildInfo'] = self.build_info.to_dict()
97
+ # puts key-value pairs in additional_properties in the top level
98
+ if self.additional_properties is not None:
99
+ for _key, _value in self.additional_properties.items():
100
+ _dict[_key] = _value
101
+
102
+ # set to None if size (nullable) is None
103
+ # and model_fields_set contains the field
104
+ if self.size is None and "size" in self.model_fields_set:
105
+ _dict['size'] = None
106
+
107
+ # set to None if entrypoint (nullable) is None
108
+ # and model_fields_set contains the field
109
+ if self.entrypoint is None and "entrypoint" in self.model_fields_set:
110
+ _dict['entrypoint'] = None
111
+
112
+ # set to None if error_reason (nullable) is None
113
+ # and model_fields_set contains the field
114
+ if self.error_reason is None and "error_reason" in self.model_fields_set:
115
+ _dict['errorReason'] = None
116
+
117
+ # set to None if last_used_at (nullable) is None
118
+ # and model_fields_set contains the field
119
+ if self.last_used_at is None and "last_used_at" in self.model_fields_set:
120
+ _dict['lastUsedAt'] = None
121
+
122
+ return _dict
123
+
124
+ @classmethod
125
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
126
+ """Create an instance of SnapshotDto from a dict"""
127
+ if obj is None:
128
+ return None
129
+
130
+ if not isinstance(obj, dict):
131
+ return cls.model_validate(obj)
132
+
133
+ _obj = cls.model_validate({
134
+ "id": obj.get("id"),
135
+ "organizationId": obj.get("organizationId"),
136
+ "general": obj.get("general"),
137
+ "name": obj.get("name"),
138
+ "imageName": obj.get("imageName"),
139
+ "state": obj.get("state"),
140
+ "size": obj.get("size"),
141
+ "entrypoint": obj.get("entrypoint"),
142
+ "cpu": obj.get("cpu"),
143
+ "gpu": obj.get("gpu"),
144
+ "mem": obj.get("mem"),
145
+ "disk": obj.get("disk"),
146
+ "errorReason": obj.get("errorReason"),
147
+ "createdAt": obj.get("createdAt"),
148
+ "updatedAt": obj.get("updatedAt"),
149
+ "lastUsedAt": obj.get("lastUsedAt"),
150
+ "buildInfo": BuildInfo.from_dict(obj["buildInfo"]) if obj.get("buildInfo") is not None else None
151
+ })
152
+ # store additional fields in additional_properties
153
+ for _key in obj.keys():
154
+ if _key not in cls.__properties:
155
+ _obj.additional_properties[_key] = obj.get(_key)
156
+
157
+ return _obj
158
+
159
+
@@ -0,0 +1,106 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Daytona
5
+
6
+ Daytona AI platform API Docs
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Contact: support@daytona.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from datetime import datetime
22
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
23
+ from typing import Any, ClassVar, Dict, List, Optional
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class SnapshotRemovedPostRequest(BaseModel):
28
+ """
29
+ SnapshotRemovedPostRequest
30
+ """ # noqa: E501
31
+ event: Optional[StrictStr] = None
32
+ timestamp: Optional[datetime] = None
33
+ data: Optional[StrictStr] = Field(default=None, description="The ID of the removed snapshot")
34
+ additional_properties: Dict[str, Any] = {}
35
+ __properties: ClassVar[List[str]] = ["event", "timestamp", "data"]
36
+
37
+ model_config = ConfigDict(
38
+ populate_by_name=True,
39
+ validate_assignment=True,
40
+ protected_namespaces=(),
41
+ )
42
+
43
+
44
+ def to_str(self) -> str:
45
+ """Returns the string representation of the model using alias"""
46
+ return pprint.pformat(self.model_dump(by_alias=True))
47
+
48
+ def to_json(self) -> str:
49
+ """Returns the JSON representation of the model using alias"""
50
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
51
+ return json.dumps(self.to_dict())
52
+
53
+ @classmethod
54
+ def from_json(cls, json_str: str) -> Optional[Self]:
55
+ """Create an instance of SnapshotRemovedPostRequest from a JSON string"""
56
+ return cls.from_dict(json.loads(json_str))
57
+
58
+ def to_dict(self) -> Dict[str, Any]:
59
+ """Return the dictionary representation of the model using alias.
60
+
61
+ This has the following differences from calling pydantic's
62
+ `self.model_dump(by_alias=True)`:
63
+
64
+ * `None` is only added to the output dict for nullable fields that
65
+ were set at model initialization. Other fields with value `None`
66
+ are ignored.
67
+ * Fields in `self.additional_properties` are added to the output dict.
68
+ """
69
+ excluded_fields: Set[str] = set([
70
+ "additional_properties",
71
+ ])
72
+
73
+ _dict = self.model_dump(
74
+ by_alias=True,
75
+ exclude=excluded_fields,
76
+ exclude_none=True,
77
+ )
78
+ # puts key-value pairs in additional_properties in the top level
79
+ if self.additional_properties is not None:
80
+ for _key, _value in self.additional_properties.items():
81
+ _dict[_key] = _value
82
+
83
+ return _dict
84
+
85
+ @classmethod
86
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
87
+ """Create an instance of SnapshotRemovedPostRequest from a dict"""
88
+ if obj is None:
89
+ return None
90
+
91
+ if not isinstance(obj, dict):
92
+ return cls.model_validate(obj)
93
+
94
+ _obj = cls.model_validate({
95
+ "event": obj.get("event"),
96
+ "timestamp": obj.get("timestamp"),
97
+ "data": obj.get("data")
98
+ })
99
+ # store additional fields in additional_properties
100
+ for _key in obj.keys():
101
+ if _key not in cls.__properties:
102
+ _obj.additional_properties[_key] = obj.get(_key)
103
+
104
+ return _obj
105
+
106
+
@@ -0,0 +1,44 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Daytona
5
+
6
+ Daytona AI platform API Docs
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Contact: support@daytona.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import json
18
+ from enum import Enum
19
+ from typing_extensions import Self
20
+
21
+
22
+ class SnapshotState(str, Enum):
23
+ """
24
+ SnapshotState
25
+ """
26
+
27
+ """
28
+ allowed enum values
29
+ """
30
+ BUILDING = 'building'
31
+ PENDING = 'pending'
32
+ PULLING = 'pulling'
33
+ ACTIVE = 'active'
34
+ INACTIVE = 'inactive'
35
+ ERROR = 'error'
36
+ BUILD_FAILED = 'build_failed'
37
+ REMOVING = 'removing'
38
+
39
+ @classmethod
40
+ def from_json(cls, json_str: str) -> Self:
41
+ """Create an instance of SnapshotState from a JSON string"""
42
+ return cls(json.loads(json_str))
43
+
44
+
@@ -0,0 +1,110 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Daytona
5
+
6
+ Daytona AI platform API Docs
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Contact: support@daytona.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from datetime import datetime
22
+ from pydantic import BaseModel, ConfigDict, StrictStr
23
+ from typing import Any, ClassVar, Dict, List, Optional
24
+ from daytona_api_client.models.snapshot_state_updated_post_request_data import SnapshotStateUpdatedPostRequestData
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+ class SnapshotStateUpdatedPostRequest(BaseModel):
29
+ """
30
+ SnapshotStateUpdatedPostRequest
31
+ """ # noqa: E501
32
+ event: Optional[StrictStr] = None
33
+ timestamp: Optional[datetime] = None
34
+ data: Optional[SnapshotStateUpdatedPostRequestData] = None
35
+ additional_properties: Dict[str, Any] = {}
36
+ __properties: ClassVar[List[str]] = ["event", "timestamp", "data"]
37
+
38
+ model_config = ConfigDict(
39
+ populate_by_name=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> Optional[Self]:
56
+ """Create an instance of SnapshotStateUpdatedPostRequest from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self) -> Dict[str, Any]:
60
+ """Return the dictionary representation of the model using alias.
61
+
62
+ This has the following differences from calling pydantic's
63
+ `self.model_dump(by_alias=True)`:
64
+
65
+ * `None` is only added to the output dict for nullable fields that
66
+ were set at model initialization. Other fields with value `None`
67
+ are ignored.
68
+ * Fields in `self.additional_properties` are added to the output dict.
69
+ """
70
+ excluded_fields: Set[str] = set([
71
+ "additional_properties",
72
+ ])
73
+
74
+ _dict = self.model_dump(
75
+ by_alias=True,
76
+ exclude=excluded_fields,
77
+ exclude_none=True,
78
+ )
79
+ # override the default output from pydantic by calling `to_dict()` of data
80
+ if self.data:
81
+ _dict['data'] = self.data.to_dict()
82
+ # puts key-value pairs in additional_properties in the top level
83
+ if self.additional_properties is not None:
84
+ for _key, _value in self.additional_properties.items():
85
+ _dict[_key] = _value
86
+
87
+ return _dict
88
+
89
+ @classmethod
90
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
91
+ """Create an instance of SnapshotStateUpdatedPostRequest from a dict"""
92
+ if obj is None:
93
+ return None
94
+
95
+ if not isinstance(obj, dict):
96
+ return cls.model_validate(obj)
97
+
98
+ _obj = cls.model_validate({
99
+ "event": obj.get("event"),
100
+ "timestamp": obj.get("timestamp"),
101
+ "data": SnapshotStateUpdatedPostRequestData.from_dict(obj["data"]) if obj.get("data") is not None else None
102
+ })
103
+ # store additional fields in additional_properties
104
+ for _key in obj.keys():
105
+ if _key not in cls.__properties:
106
+ _obj.additional_properties[_key] = obj.get(_key)
107
+
108
+ return _obj
109
+
110
+
@@ -0,0 +1,112 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Daytona
5
+
6
+ Daytona AI platform API Docs
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Contact: support@daytona.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from datetime import datetime
22
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
23
+ from typing import Any, ClassVar, Dict, List
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class SshAccessDto(BaseModel):
28
+ """
29
+ SshAccessDto
30
+ """ # noqa: E501
31
+ id: StrictStr = Field(description="Unique identifier for the SSH access")
32
+ sandbox_id: StrictStr = Field(description="ID of the sandbox this SSH access is for", alias="sandboxId")
33
+ token: StrictStr = Field(description="SSH access token")
34
+ expires_at: datetime = Field(description="When the SSH access expires", alias="expiresAt")
35
+ created_at: datetime = Field(description="When the SSH access was created", alias="createdAt")
36
+ updated_at: datetime = Field(description="When the SSH access was last updated", alias="updatedAt")
37
+ additional_properties: Dict[str, Any] = {}
38
+ __properties: ClassVar[List[str]] = ["id", "sandboxId", "token", "expiresAt", "createdAt", "updatedAt"]
39
+
40
+ model_config = ConfigDict(
41
+ populate_by_name=True,
42
+ validate_assignment=True,
43
+ protected_namespaces=(),
44
+ )
45
+
46
+
47
+ def to_str(self) -> str:
48
+ """Returns the string representation of the model using alias"""
49
+ return pprint.pformat(self.model_dump(by_alias=True))
50
+
51
+ def to_json(self) -> str:
52
+ """Returns the JSON representation of the model using alias"""
53
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
54
+ return json.dumps(self.to_dict())
55
+
56
+ @classmethod
57
+ def from_json(cls, json_str: str) -> Optional[Self]:
58
+ """Create an instance of SshAccessDto from a JSON string"""
59
+ return cls.from_dict(json.loads(json_str))
60
+
61
+ def to_dict(self) -> Dict[str, Any]:
62
+ """Return the dictionary representation of the model using alias.
63
+
64
+ This has the following differences from calling pydantic's
65
+ `self.model_dump(by_alias=True)`:
66
+
67
+ * `None` is only added to the output dict for nullable fields that
68
+ were set at model initialization. Other fields with value `None`
69
+ are ignored.
70
+ * Fields in `self.additional_properties` are added to the output dict.
71
+ """
72
+ excluded_fields: Set[str] = set([
73
+ "additional_properties",
74
+ ])
75
+
76
+ _dict = self.model_dump(
77
+ by_alias=True,
78
+ exclude=excluded_fields,
79
+ exclude_none=True,
80
+ )
81
+ # puts key-value pairs in additional_properties in the top level
82
+ if self.additional_properties is not None:
83
+ for _key, _value in self.additional_properties.items():
84
+ _dict[_key] = _value
85
+
86
+ return _dict
87
+
88
+ @classmethod
89
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
90
+ """Create an instance of SshAccessDto from a dict"""
91
+ if obj is None:
92
+ return None
93
+
94
+ if not isinstance(obj, dict):
95
+ return cls.model_validate(obj)
96
+
97
+ _obj = cls.model_validate({
98
+ "id": obj.get("id"),
99
+ "sandboxId": obj.get("sandboxId"),
100
+ "token": obj.get("token"),
101
+ "expiresAt": obj.get("expiresAt"),
102
+ "createdAt": obj.get("createdAt"),
103
+ "updatedAt": obj.get("updatedAt")
104
+ })
105
+ # store additional fields in additional_properties
106
+ for _key in obj.keys():
107
+ if _key not in cls.__properties:
108
+ _obj.additional_properties[_key] = obj.get(_key)
109
+
110
+ return _obj
111
+
112
+
@@ -0,0 +1,103 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Daytona
5
+
6
+ Daytona AI platform API Docs
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Contact: support@daytona.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
22
+ from typing import Any, ClassVar, Dict, List
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class SshAccessValidationDto(BaseModel):
27
+ """
28
+ SshAccessValidationDto
29
+ """ # noqa: E501
30
+ valid: StrictBool = Field(description="Whether the SSH access token is valid")
31
+ sandbox_id: StrictStr = Field(description="ID of the sandbox this SSH access is for", alias="sandboxId")
32
+ additional_properties: Dict[str, Any] = {}
33
+ __properties: ClassVar[List[str]] = ["valid", "sandboxId"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of SshAccessValidationDto from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ * Fields in `self.additional_properties` are added to the output dict.
66
+ """
67
+ excluded_fields: Set[str] = set([
68
+ "additional_properties",
69
+ ])
70
+
71
+ _dict = self.model_dump(
72
+ by_alias=True,
73
+ exclude=excluded_fields,
74
+ exclude_none=True,
75
+ )
76
+ # puts key-value pairs in additional_properties in the top level
77
+ if self.additional_properties is not None:
78
+ for _key, _value in self.additional_properties.items():
79
+ _dict[_key] = _value
80
+
81
+ return _dict
82
+
83
+ @classmethod
84
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
85
+ """Create an instance of SshAccessValidationDto from a dict"""
86
+ if obj is None:
87
+ return None
88
+
89
+ if not isinstance(obj, dict):
90
+ return cls.model_validate(obj)
91
+
92
+ _obj = cls.model_validate({
93
+ "valid": obj.get("valid"),
94
+ "sandboxId": obj.get("sandboxId")
95
+ })
96
+ # store additional fields in additional_properties
97
+ for _key in obj.keys():
98
+ if _key not in cls.__properties:
99
+ _obj.additional_properties[_key] = obj.get(_key)
100
+
101
+ return _obj
102
+
103
+