daytona_api_client_async 0.26.0a11__py3-none-any.whl → 0.26.0rc1__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 +0 -1
- daytona_api_client_async/api/toolbox_api.py +12 -13
- daytona_api_client_async/models/__init__.py +0 -1
- daytona_api_client_async/models/create_audit_log.py +2 -2
- daytona_api_client_async/models/create_sandbox.py +5 -1
- daytona_api_client_async/models/sandbox.py +5 -1
- daytona_api_client_async/models/sandbox_state.py +1 -1
- daytona_api_client_async/models/session_execute_response.py +3 -5
- daytona_api_client_async/models/workspace.py +5 -1
- {daytona_api_client_async-0.26.0a11.dist-info → daytona_api_client_async-0.26.0rc1.dist-info}/METADATA +1 -1
- {daytona_api_client_async-0.26.0a11.dist-info → daytona_api_client_async-0.26.0rc1.dist-info}/RECORD +14 -30
- daytona_api_client_async/api/images_api.py +0 -2350
- daytona_api_client_async/api/nodes_api.py +0 -792
- daytona_api_client_async/models/build_image.py +0 -107
- daytona_api_client_async/models/build_snapshot.py +0 -115
- daytona_api_client_async/models/create_image.py +0 -105
- daytona_api_client_async/models/create_node.py +0 -135
- daytona_api_client_async/models/download_files.py +0 -101
- daytona_api_client_async/models/image_dto.py +0 -145
- daytona_api_client_async/models/image_state.py +0 -45
- daytona_api_client_async/models/paginated_images_dto.py +0 -115
- daytona_api_client_async/models/session_command_logs_response.py +0 -103
- daytona_api_client_async/models/set_image_general_status.py +0 -101
- daytona_api_client_async/models/workspace_info.py +0 -105
- daytona_api_client_async/models/workspace_labels.py +0 -101
- daytona_api_client_async/models/workspace_state.py +0 -51
- daytona_api_client_async/models/workspace_volume.py +0 -103
- {daytona_api_client_async-0.26.0a11.dist-info → daytona_api_client_async-0.26.0rc1.dist-info}/WHEEL +0 -0
- {daytona_api_client_async-0.26.0a11.dist-info → daytona_api_client_async-0.26.0rc1.dist-info}/licenses/LICENSE +0 -0
- {daytona_api_client_async-0.26.0a11.dist-info → daytona_api_client_async-0.26.0rc1.dist-info}/top_level.txt +0 -0
|
@@ -1,145 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,45 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,115 +0,0 @@
|
|
|
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
|
|
22
|
-
from typing import Any, ClassVar, Dict, List, Union
|
|
23
|
-
from daytona_api_client_async.models.image_dto import ImageDto
|
|
24
|
-
from typing import Optional, Set
|
|
25
|
-
from typing_extensions import Self
|
|
26
|
-
|
|
27
|
-
class PaginatedImagesDto(BaseModel):
|
|
28
|
-
"""
|
|
29
|
-
PaginatedImagesDto
|
|
30
|
-
""" # noqa: E501
|
|
31
|
-
items: List[ImageDto]
|
|
32
|
-
total: Union[StrictFloat, StrictInt]
|
|
33
|
-
page: Union[StrictFloat, StrictInt]
|
|
34
|
-
total_pages: Union[StrictFloat, StrictInt] = Field(alias="totalPages")
|
|
35
|
-
additional_properties: Dict[str, Any] = {}
|
|
36
|
-
__properties: ClassVar[List[str]] = ["items", "total", "page", "totalPages"]
|
|
37
|
-
|
|
38
|
-
model_config = ConfigDict(
|
|
39
|
-
populate_by_name=True,
|
|
40
|
-
validate_assignment=True,
|
|
41
|
-
protected_namespaces=(),
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
def to_str(self) -> str:
|
|
46
|
-
"""Returns the string representation of the model using alias"""
|
|
47
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
-
|
|
49
|
-
def to_json(self) -> str:
|
|
50
|
-
"""Returns the JSON representation of the model using alias"""
|
|
51
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
-
return json.dumps(self.to_dict())
|
|
53
|
-
|
|
54
|
-
@classmethod
|
|
55
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
-
"""Create an instance of PaginatedImagesDto from a JSON string"""
|
|
57
|
-
return cls.from_dict(json.loads(json_str))
|
|
58
|
-
|
|
59
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
-
"""Return the dictionary representation of the model using alias.
|
|
61
|
-
|
|
62
|
-
This has the following differences from calling pydantic's
|
|
63
|
-
`self.model_dump(by_alias=True)`:
|
|
64
|
-
|
|
65
|
-
* `None` is only added to the output dict for nullable fields that
|
|
66
|
-
were set at model initialization. Other fields with value `None`
|
|
67
|
-
are ignored.
|
|
68
|
-
* Fields in `self.additional_properties` are added to the output dict.
|
|
69
|
-
"""
|
|
70
|
-
excluded_fields: Set[str] = set([
|
|
71
|
-
"additional_properties",
|
|
72
|
-
])
|
|
73
|
-
|
|
74
|
-
_dict = self.model_dump(
|
|
75
|
-
by_alias=True,
|
|
76
|
-
exclude=excluded_fields,
|
|
77
|
-
exclude_none=True,
|
|
78
|
-
)
|
|
79
|
-
# override the default output from pydantic by calling `to_dict()` of each item in items (list)
|
|
80
|
-
_items = []
|
|
81
|
-
if self.items:
|
|
82
|
-
for _item_items in self.items:
|
|
83
|
-
if _item_items:
|
|
84
|
-
_items.append(_item_items.to_dict())
|
|
85
|
-
_dict['items'] = _items
|
|
86
|
-
# puts key-value pairs in additional_properties in the top level
|
|
87
|
-
if self.additional_properties is not None:
|
|
88
|
-
for _key, _value in self.additional_properties.items():
|
|
89
|
-
_dict[_key] = _value
|
|
90
|
-
|
|
91
|
-
return _dict
|
|
92
|
-
|
|
93
|
-
@classmethod
|
|
94
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
95
|
-
"""Create an instance of PaginatedImagesDto from a dict"""
|
|
96
|
-
if obj is None:
|
|
97
|
-
return None
|
|
98
|
-
|
|
99
|
-
if not isinstance(obj, dict):
|
|
100
|
-
return cls.model_validate(obj)
|
|
101
|
-
|
|
102
|
-
_obj = cls.model_validate({
|
|
103
|
-
"items": [ImageDto.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None,
|
|
104
|
-
"total": obj.get("total"),
|
|
105
|
-
"page": obj.get("page"),
|
|
106
|
-
"totalPages": obj.get("totalPages")
|
|
107
|
-
})
|
|
108
|
-
# store additional fields in additional_properties
|
|
109
|
-
for _key in obj.keys():
|
|
110
|
-
if _key not in cls.__properties:
|
|
111
|
-
_obj.additional_properties[_key] = obj.get(_key)
|
|
112
|
-
|
|
113
|
-
return _obj
|
|
114
|
-
|
|
115
|
-
|
|
@@ -1,103 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,101 +0,0 @@
|
|
|
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
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
23
|
-
from typing import Optional, Set
|
|
24
|
-
from typing_extensions import Self
|
|
25
|
-
|
|
26
|
-
class SetImageGeneralStatus(BaseModel):
|
|
27
|
-
"""
|
|
28
|
-
SetImageGeneralStatus
|
|
29
|
-
""" # noqa: E501
|
|
30
|
-
general: StrictBool = Field(description="Whether the image is general")
|
|
31
|
-
additional_properties: Dict[str, Any] = {}
|
|
32
|
-
__properties: ClassVar[List[str]] = ["general"]
|
|
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 SetImageGeneralStatus 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 SetImageGeneralStatus 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
|
-
"general": obj.get("general")
|
|
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
|
-
|
|
@@ -1,105 +0,0 @@
|
|
|
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 WorkspaceInfo(BaseModel):
|
|
27
|
-
"""
|
|
28
|
-
WorkspaceInfo
|
|
29
|
-
""" # noqa: E501
|
|
30
|
-
created: StrictStr = Field(description="The creation timestamp of the project")
|
|
31
|
-
name: StrictStr = Field(description="Deprecated: The name of the workspace")
|
|
32
|
-
provider_metadata: Optional[StrictStr] = Field(default=None, description="Additional metadata provided by the provider", alias="providerMetadata")
|
|
33
|
-
additional_properties: Dict[str, Any] = {}
|
|
34
|
-
__properties: ClassVar[List[str]] = ["created", "name", "providerMetadata"]
|
|
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 WorkspaceInfo 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 WorkspaceInfo 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
|
-
"created": obj.get("created"),
|
|
95
|
-
"name": obj.get("name") if obj.get("name") is not None else '',
|
|
96
|
-
"providerMetadata": obj.get("providerMetadata")
|
|
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
|
-
|