daytona_api_client 0.25.6__py3-none-any.whl → 0.26.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 might be problematic. Click here for more details.

Files changed (44) hide show
  1. daytona_api_client/__init__.py +11 -0
  2. daytona_api_client/api/__init__.py +2 -0
  3. daytona_api_client/api/default_api.py +1884 -0
  4. daytona_api_client/api/health_api.py +282 -0
  5. daytona_api_client/api/sandbox_api.py +855 -2
  6. daytona_api_client/api/webhooks_api.py +1704 -0
  7. daytona_api_client/models/__init__.py +9 -0
  8. daytona_api_client/models/create_audit_log.py +2 -2
  9. daytona_api_client/models/health_controller_check200_response.py +154 -0
  10. daytona_api_client/models/{account_provider_dto.py → health_controller_check200_response_info_value.py} +23 -23
  11. daytona_api_client/models/health_controller_check503_response.py +154 -0
  12. daytona_api_client/models/sandbox_created_post_request.py +110 -0
  13. daytona_api_client/models/sandbox_created_post_request_data.py +152 -0
  14. daytona_api_client/models/sandbox_state_updated_post_request.py +110 -0
  15. daytona_api_client/models/sandbox_state_updated_post_request_data.py +129 -0
  16. daytona_api_client/models/{usage_overview.py → sandbox_state_updated_post_request_data_sandbox.py} +23 -21
  17. daytona_api_client/models/send_webhook_dto.py +105 -0
  18. daytona_api_client/models/snapshot_created_post_request.py +110 -0
  19. daytona_api_client/models/snapshot_created_post_request_data.py +136 -0
  20. daytona_api_client/models/{get_build_logs400_response.py → snapshot_removed_post_request.py} +31 -26
  21. daytona_api_client/models/snapshot_state_updated_post_request.py +110 -0
  22. daytona_api_client/models/snapshot_state_updated_post_request_data.py +129 -0
  23. daytona_api_client/models/snapshot_state_updated_post_request_data_snapshot.py +115 -0
  24. daytona_api_client/models/ssh_access_dto.py +112 -0
  25. daytona_api_client/models/ssh_access_validation_dto.py +107 -0
  26. daytona_api_client/models/volume_created_post_request.py +110 -0
  27. daytona_api_client/models/{volume.py → volume_created_post_request_data.py} +48 -55
  28. daytona_api_client/models/volume_state_updated_post_request.py +110 -0
  29. daytona_api_client/models/volume_state_updated_post_request_data.py +129 -0
  30. daytona_api_client/models/volume_state_updated_post_request_data_volume.py +115 -0
  31. daytona_api_client/models/{download_files.py → webhook_app_portal_access.py} +7 -7
  32. daytona_api_client/models/{upload_file.py → webhook_controller_get_app_portal_access200_response.py} +26 -26
  33. daytona_api_client/models/webhook_controller_get_initialization_status200_response.py +118 -0
  34. daytona_api_client/models/{toggle_state.py → webhook_controller_get_status200_response.py} +7 -7
  35. daytona_api_client/models/webhook_initialization_status.py +121 -0
  36. {daytona_api_client-0.25.6.dist-info → daytona_api_client-0.26.0.dist-info}/METADATA +1 -1
  37. {daytona_api_client-0.25.6.dist-info → daytona_api_client-0.26.0.dist-info}/RECORD +40 -21
  38. daytona_api_client/models/build_snapshot.py +0 -118
  39. daytona_api_client/models/upload_file_dto.py +0 -101
  40. daytona_api_client/models/upload_file_request_file.py +0 -159
  41. daytona_api_client/models/upload_files_multi_request_files_inner.py +0 -101
  42. {daytona_api_client-0.25.6.dist-info → daytona_api_client-0.26.0.dist-info}/WHEEL +0 -0
  43. {daytona_api_client-0.25.6.dist-info → daytona_api_client-0.26.0.dist-info}/licenses/LICENSE +0 -0
  44. {daytona_api_client-0.25.6.dist-info → daytona_api_client-0.26.0.dist-info}/top_level.txt +0 -0
@@ -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.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
+
@@ -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 DownloadFiles(BaseModel):
26
+ class WebhookAppPortalAccess(BaseModel):
27
27
  """
28
- DownloadFiles
28
+ WebhookAppPortalAccess
29
29
  """ # noqa: E501
30
- paths: List[StrictStr] = Field(description="List of remote file paths to download")
30
+ url: StrictStr = Field(description="The URL to the webhook app portal")
31
31
  additional_properties: Dict[str, Any] = {}
