daytona_api_client_async 0.26.0rc1__py3-none-any.whl → 0.27.0__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.

Files changed (47) hide show
  1. daytona_api_client_async/__init__.py +12 -1
  2. daytona_api_client_async/api/__init__.py +2 -0
  3. daytona_api_client_async/api/api_keys_api.py +282 -0
  4. daytona_api_client_async/api/default_api.py +1884 -0
  5. daytona_api_client_async/api/health_api.py +282 -0
  6. daytona_api_client_async/api/organizations_api.py +6 -6
  7. daytona_api_client_async/api/sandbox_api.py +855 -2
  8. daytona_api_client_async/api/toolbox_api.py +6 -6
  9. daytona_api_client_async/api/webhooks_api.py +1704 -0
  10. daytona_api_client_async/models/__init__.py +10 -1
  11. daytona_api_client_async/models/api_key_list.py +4 -2
  12. daytona_api_client_async/models/create_audit_log.py +2 -2
  13. daytona_api_client_async/models/health_controller_check200_response.py +154 -0
  14. daytona_api_client_async/models/health_controller_check200_response_info_value.py +101 -0
  15. daytona_api_client_async/models/health_controller_check503_response.py +154 -0
  16. daytona_api_client_async/models/{usage_overview.py → organization_usage_overview.py} +14 -8
  17. daytona_api_client_async/models/sandbox_created_post_request.py +110 -0
  18. daytona_api_client_async/models/sandbox_created_post_request_data.py +152 -0
  19. daytona_api_client_async/models/sandbox_state_updated_post_request.py +110 -0
  20. daytona_api_client_async/models/sandbox_state_updated_post_request_data.py +129 -0
  21. daytona_api_client_async/models/sandbox_state_updated_post_request_data_sandbox.py +115 -0
  22. daytona_api_client_async/models/send_webhook_dto.py +105 -0
  23. daytona_api_client_async/models/session_command_logs_response.py +103 -0
  24. daytona_api_client_async/models/session_execute_response.py +1 -1
  25. daytona_api_client_async/models/snapshot_created_post_request.py +110 -0
  26. daytona_api_client_async/models/snapshot_created_post_request_data.py +136 -0
  27. daytona_api_client_async/models/snapshot_removed_post_request.py +106 -0
  28. daytona_api_client_async/models/snapshot_state_updated_post_request.py +110 -0
  29. daytona_api_client_async/models/snapshot_state_updated_post_request_data.py +129 -0
  30. daytona_api_client_async/models/snapshot_state_updated_post_request_data_snapshot.py +115 -0
  31. daytona_api_client_async/models/ssh_access_dto.py +112 -0
  32. daytona_api_client_async/models/ssh_access_validation_dto.py +107 -0
  33. daytona_api_client_async/models/volume_created_post_request.py +110 -0
  34. daytona_api_client_async/models/volume_created_post_request_data.py +126 -0
  35. daytona_api_client_async/models/volume_state_updated_post_request.py +110 -0
  36. daytona_api_client_async/models/volume_state_updated_post_request_data.py +129 -0
  37. daytona_api_client_async/models/volume_state_updated_post_request_data_volume.py +115 -0
  38. daytona_api_client_async/models/webhook_app_portal_access.py +101 -0
  39. daytona_api_client_async/models/webhook_controller_get_app_portal_access200_response.py +101 -0
  40. daytona_api_client_async/models/webhook_controller_get_initialization_status200_response.py +118 -0
  41. daytona_api_client_async/models/{toggle_state.py → webhook_controller_get_status200_response.py} +7 -7
  42. daytona_api_client_async/models/webhook_initialization_status.py +121 -0
  43. {daytona_api_client_async-0.26.0rc1.dist-info → daytona_api_client_async-0.27.0.dist-info}/METADATA +1 -1
  44. {daytona_api_client_async-0.26.0rc1.dist-info → daytona_api_client_async-0.27.0.dist-info}/RECORD +47 -17
  45. {daytona_api_client_async-0.26.0rc1.dist-info → daytona_api_client_async-0.27.0.dist-info}/WHEEL +0 -0
  46. {daytona_api_client_async-0.26.0rc1.dist-info → daytona_api_client_async-0.27.0.dist-info}/licenses/LICENSE +0 -0
  47. {daytona_api_client_async-0.26.0rc1.dist-info → daytona_api_client_async-0.27.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,126 @@
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, StrictStr, field_validator
23
+ from typing import Any, ClassVar, Dict, List, Optional
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class VolumeCreatedPostRequestData(BaseModel):
28
+ """
29
+ VolumeCreatedPostRequestData
30
+ """ # noqa: E501
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")
39
+ additional_properties: Dict[str, Any] = {}
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
51
+
52
+ model_config = ConfigDict(
53
+ populate_by_name=True,
54
+ validate_assignment=True,
55
+ protected_namespaces=(),
56
+ )
57
+
58
+
59
+ def to_str(self) -> str:
60
+ """Returns the string representation of the model using alias"""
61
+ return pprint.pformat(self.model_dump(by_alias=True))
62
+
63
+ def to_json(self) -> str:
64
+ """Returns the JSON representation of the model using alias"""
65
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
66
+ return json.dumps(self.to_dict())
67
+
68
+ @classmethod
69
+ def from_json(cls, json_str: str) -> Optional[Self]:
70
+ """Create an instance of VolumeCreatedPostRequestData from a JSON string"""
71
+ return cls.from_dict(json.loads(json_str))
72
+
73
+ def to_dict(self) -> Dict[str, Any]:
74
+ """Return the dictionary representation of the model using alias.
75
+
76
+ This has the following differences from calling pydantic's
77
+ `self.model_dump(by_alias=True)`:
78
+
79
+ * `None` is only added to the output dict for nullable fields that
80
+ were set at model initialization. Other fields with value `None`
81
+ are ignored.
82
+ * Fields in `self.additional_properties` are added to the output dict.
83
+ """
84
+ excluded_fields: Set[str] = set([
85
+ "additional_properties",
86
+ ])
87
+
88
+ _dict = self.model_dump(
89
+ by_alias=True,
90
+ exclude=excluded_fields,
91
+ exclude_none=True,
92
+ )
93
+ # puts key-value pairs in additional_properties in the top level
94
+ if self.additional_properties is not None:
95
+ for _key, _value in self.additional_properties.items():
96
+ _dict[_key] = _value
97
+
98
+ return _dict
99
+
100
+ @classmethod
101
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
102
+ """Create an instance of VolumeCreatedPostRequestData from a dict"""
103
+ if obj is None:
104
+ return None
105
+
106
+ if not isinstance(obj, dict):
107
+ return cls.model_validate(obj)
108
+
109
+ _obj = cls.model_validate({
110
+ "id": obj.get("id"),
111
+ "name": obj.get("name"),
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")
118
+ })
119
+ # store additional fields in additional_properties
120
+ for _key in obj.keys():
121
+ if _key not in cls.__properties:
122
+ _obj.additional_properties[_key] = obj.get(_key)
123
+
124
+ return _obj
125
+
126
+
@@ -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
+
@@ -0,0 +1,129 @@
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, 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
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class VolumeStateUpdatedPostRequestData(BaseModel):
28
+ """
29
+ VolumeStateUpdatedPostRequestData
30
+ """ # noqa: E501
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")
34
+ additional_properties: Dict[str, Any] = {}
35
+ __properties: ClassVar[List[str]] = ["volume", "oldState", "newState"]
36
+
37
+ @field_validator('old_state')
38
+ def old_state_validate_enum(cls, value):
39
+ """Validates the enum"""
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')")
45
+ return value
46
+
47
+ @field_validator('new_state')
48
+ def new_state_validate_enum(cls, value):
49
+ """Validates the enum"""
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')")
55
+ return value
56
+
57
+ model_config = ConfigDict(
58
+ populate_by_name=True,
59
+ validate_assignment=True,
60
+ protected_namespaces=(),
61
+ )
62
+
63
+
64
+ def to_str(self) -> str:
65
+ """Returns the string representation of the model using alias"""
66
+ return pprint.pformat(self.model_dump(by_alias=True))
67
+
68
+ def to_json(self) -> str:
69
+ """Returns the JSON representation of the model using alias"""
70
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
71
+ return json.dumps(self.to_dict())
72
+
73
+ @classmethod
74
+ def from_json(cls, json_str: str) -> Optional[Self]:
75
+ """Create an instance of VolumeStateUpdatedPostRequestData from a JSON string"""
76
+ return cls.from_dict(json.loads(json_str))
77
+
78
+ def to_dict(self) -> Dict[str, Any]:
79
+ """Return the dictionary representation of the model using alias.
80
+
81
+ This has the following differences from calling pydantic's
82
+ `self.model_dump(by_alias=True)`:
83
+
84
+ * `None` is only added to the output dict for nullable fields that
85
+ were set at model initialization. Other fields with value `None`
86
+ are ignored.
87
+ * Fields in `self.additional_properties` are added to the output dict.
88
+ """
89
+ excluded_fields: Set[str] = set([
90
+ "additional_properties",
91
+ ])
92
+
93
+ _dict = self.model_dump(
94
+ by_alias=True,
95
+ exclude=excluded_fields,
96
+ exclude_none=True,
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()
101
+ # puts key-value pairs in additional_properties in the top level
102
+ if self.additional_properties is not None:
103
+ for _key, _value in self.additional_properties.items():
104
+ _dict[_key] = _value
105
+
106
+ return _dict
107
+
108
+ @classmethod
109
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
110
+ """Create an instance of VolumeStateUpdatedPostRequestData from a dict"""
111
+ if obj is None:
112
+ return None
113
+
114
+ if not isinstance(obj, dict):
115
+ return cls.model_validate(obj)
116
+
117
+ _obj = cls.model_validate({
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")
121
+ })
122
+ # store additional fields in additional_properties
123
+ for _key in obj.keys():
124
+ if _key not in cls.__properties:
125
+ _obj.additional_properties[_key] = obj.get(_key)
126
+
127
+ return _obj
128
+
129
+
@@ -0,0 +1,115 @@
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, field_validator
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class VolumeStateUpdatedPostRequestDataVolume(BaseModel):
27
+ """
28
+ VolumeStateUpdatedPostRequestDataVolume
29
+ """ # noqa: E501
30
+ id: Optional[StrictStr] = None
31
+ organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId")
32
+ state: Optional[StrictStr] = None
33
+ additional_properties: Dict[str, Any] = {}
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
45
+
46
+ model_config = ConfigDict(
47
+ populate_by_name=True,
48
+ validate_assignment=True,
49
+ protected_namespaces=(),
50
+ )
51
+
52
+
53
+ def to_str(self) -> str:
54
+ """Returns the string representation of the model using alias"""
55
+ return pprint.pformat(self.model_dump(by_alias=True))
56
+
57
+ def to_json(self) -> str:
58
+ """Returns the JSON representation of the model using alias"""
59
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
60
+ return json.dumps(self.to_dict())
61
+
62
+ @classmethod
63
+ def from_json(cls, json_str: str) -> Optional[Self]:
64
+ """Create an instance of VolumeStateUpdatedPostRequestDataVolume from a JSON string"""
65
+ return cls.from_dict(json.loads(json_str))
66
+
67
+ def to_dict(self) -> Dict[str, Any]:
68
+ """Return the dictionary representation of the model using alias.
69
+
70
+ This has the following differences from calling pydantic's
71
+ `self.model_dump(by_alias=True)`:
72
+
73
+ * `None` is only added to the output dict for nullable fields that
74
+ were set at model initialization. Other fields with value `None`
75
+ are ignored.
76
+ * Fields in `self.additional_properties` are added to the output dict.
77
+ """
78
+ excluded_fields: Set[str] = set([
79
+ "additional_properties",
80
+ ])
81
+
82
+ _dict = self.model_dump(
83
+ by_alias=True,
84
+ exclude=excluded_fields,
85
+ exclude_none=True,
86
+ )
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 VolumeStateUpdatedPostRequestDataVolume 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
+ "id": obj.get("id"),
105
+ "organizationId": obj.get("organizationId"),
106
+ "state": obj.get("state")
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
+
@@ -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, 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 WebhookAppPortalAccess(BaseModel):
27
+ """
28
+ WebhookAppPortalAccess
29
+ """ # noqa: E501
30
+ url: StrictStr = Field(description="The URL to the webhook app portal")
31
+ additional_properties: Dict[str, Any] = {}
32
+ __properties: ClassVar[List[str]] = ["url"]
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 WebhookAppPortalAccess 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 WebhookAppPortalAccess 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
+ "url": obj.get("url")
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,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, 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 WebhookControllerGetAppPortalAccess200Response(BaseModel):
27
+ """
28
+ WebhookControllerGetAppPortalAccess200Response
29
+ """ # noqa: E501
30
+ url: Optional[StrictStr] = Field(default=None, description="App Portal access URL")
31
+ additional_properties: Dict[str, Any] = {}
32
+ __properties: ClassVar[List[str]] = ["url"]
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 WebhookControllerGetAppPortalAccess200Response 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 WebhookControllerGetAppPortalAccess200Response 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
+ "url": obj.get("url")
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
+