daytona_api_client_async 0.21.3a0__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_api_client_async might be problematic. Click here for more details.
- daytona_api_client_async/__init__.py +129 -0
- daytona_api_client_async/api/__init__.py +16 -0
- daytona_api_client_async/api/api_keys_api.py +1391 -0
- daytona_api_client_async/api/docker_registry_api.py +1965 -0
- daytona_api_client_async/api/images_api.py +2350 -0
- daytona_api_client_async/api/nodes_api.py +792 -0
- daytona_api_client_async/api/object_storage_api.py +298 -0
- daytona_api_client_async/api/organizations_api.py +6762 -0
- daytona_api_client_async/api/preview_api.py +819 -0
- daytona_api_client_async/api/runners_api.py +792 -0
- daytona_api_client_async/api/sandbox_api.py +3994 -0
- daytona_api_client_async/api/snapshots_api.py +2059 -0
- daytona_api_client_async/api/toolbox_api.py +11819 -0
- daytona_api_client_async/api/users_api.py +2075 -0
- daytona_api_client_async/api/volumes_api.py +1419 -0
- daytona_api_client_async/api/workspace_api.py +4036 -0
- daytona_api_client_async/api_client.py +801 -0
- daytona_api_client_async/api_response.py +21 -0
- daytona_api_client_async/configuration.py +579 -0
- daytona_api_client_async/exceptions.py +217 -0
- daytona_api_client_async/models/__init__.py +101 -0
- daytona_api_client_async/models/account_provider.py +103 -0
- daytona_api_client_async/models/api_key_list.py +130 -0
- daytona_api_client_async/models/api_key_response.py +123 -0
- daytona_api_client_async/models/build_image.py +107 -0
- daytona_api_client_async/models/build_info.py +108 -0
- daytona_api_client_async/models/build_snapshot.py +115 -0
- daytona_api_client_async/models/command.py +105 -0
- daytona_api_client_async/models/completion_context.py +103 -0
- daytona_api_client_async/models/completion_item.py +113 -0
- daytona_api_client_async/models/completion_list.py +111 -0
- daytona_api_client_async/models/create_api_key.py +119 -0
- daytona_api_client_async/models/create_build_info.py +103 -0
- daytona_api_client_async/models/create_docker_registry.py +120 -0
- daytona_api_client_async/models/create_image.py +105 -0
- daytona_api_client_async/models/create_linked_account.py +103 -0
- daytona_api_client_async/models/create_node.py +135 -0
- daytona_api_client_async/models/create_organization.py +101 -0
- daytona_api_client_async/models/create_organization_invitation.py +115 -0
- daytona_api_client_async/models/create_organization_quota.py +117 -0
- daytona_api_client_async/models/create_organization_role.py +113 -0
- daytona_api_client_async/models/create_runner.py +135 -0
- daytona_api_client_async/models/create_sandbox.py +161 -0
- daytona_api_client_async/models/create_session_request.py +101 -0
- daytona_api_client_async/models/create_snapshot.py +121 -0
- daytona_api_client_async/models/create_user.py +125 -0
- daytona_api_client_async/models/create_volume.py +101 -0
- daytona_api_client_async/models/create_workspace.py +161 -0
- daytona_api_client_async/models/docker_registry.py +123 -0
- daytona_api_client_async/models/execute_request.py +105 -0
- daytona_api_client_async/models/execute_response.py +103 -0
- daytona_api_client_async/models/file_info.py +115 -0
- daytona_api_client_async/models/file_status.py +107 -0
- daytona_api_client_async/models/git_add_request.py +103 -0
- daytona_api_client_async/models/git_branch_request.py +103 -0
- daytona_api_client_async/models/git_checkout_request.py +103 -0
- daytona_api_client_async/models/git_clone_request.py +111 -0
- daytona_api_client_async/models/git_commit_info.py +109 -0
- daytona_api_client_async/models/git_commit_request.py +107 -0
- daytona_api_client_async/models/git_commit_response.py +101 -0
- daytona_api_client_async/models/git_delete_branch_request.py +103 -0
- daytona_api_client_async/models/git_repo_request.py +105 -0
- daytona_api_client_async/models/git_status.py +117 -0
- daytona_api_client_async/models/image_dto.py +145 -0
- daytona_api_client_async/models/image_state.py +45 -0
- daytona_api_client_async/models/list_branch_response.py +101 -0
- daytona_api_client_async/models/lsp_completion_params.py +117 -0
- daytona_api_client_async/models/lsp_document_request.py +105 -0
- daytona_api_client_async/models/lsp_location.py +107 -0
- daytona_api_client_async/models/lsp_server_request.py +103 -0
- daytona_api_client_async/models/lsp_symbol.py +109 -0
- daytona_api_client_async/models/match.py +105 -0
- daytona_api_client_async/models/organization.py +120 -0
- daytona_api_client_async/models/organization_invitation.py +144 -0
- daytona_api_client_async/models/organization_role.py +122 -0
- daytona_api_client_async/models/organization_suspension.py +104 -0
- daytona_api_client_async/models/organization_user.py +131 -0
- daytona_api_client_async/models/paginated_images_dto.py +115 -0
- daytona_api_client_async/models/paginated_snapshots_dto.py +115 -0
- daytona_api_client_async/models/port_preview_url.py +103 -0
- daytona_api_client_async/models/position.py +103 -0
- daytona_api_client_async/models/project_dir_response.py +101 -0
- daytona_api_client_async/models/range.py +110 -0
- daytona_api_client_async/models/registry_push_access_dto.py +111 -0
- daytona_api_client_async/models/replace_request.py +105 -0
- daytona_api_client_async/models/replace_result.py +105 -0
- daytona_api_client_async/models/sandbox.py +180 -0
- daytona_api_client_async/models/sandbox_info.py +105 -0
- daytona_api_client_async/models/sandbox_labels.py +101 -0
- daytona_api_client_async/models/sandbox_state.py +52 -0
- daytona_api_client_async/models/sandbox_volume.py +103 -0
- daytona_api_client_async/models/search_files_response.py +101 -0
- daytona_api_client_async/models/session.py +116 -0
- daytona_api_client_async/models/session_execute_request.py +105 -0
- daytona_api_client_async/models/session_execute_response.py +105 -0
- daytona_api_client_async/models/set_image_general_status.py +101 -0
- daytona_api_client_async/models/set_snapshot_general_status_dto.py +101 -0
- daytona_api_client_async/models/snapshot_dto.py +161 -0
- daytona_api_client_async/models/snapshot_state.py +46 -0
- daytona_api_client_async/models/storage_access_dto.py +111 -0
- daytona_api_client_async/models/toggle_state.py +101 -0
- daytona_api_client_async/models/update_assigned_organization_roles.py +101 -0
- daytona_api_client_async/models/update_docker_registry.py +105 -0
- daytona_api_client_async/models/update_organization_invitation.py +113 -0
- daytona_api_client_async/models/update_organization_member_role.py +108 -0
- daytona_api_client_async/models/update_organization_quota.py +162 -0
- daytona_api_client_async/models/update_organization_role.py +113 -0
- daytona_api_client_async/models/usage_overview.py +113 -0
- daytona_api_client_async/models/user.py +115 -0
- daytona_api_client_async/models/user_public_key.py +103 -0
- daytona_api_client_async/models/volume_dto.py +126 -0
- daytona_api_client_async/models/volume_state.py +43 -0
- daytona_api_client_async/models/workspace.py +204 -0
- daytona_api_client_async/models/workspace_info.py +105 -0
- daytona_api_client_async/models/workspace_labels.py +101 -0
- daytona_api_client_async/models/workspace_state.py +51 -0
- daytona_api_client_async/models/workspace_volume.py +103 -0
- daytona_api_client_async/py.typed +0 -0
- daytona_api_client_async/rest.py +214 -0
- daytona_api_client_async-0.21.3a0.dist-info/METADATA +25 -0
- daytona_api_client_async-0.21.3a0.dist-info/RECORD +123 -0
- daytona_api_client_async-0.21.3a0.dist-info/WHEEL +5 -0
- daytona_api_client_async-0.21.3a0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,145 @@
|
|
|
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_async.models.image_state import ImageState
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class ImageDto(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
ImageDto
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
id: StrictStr
|
|
33
|
+
organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId")
|
|
34
|
+
general: StrictBool
|
|
35
|
+
name: StrictStr
|
|
36
|
+
enabled: StrictBool
|
|
37
|
+
state: ImageState
|
|
38
|
+
size: Optional[Union[StrictFloat, StrictInt]]
|
|
39
|
+
entrypoint: Optional[List[StrictStr]]
|
|
40
|
+
error_reason: Optional[StrictStr] = Field(alias="errorReason")
|
|
41
|
+
created_at: datetime = Field(alias="createdAt")
|
|
42
|
+
updated_at: datetime = Field(alias="updatedAt")
|
|
43
|
+
last_used_at: Optional[datetime] = Field(alias="lastUsedAt")
|
|
44
|
+
additional_properties: Dict[str, Any] = {}
|
|
45
|
+
__properties: ClassVar[List[str]] = ["id", "organizationId", "general", "name", "enabled", "state", "size", "entrypoint", "errorReason", "createdAt", "updatedAt", "lastUsedAt"]
|
|
46
|
+
|
|
47
|
+
model_config = ConfigDict(
|
|
48
|
+
populate_by_name=True,
|
|
49
|
+
validate_assignment=True,
|
|
50
|
+
protected_namespaces=(),
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def to_str(self) -> str:
|
|
55
|
+
"""Returns the string representation of the model using alias"""
|
|
56
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
57
|
+
|
|
58
|
+
def to_json(self) -> str:
|
|
59
|
+
"""Returns the JSON representation of the model using alias"""
|
|
60
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
61
|
+
return json.dumps(self.to_dict())
|
|
62
|
+
|
|
63
|
+
@classmethod
|
|
64
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
65
|
+
"""Create an instance of ImageDto from a JSON string"""
|
|
66
|
+
return cls.from_dict(json.loads(json_str))
|
|
67
|
+
|
|
68
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
69
|
+
"""Return the dictionary representation of the model using alias.
|
|
70
|
+
|
|
71
|
+
This has the following differences from calling pydantic's
|
|
72
|
+
`self.model_dump(by_alias=True)`:
|
|
73
|
+
|
|
74
|
+
* `None` is only added to the output dict for nullable fields that
|
|
75
|
+
were set at model initialization. Other fields with value `None`
|
|
76
|
+
are ignored.
|
|
77
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
78
|
+
"""
|
|
79
|
+
excluded_fields: Set[str] = set([
|
|
80
|
+
"additional_properties",
|
|
81
|
+
])
|
|
82
|
+
|
|
83
|
+
_dict = self.model_dump(
|
|
84
|
+
by_alias=True,
|
|
85
|
+
exclude=excluded_fields,
|
|
86
|
+
exclude_none=True,
|
|
87
|
+
)
|
|
88
|
+
# puts key-value pairs in additional_properties in the top level
|
|
89
|
+
if self.additional_properties is not None:
|
|
90
|
+
for _key, _value in self.additional_properties.items():
|
|
91
|
+
_dict[_key] = _value
|
|
92
|
+
|
|
93
|
+
# set to None if size (nullable) is None
|
|
94
|
+
# and model_fields_set contains the field
|
|
95
|
+
if self.size is None and "size" in self.model_fields_set:
|
|
96
|
+
_dict['size'] = None
|
|
97
|
+
|
|
98
|
+
# set to None if entrypoint (nullable) is None
|
|
99
|
+
# and model_fields_set contains the field
|
|
100
|
+
if self.entrypoint is None and "entrypoint" in self.model_fields_set:
|
|
101
|
+
_dict['entrypoint'] = None
|
|
102
|
+
|
|
103
|
+
# set to None if error_reason (nullable) is None
|
|
104
|
+
# and model_fields_set contains the field
|
|
105
|
+
if self.error_reason is None and "error_reason" in self.model_fields_set:
|
|
106
|
+
_dict['errorReason'] = None
|
|
107
|
+
|
|
108
|
+
# set to None if last_used_at (nullable) is None
|
|
109
|
+
# and model_fields_set contains the field
|
|
110
|
+
if self.last_used_at is None and "last_used_at" in self.model_fields_set:
|
|
111
|
+
_dict['lastUsedAt'] = None
|
|
112
|
+
|
|
113
|
+
return _dict
|
|
114
|
+
|
|
115
|
+
@classmethod
|
|
116
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
117
|
+
"""Create an instance of ImageDto from a dict"""
|
|
118
|
+
if obj is None:
|
|
119
|
+
return None
|
|
120
|
+
|
|
121
|
+
if not isinstance(obj, dict):
|
|
122
|
+
return cls.model_validate(obj)
|
|
123
|
+
|
|
124
|
+
_obj = cls.model_validate({
|
|
125
|
+
"id": obj.get("id"),
|
|
126
|
+
"organizationId": obj.get("organizationId"),
|
|
127
|
+
"general": obj.get("general"),
|
|
128
|
+
"name": obj.get("name"),
|
|
129
|
+
"enabled": obj.get("enabled"),
|
|
130
|
+
"state": obj.get("state"),
|
|
131
|
+
"size": obj.get("size"),
|
|
132
|
+
"entrypoint": obj.get("entrypoint"),
|
|
133
|
+
"errorReason": obj.get("errorReason"),
|
|
134
|
+
"createdAt": obj.get("createdAt"),
|
|
135
|
+
"updatedAt": obj.get("updatedAt"),
|
|
136
|
+
"lastUsedAt": obj.get("lastUsedAt")
|
|
137
|
+
})
|
|
138
|
+
# store additional fields in additional_properties
|
|
139
|
+
for _key in obj.keys():
|
|
140
|
+
if _key not in cls.__properties:
|
|
141
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
142
|
+
|
|
143
|
+
return _obj
|
|
144
|
+
|
|
145
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
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 ImageState(str, Enum):
|
|
23
|
+
"""
|
|
24
|
+
ImageState
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
"""
|
|
28
|
+
allowed enum values
|
|
29
|
+
"""
|
|
30
|
+
BUILD_PENDING = 'build_pending'
|
|
31
|
+
BUILDING = 'building'
|
|
32
|
+
PENDING = 'pending'
|
|
33
|
+
PULLING_IMAGE = 'pulling_image'
|
|
34
|
+
PENDING_VALIDATION = 'pending_validation'
|
|
35
|
+
VALIDATING = 'validating'
|
|
36
|
+
ACTIVE = 'active'
|
|
37
|
+
ERROR = 'error'
|
|
38
|
+
REMOVING = 'removing'
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_json(cls, json_str: str) -> Self:
|
|
42
|
+
"""Create an instance of ImageState from a JSON string"""
|
|
43
|
+
return cls(json.loads(json_str))
|
|
44
|
+
|
|
45
|
+
|
|
@@ -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 ListBranchResponse(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ListBranchResponse
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
branches: List[StrictStr]
|
|
31
|
+
additional_properties: Dict[str, Any] = {}
|
|
32
|
+
__properties: ClassVar[List[str]] = ["branches"]
|
|
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 ListBranchResponse 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 ListBranchResponse 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
|
+
"branches": obj.get("branches")
|
|
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,117 @@
|
|
|
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.completion_context import CompletionContext
|
|
24
|
+
from daytona_api_client_async.models.position import Position
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class LspCompletionParams(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
LspCompletionParams
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
language_id: StrictStr = Field(description="Language identifier", alias="languageId")
|
|
33
|
+
path_to_project: StrictStr = Field(description="Path to the project", alias="pathToProject")
|
|
34
|
+
uri: StrictStr = Field(description="Document URI")
|
|
35
|
+
position: Position
|
|
36
|
+
context: Optional[CompletionContext] = None
|
|
37
|
+
additional_properties: Dict[str, Any] = {}
|
|
38
|
+
__properties: ClassVar[List[str]] = ["languageId", "pathToProject", "uri", "position", "context"]
|
|
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 LspCompletionParams 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
|
+
# override the default output from pydantic by calling `to_dict()` of position
|
|
82
|
+
if self.position:
|
|
83
|
+
_dict['position'] = self.position.to_dict()
|
|
84
|
+
# override the default output from pydantic by calling `to_dict()` of context
|
|
85
|
+
if self.context:
|
|
86
|
+
_dict['context'] = self.context.to_dict()
|
|
87
|
+
# puts key-value pairs in additional_properties in the top level
|
|
88
|
+
if self.additional_properties is not None:
|
|
89
|
+
for _key, _value in self.additional_properties.items():
|
|
90
|
+
_dict[_key] = _value
|
|
91
|
+
|
|
92
|
+
return _dict
|
|
93
|
+
|
|
94
|
+
@classmethod
|
|
95
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
96
|
+
"""Create an instance of LspCompletionParams from a dict"""
|
|
97
|
+
if obj is None:
|
|
98
|
+
return None
|
|
99
|
+
|
|
100
|
+
if not isinstance(obj, dict):
|
|
101
|
+
return cls.model_validate(obj)
|
|
102
|
+
|
|
103
|
+
_obj = cls.model_validate({
|
|
104
|
+
"languageId": obj.get("languageId"),
|
|
105
|
+
"pathToProject": obj.get("pathToProject"),
|
|
106
|
+
"uri": obj.get("uri"),
|
|
107
|
+
"position": Position.from_dict(obj["position"]) if obj.get("position") is not None else None,
|
|
108
|
+
"context": CompletionContext.from_dict(obj["context"]) if obj.get("context") is not None else None
|
|
109
|
+
})
|
|
110
|
+
# store additional fields in additional_properties
|
|
111
|
+
for _key in obj.keys():
|
|
112
|
+
if _key not in cls.__properties:
|
|
113
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
114
|
+
|
|
115
|
+
return _obj
|
|
116
|
+
|
|
117
|
+
|
|
@@ -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
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class LspDocumentRequest(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
LspDocumentRequest
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
language_id: StrictStr = Field(description="Language identifier", alias="languageId")
|
|
31
|
+
path_to_project: StrictStr = Field(description="Path to the project", alias="pathToProject")
|
|
32
|
+
uri: StrictStr = Field(description="Document URI")
|
|
33
|
+
additional_properties: Dict[str, Any] = {}
|
|
34
|
+
__properties: ClassVar[List[str]] = ["languageId", "pathToProject", "uri"]
|
|
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 LspDocumentRequest 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 LspDocumentRequest 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
|
+
"languageId": obj.get("languageId"),
|
|
95
|
+
"pathToProject": obj.get("pathToProject"),
|
|
96
|
+
"uri": obj.get("uri")
|
|
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,107 @@
|
|
|
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 daytona_api_client_async.models.range import Range
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class LspLocation(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
LspLocation
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
range: Range
|
|
32
|
+
uri: StrictStr
|
|
33
|
+
additional_properties: Dict[str, Any] = {}
|
|
34
|
+
__properties: ClassVar[List[str]] = ["range", "uri"]
|
|
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 LspLocation 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 range
|
|
78
|
+
if self.range:
|
|
79
|
+
_dict['range'] = self.range.to_dict()
|
|
80
|
+
# puts key-value pairs in additional_properties in the top level
|
|
81
|
+
if self.additional_properties is not None:
|
|
82
|
+
for _key, _value in self.additional_properties.items():
|
|
83
|
+
_dict[_key] = _value
|
|
84
|
+
|
|
85
|
+
return _dict
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
89
|
+
"""Create an instance of LspLocation from a dict"""
|
|
90
|
+
if obj is None:
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
if not isinstance(obj, dict):
|
|
94
|
+
return cls.model_validate(obj)
|
|
95
|
+
|
|
96
|
+
_obj = cls.model_validate({
|
|
97
|
+
"range": Range.from_dict(obj["range"]) if obj.get("range") is not None else None,
|
|
98
|
+
"uri": obj.get("uri")
|
|
99
|
+
})
|
|
100
|
+
# store additional fields in additional_properties
|
|
101
|
+
for _key in obj.keys():
|
|
102
|
+
if _key not in cls.__properties:
|
|
103
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
104
|
+
|
|
105
|
+
return _obj
|
|
106
|
+
|
|
107
|
+
|