32
- __properties: ClassVar[List[str]] = ["paths"]
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 DownloadFiles from a JSON string"""
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 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 DownloadFiles from a dict"""
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 DownloadFiles(BaseModel):
89
89
  return cls.model_validate(obj)
90
90
 
91
91
  _obj = cls.model_validate({
92
- "paths": obj.get("paths")
92
+ "url": obj.get("url")
93
93
  })
94
94
  # store additional fields in additional_properties
95
95
  for _key in obj.keys():
@@ -1,38 +1,35 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- Daytona
4
+ Daytona
5
5
 
6
- Daytona AI platform API Docs
6
+ Daytona AI platform API Docs
7
7
 
8
- The version of the OpenAPI document: 1.0
9
- Contact: support@daytona.com
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 1.0
9
+ Contact: support@daytona.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
- Do not edit the class manually.
12
+ Do not edit the class manually.
13
13
  """ # noqa: E501
14
14
 
15
15
 
16
16
  from __future__ import annotations
17
-
18
- import json
19
17
  import pprint
20
18
  import re # noqa: F401
21
- from typing import Any, ClassVar, Dict, List, Optional, Set, Tuple, Union
19
+ import json
22
20
 
23
- from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
26
-
27
- class UploadFile(BaseModel):
26
+ class WebhookControllerGetAppPortalAccess200Response(BaseModel):
28
27
  """
29
- UploadFile
30
- """ # noqa: E501
31
-
32
- file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]
33
- path: StrictStr
28
+ WebhookControllerGetAppPortalAccess200Response
29
+ """ # noqa: E501
30
+ url: Optional[StrictStr] = Field(default=None, description="App Portal access URL")
34
31
  additional_properties: Dict[str, Any] = {}
35
- __properties: ClassVar[List[str]] = ["file", "path"]
32
+ __properties: ClassVar[List[str]] = ["url"]
36
33
 
37
34
  model_config = ConfigDict(
38
35
  populate_by_name=True,
@@ -40,6 +37,7 @@ class UploadFile(BaseModel):
40
37
  protected_namespaces=(),
41
38
  )
42
39
 
40
+
43
41
  def to_str(self) -> str:
44
42
  """Returns the string representation of the model using alias"""
45
43
  return pprint.pformat(self.model_dump(by_alias=True))
@@ -51,7 +49,7 @@ class UploadFile(BaseModel):
51
49
 
52
50
  @classmethod
53
51
  def from_json(cls, json_str: str) -> Optional[Self]:
54
- """Create an instance of UploadFile from a JSON string"""
52
+ """Create an instance of WebhookControllerGetAppPortalAccess200Response from a JSON string"""
55
53
  return cls.from_dict(json.loads(json_str))
56
54
 
57
55
  def to_dict(self) -> Dict[str, Any]:
@@ -65,11 +63,9 @@ class UploadFile(BaseModel):
65
63
  are ignored.
66
64
  * Fields in `self.additional_properties` are added to the output dict.
67
65
  """
68
- excluded_fields: Set[str] = set(
69
- [
70
- "additional_properties",
71
- ]
72
- )
66
+ excluded_fields: Set[str] = set([
67
+ "additional_properties",
68
+ ])
73
69
 
74
70
  _dict = self.model_dump(
75
71
  by_alias=True,
@@ -85,17 +81,21 @@ class UploadFile(BaseModel):
85
81
 
86
82
  @classmethod
87
83
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
88
- """Create an instance of UploadFile from a dict"""
84
+ """Create an instance of WebhookControllerGetAppPortalAccess200Response from a dict"""
89
85
  if obj is None:
90
86
  return None
91
87
 
92
88
  if not isinstance(obj, dict):
93
89
  return cls.model_validate(obj)
94
90
 
95
- _obj = cls.model_validate({"file": obj.get("file"), "path": obj.get("path")})
91
+ _obj = cls.model_validate({
92
+ "url": obj.get("url")
93
+ })
96
94
  # store additional fields in additional_properties
97
95
  for _key in obj.keys():
98
96
  if _key not in cls.__properties:
99
97
  _obj.additional_properties[_key] = obj.get(_key)
100
98
 
101
99
  return _obj
100
+
101
+
@@ -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
+
@@ -18,16 +18,16 @@ import pprint
18
18
  import re # noqa: F401
19
19
  import json
20
20
 
21
- from pydantic import BaseModel, ConfigDict, Field, StrictBool
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 ToggleState(BaseModel):
26
+ class WebhookControllerGetStatus200Response(BaseModel):
27
27
  """
