daytona_toolbox_api_client 0.102.0rc2__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.

Potentially problematic release.


This version of daytona_toolbox_api_client might be problematic. Click here for more details.

Files changed (163) hide show
  1. daytona_daemon_api_client/__init__.py +102 -0
  2. daytona_daemon_api_client/api/__init__.py +11 -0
  3. daytona_daemon_api_client/api/computer_use_api.py +6077 -0
  4. daytona_daemon_api_client/api/file_system_api.py +3463 -0
  5. daytona_daemon_api_client/api/git_api.py +3052 -0
  6. daytona_daemon_api_client/api/info_api.py +528 -0
  7. daytona_daemon_api_client/api/lsp_api.py +2027 -0
  8. daytona_daemon_api_client/api/port_api.py +547 -0
  9. daytona_daemon_api_client/api/process_api.py +2262 -0
  10. daytona_daemon_api_client/api_client.py +797 -0
  11. daytona_daemon_api_client/api_response.py +21 -0
  12. daytona_daemon_api_client/configuration.py +572 -0
  13. daytona_daemon_api_client/exceptions.py +216 -0
  14. daytona_daemon_api_client/models/__init__.py +79 -0
  15. daytona_daemon_api_client/models/command.py +104 -0
  16. daytona_daemon_api_client/models/completion_context.py +102 -0
  17. daytona_daemon_api_client/models/completion_item.py +112 -0
  18. daytona_daemon_api_client/models/completion_list.py +110 -0
  19. daytona_daemon_api_client/models/computer_use_start_response.py +115 -0
  20. daytona_daemon_api_client/models/computer_use_status_response.py +100 -0
  21. daytona_daemon_api_client/models/computer_use_stop_response.py +115 -0
  22. daytona_daemon_api_client/models/create_session_request.py +100 -0
  23. daytona_daemon_api_client/models/display_info.py +110 -0
  24. daytona_daemon_api_client/models/display_info_response.py +108 -0
  25. daytona_daemon_api_client/models/execute_request.py +104 -0
  26. daytona_daemon_api_client/models/execute_response.py +102 -0
  27. daytona_daemon_api_client/models/file_info.py +114 -0
  28. daytona_daemon_api_client/models/file_status.py +107 -0
  29. daytona_daemon_api_client/models/git_add_request.py +102 -0
  30. daytona_daemon_api_client/models/git_branch_request.py +102 -0
  31. daytona_daemon_api_client/models/git_checkout_request.py +102 -0
  32. daytona_daemon_api_client/models/git_clone_request.py +110 -0
  33. daytona_daemon_api_client/models/git_commit_info.py +108 -0
  34. daytona_daemon_api_client/models/git_commit_request.py +108 -0
  35. daytona_daemon_api_client/models/git_commit_response.py +100 -0
  36. daytona_daemon_api_client/models/git_git_delete_branch_request.py +102 -0
  37. daytona_daemon_api_client/models/git_repo_request.py +104 -0
  38. daytona_daemon_api_client/models/git_status.py +116 -0
  39. daytona_daemon_api_client/models/is_port_in_use_response.py +100 -0
  40. daytona_daemon_api_client/models/keyboard_hotkey_request.py +100 -0
  41. daytona_daemon_api_client/models/keyboard_press_request.py +102 -0
  42. daytona_daemon_api_client/models/keyboard_type_request.py +102 -0
  43. daytona_daemon_api_client/models/list_branch_response.py +100 -0
  44. daytona_daemon_api_client/models/lsp_completion_params.py +116 -0
  45. daytona_daemon_api_client/models/lsp_document_request.py +104 -0
  46. daytona_daemon_api_client/models/lsp_location.py +106 -0
  47. daytona_daemon_api_client/models/lsp_position.py +102 -0
  48. daytona_daemon_api_client/models/lsp_range.py +109 -0
  49. daytona_daemon_api_client/models/lsp_server_request.py +102 -0
  50. daytona_daemon_api_client/models/lsp_symbol.py +108 -0
  51. daytona_daemon_api_client/models/match.py +104 -0
  52. daytona_daemon_api_client/models/mouse_click_request.py +106 -0
  53. daytona_daemon_api_client/models/mouse_click_response.py +102 -0
  54. daytona_daemon_api_client/models/mouse_drag_request.py +108 -0
  55. daytona_daemon_api_client/models/mouse_drag_response.py +102 -0
  56. daytona_daemon_api_client/models/mouse_move_request.py +102 -0
  57. daytona_daemon_api_client/models/mouse_position_response.py +102 -0
  58. daytona_daemon_api_client/models/mouse_scroll_request.py +106 -0
  59. daytona_daemon_api_client/models/port_list.py +100 -0
  60. daytona_daemon_api_client/models/position.py +102 -0
  61. daytona_daemon_api_client/models/process_errors_response.py +102 -0
  62. daytona_daemon_api_client/models/process_logs_response.py +102 -0
  63. daytona_daemon_api_client/models/process_restart_response.py +102 -0
  64. daytona_daemon_api_client/models/process_status.py +106 -0
  65. daytona_daemon_api_client/models/process_status_response.py +102 -0
  66. daytona_daemon_api_client/models/project_dir_response.py +100 -0
  67. daytona_daemon_api_client/models/replace_request.py +104 -0
  68. daytona_daemon_api_client/models/replace_result.py +104 -0
  69. daytona_daemon_api_client/models/screenshot_response.py +108 -0
  70. daytona_daemon_api_client/models/scroll_response.py +100 -0
  71. daytona_daemon_api_client/models/search_files_response.py +100 -0
  72. daytona_daemon_api_client/models/session.py +110 -0
  73. daytona_daemon_api_client/models/session_execute_request.py +104 -0
  74. daytona_daemon_api_client/models/session_execute_response.py +108 -0
  75. daytona_daemon_api_client/models/status.py +43 -0
  76. daytona_daemon_api_client/models/window_info.py +112 -0
  77. daytona_daemon_api_client/models/windows_response.py +108 -0
  78. daytona_daemon_api_client/py.typed +0 -0
  79. daytona_daemon_api_client/rest.py +258 -0
  80. daytona_toolbox_api_client/__init__.py +102 -0
  81. daytona_toolbox_api_client/api/__init__.py +11 -0
  82. daytona_toolbox_api_client/api/computer_use_api.py +6011 -0
  83. daytona_toolbox_api_client/api/file_system_api.py +3310 -0
  84. daytona_toolbox_api_client/api/git_api.py +2970 -0
  85. daytona_toolbox_api_client/api/info_api.py +528 -0
  86. daytona_toolbox_api_client/api/lsp_api.py +1972 -0
  87. daytona_toolbox_api_client/api/port_api.py +544 -0
  88. daytona_toolbox_api_client/api/process_api.py +2200 -0
  89. daytona_toolbox_api_client/api_client.py +797 -0
  90. daytona_toolbox_api_client/api_response.py +21 -0
  91. daytona_toolbox_api_client/configuration.py +572 -0
  92. daytona_toolbox_api_client/exceptions.py +216 -0
  93. daytona_toolbox_api_client/models/__init__.py +79 -0
  94. daytona_toolbox_api_client/models/command.py +104 -0
  95. daytona_toolbox_api_client/models/completion_context.py +102 -0
  96. daytona_toolbox_api_client/models/completion_item.py +112 -0
  97. daytona_toolbox_api_client/models/completion_list.py +110 -0
  98. daytona_toolbox_api_client/models/computer_use_start_response.py +115 -0
  99. daytona_toolbox_api_client/models/computer_use_status_response.py +100 -0
  100. daytona_toolbox_api_client/models/computer_use_stop_response.py +115 -0
  101. daytona_toolbox_api_client/models/create_session_request.py +100 -0
  102. daytona_toolbox_api_client/models/display_info.py +110 -0
  103. daytona_toolbox_api_client/models/display_info_response.py +108 -0
  104. daytona_toolbox_api_client/models/execute_request.py +104 -0
  105. daytona_toolbox_api_client/models/execute_response.py +102 -0
  106. daytona_toolbox_api_client/models/file_info.py +114 -0
  107. daytona_toolbox_api_client/models/file_status.py +107 -0
  108. daytona_toolbox_api_client/models/git_add_request.py +102 -0
  109. daytona_toolbox_api_client/models/git_branch_request.py +102 -0
  110. daytona_toolbox_api_client/models/git_checkout_request.py +102 -0
  111. daytona_toolbox_api_client/models/git_clone_request.py +110 -0
  112. daytona_toolbox_api_client/models/git_commit_info.py +108 -0
  113. daytona_toolbox_api_client/models/git_commit_request.py +108 -0
  114. daytona_toolbox_api_client/models/git_commit_response.py +100 -0
  115. daytona_toolbox_api_client/models/git_git_delete_branch_request.py +102 -0
  116. daytona_toolbox_api_client/models/git_repo_request.py +104 -0
  117. daytona_toolbox_api_client/models/git_status.py +116 -0
  118. daytona_toolbox_api_client/models/is_port_in_use_response.py +100 -0
  119. daytona_toolbox_api_client/models/keyboard_hotkey_request.py +100 -0
  120. daytona_toolbox_api_client/models/keyboard_press_request.py +102 -0
  121. daytona_toolbox_api_client/models/keyboard_type_request.py +102 -0
  122. daytona_toolbox_api_client/models/list_branch_response.py +100 -0
  123. daytona_toolbox_api_client/models/lsp_completion_params.py +116 -0
  124. daytona_toolbox_api_client/models/lsp_document_request.py +104 -0
  125. daytona_toolbox_api_client/models/lsp_location.py +106 -0
  126. daytona_toolbox_api_client/models/lsp_position.py +102 -0
  127. daytona_toolbox_api_client/models/lsp_range.py +109 -0
  128. daytona_toolbox_api_client/models/lsp_server_request.py +102 -0
  129. daytona_toolbox_api_client/models/lsp_symbol.py +108 -0
  130. daytona_toolbox_api_client/models/match.py +104 -0
  131. daytona_toolbox_api_client/models/mouse_click_request.py +106 -0
  132. daytona_toolbox_api_client/models/mouse_click_response.py +102 -0
  133. daytona_toolbox_api_client/models/mouse_drag_request.py +108 -0
  134. daytona_toolbox_api_client/models/mouse_drag_response.py +102 -0
  135. daytona_toolbox_api_client/models/mouse_move_request.py +102 -0
  136. daytona_toolbox_api_client/models/mouse_position_response.py +102 -0
  137. daytona_toolbox_api_client/models/mouse_scroll_request.py +106 -0
  138. daytona_toolbox_api_client/models/port_list.py +100 -0
  139. daytona_toolbox_api_client/models/position.py +102 -0
  140. daytona_toolbox_api_client/models/process_errors_response.py +102 -0
  141. daytona_toolbox_api_client/models/process_logs_response.py +102 -0
  142. daytona_toolbox_api_client/models/process_restart_response.py +102 -0
  143. daytona_toolbox_api_client/models/process_status.py +106 -0
  144. daytona_toolbox_api_client/models/process_status_response.py +102 -0
  145. daytona_toolbox_api_client/models/project_dir_response.py +100 -0
  146. daytona_toolbox_api_client/models/replace_request.py +104 -0
  147. daytona_toolbox_api_client/models/replace_result.py +104 -0
  148. daytona_toolbox_api_client/models/screenshot_response.py +108 -0
  149. daytona_toolbox_api_client/models/scroll_response.py +100 -0
  150. daytona_toolbox_api_client/models/search_files_response.py +100 -0
  151. daytona_toolbox_api_client/models/session.py +110 -0
  152. daytona_toolbox_api_client/models/session_execute_request.py +104 -0
  153. daytona_toolbox_api_client/models/session_execute_response.py +108 -0
  154. daytona_toolbox_api_client/models/status.py +43 -0
  155. daytona_toolbox_api_client/models/window_info.py +112 -0
  156. daytona_toolbox_api_client/models/windows_response.py +108 -0
  157. daytona_toolbox_api_client/py.typed +0 -0
  158. daytona_toolbox_api_client/rest.py +258 -0
  159. daytona_toolbox_api_client-0.102.0rc2.dist-info/METADATA +25 -0
  160. daytona_toolbox_api_client-0.102.0rc2.dist-info/RECORD +163 -0
  161. daytona_toolbox_api_client-0.102.0rc2.dist-info/WHEEL +5 -0
  162. daytona_toolbox_api_client-0.102.0rc2.dist-info/licenses/LICENSE +190 -0
  163. daytona_toolbox_api_client-0.102.0rc2.dist-info/top_level.txt +2 -0
