daytona_api_client 0.103.0rc2__py3-none-any.whl → 0.104.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 might be problematic. Click here for more details.

@@ -16,6 +16,7 @@
16
16
 
17
17
  # import models into model package
18
18
  from daytona_api_client.models.account_provider import AccountProvider
19
+ from daytona_api_client.models.announcement import Announcement
19
20
  from daytona_api_client.models.api_key_list import ApiKeyList
20
21
  from daytona_api_client.models.api_key_response import ApiKeyResponse
21
22
  from daytona_api_client.models.audit_log import AuditLog
@@ -44,6 +45,7 @@ from daytona_api_client.models.create_snapshot import CreateSnapshot
44
45
  from daytona_api_client.models.create_user import CreateUser
45
46
  from daytona_api_client.models.create_volume import CreateVolume
46
47
  from daytona_api_client.models.create_workspace import CreateWorkspace
48
+ from daytona_api_client.models.daytona_configuration import DaytonaConfiguration
47
49
  from daytona_api_client.models.display_info_response import DisplayInfoResponse
48
50
  from daytona_api_client.models.docker_registry import DockerRegistry
49
51
  from daytona_api_client.models.execute_request import ExecuteRequest
@@ -82,6 +84,7 @@ from daytona_api_client.models.mouse_move_response import MouseMoveResponse
82
84
  from daytona_api_client.models.mouse_position import MousePosition
83
85
  from daytona_api_client.models.mouse_scroll_request import MouseScrollRequest
84
86
  from daytona_api_client.models.mouse_scroll_response import MouseScrollResponse
87
+ from daytona_api_client.models.oidc_config import OidcConfig
85
88
  from daytona_api_client.models.organization import Organization
86
89
  from daytona_api_client.models.organization_invitation import OrganizationInvitation
87
90
  from daytona_api_client.models.organization_role import OrganizationRole
@@ -93,6 +96,7 @@ from daytona_api_client.models.paginated_audit_logs import PaginatedAuditLogs
93
96
  from daytona_api_client.models.paginated_snapshots_dto import PaginatedSnapshotsDto
94
97
  from daytona_api_client.models.port_preview_url import PortPreviewUrl
95
98
  from daytona_api_client.models.position import Position
99
+ from daytona_api_client.models.posthog_config import PosthogConfig
96
100
  from daytona_api_client.models.process_errors_response import ProcessErrorsResponse
97
101
  from daytona_api_client.models.process_logs_response import ProcessLogsResponse
98
102
  from daytona_api_client.models.process_restart_response import ProcessRestartResponse
@@ -130,7 +134,9 @@ from daytona_api_client.models.update_organization_invitation import UpdateOrgan
130
134
  from daytona_api_client.models.update_organization_member_access import UpdateOrganizationMemberAccess
131
135
  from daytona_api_client.models.update_organization_quota import UpdateOrganizationQuota
132
136
  from daytona_api_client.models.update_organization_role import UpdateOrganizationRole
137
+ from daytona_api_client.models.update_sandbox_state_dto import UpdateSandboxStateDto
133
138
  from daytona_api_client.models.user import User
139
+ from daytona_api_client.models.user_home_dir_response import UserHomeDirResponse
134
140
  from daytona_api_client.models.user_public_key import UserPublicKey
135
141
  from daytona_api_client.models.volume_dto import VolumeDto
136
142
  from daytona_api_client.models.volume_state import VolumeState
@@ -138,4 +144,5 @@ from daytona_api_client.models.webhook_app_portal_access import WebhookAppPortal
138
144
  from daytona_api_client.models.webhook_controller_get_status200_response import WebhookControllerGetStatus200Response
139
145
  from daytona_api_client.models.webhook_initialization_status import WebhookInitializationStatus
140
146
  from daytona_api_client.models.windows_response import WindowsResponse
147
+ from daytona_api_client.models.work_dir_response import WorkDirResponse
141
148
  from daytona_api_client.models.workspace import Workspace
@@ -0,0 +1,103 @@
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 Announcement(BaseModel):
27
+ """
28
+ Announcement
29
+ """ # noqa: E501
30
+ text: StrictStr = Field(description="The announcement text")
31
+ learn_more_url: Optional[StrictStr] = Field(default=None, description="URL to learn more about the announcement", alias="learnMoreUrl")
32
+ additional_properties: Dict[str, Any] = {}
33
+ __properties: ClassVar[List[str]] = ["text", "learnMoreUrl"]
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 Announcement 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 Announcement 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
+ "text": obj.get("text"),
94
+ "learnMoreUrl": obj.get("learnMoreUrl")
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
+
@@ -40,8 +40,8 @@ class CreateDockerRegistry(BaseModel):
40
40
  @field_validator('registry_type')