28
- ToggleState
28
+ WebhookControllerGetStatus200Response
29
29
  """ # noqa: E501
30
- enabled: StrictBool = Field(description="Enable or disable the snapshot/tag")
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 ToggleState from a JSON string"""
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 ToggleState from a dict"""
84
+ """Create an instance of WebhookControllerGetStatus200Response from a dict"""
85
85
  if obj is None:
86
86
  return None
87
87
 
@@ -0,0 +1,121 @@
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, 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 WebhookInitializationStatus(BaseModel):
27
+ """
28
+ WebhookInitializationStatus
29
+ """ # noqa: E501
30
+ organization_id: StrictStr = Field(description="Organization ID", alias="organizationId")
31
+ svix_application_id: Optional[StrictStr] = Field(description="The ID of the Svix application", alias="svixApplicationId")
32
+ last_error: Optional[StrictStr] = Field(description="The error reason for the last initialization attempt", alias="lastError")
33
+ retry_count: Union[StrictFloat, StrictInt] = Field(description="The number of times the initialization has been attempted", alias="retryCount")
34
+ created_at: StrictStr = Field(description="When the webhook initialization was created", alias="createdAt")
35
+ updated_at: StrictStr = Field(description="When the webhook initialization was last updated", alias="updatedAt")
36
+ additional_properties: Dict[str, Any] = {}
37
+ __properties: ClassVar[List[str]] = ["organizationId", "svixApplicationId", "lastError", "retryCount", "createdAt", "updatedAt"]
38
+
39
+ model_config = ConfigDict(
40
+ populate_by_name=True,
41
+ validate_assignment=True,
42
+ protected_namespaces=(),
43
+ )
44
+
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.model_dump(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
53
+ return json.dumps(self.to_dict())
54
+
55
+ @classmethod
56
+ def from_json(cls, json_str: str) -> Optional[Self]:
57
+ """Create an instance of WebhookInitializationStatus from a JSON string"""
58
+ return cls.from_dict(json.loads(json_str))
59
+
60
+ def to_dict(self) -> Dict[str, Any]:
61
+ """Return the dictionary representation of the model using alias.
62
+
63
+ This has the following differences from calling pydantic's
64
+ `self.model_dump(by_alias=True)`:
65
+
66
+ * `None` is only added to the output dict for nullable fields that
67
+ were set at model initialization. Other fields with value `None`
68
+ are ignored.
69
+ * Fields in `self.additional_properties` are added to the output dict.
70
+ """
71
+ excluded_fields: Set[str] = set([
72
+ "additional_properties",
73
+ ])
74
+
75
+ _dict = self.model_dump(
76
+ by_alias=True,
77
+ exclude=excluded_fields,
78
+ exclude_none=True,
79
+ )
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
+ # set to None if svix_application_id (nullable) is None
86
+ # and model_fields_set contains the field
87
+ if self.svix_application_id is None and "svix_application_id" in self.model_fields_set:
88
+ _dict['svixApplicationId'] = None
89
+
90
+ # set to None if last_error (nullable) is None
91
+ # and model_fields_set contains the field
92
+ if self.last_error is None and "last_error" in self.model_fields_set:
93
+ _dict['lastError'] = None
94
+
95
+ return _dict
96
+
97
+ @classmethod
98
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
99
+ """Create an instance of WebhookInitializationStatus from a dict"""
100
+ if obj is None:
101
+ return None
102
+
103
+ if not isinstance(obj, dict):
104
+ return cls.model_validate(obj)
105
+
106
+ _obj = cls.model_validate({
107
+ "organizationId": obj.get("organizationId"),
108
+ "svixApplicationId": obj.get("svixApplicationId"),
109
+ "lastError": obj.get("lastError"),
110
+ "retryCount": obj.get("retryCount"),
111
+ "createdAt": obj.get("createdAt"),
112
+ "updatedAt": obj.get("updatedAt")
113
+ })
114
+ # store additional fields in additional_properties
115
+ for _key in obj.keys():
116
+ if _key not in cls.__properties:
117
+ _obj.additional_properties[_key] = obj.get(_key)
118
+
119
+ return _obj
120
+
121
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: daytona_api_client
3
- Version: 0.25.6
3
+ Version: 0.26.0
4
4
  Summary: Daytona
5
5
  Home-page:
6
6
  Author: Daytona Platforms Inc.