@@ -0,0 +1,102 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Daytona Daemon API
5
+
6
+ Daytona Daemon API
7
+
8
+ The version of the OpenAPI document: v0.0.0-dev
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictInt
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class Position(BaseModel):
26
+ """
27
+ Position
28
+ """ # noqa: E501
29
+ character: StrictInt
30
+ line: StrictInt
31
+ additional_properties: Dict[str, Any] = {}
32
+ __properties: ClassVar[List[str]] = ["character", "line"]
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 Position 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 Position 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
+ "character": obj.get("character"),
93
+ "line": obj.get("line")
94
+ })
95
+ # store additional fields in additional_properties
96
+ for _key in obj.keys():
97
+ if _key not in cls.__properties:
98
+ _obj.additional_properties[_key] = obj.get(_key)
99
+
100
+ return _obj
101
+
102
+
@@ -0,0 +1,102 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Daytona Daemon API
5
+
6
+ Daytona Daemon API
7
+
8
+ The version of the OpenAPI document: v0.0.0-dev
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class ProcessErrorsResponse(BaseModel):
26
+ """
27
+ ProcessErrorsResponse
28
+ """ # noqa: E501
29
+ errors: Optional[StrictStr] = None
30
+ process_name: Optional[StrictStr] = Field(default=None, alias="processName")
31
+ additional_properties: Dict[str, Any] = {}
32
+ __properties: ClassVar[List[str]] = ["errors", "processName"]
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 ProcessErrorsResponse 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 ProcessErrorsResponse 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
+ "errors": obj.get("errors"),
93
+ "processName": obj.get("processName")
94
+ })
95
+ # store additional fields in additional_properties
96
+ for _key in obj.keys():
97
+ if _key not in cls.__properties:
98
+ _obj.additional_properties[_key] = obj.get(_key)
99
+
100
+ return _obj
101
+
102
+
@@ -0,0 +1,102 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Daytona Daemon API
5
+
6
+ Daytona Daemon API
7
+
8
+ The version of the OpenAPI document: v0.0.0-dev
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class ProcessLogsResponse(BaseModel):
26
+ """
27
+ ProcessLogsResponse
28
+ """ # noqa: E501
29
+ logs: Optional[StrictStr] = None
30
+ process_name: Optional[StrictStr] = Field(default=None, alias="processName")
31
+ additional_properties: Dict[str, Any] = {}
32
+ __properties: ClassVar[List[str]] = ["logs", "processName"]
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 ProcessLogsResponse 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 ProcessLogsResponse 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
+ "logs": obj.get("logs"),
93
+ "processName": obj.get("processName")
94
+ })
95
+ # store additional fields in additional_properties
96
+ for _key in obj.keys():
97
+ if _key not in cls.__properties:
98
+ _obj.additional_properties[_key] = obj.get(_key)
99
+
100
+ return _obj
101
+
102
+
@@ -0,0 +1,102 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Daytona Daemon API
5
+
6
+ Daytona Daemon API
7
+
8
+ The version of the OpenAPI document: v0.0.0-dev
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class ProcessRestartResponse(BaseModel):
26
+ """
27
+ ProcessRestartResponse
28
+ """ # noqa: E501
29
+ message: Optional[StrictStr] = None
30
+ process_name: Optional[StrictStr] = Field(default=None, alias="processName")
31
+ additional_properties: Dict[str, Any] = {}
32
+ __properties: ClassVar[List[str]] = ["message", "processName"]
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 ProcessRestartResponse 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 ProcessRestartResponse 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
+ "message": obj.get("message"),
93
+ "processName": obj.get("processName")
94
+ })
95
+ # store additional fields in additional_properties
96
+ for _key in obj.keys():
97
+ if _key not in cls.__properties:
98
+ _obj.additional_properties[_key] = obj.get(_key)
99
+
100
+ return _obj
101
+
102
+
@@ -0,0 +1,106 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Daytona Daemon API
5
+
6
+ Daytona Daemon API
7
+
8
+ The version of the OpenAPI document: v0.0.0-dev
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class ProcessStatus(BaseModel):
26
+ """
27
+ ProcessStatus
28
+ """ # noqa: E501
29
+ auto_restart: Optional[StrictBool] = Field(default=None, alias="autoRestart")
30
+ pid: Optional[StrictInt] = None
31
+ priority: Optional[StrictInt] = None
32
+ running: Optional[StrictBool] = None
33
+ additional_properties: Dict[str, Any] = {}
34
+ __properties: ClassVar[List[str]] = ["autoRestart", "pid", "priority", "running"]
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 ProcessStatus 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 ProcessStatus 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
+ "autoRestart": obj.get("autoRestart"),
95
+ "pid": obj.get("pid"),
96
+ "priority": obj.get("priority"),
97
+ "running": obj.get("running")
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,102 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Daytona Daemon API
5
+
6
+ Daytona Daemon API
7
+
8
+ The version of the OpenAPI document: v0.0.0-dev
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class ProcessStatusResponse(BaseModel):
26
+ """
27
+ ProcessStatusResponse
28
+ """ # noqa: E501
29
+ process_name: Optional[StrictStr] = Field(default=None, alias="processName")
30
+ running: Optional[StrictBool] = None
31
+ additional_properties: Dict[str, Any] = {}
32
+ __properties: ClassVar[List[str]] = ["processName", "running"]
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 ProcessStatusResponse 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 ProcessStatusResponse 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
+ "processName": obj.get("processName"),
93
+ "running": obj.get("running")
94
+ })
95
+ # store additional fields in additional_properties
96
+ for _key in obj.keys():
97
+ if _key not in cls.__properties:
98
+ _obj.additional_properties[_key] = obj.get(_key)
99
+
100
+ return _obj
101
+
102
+