41
41
  def registry_type_validate_enum(cls, value):
42
42
  """Validates the enum"""
43
- if value not in set(['internal', 'organization', 'public', 'transient']):
44
- raise ValueError("must be one of enum values ('internal', 'organization', 'public', 'transient')")
43
+ if value not in set(['internal', 'organization', 'transient', 'backup']):
44
+ raise ValueError("must be one of enum values ('internal', 'organization', 'transient', 'backup')")
45
45
  return value
46
46
 
47
47
  model_config = ConfigDict(
@@ -0,0 +1,148 @@
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 daytona_api_client.models.announcement import Announcement
24
+ from daytona_api_client.models.oidc_config import OidcConfig
25
+ from daytona_api_client.models.posthog_config import PosthogConfig
26
+ from typing import Optional, Set
27
+ from typing_extensions import Self
28
+
29
+ class DaytonaConfiguration(BaseModel):
30
+ """
31
+ DaytonaConfiguration
32
+ """ # noqa: E501
33
+ version: StrictStr = Field(description="Daytona version")
34
+ posthog: Optional[PosthogConfig] = Field(default=None, description="PostHog configuration")
35
+ oidc: OidcConfig = Field(description="OIDC configuration")
36
+ linked_accounts_enabled: StrictBool = Field(description="Whether linked accounts are enabled", alias="linkedAccountsEnabled")
37
+ announcements: Dict[str, Announcement] = Field(description="System announcements")
38
+ pylon_app_id: Optional[StrictStr] = Field(default=None, description="Pylon application ID", alias="pylonAppId")
39
+ proxy_template_url: StrictStr = Field(description="Proxy template URL", alias="proxyTemplateUrl")
40
+ default_snapshot: StrictStr = Field(description="Default snapshot for sandboxes", alias="defaultSnapshot")
41
+ dashboard_url: StrictStr = Field(description="Dashboard URL", alias="dashboardUrl")
42
+ max_auto_archive_interval: Union[StrictFloat, StrictInt] = Field(description="Maximum auto-archive interval in minutes", alias="maxAutoArchiveInterval")
43
+ maintanance_mode: StrictBool = Field(description="Whether maintenance mode is enabled", alias="maintananceMode")
44
+ environment: StrictStr = Field(description="Current environment")
45
+ billing_api_url: Optional[StrictStr] = Field(default=None, description="Billing API URL", alias="billingApiUrl")
46
+ ssh_gateway_command: Optional[StrictStr] = Field(default=None, description="SSH Gateway command", alias="sshGatewayCommand")
47
+ additional_properties: Dict[str, Any] = {}
48
+ __properties: ClassVar[List[str]] = ["version", "posthog", "oidc", "linkedAccountsEnabled", "announcements", "pylonAppId", "proxyTemplateUrl", "defaultSnapshot", "dashboardUrl", "maxAutoArchiveInterval", "maintananceMode", "environment", "billingApiUrl", "sshGatewayCommand"]
49
+
50
+ model_config = ConfigDict(
51
+ populate_by_name=True,
52
+ validate_assignment=True,
53
+ protected_namespaces=(),
54
+ )
55
+
56
+
57
+ def to_str(self) -> str:
58
+ """Returns the string representation of the model using alias"""
59
+ return pprint.pformat(self.model_dump(by_alias=True))
60
+
61
+ def to_json(self) -> str:
62
+ """Returns the JSON representation of the model using alias"""
63
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
64
+ return json.dumps(self.to_dict())
65
+
66
+ @classmethod
67
+ def from_json(cls, json_str: str) -> Optional[Self]:
68
+ """Create an instance of DaytonaConfiguration from a JSON string"""
69
+ return cls.from_dict(json.loads(json_str))
70
+
71
+ def to_dict(self) -> Dict[str, Any]:
72
+ """Return the dictionary representation of the model using alias.
73
+
74
+ This has the following differences from calling pydantic's
75
+ `self.model_dump(by_alias=True)`:
76
+
77
+ * `None` is only added to the output dict for nullable fields that
78
+ were set at model initialization. Other fields with value `None`
79
+ are ignored.
80
+ * Fields in `self.additional_properties` are added to the output dict.
81
+ """
82
+ excluded_fields: Set[str] = set([
83
+ "additional_properties",
84
+ ])
85
+
86
+ _dict = self.model_dump(
87
+ by_alias=True,
88
+ exclude=excluded_fields,
89
+ exclude_none=True,
90
+ )
91
+ # override the default output from pydantic by calling `to_dict()` of posthog
92
+ if self.posthog:
93
+ _dict['posthog'] = self.posthog.to_dict()
94
+ # override the default output from pydantic by calling `to_dict()` of oidc
95
+ if self.oidc:
96
+ _dict['oidc'] = self.oidc.to_dict()
97
+ # override the default output from pydantic by calling `to_dict()` of each value in announcements (dict)
98
+ _field_dict = {}
99
+ if self.announcements:
100
+ for _key_announcements in self.announcements:
101
+ if self.announcements[_key_announcements]:
102
+ _field_dict[_key_announcements] = self.announcements[_key_announcements].to_dict()
103
+ _dict['announcements'] = _field_dict
104
+ # puts key-value pairs in additional_properties in the top level
105
+ if self.additional_properties is not None:
106
+ for _key, _value in self.additional_properties.items():
107
+ _dict[_key] = _value
108
+
109
+ return _dict
110
+
111
+ @classmethod
112
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
113
+ """Create an instance of DaytonaConfiguration from a dict"""
114
+ if obj is None:
115
+ return None
116
+
117
+ if not isinstance(obj, dict):
118
+ return cls.model_validate(obj)
119
+
120
+ _obj = cls.model_validate({
121
+ "version": obj.get("version"),
122
+ "posthog": PosthogConfig.from_dict(obj["posthog"]) if obj.get("posthog") is not None else None,
123
+ "oidc": OidcConfig.from_dict(obj["oidc"]) if obj.get("oidc") is not None else None,
124
+ "linkedAccountsEnabled": obj.get("linkedAccountsEnabled"),
125
+ "announcements": dict(
126
+ (_k, Announcement.from_dict(_v))
127
+ for _k, _v in obj["announcements"].items()
128
+ )
129
+ if obj.get("announcements") is not None
130
+ else None,
131
+ "pylonAppId": obj.get("pylonAppId"),
132
+ "proxyTemplateUrl": obj.get("proxyTemplateUrl"),
133
+ "defaultSnapshot": obj.get("defaultSnapshot"),
134
+ "dashboardUrl": obj.get("dashboardUrl"),
135
+ "maxAutoArchiveInterval": obj.get("maxAutoArchiveInterval"),
136
+ "maintananceMode": obj.get("maintananceMode"),
137
+ "environment": obj.get("environment"),
138
+ "billingApiUrl": obj.get("billingApiUrl"),
139
+ "sshGatewayCommand": obj.get("sshGatewayCommand")
140
+ })
141
+ # store additional fields in additional_properties
142
+ for _key in obj.keys():
143
+ if _key not in cls.__properties:
144
+ _obj.additional_properties[_key] = obj.get(_key)
145
+
146
+ return _obj
147
+
148
+
@@ -42,8 +42,8 @@ class DockerRegistry(BaseModel):
42
42
  @field_validator('registry_type')
43
43
  def registry_type_validate_enum(cls, value):
44
44
  """Validates the enum"""
45
- if value not in set(['internal', 'organization', 'public', 'transient']):
46
- raise ValueError("must be one of enum values ('internal', 'organization', 'public', 'transient')")
45
+ if value not in set(['internal', 'organization', 'transient', 'backup']):
46
+ raise ValueError("must be one of enum values ('internal', 'organization', 'transient', 'backup')")
47
47
  return value
48
48
 
49
49
  model_config = ConfigDict(
@@ -0,0 +1,105 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Daytona
5
+
6
+ Daytona AI platform API Docs
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Contact: support@daytona.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
22
+ from typing import Any, ClassVar, Dict, List
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class OidcConfig(BaseModel):
27
+ """
28
+ OidcConfig
29
+ """ # noqa: E501
30
+ issuer: StrictStr = Field(description="OIDC issuer")
31
+ client_id: StrictStr = Field(description="OIDC client ID", alias="clientId")
32
+ audience: StrictStr = Field(description="OIDC audience")
33
+ additional_properties: Dict[str, Any] = {}
34
+ __properties: ClassVar[List[str]] = ["issuer", "clientId", "audience"]
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 OidcConfig 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 OidcConfig 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
+ "issuer": obj.get("issuer"),
95
+ "clientId": obj.get("clientId"),
96
+ "audience": obj.get("audience")
97
+ })
98
+ # store additional fields in additional_properties
99
+ for _key in obj.keys():
100
+ if _key not in cls.__properties:
101
+ _obj.additional_properties[_key] = obj.get(_key)
102
+
103
+ return _obj
104
+
105
+
@@ -0,0 +1,103 @@
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 PosthogConfig(BaseModel):
27
+ """
28
+ PosthogConfig
29
+ """ # noqa: E501
30
+ api_key: StrictStr = Field(description="PostHog API key", alias="apiKey")
31
+ host: StrictStr = Field(description="PostHog host URL")
32
+ additional_properties: Dict[str, Any] = {}
33
+ __properties: ClassVar[List[str]] = ["apiKey", "host"]
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 PosthogConfig 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 PosthogConfig 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
+ "apiKey": obj.get("apiKey"),
94
+ "host": obj.get("host")
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
+
@@ -0,0 +1,108 @@
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
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class UpdateSandboxStateDto(BaseModel):
27
+ """
28
+ UpdateSandboxStateDto
29
+ """ # noqa: E501
30
+ state: StrictStr = Field(description="The new state for the sandbox")
31
+ additional_properties: Dict[str, Any] = {}
32
+ __properties: ClassVar[List[str]] = ["state"]
33
+
34
+ @field_validator('state')
35
+ def state_validate_enum(cls, value):
36
+ """Validates the enum"""
37
+ if value not in set(['creating', 'restoring', 'destroyed', 'destroying', 'started', 'stopped', 'starting', 'stopping', 'error', 'build_failed', 'pending_build', 'building_snapshot', 'unknown', 'pulling_snapshot', 'archived', 'archiving']):
38
+ raise ValueError("must be one of enum values ('creating', 'restoring', 'destroyed', 'destroying', 'started', 'stopped', 'starting', 'stopping', 'error', 'build_failed', 'pending_build', 'building_snapshot', 'unknown', 'pulling_snapshot', 'archived', 'archiving')")
39
+ return value
40
+
41
+ model_config = ConfigDict(
42
+ populate_by_name=True,
43
+ validate_assignment=True,
44
+ protected_namespaces=(),
45
+ )
46
+
47
+
48
+ def to_str(self) -> str:
49
+ """Returns the string representation of the model using alias"""
50
+ return pprint.pformat(self.model_dump(by_alias=True))
51
+
52
+ def to_json(self) -> str:
53
+ """Returns the JSON representation of the model using alias"""
54
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
55
+ return json.dumps(self.to_dict())
56
+
57
+ @classmethod
58
+ def from_json(cls, json_str: str) -> Optional[Self]:
59
+ """Create an instance of UpdateSandboxStateDto from a JSON string"""
60
+ return cls.from_dict(json.loads(json_str))
61
+
62
+ def to_dict(self) -> Dict[str, Any]:
63
+ """Return the dictionary representation of the model using alias.
64
+
65
+ This has the following differences from calling pydantic's
66
+ `self.model_dump(by_alias=True)`:
67
+
68
+ * `None` is only added to the output dict for nullable fields that
69
+ were set at model initialization. Other fields with value `None`
70
+ are ignored.
71
+ * Fields in `self.additional_properties` are added to the output dict.
72
+ """
73
+ excluded_fields: Set[str] = set([
74
+ "additional_properties",
75
+ ])
76
+
77
+ _dict = self.model_dump(
78
+ by_alias=True,
79
+ exclude=excluded_fields,
80
+ exclude_none=True,
81
+ )
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 UpdateSandboxStateDto 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
+ "state": obj.get("state")
100
+ })
101
+ # store additional fields in additional_properties
102
+ for _key in obj.keys():
103
+ if _key not in cls.__properties:
104
+ _obj.additional_properties[_key] = obj.get(_key)
105
+
106
+ return _obj
107
+
108
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: daytona_api_client
3
- Version: 0.103.0rc2
3
+ Version: 0.104.0rc1
4
4
  Summary: Daytona
5
5
  Home-page:
6
6
  Author: Daytona Platforms Inc.