daytona_api_client_async 0.103.0rc3__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_async might be problematic. Click here for more details.
- daytona_api_client_async/__init__.py +6 -0
- daytona_api_client_async/api/__init__.py +1 -0
- daytona_api_client_async/api/config_api.py +279 -0
- daytona_api_client_async/api/preview_api.py +12 -5
- daytona_api_client_async/api/sandbox_api.py +572 -0
- daytona_api_client_async/models/__init__.py +5 -0
- daytona_api_client_async/models/announcement.py +103 -0
- daytona_api_client_async/models/configuration.py +145 -0
- daytona_api_client_async/models/create_docker_registry.py +2 -2
- daytona_api_client_async/models/daytona_configuration.py +148 -0
- daytona_api_client_async/models/docker_registry.py +2 -2
- daytona_api_client_async/models/oidc_config.py +105 -0
- daytona_api_client_async/models/posthog_config.py +103 -0
- daytona_api_client_async/models/update_sandbox_state_dto.py +108 -0
- {daytona_api_client_async-0.103.0rc3.dist-info → daytona_api_client_async-0.104.0rc1.dist-info}/METADATA +1 -1
- {daytona_api_client_async-0.103.0rc3.dist-info → daytona_api_client_async-0.104.0rc1.dist-info}/RECORD +19 -12
- {daytona_api_client_async-0.103.0rc3.dist-info → daytona_api_client_async-0.104.0rc1.dist-info}/WHEEL +0 -0
- {daytona_api_client_async-0.103.0rc3.dist-info → daytona_api_client_async-0.104.0rc1.dist-info}/licenses/LICENSE +0 -0
- {daytona_api_client_async-0.103.0rc3.dist-info → daytona_api_client_async-0.104.0rc1.dist-info}/top_level.txt +0 -0
|
@@ -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
|
+
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# Copyright 2025 Daytona Platforms Inc.
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
"""
|
|
7
|
+
Daytona
|
|
8
|
+
|
|
9
|
+
Daytona AI platform API Docs
|
|
10
|
+
|
|
11
|
+
The version of the OpenAPI document: 1.0
|
|
12
|
+
Contact: support@daytona.com
|
|
13
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
14
|
+
|
|
15
|
+
Do not edit the class manually.
|
|
16
|
+
""" # noqa: E501
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
from __future__ import annotations
|
|
20
|
+
import pprint
|
|
21
|
+
import re # noqa: F401
|
|
22
|
+
import json
|
|
23
|
+
|
|
24
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr
|
|
25
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
26
|
+
from daytona_api_client_async.models.announcement import Announcement
|
|
27
|
+
from daytona_api_client_async.models.oidc_config import OidcConfig
|
|
28
|
+
from daytona_api_client_async.models.posthog_config import PosthogConfig
|
|
29
|
+
from typing import Optional, Set
|
|
30
|
+
from typing_extensions import Self
|
|
31
|
+
|
|
32
|
+
class Configuration(BaseModel):
|
|
33
|
+
"""
|
|
34
|
+
Configuration
|
|
35
|
+
""" # noqa: E501
|
|
36
|
+
posthog: Optional[PosthogConfig] = Field(default=None, description="PostHog configuration")
|
|
37
|
+
oidc: OidcConfig = Field(description="OIDC configuration")
|
|
38
|
+
linked_accounts_enabled: StrictBool = Field(description="Whether linked accounts are enabled", alias="linkedAccountsEnabled")
|
|
39
|
+
announcements: Dict[str, Announcement] = Field(description="System announcements")
|
|
40
|
+
pylon_app_id: Optional[StrictStr] = Field(default=None, description="Pylon application ID", alias="pylonAppId")
|
|
41
|
+
proxy_template_url: StrictStr = Field(description="Proxy template URL", alias="proxyTemplateUrl")
|
|
42
|
+
default_snapshot: StrictStr = Field(description="Default snapshot for sandboxes", alias="defaultSnapshot")
|
|
43
|
+
dashboard_url: StrictStr = Field(description="Dashboard URL", alias="dashboardUrl")
|
|
44
|
+
max_auto_archive_interval: Union[StrictFloat, StrictInt] = Field(description="Maximum auto-archive interval in minutes", alias="maxAutoArchiveInterval")
|
|
45
|
+
maintanance_mode: StrictBool = Field(description="Whether maintenance mode is enabled", alias="maintananceMode")
|
|
46
|
+
environment: StrictStr = Field(description="Current environment")
|
|
47
|
+
additional_properties: Dict[str, Any] = {}
|
|
48
|
+
__properties: ClassVar[List[str]] = ["posthog", "oidc", "linkedAccountsEnabled", "announcements", "pylonAppId", "proxyTemplateUrl", "defaultSnapshot", "dashboardUrl", "maxAutoArchiveInterval", "maintananceMode", "environment"]
|
|
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 Configuration 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 Configuration 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
|
+
"posthog": PosthogConfig.from_dict(obj["posthog"]) if obj.get("posthog") is not None else None,
|
|
122
|
+
"oidc": OidcConfig.from_dict(obj["oidc"]) if obj.get("oidc") is not None else None,
|
|
123
|
+
"linkedAccountsEnabled": obj.get("linkedAccountsEnabled"),
|
|
124
|
+
"announcements": dict(
|
|
125
|
+
(_k, Announcement.from_dict(_v))
|
|
126
|
+
for _k, _v in obj["announcements"].items()
|
|
127
|
+
)
|
|
128
|
+
if obj.get("announcements") is not None
|
|
129
|
+
else None,
|
|
130
|
+
"pylonAppId": obj.get("pylonAppId"),
|
|
131
|
+
"proxyTemplateUrl": obj.get("proxyTemplateUrl"),
|
|
132
|
+
"defaultSnapshot": obj.get("defaultSnapshot"),
|
|
133
|
+
"dashboardUrl": obj.get("dashboardUrl"),
|
|
134
|
+
"maxAutoArchiveInterval": obj.get("maxAutoArchiveInterval"),
|
|
135
|
+
"maintananceMode": obj.get("maintananceMode"),
|
|
136
|
+
"environment": obj.get("environment")
|
|
137
|
+
})
|
|
138
|
+
# store additional fields in additional_properties
|
|
139
|
+
for _key in obj.keys():
|
|
140
|
+
if _key not in cls.__properties:
|
|
141
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
142
|
+
|
|
143
|
+
return _obj
|
|
144
|
+
|
|
145
|
+
|
|
@@ -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', '
|
|
44
|
-
raise ValueError("must be one of enum values ('internal', 'organization', '
|
|
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_async.models.announcement import Announcement
|
|
24
|
+
from daytona_api_client_async.models.oidc_config import OidcConfig
|
|
25
|
+
from daytona_api_client_async.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', '
|
|
46
|
-
raise ValueError("must be one of enum values ('internal', 'organization', '
|
|
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
|
+
|