daytona_api_client_async 0.26.0a12__py3-none-any.whl → 0.26.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_api_client_async might be problematic. Click here for more details.
- daytona_api_client_async/__init__.py +8 -1
- daytona_api_client_async/api/__init__.py +1 -0
- daytona_api_client_async/api/{images_api.py → default_api.py} +258 -724
- daytona_api_client_async/api/organizations_api.py +6 -6
- daytona_api_client_async/api/sandbox_api.py +855 -2
- daytona_api_client_async/api/webhooks_api.py +1704 -0
- daytona_api_client_async/models/__init__.py +7 -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/{usage_overview.py → organization_usage_overview.py} +14 -8
- daytona_api_client_async/models/sandbox.py +5 -1
- daytona_api_client_async/models/{build_image.py → sandbox_created_post_request.py} +18 -15
- daytona_api_client_async/models/sandbox_created_post_request_data.py +152 -0
- daytona_api_client_async/models/sandbox_state.py +1 -1
- daytona_api_client_async/models/sandbox_state_updated_post_request.py +110 -0
- daytona_api_client_async/models/sandbox_state_updated_post_request_data.py +129 -0
- daytona_api_client_async/models/sandbox_state_updated_post_request_data_sandbox.py +115 -0
- daytona_api_client_async/models/{workspace_info.py → send_webhook_dto.py} +11 -11
- daytona_api_client_async/models/snapshot_created_post_request.py +110 -0
- daytona_api_client_async/models/{image_dto.py → snapshot_created_post_request_data.py} +34 -43
- daytona_api_client_async/models/{workspace_volume.py → snapshot_removed_post_request.py} +13 -10
- daytona_api_client_async/models/snapshot_state_updated_post_request.py +110 -0
- daytona_api_client_async/models/snapshot_state_updated_post_request_data.py +129 -0
- daytona_api_client_async/models/snapshot_state_updated_post_request_data_snapshot.py +115 -0
- daytona_api_client_async/models/ssh_access_dto.py +112 -0
- daytona_api_client_async/models/{set_image_general_status.py → ssh_access_validation_dto.py} +15 -9
- daytona_api_client_async/models/{create_image.py → volume_created_post_request.py} +17 -12
- daytona_api_client_async/models/{build_snapshot.py → volume_created_post_request_data.py} +32 -21
- daytona_api_client_async/models/volume_state_updated_post_request.py +110 -0
- daytona_api_client_async/models/{create_node.py → volume_state_updated_post_request_data.py} +31 -37
- daytona_api_client_async/models/{paginated_images_dto.py → volume_state_updated_post_request_data_volume.py} +23 -23
- daytona_api_client_async/models/{workspace_labels.py → webhook_app_portal_access.py} +7 -7
- daytona_api_client_async/models/{download_files.py → webhook_controller_get_app_portal_access200_response.py} +8 -8
- daytona_api_client_async/models/webhook_controller_get_initialization_status200_response.py +118 -0
- daytona_api_client_async/models/{toggle_state.py → webhook_controller_get_status200_response.py} +7 -7
- daytona_api_client_async/models/webhook_initialization_status.py +121 -0
- daytona_api_client_async/models/workspace.py +5 -1
- {daytona_api_client_async-0.26.0a12.dist-info → daytona_api_client_async-0.26.0rc2.dist-info}/METADATA +1 -1
- {daytona_api_client_async-0.26.0a12.dist-info → daytona_api_client_async-0.26.0rc2.dist-info}/RECORD +42 -32
- daytona_api_client_async/api/nodes_api.py +0 -792
- daytona_api_client_async/models/image_state.py +0 -45
- daytona_api_client_async/models/workspace_state.py +0 -51
- {daytona_api_client_async-0.26.0a12.dist-info → daytona_api_client_async-0.26.0rc2.dist-info}/WHEEL +0 -0
- {daytona_api_client_async-0.26.0a12.dist-info → daytona_api_client_async-0.26.0rc2.dist-info}/licenses/LICENSE +0 -0
- {daytona_api_client_async-0.26.0a12.dist-info → daytona_api_client_async-0.26.0rc2.dist-info}/top_level.txt +0 -0
|
@@ -18,24 +18,36 @@ import pprint
|
|
|
18
18
|
import re # noqa: F401
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
|
-
from
|
|
21
|
+
from datetime import datetime
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
22
23
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
-
from daytona_api_client_async.models.create_build_info import CreateBuildInfo
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
26
|
|
|
27
|
-
class
|
|
27
|
+
class VolumeCreatedPostRequestData(BaseModel):
|
|
28
28
|
"""
|
|
29
|
-
|
|
29
|
+
VolumeCreatedPostRequestData
|
|
30
30
|
""" # noqa: E501
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
id: Optional[StrictStr] = None
|
|
32
|
+
name: Optional[StrictStr] = None
|
|
33
|
+
organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId")
|
|
34
|
+
state: Optional[StrictStr] = None
|
|
35
|
+
created_at: Optional[datetime] = Field(default=None, alias="createdAt")
|
|
36
|
+
updated_at: Optional[datetime] = Field(default=None, alias="updatedAt")
|
|
37
|
+
last_used_at: Optional[datetime] = Field(default=None, alias="lastUsedAt")
|
|
38
|
+
error_reason: Optional[StrictStr] = Field(default=None, alias="errorReason")
|
|
37
39
|
additional_properties: Dict[str, Any] = {}
|
|
38
|
-
__properties: ClassVar[List[str]] = ["name", "
|
|
40
|
+
__properties: ClassVar[List[str]] = ["id", "name", "organizationId", "state", "createdAt", "updatedAt", "lastUsedAt", "errorReason"]
|
|
41
|
+
|
|
42
|
+
@field_validator('state')
|
|
43
|
+
def state_validate_enum(cls, value):
|
|
44
|
+
"""Validates the enum"""
|
|
45
|
+
if value is None:
|
|
46
|
+
return value
|
|
47
|
+
|
|
48
|
+
if value not in set(['creating', 'ready', 'pending_create', 'pending_delete', 'deleting', 'deleted', 'error']):
|
|
49
|
+
raise ValueError("must be one of enum values ('creating', 'ready', 'pending_create', 'pending_delete', 'deleting', 'deleted', 'error')")
|
|
50
|
+
return value
|
|
39
51
|
|
|
40
52
|
model_config = ConfigDict(
|
|
41
53
|
populate_by_name=True,
|
|
@@ -55,7 +67,7 @@ class BuildSnapshot(BaseModel):
|
|
|
55
67
|
|
|
56
68
|
@classmethod
|
|
57
69
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
58
|
-
"""Create an instance of
|
|
70
|
+
"""Create an instance of VolumeCreatedPostRequestData from a JSON string"""
|
|
59
71
|
return cls.from_dict(json.loads(json_str))
|
|
60
72
|
|
|
61
73
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -78,9 +90,6 @@ class BuildSnapshot(BaseModel):
|
|
|
78
90
|
exclude=excluded_fields,
|
|
79
91
|
exclude_none=True,
|
|
80
92
|
)
|
|
81
|
-
# override the default output from pydantic by calling `to_dict()` of build_info
|
|
82
|
-
if self.build_info:
|
|
83
|
-
_dict['buildInfo'] = self.build_info.to_dict()
|
|
84
93
|
# puts key-value pairs in additional_properties in the top level
|
|
85
94
|
if self.additional_properties is not None:
|
|
86
95
|
for _key, _value in self.additional_properties.items():
|
|
@@ -90,7 +99,7 @@ class BuildSnapshot(BaseModel):
|
|
|
90
99
|
|
|
91
100
|
@classmethod
|
|
92
101
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
93
|
-
"""Create an instance of
|
|
102
|
+
"""Create an instance of VolumeCreatedPostRequestData from a dict"""
|
|
94
103
|
if obj is None:
|
|
95
104
|
return None
|
|
96
105
|
|
|
@@ -98,12 +107,14 @@ class BuildSnapshot(BaseModel):
|
|
|
98
107
|
return cls.model_validate(obj)
|
|
99
108
|
|
|
100
109
|
_obj = cls.model_validate({
|
|
110
|
+
"id": obj.get("id"),
|
|
101
111
|
"name": obj.get("name"),
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
112
|
+
"organizationId": obj.get("organizationId"),
|
|
113
|
+
"state": obj.get("state"),
|
|
114
|
+
"createdAt": obj.get("createdAt"),
|
|
115
|
+
"updatedAt": obj.get("updatedAt"),
|
|
116
|
+
"lastUsedAt": obj.get("lastUsedAt"),
|
|
117
|
+
"errorReason": obj.get("errorReason")
|
|
107
118
|
})
|
|
108
119
|
# store additional fields in additional_properties
|
|
109
120
|
for _key in obj.keys():
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Daytona
|
|
5
|
+
|
|
6
|
+
Daytona AI platform API Docs
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: support@daytona.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from datetime import datetime
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
+
from daytona_api_client_async.models.volume_state_updated_post_request_data import VolumeStateUpdatedPostRequestData
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class VolumeStateUpdatedPostRequest(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
VolumeStateUpdatedPostRequest
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
event: Optional[StrictStr] = None
|
|
33
|
+
timestamp: Optional[datetime] = None
|
|
34
|
+
data: Optional[VolumeStateUpdatedPostRequestData] = None
|
|
35
|
+
additional_properties: Dict[str, Any] = {}
|
|
36
|
+
__properties: ClassVar[List[str]] = ["event", "timestamp", "data"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
+
"""Create an instance of VolumeStateUpdatedPostRequest from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
+
"""Return the dictionary representation of the model using alias.
|
|
61
|
+
|
|
62
|
+
This has the following differences from calling pydantic's
|
|
63
|
+
`self.model_dump(by_alias=True)`:
|
|
64
|
+
|
|
65
|
+
* `None` is only added to the output dict for nullable fields that
|
|
66
|
+
were set at model initialization. Other fields with value `None`
|
|
67
|
+
are ignored.
|
|
68
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
69
|
+
"""
|
|
70
|
+
excluded_fields: Set[str] = set([
|
|
71
|
+
"additional_properties",
|
|
72
|
+
])
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of data
|
|
80
|
+
if self.data:
|
|
81
|
+
_dict['data'] = self.data.to_dict()
|
|
82
|
+
# puts key-value pairs in additional_properties in the top level
|
|
83
|
+
if self.additional_properties is not None:
|
|
84
|
+
for _key, _value in self.additional_properties.items():
|
|
85
|
+
_dict[_key] = _value
|
|
86
|
+
|
|
87
|
+
return _dict
|
|
88
|
+
|
|
89
|
+
@classmethod
|
|
90
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
91
|
+
"""Create an instance of VolumeStateUpdatedPostRequest from a dict"""
|
|
92
|
+
if obj is None:
|
|
93
|
+
return None
|
|
94
|
+
|
|
95
|
+
if not isinstance(obj, dict):
|
|
96
|
+
return cls.model_validate(obj)
|
|
97
|
+
|
|
98
|
+
_obj = cls.model_validate({
|
|
99
|
+
"event": obj.get("event"),
|
|
100
|
+
"timestamp": obj.get("timestamp"),
|
|
101
|
+
"data": VolumeStateUpdatedPostRequestData.from_dict(obj["data"]) if obj.get("data") is not None else None
|
|
102
|
+
})
|
|
103
|
+
# store additional fields in additional_properties
|
|
104
|
+
for _key in obj.keys():
|
|
105
|
+
if _key not in cls.__properties:
|
|
106
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
107
|
+
|
|
108
|
+
return _obj
|
|
109
|
+
|
|
110
|
+
|
daytona_api_client_async/models/{create_node.py → volume_state_updated_post_request_data.py}
RENAMED
|
@@ -18,41 +18,40 @@ import pprint
|
|
|
18
18
|
import re # noqa: F401
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field,
|
|
22
|
-
from typing import Any, ClassVar, Dict, List,
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from daytona_api_client_async.models.volume_state_updated_post_request_data_volume import VolumeStateUpdatedPostRequestDataVolume
|
|
23
24
|
from typing import Optional, Set
|
|
24
25
|
from typing_extensions import Self
|
|
25
26
|
|
|
26
|
-
class
|
|
27
|
+
class VolumeStateUpdatedPostRequestData(BaseModel):
|
|
27
28
|
"""
|
|
28
|
-
|
|
29
|
+
VolumeStateUpdatedPostRequestData
|
|
29
30
|
""" # noqa: E501
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
cpu: Union[StrictFloat, StrictInt]
|
|
34
|
-
memory: Union[StrictFloat, StrictInt]
|
|
35
|
-
disk: Union[StrictFloat, StrictInt]
|
|
36
|
-
gpu: Union[StrictFloat, StrictInt]
|
|
37
|
-
gpu_type: StrictStr = Field(alias="gpuType")
|
|
38
|
-
var_class: StrictStr = Field(alias="class")
|
|
39
|
-
capacity: Union[StrictFloat, StrictInt]
|
|
40
|
-
region: StrictStr
|
|
31
|
+
volume: Optional[VolumeStateUpdatedPostRequestDataVolume] = None
|
|
32
|
+
old_state: Optional[StrictStr] = Field(default=None, alias="oldState")
|
|
33
|
+
new_state: Optional[StrictStr] = Field(default=None, alias="newState")
|
|
41
34
|
additional_properties: Dict[str, Any] = {}
|
|
42
|
-
__properties: ClassVar[List[str]] = ["
|
|
35
|
+
__properties: ClassVar[List[str]] = ["volume", "oldState", "newState"]
|
|
43
36
|
|
|
44
|
-
@field_validator('
|
|
45
|
-
def
|
|
37
|
+
@field_validator('old_state')
|
|
38
|
+
def old_state_validate_enum(cls, value):
|
|
46
39
|
"""Validates the enum"""
|
|
47
|
-
if value
|
|
48
|
-
|
|
40
|
+
if value is None:
|
|
41
|
+
return value
|
|
42
|
+
|
|
43
|
+
if value not in set(['creating', 'ready', 'pending_create', 'pending_delete', 'deleting', 'deleted', 'error']):
|
|
44
|
+
raise ValueError("must be one of enum values ('creating', 'ready', 'pending_create', 'pending_delete', 'deleting', 'deleted', 'error')")
|
|
49
45
|
return value
|
|
50
46
|
|
|
51
|
-
@field_validator('
|
|
52
|
-
def
|
|
47
|
+
@field_validator('new_state')
|
|
48
|
+
def new_state_validate_enum(cls, value):
|
|
53
49
|
"""Validates the enum"""
|
|
54
|
-
if value
|
|
55
|
-
|
|
50
|
+
if value is None:
|
|
51
|
+
return value
|
|
52
|
+
|
|
53
|
+
if value not in set(['creating', 'ready', 'pending_create', 'pending_delete', 'deleting', 'deleted', 'error']):
|
|
54
|
+
raise ValueError("must be one of enum values ('creating', 'ready', 'pending_create', 'pending_delete', 'deleting', 'deleted', 'error')")
|
|
56
55
|
return value
|
|
57
56
|
|
|
58
57
|
model_config = ConfigDict(
|
|
@@ -73,7 +72,7 @@ class CreateNode(BaseModel):
|
|
|
73
72
|
|
|
74
73
|
@classmethod
|
|
75
74
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
76
|
-
"""Create an instance of
|
|
75
|
+
"""Create an instance of VolumeStateUpdatedPostRequestData from a JSON string"""
|
|
77
76
|
return cls.from_dict(json.loads(json_str))
|
|
78
77
|
|
|
79
78
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -96,6 +95,9 @@ class CreateNode(BaseModel):
|
|
|
96
95
|
exclude=excluded_fields,
|
|
97
96
|
exclude_none=True,
|
|
98
97
|
)
|
|
98
|
+
# override the default output from pydantic by calling `to_dict()` of volume
|
|
99
|
+
if self.volume:
|
|
100
|
+
_dict['volume'] = self.volume.to_dict()
|
|
99
101
|
# puts key-value pairs in additional_properties in the top level
|
|
100
102
|
if self.additional_properties is not None:
|
|
101
103
|
for _key, _value in self.additional_properties.items():
|
|
@@ -105,7 +107,7 @@ class CreateNode(BaseModel):
|
|
|
105
107
|
|
|
106
108
|
@classmethod
|
|
107
109
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
108
|
-
"""Create an instance of
|
|
110
|
+
"""Create an instance of VolumeStateUpdatedPostRequestData from a dict"""
|
|
109
111
|
if obj is None:
|
|
110
112
|
return None
|
|
111
113
|
|
|
@@ -113,17 +115,9 @@ class CreateNode(BaseModel):
|
|
|
113
115
|
return cls.model_validate(obj)
|
|
114
116
|
|
|
115
117
|
_obj = cls.model_validate({
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"cpu": obj.get("cpu"),
|
|
120
|
-
"memory": obj.get("memory"),
|
|
121
|
-
"disk": obj.get("disk"),
|
|
122
|
-
"gpu": obj.get("gpu"),
|
|
123
|
-
"gpuType": obj.get("gpuType"),
|
|
124
|
-
"class": obj.get("class"),
|
|
125
|
-
"capacity": obj.get("capacity"),
|
|
126
|
-
"region": obj.get("region")
|
|
118
|
+
"volume": VolumeStateUpdatedPostRequestDataVolume.from_dict(obj["volume"]) if obj.get("volume") is not None else None,
|
|
119
|
+
"oldState": obj.get("oldState"),
|
|
120
|
+
"newState": obj.get("newState")
|
|
127
121
|
})
|
|
128
122
|
# store additional fields in additional_properties
|
|
129
123
|
for _key in obj.keys():
|
|
@@ -18,22 +18,30 @@ import pprint
|
|
|
18
18
|
import re # noqa: F401
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field,
|
|
22
|
-
from typing import Any, ClassVar, Dict, List,
|
|
23
|
-
from daytona_api_client_async.models.image_dto import ImageDto
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
23
|
from typing import Optional, Set
|
|
25
24
|
from typing_extensions import Self
|
|
26
25
|
|
|
27
|
-
class
|
|
26
|
+
class VolumeStateUpdatedPostRequestDataVolume(BaseModel):
|
|
28
27
|
"""
|
|
29
|
-
|
|
28
|
+
VolumeStateUpdatedPostRequestDataVolume
|
|
30
29
|
""" # noqa: E501
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
total_pages: Union[StrictFloat, StrictInt] = Field(alias="totalPages")
|
|
30
|
+
id: Optional[StrictStr] = None
|
|
31
|
+
organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId")
|
|
32
|
+
state: Optional[StrictStr] = None
|
|
35
33
|
additional_properties: Dict[str, Any] = {}
|
|
36
|
-
__properties: ClassVar[List[str]] = ["
|
|
34
|
+
__properties: ClassVar[List[str]] = ["id", "organizationId", "state"]
|
|
35
|
+
|
|
36
|
+
@field_validator('state')
|
|
37
|
+
def state_validate_enum(cls, value):
|
|
38
|
+
"""Validates the enum"""
|
|
39
|
+
if value is None:
|
|
40
|
+
return value
|
|
41
|
+
|
|
42
|
+
if value not in set(['creating', 'ready', 'pending_create', 'pending_delete', 'deleting', 'deleted', 'error']):
|
|
43
|
+
raise ValueError("must be one of enum values ('creating', 'ready', 'pending_create', 'pending_delete', 'deleting', 'deleted', 'error')")
|
|
44
|
+
return value
|
|
37
45
|
|
|
38
46
|
model_config = ConfigDict(
|
|
39
47
|
populate_by_name=True,
|
|
@@ -53,7 +61,7 @@ class PaginatedImagesDto(BaseModel):
|
|
|
53
61
|
|
|
54
62
|
@classmethod
|
|
55
63
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
-
"""Create an instance of
|
|
64
|
+
"""Create an instance of VolumeStateUpdatedPostRequestDataVolume from a JSON string"""
|
|
57
65
|
return cls.from_dict(json.loads(json_str))
|
|
58
66
|
|
|
59
67
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -76,13 +84,6 @@ class PaginatedImagesDto(BaseModel):
|
|
|
76
84
|
exclude=excluded_fields,
|
|
77
85
|
exclude_none=True,
|
|
78
86
|
)
|
|
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
87
|
# puts key-value pairs in additional_properties in the top level
|
|
87
88
|
if self.additional_properties is not None:
|
|
88
89
|
for _key, _value in self.additional_properties.items():
|
|
@@ -92,7 +93,7 @@ class PaginatedImagesDto(BaseModel):
|
|
|
92
93
|
|
|
93
94
|
@classmethod
|
|
94
95
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
95
|
-
"""Create an instance of
|
|
96
|
+
"""Create an instance of VolumeStateUpdatedPostRequestDataVolume from a dict"""
|
|
96
97
|
if obj is None:
|
|
97
98
|
return None
|
|
98
99
|
|
|
@@ -100,10 +101,9 @@ class PaginatedImagesDto(BaseModel):
|
|
|
100
101
|
return cls.model_validate(obj)
|
|
101
102
|
|
|
102
103
|
_obj = cls.model_validate({
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"totalPages": obj.get("totalPages")
|
|
104
|
+
"id": obj.get("id"),
|
|
105
|
+
"organizationId": obj.get("organizationId"),
|
|
106
|
+
"state": obj.get("state")
|
|
107
107
|
})
|
|
108
108
|
# store additional fields in additional_properties
|
|
109
109
|
for _key in obj.keys():
|
|
@@ -23,13 +23,13 @@ from typing import Any, ClassVar, Dict, List
|
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class WebhookAppPortalAccess(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
WebhookAppPortalAccess
|
|
29
29
|
""" # noqa: E501
|
|
30
|
-
|
|
30
|
+
url: StrictStr = Field(description="The URL to the webhook app portal")
|
|
31
31
|
additional_properties: Dict[str, Any] = {}
|
|
32
|
-
__properties: ClassVar[List[str]] = ["
|
|
32
|
+
__properties: ClassVar[List[str]] = ["url"]
|
|
33
33
|
|
|
34
34
|
model_config = ConfigDict(
|
|
35
35
|
populate_by_name=True,
|
|
@@ -49,7 +49,7 @@ class WorkspaceLabels(BaseModel):
|
|
|
49
49
|
|
|
50
50
|
@classmethod
|
|
51
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
-
"""Create an instance of
|
|
52
|
+
"""Create an instance of WebhookAppPortalAccess from a JSON string"""
|
|
53
53
|
return cls.from_dict(json.loads(json_str))
|
|
54
54
|
|
|
55
55
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -81,7 +81,7 @@ class WorkspaceLabels(BaseModel):
|
|
|
81
81
|
|
|
82
82
|
@classmethod
|
|
83
83
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
-
"""Create an instance of
|
|
84
|
+
"""Create an instance of WebhookAppPortalAccess from a dict"""
|
|
85
85
|
if obj is None:
|
|
86
86
|
return None
|
|
87
87
|
|
|
@@ -89,7 +89,7 @@ class WorkspaceLabels(BaseModel):
|
|
|
89
89
|
return cls.model_validate(obj)
|
|
90
90
|
|
|
91
91
|
_obj = cls.model_validate({
|
|
92
|
-
"
|
|
92
|
+
"url": obj.get("url")
|
|
93
93
|
})
|
|
94
94
|
# store additional fields in additional_properties
|
|
95
95
|
for _key in obj.keys():
|
|
@@ -19,17 +19,17 @@ import re # noqa: F401
|
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class WebhookControllerGetAppPortalAccess200Response(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
WebhookControllerGetAppPortalAccess200Response
|
|
29
29
|
""" # noqa: E501
|
|
30
|
-
|
|
30
|
+
url: Optional[StrictStr] = Field(default=None, description="App Portal access URL")
|
|
31
31
|
additional_properties: Dict[str, Any] = {}
|
|
32
|
-
__properties: ClassVar[List[str]] = ["
|
|
32
|
+
__properties: ClassVar[List[str]] = ["url"]
|
|
33
33
|
|
|
34
34
|
model_config = ConfigDict(
|
|
35
35
|
populate_by_name=True,
|
|
@@ -49,7 +49,7 @@ class DownloadFiles(BaseModel):
|
|
|
49
49
|
|
|
50
50
|
@classmethod
|
|
51
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
-
"""Create an instance of
|
|
52
|
+
"""Create an instance of WebhookControllerGetAppPortalAccess200Response from a JSON string"""
|
|
53
53
|
return cls.from_dict(json.loads(json_str))
|
|
54
54
|
|
|
55
55
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -81,7 +81,7 @@ class DownloadFiles(BaseModel):
|
|
|
81
81
|
|
|
82
82
|
@classmethod
|
|
83
83
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
-
"""Create an instance of
|
|
84
|
+
"""Create an instance of WebhookControllerGetAppPortalAccess200Response from a dict"""
|
|
85
85
|
if obj is None:
|
|
86
86
|
return None
|
|
87
87
|
|
|
@@ -89,7 +89,7 @@ class DownloadFiles(BaseModel):
|
|
|
89
89
|
return cls.model_validate(obj)
|
|
90
90
|
|
|
91
91
|
_obj = cls.model_validate({
|
|
92
|
-
"
|
|
92
|
+
"url": obj.get("url")
|
|
93
93
|
})
|
|
94
94
|
# store additional fields in additional_properties
|
|
95
95
|
for _key in obj.keys():
|
|
@@ -0,0 +1,118 @@
|
|
|
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, 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 WebhookControllerGetInitializationStatus200Response(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
WebhookControllerGetInitializationStatus200Response
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId")
|
|
31
|
+
endpoints_created: Optional[StrictBool] = Field(default=None, alias="endpointsCreated")
|
|
32
|
+
svix_application_created: Optional[StrictBool] = Field(default=None, alias="svixApplicationCreated")
|
|
33
|
+
last_error: Optional[StrictStr] = Field(default=None, alias="lastError")
|
|
34
|
+
retry_count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="retryCount")
|
|
35
|
+
created_at: Optional[StrictStr] = Field(default=None, alias="createdAt")
|
|
36
|
+
updated_at: Optional[StrictStr] = Field(default=None, alias="updatedAt")
|
|
37
|
+
additional_properties: Dict[str, Any] = {}
|
|
38
|
+
__properties: ClassVar[List[str]] = ["organizationId", "endpointsCreated", "svixApplicationCreated", "lastError", "retryCount", "createdAt", "updatedAt"]
|
|
39
|
+
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
populate_by_name=True,
|
|
42
|
+
validate_assignment=True,
|
|
43
|
+
protected_namespaces=(),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def to_str(self) -> str:
|
|
48
|
+
"""Returns the string representation of the model using alias"""
|
|
49
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
50
|
+
|
|
51
|
+
def to_json(self) -> str:
|
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
|
53
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
54
|
+
return json.dumps(self.to_dict())
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
58
|
+
"""Create an instance of WebhookControllerGetInitializationStatus200Response from a JSON string"""
|
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
|
60
|
+
|
|
61
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
62
|
+
"""Return the dictionary representation of the model using alias.
|
|
63
|
+
|
|
64
|
+
This has the following differences from calling pydantic's
|
|
65
|
+
`self.model_dump(by_alias=True)`:
|
|
66
|
+
|
|
67
|
+
* `None` is only added to the output dict for nullable fields that
|
|
68
|
+
were set at model initialization. Other fields with value `None`
|
|
69
|
+
are ignored.
|
|
70
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
71
|
+
"""
|
|
72
|
+
excluded_fields: Set[str] = set([
|
|
73
|
+
"additional_properties",
|
|
74
|
+
])
|
|
75
|
+
|
|
76
|
+
_dict = self.model_dump(
|
|
77
|
+
by_alias=True,
|
|
78
|
+
exclude=excluded_fields,
|
|
79
|
+
exclude_none=True,
|
|
80
|
+
)
|
|
81
|
+
# puts key-value pairs in additional_properties in the top level
|
|
82
|
+
if self.additional_properties is not None:
|
|
83
|
+
for _key, _value in self.additional_properties.items():
|
|
84
|
+
_dict[_key] = _value
|
|
85
|
+
|
|
86
|
+
# set to None if last_error (nullable) is None
|
|
87
|
+
# and model_fields_set contains the field
|
|
88
|
+
if self.last_error is None and "last_error" in self.model_fields_set:
|
|
89
|
+
_dict['lastError'] = None
|
|
90
|
+
|
|
91
|
+
return _dict
|
|
92
|
+
|
|
93
|
+
@classmethod
|
|
94
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
95
|
+
"""Create an instance of WebhookControllerGetInitializationStatus200Response 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
|
+
"organizationId": obj.get("organizationId"),
|
|
104
|
+
"endpointsCreated": obj.get("endpointsCreated"),
|
|
105
|
+
"svixApplicationCreated": obj.get("svixApplicationCreated"),
|
|
106
|
+
"lastError": obj.get("lastError"),
|
|
107
|
+
"retryCount": obj.get("retryCount"),
|
|
108
|
+
"createdAt": obj.get("createdAt"),
|
|
109
|
+
"updatedAt": obj.get("updatedAt")
|
|
110
|
+
})
|
|
111
|
+
# store additional fields in additional_properties
|
|
112
|
+
for _key in obj.keys():
|
|
113
|
+
if _key not in cls.__properties:
|
|
114
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
115
|
+
|
|
116
|
+
return _obj
|
|
117
|
+
|
|
118
|
+
|
daytona_api_client_async/models/{toggle_state.py → webhook_controller_get_status200_response.py}
RENAMED
|
@@ -18,16 +18,16 @@ import pprint
|
|
|
18
18
|
import re # noqa: F401
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
|
-
from pydantic import BaseModel, ConfigDict,
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictBool
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class WebhookControllerGetStatus200Response(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
WebhookControllerGetStatus200Response
|
|
29
29
|
""" # noqa: E501
|
|
30
|
-
enabled: StrictBool =
|
|
30
|
+
enabled: Optional[StrictBool] = None
|
|
31
31
|
additional_properties: Dict[str, Any] = {}
|
|
32
32
|
__properties: ClassVar[List[str]] = ["enabled"]
|
|
33
33
|
|
|
@@ -49,7 +49,7 @@ class ToggleState(BaseModel):
|
|
|
49
49
|
|
|
50
50
|
@classmethod
|
|
51
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
-
"""Create an instance of
|
|
52
|
+
"""Create an instance of WebhookControllerGetStatus200Response from a JSON string"""
|
|
53
53
|
return cls.from_dict(json.loads(json_str))
|
|
54
54
|
|
|
55
55
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -81,7 +81,7 @@ class ToggleState(BaseModel):
|
|
|
81
81
|
|
|
82
82
|
@classmethod
|
|
83
83
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
-
"""Create an instance of
|
|
84
|
+
"""Create an instance of WebhookControllerGetStatus200Response from a dict"""
|
|
85
85
|
if obj is None:
|
|
86
86
|
return None
|
|
87
87
|
|