daytona_api_client_async 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 (209) hide show
  1. daytona_api_client_async/__init__.py +195 -0
  2. daytona_api_client_async/api/__init__.py +21 -0
  3. daytona_api_client_async/api/api_keys_api.py +1673 -0
  4. daytona_api_client_async/api/audit_api.py +750 -0
  5. daytona_api_client_async/api/config_api.py +279 -0
  6. daytona_api_client_async/api/default_api.py +1884 -0
  7. daytona_api_client_async/api/docker_registry_api.py +1965 -0
  8. daytona_api_client_async/api/health_api.py +282 -0
  9. daytona_api_client_async/api/object_storage_api.py +299 -0
  10. daytona_api_client_async/api/organizations_api.py +7836 -0
  11. daytona_api_client_async/api/preview_api.py +826 -0
  12. daytona_api_client_async/api/regions_api.py +316 -0
  13. daytona_api_client_async/api/runners_api.py +1560 -0
  14. daytona_api_client_async/api/sandbox_api.py +6927 -0
  15. daytona_api_client_async/api/snapshots_api.py +2630 -0
  16. daytona_api_client_async/api/toolbox_api.py +20759 -0
  17. daytona_api_client_async/api/users_api.py +2319 -0
  18. daytona_api_client_async/api/volumes_api.py +1419 -0
  19. daytona_api_client_async/api/webhooks_api.py +1704 -0
  20. daytona_api_client_async/api/workspace_api.py +4036 -0
  21. daytona_api_client_async/api_client.py +801 -0
  22. daytona_api_client_async/api_response.py +21 -0
  23. daytona_api_client_async/configuration.py +579 -0
  24. daytona_api_client_async/exceptions.py +217 -0
  25. daytona_api_client_async/models/__init__.py +162 -0
  26. daytona_api_client_async/models/account_provider.py +103 -0
  27. daytona_api_client_async/models/announcement.py +103 -0
  28. daytona_api_client_async/models/api_key_list.py +132 -0
  29. daytona_api_client_async/models/api_key_response.py +123 -0
  30. daytona_api_client_async/models/audit_log.py +128 -0
  31. daytona_api_client_async/models/build_info.py +108 -0
  32. daytona_api_client_async/models/command.py +105 -0
  33. daytona_api_client_async/models/completion_context.py +103 -0
  34. daytona_api_client_async/models/completion_item.py +113 -0
  35. daytona_api_client_async/models/completion_list.py +111 -0
  36. daytona_api_client_async/models/compressed_screenshot_response.py +105 -0
  37. daytona_api_client_async/models/computer_use_start_response.py +103 -0
  38. daytona_api_client_async/models/computer_use_status_response.py +108 -0
  39. daytona_api_client_async/models/computer_use_stop_response.py +103 -0
  40. daytona_api_client_async/models/configuration.py +145 -0
  41. daytona_api_client_async/models/create_api_key.py +119 -0
  42. daytona_api_client_async/models/create_audit_log.py +128 -0
  43. daytona_api_client_async/models/create_build_info.py +103 -0
  44. daytona_api_client_async/models/create_docker_registry.py +120 -0
  45. daytona_api_client_async/models/create_linked_account.py +103 -0
  46. daytona_api_client_async/models/create_organization.py +103 -0
  47. daytona_api_client_async/models/create_organization_invitation.py +115 -0
  48. daytona_api_client_async/models/create_organization_quota.py +117 -0
  49. daytona_api_client_async/models/create_organization_role.py +113 -0
  50. daytona_api_client_async/models/create_runner.py +130 -0
  51. daytona_api_client_async/models/create_sandbox.py +159 -0
  52. daytona_api_client_async/models/create_session_request.py +101 -0
  53. daytona_api_client_async/models/create_snapshot.py +121 -0
  54. daytona_api_client_async/models/create_user.py +127 -0
  55. daytona_api_client_async/models/create_volume.py +101 -0
  56. daytona_api_client_async/models/create_workspace.py +161 -0
  57. daytona_api_client_async/models/daytona_configuration.py +158 -0
  58. daytona_api_client_async/models/display_info_response.py +101 -0
  59. daytona_api_client_async/models/docker_registry.py +123 -0
  60. daytona_api_client_async/models/download_files.py +101 -0
  61. daytona_api_client_async/models/empty_response.py +101 -0
  62. daytona_api_client_async/models/execute_request.py +105 -0
  63. daytona_api_client_async/models/execute_response.py +103 -0
  64. daytona_api_client_async/models/file_info.py +115 -0
  65. daytona_api_client_async/models/file_status.py +107 -0
  66. daytona_api_client_async/models/git_add_request.py +103 -0
  67. daytona_api_client_async/models/git_branch_request.py +103 -0
  68. daytona_api_client_async/models/git_checkout_request.py +103 -0
  69. daytona_api_client_async/models/git_clone_request.py +111 -0
  70. daytona_api_client_async/models/git_commit_info.py +109 -0
  71. daytona_api_client_async/models/git_commit_request.py +109 -0
  72. daytona_api_client_async/models/git_commit_response.py +101 -0
  73. daytona_api_client_async/models/git_delete_branch_request.py +103 -0
  74. daytona_api_client_async/models/git_repo_request.py +105 -0
  75. daytona_api_client_async/models/git_status.py +117 -0
  76. daytona_api_client_async/models/health_controller_check200_response.py +154 -0
  77. daytona_api_client_async/models/health_controller_check200_response_info_value.py +101 -0
  78. daytona_api_client_async/models/health_controller_check503_response.py +154 -0
  79. daytona_api_client_async/models/keyboard_hotkey_request.py +101 -0
  80. daytona_api_client_async/models/keyboard_hotkey_response.py +103 -0
  81. daytona_api_client_async/models/keyboard_press_request.py +103 -0
  82. daytona_api_client_async/models/keyboard_press_response.py +105 -0
  83. daytona_api_client_async/models/keyboard_type_request.py +103 -0
  84. daytona_api_client_async/models/keyboard_type_response.py +103 -0
  85. daytona_api_client_async/models/list_branch_response.py +101 -0
  86. daytona_api_client_async/models/lsp_completion_params.py +117 -0
  87. daytona_api_client_async/models/lsp_document_request.py +105 -0
  88. daytona_api_client_async/models/lsp_location.py +107 -0
  89. daytona_api_client_async/models/lsp_server_request.py +103 -0
  90. daytona_api_client_async/models/lsp_symbol.py +109 -0
  91. daytona_api_client_async/models/match.py +105 -0
  92. daytona_api_client_async/models/mouse_click_request.py +107 -0
  93. daytona_api_client_async/models/mouse_click_response.py +103 -0
  94. daytona_api_client_async/models/mouse_drag_request.py +109 -0
  95. daytona_api_client_async/models/mouse_drag_response.py +103 -0
  96. daytona_api_client_async/models/mouse_move_request.py +103 -0
  97. daytona_api_client_async/models/mouse_move_response.py +103 -0
  98. daytona_api_client_async/models/mouse_position.py +103 -0
  99. daytona_api_client_async/models/mouse_scroll_request.py +107 -0
  100. daytona_api_client_async/models/mouse_scroll_response.py +101 -0
  101. daytona_api_client_async/models/oidc_config.py +105 -0
  102. daytona_api_client_async/models/organization.py +153 -0
  103. daytona_api_client_async/models/organization_invitation.py +144 -0
  104. daytona_api_client_async/models/organization_role.py +122 -0
  105. daytona_api_client_async/models/organization_sandbox_default_limited_network_egress.py +101 -0
  106. daytona_api_client_async/models/organization_sandbox_default_network_block_all.py +101 -0
  107. daytona_api_client_async/models/organization_suspension.py +106 -0
  108. daytona_api_client_async/models/organization_usage_overview.py +117 -0
  109. daytona_api_client_async/models/organization_user.py +131 -0
  110. daytona_api_client_async/models/paginated_audit_logs.py +117 -0
  111. daytona_api_client_async/models/paginated_sandboxes.py +115 -0
  112. daytona_api_client_async/models/paginated_snapshots.py +115 -0
  113. daytona_api_client_async/models/paginated_snapshots_dto.py +115 -0
  114. daytona_api_client_async/models/paginated_workspaces.py +115 -0
  115. daytona_api_client_async/models/port_preview_url.py +105 -0
  116. daytona_api_client_async/models/position.py +103 -0
  117. daytona_api_client_async/models/posthog_config.py +103 -0
  118. daytona_api_client_async/models/process_errors_response.py +103 -0
  119. daytona_api_client_async/models/process_logs_response.py +103 -0
  120. daytona_api_client_async/models/process_restart_response.py +103 -0
  121. daytona_api_client_async/models/process_status_response.py +103 -0
  122. daytona_api_client_async/models/project_dir_response.py +101 -0
  123. daytona_api_client_async/models/pty_create_request.py +111 -0
  124. daytona_api_client_async/models/pty_create_response.py +101 -0
  125. daytona_api_client_async/models/pty_list_response.py +109 -0
  126. daytona_api_client_async/models/pty_resize_request.py +103 -0
  127. daytona_api_client_async/models/pty_session_info.py +115 -0
  128. daytona_api_client_async/models/range.py +110 -0
  129. daytona_api_client_async/models/rate_limit_config.py +120 -0
  130. daytona_api_client_async/models/rate_limit_entry.py +103 -0
  131. daytona_api_client_async/models/region.py +114 -0
  132. daytona_api_client_async/models/region_quota.py +109 -0
  133. daytona_api_client_async/models/region_screenshot_response.py +105 -0
  134. daytona_api_client_async/models/region_usage_overview.py +113 -0
  135. daytona_api_client_async/models/registry_push_access_dto.py +111 -0
  136. daytona_api_client_async/models/replace_request.py +105 -0
  137. daytona_api_client_async/models/replace_result.py +105 -0
  138. daytona_api_client_async/models/runner.py +153 -0
  139. daytona_api_client_async/models/runner_region.py +39 -0
  140. daytona_api_client_async/models/runner_snapshot_dto.py +105 -0
  141. daytona_api_client_async/models/runner_state.py +41 -0
  142. daytona_api_client_async/models/sandbox.py +193 -0
  143. daytona_api_client_async/models/sandbox_class.py +39 -0
  144. daytona_api_client_async/models/sandbox_created_post_request.py +110 -0
  145. daytona_api_client_async/models/sandbox_created_post_request_data.py +152 -0
  146. daytona_api_client_async/models/sandbox_desired_state.py +41 -0
  147. daytona_api_client_async/models/sandbox_info.py +105 -0
  148. daytona_api_client_async/models/sandbox_labels.py +101 -0
  149. daytona_api_client_async/models/sandbox_state.py +52 -0
  150. daytona_api_client_async/models/sandbox_state_updated_post_request.py +110 -0
  151. daytona_api_client_async/models/sandbox_state_updated_post_request_data.py +129 -0
  152. daytona_api_client_async/models/sandbox_state_updated_post_request_data_sandbox.py +115 -0
  153. daytona_api_client_async/models/sandbox_volume.py +105 -0
  154. daytona_api_client_async/models/screenshot_response.py +105 -0
  155. daytona_api_client_async/models/search_files_response.py +101 -0
  156. daytona_api_client_async/models/send_webhook_dto.py +105 -0
  157. daytona_api_client_async/models/session.py +116 -0
  158. daytona_api_client_async/models/session_command_logs_response.py +103 -0
  159. daytona_api_client_async/models/session_execute_request.py +105 -0
  160. daytona_api_client_async/models/session_execute_response.py +105 -0
  161. daytona_api_client_async/models/set_snapshot_general_status_dto.py +101 -0
  162. daytona_api_client_async/models/snapshot_created_post_request.py +110 -0
  163. daytona_api_client_async/models/snapshot_created_post_request_data.py +136 -0
  164. daytona_api_client_async/models/snapshot_dto.py +159 -0
  165. daytona_api_client_async/models/snapshot_removed_post_request.py +106 -0
  166. daytona_api_client_async/models/snapshot_state.py +44 -0
  167. daytona_api_client_async/models/snapshot_state_updated_post_request.py +110 -0
  168. daytona_api_client_async/models/snapshot_state_updated_post_request_data.py +129 -0
  169. daytona_api_client_async/models/snapshot_state_updated_post_request_data_snapshot.py +115 -0
  170. daytona_api_client_async/models/ssh_access_dto.py +112 -0
  171. daytona_api_client_async/models/ssh_access_validation_dto.py +103 -0
  172. daytona_api_client_async/models/storage_access_dto.py +111 -0
  173. daytona_api_client_async/models/update_assigned_organization_roles.py +101 -0
  174. daytona_api_client_async/models/update_docker_registry.py +109 -0
  175. daytona_api_client_async/models/update_organization_default_region.py +101 -0
  176. daytona_api_client_async/models/update_organization_invitation.py +113 -0
  177. daytona_api_client_async/models/update_organization_member_access.py +110 -0
  178. daytona_api_client_async/models/update_organization_member_role.py +108 -0
  179. daytona_api_client_async/models/update_organization_quota.py +162 -0
  180. daytona_api_client_async/models/update_organization_region_quota.py +120 -0
  181. daytona_api_client_async/models/update_organization_role.py +113 -0
  182. daytona_api_client_async/models/update_sandbox_state_dto.py +110 -0
  183. daytona_api_client_async/models/user.py +118 -0
  184. daytona_api_client_async/models/user_home_dir_response.py +101 -0
  185. daytona_api_client_async/models/user_public_key.py +103 -0
  186. daytona_api_client_async/models/volume_created_post_request.py +110 -0
  187. daytona_api_client_async/models/volume_created_post_request_data.py +126 -0
  188. daytona_api_client_async/models/volume_dto.py +126 -0
  189. daytona_api_client_async/models/volume_state.py +43 -0
  190. daytona_api_client_async/models/volume_state_updated_post_request.py +110 -0
  191. daytona_api_client_async/models/volume_state_updated_post_request_data.py +129 -0
  192. daytona_api_client_async/models/volume_state_updated_post_request_data_volume.py +115 -0
  193. daytona_api_client_async/models/webhook_app_portal_access.py +101 -0
  194. daytona_api_client_async/models/webhook_controller_get_app_portal_access200_response.py +101 -0
  195. daytona_api_client_async/models/webhook_controller_get_initialization_status200_response.py +118 -0
  196. daytona_api_client_async/models/webhook_controller_get_status200_response.py +101 -0
  197. daytona_api_client_async/models/webhook_initialization_status.py +121 -0
  198. daytona_api_client_async/models/windows_response.py +103 -0
  199. daytona_api_client_async/models/work_dir_response.py +101 -0
  200. daytona_api_client_async/models/workdir_response.py +101 -0
  201. daytona_api_client_async/models/workspace.py +215 -0
  202. daytona_api_client_async/models/workspace_port_preview_url.py +103 -0
  203. daytona_api_client_async/py.typed +0 -0
  204. daytona_api_client_async/rest.py +214 -0
  205. daytona_api_client_async-0.0.0.dev0.dist-info/METADATA +27 -0
  206. daytona_api_client_async-0.0.0.dev0.dist-info/RECORD +209 -0
  207. daytona_api_client_async-0.0.0.dev0.dist-info/WHEEL +5 -0
  208. daytona_api_client_async-0.0.0.dev0.dist-info/licenses/LICENSE +190 -0
  209. daytona_api_client_async-0.0.0.dev0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,105 @@
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, StrictFloat, StrictInt, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional, Union
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class ScreenshotResponse(BaseModel):
27
+ """
28
+ ScreenshotResponse
29
+ """ # noqa: E501
30
+ screenshot: StrictStr = Field(description="Base64 encoded screenshot image data")
31
+ cursor_position: Optional[Dict[str, Any]] = Field(default=None, description="The current cursor position when the screenshot was taken", alias="cursorPosition")
32
+ size_bytes: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The size of the screenshot data in bytes", alias="sizeBytes")
33
+ additional_properties: Dict[str, Any] = {}
34
+ __properties: ClassVar[List[str]] = ["screenshot", "cursorPosition", "sizeBytes"]
35
+
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of ScreenshotResponse from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ * Fields in `self.additional_properties` are added to the output dict.
67
+ """
68
+ excluded_fields: Set[str] = set([
69
+ "additional_properties",
70
+ ])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ # puts key-value pairs in additional_properties in the top level
78
+ if self.additional_properties is not None:
79
+ for _key, _value in self.additional_properties.items():
80
+ _dict[_key] = _value
81
+
82
+ return _dict
83
+
84
+ @classmethod
85
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
+ """Create an instance of ScreenshotResponse from a dict"""
87
+ if obj is None:
88
+ return None
89
+
90
+ if not isinstance(obj, dict):
91
+ return cls.model_validate(obj)
92
+
93
+ _obj = cls.model_validate({
94
+ "screenshot": obj.get("screenshot"),
95
+ "cursorPosition": obj.get("cursorPosition"),
96
+ "sizeBytes": obj.get("sizeBytes")
97
+ })
98
+ # store additional fields in additional_properties
99
+ for _key in obj.keys():
100
+ if _key not in cls.__properties:
101
+ _obj.additional_properties[_key] = obj.get(_key)
102
+
103
+ return _obj
104
+
105
+
@@ -0,0 +1,101 @@
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, StrictStr
22
+ from typing import Any, ClassVar, Dict, List
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class SearchFilesResponse(BaseModel):
27
+ """
28
+ SearchFilesResponse
29
+ """ # noqa: E501
30
+ files: List[StrictStr]
31
+ additional_properties: Dict[str, Any] = {}
32
+ __properties: ClassVar[List[str]] = ["files"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
+
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.model_dump(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of SearchFilesResponse from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self) -> Dict[str, Any]:
56
+ """Return the dictionary representation of the model using alias.
57
+
58
+ This has the following differences from calling pydantic's
59
+ `self.model_dump(by_alias=True)`:
60
+
61
+ * `None` is only added to the output dict for nullable fields that
62
+ were set at model initialization. Other fields with value `None`
63
+ are ignored.
64
+ * Fields in `self.additional_properties` are added to the output dict.
65
+ """
66
+ excluded_fields: Set[str] = set([
67
+ "additional_properties",
68
+ ])
69
+
70
+ _dict = self.model_dump(
71
+ by_alias=True,
72
+ exclude=excluded_fields,
73
+ exclude_none=True,
74
+ )
75
+ # puts key-value pairs in additional_properties in the top level
76
+ if self.additional_properties is not None:
77
+ for _key, _value in self.additional_properties.items():
78
+ _dict[_key] = _value
79
+
80
+ return _dict
81
+
82
+ @classmethod
83
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84
+ """Create an instance of SearchFilesResponse from a dict"""
85
+ if obj is None:
86
+ return None
87
+
88
+ if not isinstance(obj, dict):
89
+ return cls.model_validate(obj)
90
+
91
+ _obj = cls.model_validate({
92
+ "files": obj.get("files")
93
+ })
94
+ # store additional fields in additional_properties
95
+ for _key in obj.keys():
96
+ if _key not in cls.__properties:
97
+ _obj.additional_properties[_key] = obj.get(_key)
98
+
99
+ return _obj
100
+
101
+
@@ -0,0 +1,105 @@
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, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class SendWebhookDto(BaseModel):
27
+ """
28
+ SendWebhookDto
29
+ """ # noqa: E501
30
+ event_type: StrictStr = Field(description="The type of event being sent", alias="eventType")
31
+ payload: Dict[str, Any] = Field(description="The payload data to send")
32
+ event_id: Optional[StrictStr] = Field(default=None, description="Optional event ID for idempotency", alias="eventId")
33
+ additional_properties: Dict[str, Any] = {}
34
+ __properties: ClassVar[List[str]] = ["eventType", "payload", "eventId"]
35
+
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of SendWebhookDto from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ * Fields in `self.additional_properties` are added to the output dict.
67
+ """
68
+ excluded_fields: Set[str] = set([
69
+ "additional_properties",
70
+ ])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ # puts key-value pairs in additional_properties in the top level
78
+ if self.additional_properties is not None:
79
+ for _key, _value in self.additional_properties.items():
80
+ _dict[_key] = _value
81
+
82
+ return _dict
83
+
84
+ @classmethod
85
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
+ """Create an instance of SendWebhookDto from a dict"""
87
+ if obj is None:
88
+ return None
89
+
90
+ if not isinstance(obj, dict):
91
+ return cls.model_validate(obj)
92
+
93
+ _obj = cls.model_validate({
94
+ "eventType": obj.get("eventType"),
95
+ "payload": obj.get("payload"),
96
+ "eventId": obj.get("eventId")
97
+ })
98
+ # store additional fields in additional_properties
99
+ for _key in obj.keys():
100
+ if _key not in cls.__properties:
101
+ _obj.additional_properties[_key] = obj.get(_key)
102
+
103
+ return _obj
104
+
105
+
@@ -0,0 +1,116 @@
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, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from daytona_api_client_async.models.command import Command
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class Session(BaseModel):
28
+ """
29
+ Session
30
+ """ # noqa: E501
31
+ session_id: StrictStr = Field(description="The ID of the session", alias="sessionId")
32
+ commands: Optional[List[Command]] = Field(description="The list of commands executed in this session")
33
+ additional_properties: Dict[str, Any] = {}
34
+ __properties: ClassVar[List[str]] = ["sessionId", "commands"]
35
+
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of Session from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ * Fields in `self.additional_properties` are added to the output dict.
67
+ """
68
+ excluded_fields: Set[str] = set([
69
+ "additional_properties",
70
+ ])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ # override the default output from pydantic by calling `to_dict()` of each item in commands (list)
78
+ _items = []
79
+ if self.commands:
80
+ for _item_commands in self.commands:
81
+ if _item_commands:
82
+ _items.append(_item_commands.to_dict())
83
+ _dict['commands'] = _items
84
+ # puts key-value pairs in additional_properties in the top level
85
+ if self.additional_properties is not None:
86
+ for _key, _value in self.additional_properties.items():
87
+ _dict[_key] = _value
88
+
89
+ # set to None if commands (nullable) is None
90
+ # and model_fields_set contains the field
91
+ if self.commands is None and "commands" in self.model_fields_set:
92
+ _dict['commands'] = None
93
+
94
+ return _dict
95
+
96
+ @classmethod
97
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
98
+ """Create an instance of Session from a dict"""
99
+ if obj is None:
100
+ return None
101
+
102
+ if not isinstance(obj, dict):
103
+ return cls.model_validate(obj)
104
+
105
+ _obj = cls.model_validate({
106
+ "sessionId": obj.get("sessionId"),
107
+ "commands": [Command.from_dict(_item) for _item in obj["commands"]] if obj.get("commands") is not None else None
108
+ })
109
+ # store additional fields in additional_properties
110
+ for _key in obj.keys():
111
+ if _key not in cls.__properties:
112
+ _obj.additional_properties[_key] = obj.get(_key)
113
+
114
+ return _obj
115
+
116
+
@@ -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, StrictStr
22
+ from typing import Any, ClassVar, Dict, List
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class SessionCommandLogsResponse(BaseModel):
27
+ """
28
+ SessionCommandLogsResponse
29
+ """ # noqa: E501
30
+ stdout: StrictStr = Field(description="The stdout of the command")
31
+ stderr: StrictStr = Field(description="The stderr of the command")
32
+ additional_properties: Dict[str, Any] = {}
33
+ __properties: ClassVar[List[str]] = ["stdout", "stderr"]
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 SessionCommandLogsResponse 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 SessionCommandLogsResponse 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
+ "stdout": obj.get("stdout"),
94
+ "stderr": obj.get("stderr")
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
+
@@ -0,0 +1,105 @@
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, Optional
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class SessionExecuteRequest(BaseModel):
27
+ """
28
+ SessionExecuteRequest
29
+ """ # noqa: E501
30
+ command: StrictStr = Field(description="The command to execute")
31
+ run_async: Optional[StrictBool] = Field(default=None, description="Whether to execute the command asynchronously", alias="runAsync")
32
+ var_async: Optional[StrictBool] = Field(default=None, description="Deprecated: Use runAsync instead. Whether to execute the command asynchronously", alias="async")
33
+ additional_properties: Dict[str, Any] = {}
34
+ __properties: ClassVar[List[str]] = ["command", "runAsync", "async"]
35
+
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of SessionExecuteRequest from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ * Fields in `self.additional_properties` are added to the output dict.
67
+ """
68
+ excluded_fields: Set[str] = set([
69
+ "additional_properties",
70
+ ])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ # puts key-value pairs in additional_properties in the top level
78
+ if self.additional_properties is not None:
79
+ for _key, _value in self.additional_properties.items():
80
+ _dict[_key] = _value
81
+
82
+ return _dict
83
+
84
+ @classmethod
85
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
+ """Create an instance of SessionExecuteRequest from a dict"""
87
+ if obj is None:
88
+ return None
89
+
90
+ if not isinstance(obj, dict):
91
+ return cls.model_validate(obj)
92
+
93
+ _obj = cls.model_validate({
94
+ "command": obj.get("command"),
95
+ "runAsync": obj.get("runAsync"),
96
+ "async": obj.get("async")
97
+ })
98
+ # store additional fields in additional_properties
99
+ for _key in obj.keys():
100
+ if _key not in cls.__properties:
101
+ _obj.additional_properties[_key] = obj.get(_key)
102
+
103
+ return _obj
104
+
105
+