latitudesh-python-sdk 1.1.0__py3-none-any.whl → 2.0.1__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 latitudesh-python-sdk might be problematic. Click here for more details.
- latitudesh_python_sdk/_hooks/types.py +7 -0
- latitudesh_python_sdk/_version.py +6 -4
- latitudesh_python_sdk/apikeys.py +73 -156
- latitudesh_python_sdk/basesdk.py +16 -24
- latitudesh_python_sdk/billing.py +13 -32
- latitudesh_python_sdk/events_sdk.py +11 -34
- latitudesh_python_sdk/firewalls_sdk.py +105 -264
- latitudesh_python_sdk/httpclient.py +6 -16
- latitudesh_python_sdk/ipaddresses_sdk.py +29 -68
- latitudesh_python_sdk/models/__init__.py +2586 -1126
- latitudesh_python_sdk/models/apierror.py +30 -14
- latitudesh_python_sdk/models/assign_server_virtual_networkop.py +2 -2
- latitudesh_python_sdk/models/{bandwidth_plan.py → bandwidth_plan_data.py} +9 -9
- latitudesh_python_sdk/models/bandwidth_plans.py +14 -3
- latitudesh_python_sdk/models/custom_tag.py +15 -0
- latitudesh_python_sdk/models/custom_tag_data.py +54 -0
- latitudesh_python_sdk/models/custom_tags.py +26 -0
- latitudesh_python_sdk/models/delete_ssh_keyop.py +16 -0
- latitudesh_python_sdk/models/delete_user_dataop.py +16 -0
- latitudesh_python_sdk/models/deploy_config.py +11 -6
- latitudesh_python_sdk/models/error_object.py +11 -6
- latitudesh_python_sdk/models/event_data.py +98 -0
- latitudesh_python_sdk/models/events.py +16 -1
- latitudesh_python_sdk/models/filesystem_data.py +4 -0
- latitudesh_python_sdk/models/firewall.py +15 -0
- latitudesh_python_sdk/models/firewall_assignment_data.py +50 -0
- latitudesh_python_sdk/models/firewall_assignments.py +29 -0
- latitudesh_python_sdk/models/firewall_data.py +71 -0
- latitudesh_python_sdk/models/firewall_server.py +4 -1
- latitudesh_python_sdk/models/firewalls.py +7 -7
- latitudesh_python_sdk/models/get_firewall_assignmentsop.py +3 -3
- latitudesh_python_sdk/models/get_ssh_keyop.py +30 -0
- latitudesh_python_sdk/models/get_ssh_keysop.py +22 -0
- latitudesh_python_sdk/models/get_traffic_consumptionop.py +8 -4
- latitudesh_python_sdk/models/get_user_dataop.py +31 -0
- latitudesh_python_sdk/models/get_users_dataop.py +35 -0
- latitudesh_python_sdk/models/latitudesherror.py +26 -0
- latitudesh_python_sdk/models/no_response_error.py +13 -0
- latitudesh_python_sdk/models/operating_system_data.py +65 -0
- latitudesh_python_sdk/models/operating_systems.py +15 -0
- latitudesh_python_sdk/models/out_of_band_connection.py +4 -4
- latitudesh_python_sdk/models/patch_user_dataop.py +69 -0
- latitudesh_python_sdk/models/post_ssh_keyop.py +58 -0
- latitudesh_python_sdk/models/post_user_dataop.py +45 -0
- latitudesh_python_sdk/models/project_include.py +3 -0
- latitudesh_python_sdk/models/put_ssh_keyop.py +80 -0
- latitudesh_python_sdk/models/region_resource_data.py +4 -4
- latitudesh_python_sdk/models/responsevalidationerror.py +25 -0
- latitudesh_python_sdk/models/role.py +11 -0
- latitudesh_python_sdk/models/server.py +11 -6
- latitudesh_python_sdk/models/server_data.py +14 -3
- latitudesh_python_sdk/models/server_region_resource_data.py +40 -0
- latitudesh_python_sdk/models/{ssh_key.py → ssh_keys.py} +13 -2
- latitudesh_python_sdk/models/storage_plan_data.py +47 -0
- latitudesh_python_sdk/models/storage_plans.py +14 -3
- latitudesh_python_sdk/models/update_serverop.py +58 -10
- latitudesh_python_sdk/models/user_data.py +11 -0
- latitudesh_python_sdk/models/virtual_network.py +30 -6
- latitudesh_python_sdk/models/virtual_network1.py +15 -0
- latitudesh_python_sdk/models/virtual_network_assignment.py +41 -0
- latitudesh_python_sdk/models/virtual_network_assignment_data.py +68 -0
- latitudesh_python_sdk/models/virtual_network_assignments.py +5 -5
- latitudesh_python_sdk/models/virtual_network_data.py +88 -0
- latitudesh_python_sdk/models/virtual_networks.py +3 -3
- latitudesh_python_sdk/operatingsystems_sdk.py +13 -32
- latitudesh_python_sdk/plans.py +99 -214
- latitudesh_python_sdk/privatenetworks.py +131 -290
- latitudesh_python_sdk/projects_sdk.py +79 -158
- latitudesh_python_sdk/regions_sdk.py +25 -66
- latitudesh_python_sdk/roles.py +25 -64
- latitudesh_python_sdk/sdk.py +110 -73
- latitudesh_python_sdk/sdkconfiguration.py +0 -7
- latitudesh_python_sdk/servers_sdk.py +305 -646
- latitudesh_python_sdk/sshkeys_sdk.py +1856 -0
- latitudesh_python_sdk/storage.py +41 -120
- latitudesh_python_sdk/tags.py +67 -146
- latitudesh_python_sdk/teams_sdk.py +41 -100
- latitudesh_python_sdk/teamsmembers.py +37 -96
- latitudesh_python_sdk/traffic_sdk.py +37 -76
- latitudesh_python_sdk/userdata_sdk.py +959 -149
- latitudesh_python_sdk/userprofile.py +37 -100
- latitudesh_python_sdk/utils/__init__.py +131 -46
- latitudesh_python_sdk/utils/forms.py +49 -28
- latitudesh_python_sdk/utils/serializers.py +3 -2
- latitudesh_python_sdk/utils/unmarshal_json_response.py +24 -0
- latitudesh_python_sdk/virtualmachines.py +71 -140
- latitudesh_python_sdk/vpnsessions.py +93 -172
- {latitudesh_python_sdk-1.1.0.dist-info → latitudesh_python_sdk-2.0.1.dist-info}/METADATA +76 -43
- {latitudesh_python_sdk-1.1.0.dist-info → latitudesh_python_sdk-2.0.1.dist-info}/RECORD +91 -67
- {latitudesh_python_sdk-1.1.0.dist-info → latitudesh_python_sdk-2.0.1.dist-info}/WHEEL +1 -1
- latitudesh_python_sdk/models/storage_plan.py +0 -36
- latitudesh_python_sdk/sshkeys.py +0 -1050
- {latitudesh_python_sdk-1.1.0.dist-info → latitudesh_python_sdk-2.0.1.dist-info}/LICENSE +0 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .ssh_key_data import SSHKeyData, SSHKeyDataTypedDict
|
|
5
|
+
from enum import Enum
|
|
6
|
+
from latitudesh_python_sdk.types import BaseModel
|
|
7
|
+
from latitudesh_python_sdk.utils import (
|
|
8
|
+
FieldMetadata,
|
|
9
|
+
PathParamMetadata,
|
|
10
|
+
RequestMetadata,
|
|
11
|
+
)
|
|
12
|
+
from typing import List, Optional
|
|
13
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class PutSSHKeySSHKeysType(str, Enum):
|
|
17
|
+
SSH_KEYS = "ssh_keys"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class PutSSHKeySSHKeysAttributesTypedDict(TypedDict):
|
|
21
|
+
tags: NotRequired[List[str]]
|
|
22
|
+
name: NotRequired[str]
|
|
23
|
+
r"""Name of the SSH Key"""
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class PutSSHKeySSHKeysAttributes(BaseModel):
|
|
27
|
+
tags: Optional[List[str]] = None
|
|
28
|
+
|
|
29
|
+
name: Optional[str] = "New SSH Key Name"
|
|
30
|
+
r"""Name of the SSH Key"""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class PutSSHKeySSHKeysDataTypedDict(TypedDict):
|
|
34
|
+
type: PutSSHKeySSHKeysType
|
|
35
|
+
id: NotRequired[str]
|
|
36
|
+
attributes: NotRequired[PutSSHKeySSHKeysAttributesTypedDict]
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class PutSSHKeySSHKeysData(BaseModel):
|
|
40
|
+
type: PutSSHKeySSHKeysType
|
|
41
|
+
|
|
42
|
+
id: Optional[str] = "ssh_81EVOtR1N4J2Z"
|
|
43
|
+
|
|
44
|
+
attributes: Optional[PutSSHKeySSHKeysAttributes] = None
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class PutSSHKeySSHKeysRequestBodyTypedDict(TypedDict):
|
|
48
|
+
data: PutSSHKeySSHKeysDataTypedDict
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class PutSSHKeySSHKeysRequestBody(BaseModel):
|
|
52
|
+
data: PutSSHKeySSHKeysData
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class PutSSHKeyRequestTypedDict(TypedDict):
|
|
56
|
+
ssh_key_id: str
|
|
57
|
+
request_body: PutSSHKeySSHKeysRequestBodyTypedDict
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class PutSSHKeyRequest(BaseModel):
|
|
61
|
+
ssh_key_id: Annotated[
|
|
62
|
+
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
63
|
+
]
|
|
64
|
+
|
|
65
|
+
request_body: Annotated[
|
|
66
|
+
PutSSHKeySSHKeysRequestBody,
|
|
67
|
+
FieldMetadata(request=RequestMetadata(media_type="application/json")),
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class PutSSHKeyResponseBodyTypedDict(TypedDict):
|
|
72
|
+
r"""Success"""
|
|
73
|
+
|
|
74
|
+
data: NotRequired[SSHKeyDataTypedDict]
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class PutSSHKeyResponseBody(BaseModel):
|
|
78
|
+
r"""Success"""
|
|
79
|
+
|
|
80
|
+
data: Optional[SSHKeyData] = None
|
|
@@ -6,14 +6,14 @@ from typing import Optional
|
|
|
6
6
|
from typing_extensions import NotRequired, TypedDict
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class
|
|
9
|
+
class RegionResourceDataSiteTypedDict(TypedDict):
|
|
10
10
|
id: NotRequired[str]
|
|
11
11
|
name: NotRequired[str]
|
|
12
12
|
slug: NotRequired[str]
|
|
13
13
|
facility: NotRequired[str]
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class RegionResourceDataSite(BaseModel):
|
|
17
17
|
id: Optional[str] = None
|
|
18
18
|
|
|
19
19
|
name: Optional[str] = None
|
|
@@ -26,7 +26,7 @@ class Site(BaseModel):
|
|
|
26
26
|
class RegionResourceDataTypedDict(TypedDict):
|
|
27
27
|
city: NotRequired[str]
|
|
28
28
|
country: NotRequired[str]
|
|
29
|
-
site: NotRequired[
|
|
29
|
+
site: NotRequired[RegionResourceDataSiteTypedDict]
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
class RegionResourceData(BaseModel):
|
|
@@ -34,4 +34,4 @@ class RegionResourceData(BaseModel):
|
|
|
34
34
|
|
|
35
35
|
country: Optional[str] = None
|
|
36
36
|
|
|
37
|
-
site: Optional[
|
|
37
|
+
site: Optional[RegionResourceDataSite] = None
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
import httpx
|
|
4
|
+
from typing import Optional
|
|
5
|
+
|
|
6
|
+
from latitudesh_python_sdk.models import LatitudeshError
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ResponseValidationError(LatitudeshError):
|
|
10
|
+
"""Error raised when there is a type mismatch between the response data and the expected Pydantic model."""
|
|
11
|
+
|
|
12
|
+
def __init__(
|
|
13
|
+
self,
|
|
14
|
+
message: str,
|
|
15
|
+
raw_response: httpx.Response,
|
|
16
|
+
cause: Exception,
|
|
17
|
+
body: Optional[str] = None,
|
|
18
|
+
):
|
|
19
|
+
message = f"{message}: {cause}"
|
|
20
|
+
super().__init__(message, raw_response, body)
|
|
21
|
+
|
|
22
|
+
@property
|
|
23
|
+
def cause(self):
|
|
24
|
+
"""Normally the Pydantic ValidationError"""
|
|
25
|
+
return self.__cause__
|
|
@@ -7,9 +7,20 @@ from typing import Optional
|
|
|
7
7
|
from typing_extensions import NotRequired, TypedDict
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
class RoleMetaTypedDict(TypedDict):
|
|
11
|
+
pass
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class RoleMeta(BaseModel):
|
|
15
|
+
pass
|
|
16
|
+
|
|
17
|
+
|
|
10
18
|
class RoleTypedDict(TypedDict):
|
|
11
19
|
data: NotRequired[RoleDataTypedDict]
|
|
20
|
+
meta: NotRequired[RoleMetaTypedDict]
|
|
12
21
|
|
|
13
22
|
|
|
14
23
|
class Role(BaseModel):
|
|
15
24
|
data: Optional[RoleData] = None
|
|
25
|
+
|
|
26
|
+
meta: Optional[RoleMeta] = None
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .server_data import ServerData, ServerDataTypedDict
|
|
5
|
-
|
|
5
|
+
import httpx
|
|
6
|
+
from latitudesh_python_sdk.models import LatitudeshError
|
|
6
7
|
from latitudesh_python_sdk.types import BaseModel
|
|
7
8
|
from typing import Optional
|
|
8
9
|
from typing_extensions import NotRequired, TypedDict
|
|
@@ -33,15 +34,19 @@ class ServerErrorData(BaseModel):
|
|
|
33
34
|
meta: Optional[ServerMeta] = None
|
|
34
35
|
|
|
35
36
|
|
|
36
|
-
class ServerError(
|
|
37
|
+
class ServerError(LatitudeshError):
|
|
37
38
|
data: ServerErrorData
|
|
38
39
|
|
|
39
|
-
def __init__(
|
|
40
|
+
def __init__(
|
|
41
|
+
self,
|
|
42
|
+
data: ServerErrorData,
|
|
43
|
+
raw_response: httpx.Response,
|
|
44
|
+
body: Optional[str] = None,
|
|
45
|
+
):
|
|
46
|
+
message = body or raw_response.text
|
|
47
|
+
super().__init__(message, raw_response, body)
|
|
40
48
|
self.data = data
|
|
41
49
|
|
|
42
|
-
def __str__(self) -> str:
|
|
43
|
-
return utils.marshal_json(self.data, ServerErrorData)
|
|
44
|
-
|
|
45
50
|
|
|
46
51
|
class Server1TypedDict(TypedDict):
|
|
47
52
|
data: NotRequired[ServerDataTypedDict]
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .project_include import ProjectInclude, ProjectIncludeTypedDict
|
|
5
|
-
from .
|
|
5
|
+
from .server_region_resource_data import (
|
|
6
|
+
ServerRegionResourceData,
|
|
7
|
+
ServerRegionResourceDataTypedDict,
|
|
8
|
+
)
|
|
6
9
|
from .team_include import TeamInclude, TeamIncludeTypedDict
|
|
7
10
|
from enum import Enum
|
|
8
11
|
from latitudesh_python_sdk.types import BaseModel
|
|
@@ -45,6 +48,8 @@ class ServerDataPlanTypedDict(TypedDict):
|
|
|
45
48
|
r"""The plan name"""
|
|
46
49
|
billing: NotRequired[str]
|
|
47
50
|
r"""hourly/monthly pricing. Defaults to `hourly`. Appliable for `on_demand` projects only."""
|
|
51
|
+
slug: NotRequired[str]
|
|
52
|
+
r"""The plan slug"""
|
|
48
53
|
|
|
49
54
|
|
|
50
55
|
class ServerDataPlan(BaseModel):
|
|
@@ -57,6 +62,9 @@ class ServerDataPlan(BaseModel):
|
|
|
57
62
|
billing: Optional[str] = None
|
|
58
63
|
r"""hourly/monthly pricing. Defaults to `hourly`. Appliable for `on_demand` projects only."""
|
|
59
64
|
|
|
65
|
+
slug: Optional[str] = None
|
|
66
|
+
r"""The plan slug"""
|
|
67
|
+
|
|
60
68
|
|
|
61
69
|
class ServerDataFeaturesTypedDict(TypedDict):
|
|
62
70
|
raid: NotRequired[bool]
|
|
@@ -155,10 +163,11 @@ class ServerDataAttributesTypedDict(TypedDict):
|
|
|
155
163
|
scheduled_deletion_at: NotRequired[str]
|
|
156
164
|
plan: NotRequired[ServerDataPlanTypedDict]
|
|
157
165
|
operating_system: NotRequired[OperatingSystemTypedDict]
|
|
158
|
-
region: NotRequired[
|
|
166
|
+
region: NotRequired[ServerRegionResourceDataTypedDict]
|
|
159
167
|
specs: NotRequired[ServerDataSpecsTypedDict]
|
|
160
168
|
project: NotRequired[ProjectIncludeTypedDict]
|
|
161
169
|
team: NotRequired[TeamIncludeTypedDict]
|
|
170
|
+
primary_ipv6: NotRequired[str]
|
|
162
171
|
|
|
163
172
|
|
|
164
173
|
class ServerDataAttributes(BaseModel):
|
|
@@ -196,7 +205,7 @@ class ServerDataAttributes(BaseModel):
|
|
|
196
205
|
|
|
197
206
|
operating_system: Optional[OperatingSystem] = None
|
|
198
207
|
|
|
199
|
-
region: Optional[
|
|
208
|
+
region: Optional[ServerRegionResourceData] = None
|
|
200
209
|
|
|
201
210
|
specs: Optional[ServerDataSpecs] = None
|
|
202
211
|
|
|
@@ -204,6 +213,8 @@ class ServerDataAttributes(BaseModel):
|
|
|
204
213
|
|
|
205
214
|
team: Optional[TeamInclude] = None
|
|
206
215
|
|
|
216
|
+
primary_ipv6: Optional[str] = None
|
|
217
|
+
|
|
207
218
|
|
|
208
219
|
class ServerDataTypedDict(TypedDict):
|
|
209
220
|
id: NotRequired[str]
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from latitudesh_python_sdk.types import BaseModel
|
|
5
|
+
from typing import Optional
|
|
6
|
+
from typing_extensions import NotRequired, TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class SiteTypedDict(TypedDict):
|
|
10
|
+
id: NotRequired[str]
|
|
11
|
+
name: NotRequired[str]
|
|
12
|
+
slug: NotRequired[str]
|
|
13
|
+
facility: NotRequired[str]
|
|
14
|
+
rack_id: NotRequired[str]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Site(BaseModel):
|
|
18
|
+
id: Optional[str] = None
|
|
19
|
+
|
|
20
|
+
name: Optional[str] = None
|
|
21
|
+
|
|
22
|
+
slug: Optional[str] = None
|
|
23
|
+
|
|
24
|
+
facility: Optional[str] = None
|
|
25
|
+
|
|
26
|
+
rack_id: Optional[str] = None
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class ServerRegionResourceDataTypedDict(TypedDict):
|
|
30
|
+
city: NotRequired[str]
|
|
31
|
+
country: NotRequired[str]
|
|
32
|
+
site: NotRequired[SiteTypedDict]
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class ServerRegionResourceData(BaseModel):
|
|
36
|
+
city: Optional[str] = None
|
|
37
|
+
|
|
38
|
+
country: Optional[str] = None
|
|
39
|
+
|
|
40
|
+
site: Optional[Site] = None
|
|
@@ -7,9 +7,20 @@ from typing import List, Optional
|
|
|
7
7
|
from typing_extensions import NotRequired, TypedDict
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class
|
|
10
|
+
class SSHKeysMetaTypedDict(TypedDict):
|
|
11
|
+
pass
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class SSHKeysMeta(BaseModel):
|
|
15
|
+
pass
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class SSHKeysTypedDict(TypedDict):
|
|
11
19
|
data: NotRequired[List[SSHKeyDataTypedDict]]
|
|
20
|
+
meta: NotRequired[SSHKeysMetaTypedDict]
|
|
12
21
|
|
|
13
22
|
|
|
14
|
-
class
|
|
23
|
+
class SSHKeys(BaseModel):
|
|
15
24
|
data: Optional[List[SSHKeyData]] = None
|
|
25
|
+
|
|
26
|
+
meta: Optional[SSHKeysMeta] = None
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from enum import Enum
|
|
5
|
+
from latitudesh_python_sdk.types import BaseModel
|
|
6
|
+
from typing import List, Optional
|
|
7
|
+
from typing_extensions import NotRequired, TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class StoragePlanDataType(str, Enum):
|
|
11
|
+
STORAGE_PLANS = "storage_plans"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class StoragePlanDataPricingTypedDict(TypedDict):
|
|
15
|
+
month: NotRequired[float]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class StoragePlanDataPricing(BaseModel):
|
|
19
|
+
month: Optional[float] = None
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class StoragePlanDataAttributesTypedDict(TypedDict):
|
|
23
|
+
name: NotRequired[str]
|
|
24
|
+
locations: NotRequired[List[str]]
|
|
25
|
+
pricing: NotRequired[StoragePlanDataPricingTypedDict]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class StoragePlanDataAttributes(BaseModel):
|
|
29
|
+
name: Optional[str] = None
|
|
30
|
+
|
|
31
|
+
locations: Optional[List[str]] = None
|
|
32
|
+
|
|
33
|
+
pricing: Optional[StoragePlanDataPricing] = None
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class StoragePlanDataTypedDict(TypedDict):
|
|
37
|
+
id: NotRequired[str]
|
|
38
|
+
type: NotRequired[StoragePlanDataType]
|
|
39
|
+
attributes: NotRequired[StoragePlanDataAttributesTypedDict]
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class StoragePlanData(BaseModel):
|
|
43
|
+
id: Optional[str] = None
|
|
44
|
+
|
|
45
|
+
type: Optional[StoragePlanDataType] = None
|
|
46
|
+
|
|
47
|
+
attributes: Optional[StoragePlanDataAttributes] = None
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .
|
|
4
|
+
from .storage_plan_data import StoragePlanData, StoragePlanDataTypedDict
|
|
5
5
|
from latitudesh_python_sdk.types import BaseModel
|
|
6
6
|
from typing import List, Optional
|
|
7
7
|
from typing_extensions import NotRequired, TypedDict
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
class StoragePlansMetaTypedDict(TypedDict):
|
|
11
|
+
pass
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class StoragePlansMeta(BaseModel):
|
|
15
|
+
pass
|
|
16
|
+
|
|
17
|
+
|
|
10
18
|
class StoragePlansTypedDict(TypedDict):
|
|
11
|
-
data: NotRequired[List[
|
|
19
|
+
data: NotRequired[List[StoragePlanDataTypedDict]]
|
|
20
|
+
meta: NotRequired[StoragePlansMetaTypedDict]
|
|
12
21
|
|
|
13
22
|
|
|
14
23
|
class StoragePlans(BaseModel):
|
|
15
|
-
data: Optional[List[
|
|
24
|
+
data: Optional[List[StoragePlanData]] = None
|
|
25
|
+
|
|
26
|
+
meta: Optional[StoragePlansMeta] = None
|
|
@@ -12,45 +12,93 @@ from typing import List, Optional
|
|
|
12
12
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
class
|
|
15
|
+
class UpdateServerServersRequestType(str, Enum):
|
|
16
16
|
SERVERS = "servers"
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
class
|
|
19
|
+
class UpdateServerServersRequestBilling(str, Enum):
|
|
20
20
|
HOURLY = "hourly"
|
|
21
21
|
MONTHLY = "monthly"
|
|
22
22
|
YEARLY = "yearly"
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
class
|
|
25
|
+
class UpdateServerServersRequestAttributesTypedDict(TypedDict):
|
|
26
26
|
hostname: NotRequired[str]
|
|
27
|
-
billing: NotRequired[
|
|
27
|
+
billing: NotRequired[UpdateServerServersRequestBilling]
|
|
28
28
|
tags: NotRequired[List[str]]
|
|
29
29
|
project: NotRequired[str]
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
class
|
|
32
|
+
class UpdateServerServersRequestAttributes(BaseModel):
|
|
33
33
|
hostname: Optional[str] = "new-hostname"
|
|
34
34
|
|
|
35
|
-
billing: Optional[
|
|
35
|
+
billing: Optional[UpdateServerServersRequestBilling] = None
|
|
36
36
|
|
|
37
37
|
tags: Optional[List[str]] = None
|
|
38
38
|
|
|
39
39
|
project: Optional[str] = None
|
|
40
40
|
|
|
41
41
|
|
|
42
|
+
class UpdateServerServersRequestApplicationJSONType(str, Enum):
|
|
43
|
+
SERVERS = "servers"
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class UpdateServerServersRequestApplicationJSONBilling(str, Enum):
|
|
47
|
+
HOURLY = "hourly"
|
|
48
|
+
MONTHLY = "monthly"
|
|
49
|
+
YEARLY = "yearly"
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class UpdateServerServersRequestApplicationJSONAttributesTypedDict(TypedDict):
|
|
53
|
+
hostname: NotRequired[str]
|
|
54
|
+
billing: NotRequired[UpdateServerServersRequestApplicationJSONBilling]
|
|
55
|
+
tags: NotRequired[List[str]]
|
|
56
|
+
project: NotRequired[str]
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class UpdateServerServersRequestApplicationJSONAttributes(BaseModel):
|
|
60
|
+
hostname: Optional[str] = "new-hostname"
|
|
61
|
+
|
|
62
|
+
billing: Optional[UpdateServerServersRequestApplicationJSONBilling] = (
|
|
63
|
+
UpdateServerServersRequestApplicationJSONBilling.MONTHLY
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
tags: Optional[List[str]] = None
|
|
67
|
+
|
|
68
|
+
project: Optional[str] = None
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class UpdateServerServersDataTypedDict(TypedDict):
|
|
72
|
+
id: NotRequired[str]
|
|
73
|
+
type: NotRequired[UpdateServerServersRequestApplicationJSONType]
|
|
74
|
+
attributes: NotRequired[
|
|
75
|
+
UpdateServerServersRequestApplicationJSONAttributesTypedDict
|
|
76
|
+
]
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class UpdateServerServersData(BaseModel):
|
|
80
|
+
id: Optional[str] = "sv_81EVOtR1N4J2Z"
|
|
81
|
+
|
|
82
|
+
type: Optional[UpdateServerServersRequestApplicationJSONType] = None
|
|
83
|
+
|
|
84
|
+
attributes: Optional[UpdateServerServersRequestApplicationJSONAttributes] = None
|
|
85
|
+
|
|
86
|
+
|
|
42
87
|
class UpdateServerServersRequestBodyTypedDict(TypedDict):
|
|
43
88
|
id: NotRequired[str]
|
|
44
|
-
type: NotRequired[
|
|
45
|
-
attributes: NotRequired[
|
|
89
|
+
type: NotRequired[UpdateServerServersRequestType]
|
|
90
|
+
attributes: NotRequired[UpdateServerServersRequestAttributesTypedDict]
|
|
91
|
+
data: NotRequired[UpdateServerServersDataTypedDict]
|
|
46
92
|
|
|
47
93
|
|
|
48
94
|
class UpdateServerServersRequestBody(BaseModel):
|
|
49
95
|
id: Optional[str] = "sv_81EVOtR1N4J2Z"
|
|
50
96
|
|
|
51
|
-
type: Optional[
|
|
97
|
+
type: Optional[UpdateServerServersRequestType] = None
|
|
98
|
+
|
|
99
|
+
attributes: Optional[UpdateServerServersRequestAttributes] = None
|
|
52
100
|
|
|
53
|
-
|
|
101
|
+
data: Optional[UpdateServerServersData] = None
|
|
54
102
|
|
|
55
103
|
|
|
56
104
|
class UpdateServerRequestTypedDict(TypedDict):
|
|
@@ -7,9 +7,20 @@ from typing import Optional
|
|
|
7
7
|
from typing_extensions import NotRequired, TypedDict
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
class UserDataMetaTypedDict(TypedDict):
|
|
11
|
+
pass
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class UserDataMeta(BaseModel):
|
|
15
|
+
pass
|
|
16
|
+
|
|
17
|
+
|
|
10
18
|
class UserDataTypedDict(TypedDict):
|
|
11
19
|
data: NotRequired[UserDataPropertiesTypedDict]
|
|
20
|
+
meta: NotRequired[UserDataMetaTypedDict]
|
|
12
21
|
|
|
13
22
|
|
|
14
23
|
class UserData(BaseModel):
|
|
15
24
|
data: Optional[UserDataProperties] = None
|
|
25
|
+
|
|
26
|
+
meta: Optional[UserDataMeta] = None
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
from .virtual_network_data import VirtualNetworkData, VirtualNetworkDataTypedDict
|
|
4
5
|
from enum import Enum
|
|
5
|
-
|
|
6
|
+
import httpx
|
|
7
|
+
from latitudesh_python_sdk.models import LatitudeshError
|
|
6
8
|
from latitudesh_python_sdk.types import BaseModel
|
|
7
9
|
from typing import Optional
|
|
8
10
|
from typing_extensions import NotRequired, TypedDict
|
|
@@ -71,10 +73,20 @@ class VirtualNetworkAttributes1(BaseModel):
|
|
|
71
73
|
r"""Amount of devices assigned to the virtual network"""
|
|
72
74
|
|
|
73
75
|
|
|
76
|
+
class VirtualNetworkMeta1TypedDict(TypedDict):
|
|
77
|
+
pass
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
class VirtualNetworkMeta1(BaseModel):
|
|
81
|
+
pass
|
|
82
|
+
|
|
83
|
+
|
|
74
84
|
class VirtualNetworkTypedDict(TypedDict):
|
|
75
85
|
id: NotRequired[str]
|
|
76
86
|
type: NotRequired[VirtualNetworkType1]
|
|
77
87
|
attributes: NotRequired[VirtualNetworkAttributes1TypedDict]
|
|
88
|
+
data: NotRequired[VirtualNetworkDataTypedDict]
|
|
89
|
+
meta: NotRequired[VirtualNetworkMeta1TypedDict]
|
|
78
90
|
|
|
79
91
|
|
|
80
92
|
class VirtualNetwork(BaseModel):
|
|
@@ -84,6 +96,10 @@ class VirtualNetwork(BaseModel):
|
|
|
84
96
|
|
|
85
97
|
attributes: Optional[VirtualNetworkAttributes1] = None
|
|
86
98
|
|
|
99
|
+
data: Optional[VirtualNetworkData] = None
|
|
100
|
+
|
|
101
|
+
meta: Optional[VirtualNetworkMeta1] = None
|
|
102
|
+
|
|
87
103
|
|
|
88
104
|
class VirtualNetworkErrorData(BaseModel):
|
|
89
105
|
id: Optional[str] = None
|
|
@@ -92,12 +108,20 @@ class VirtualNetworkErrorData(BaseModel):
|
|
|
92
108
|
|
|
93
109
|
attributes: Optional[VirtualNetworkAttributes1] = None
|
|
94
110
|
|
|
111
|
+
data: Optional[VirtualNetworkData] = None
|
|
112
|
+
|
|
113
|
+
meta: Optional[VirtualNetworkMeta1] = None
|
|
95
114
|
|
|
96
|
-
|
|
115
|
+
|
|
116
|
+
class VirtualNetworkError(LatitudeshError):
|
|
97
117
|
data: VirtualNetworkErrorData
|
|
98
118
|
|
|
99
|
-
def __init__(
|
|
119
|
+
def __init__(
|
|
120
|
+
self,
|
|
121
|
+
data: VirtualNetworkErrorData,
|
|
122
|
+
raw_response: httpx.Response,
|
|
123
|
+
body: Optional[str] = None,
|
|
124
|
+
):
|
|
125
|
+
message = body or raw_response.text
|
|
126
|
+
super().__init__(message, raw_response, body)
|
|
100
127
|
self.data = data
|
|
101
|
-
|
|
102
|
-
def __str__(self) -> str:
|
|
103
|
-
return utils.marshal_json(self.data, VirtualNetworkErrorData)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
from .virtual_network_data import VirtualNetworkData, VirtualNetworkDataTypedDict
|
|
4
5
|
from enum import Enum
|
|
5
6
|
from latitudesh_python_sdk.types import BaseModel
|
|
6
7
|
from typing import Optional
|
|
@@ -70,10 +71,20 @@ class VirtualNetworkAttributes(BaseModel):
|
|
|
70
71
|
r"""Amount of devices assigned to the virtual network"""
|
|
71
72
|
|
|
72
73
|
|
|
74
|
+
class VirtualNetworkMetaTypedDict(TypedDict):
|
|
75
|
+
pass
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class VirtualNetworkMeta(BaseModel):
|
|
79
|
+
pass
|
|
80
|
+
|
|
81
|
+
|
|
73
82
|
class VirtualNetwork1TypedDict(TypedDict):
|
|
74
83
|
id: NotRequired[str]
|
|
75
84
|
type: NotRequired[VirtualNetworkType]
|
|
76
85
|
attributes: NotRequired[VirtualNetworkAttributesTypedDict]
|
|
86
|
+
data: NotRequired[VirtualNetworkDataTypedDict]
|
|
87
|
+
meta: NotRequired[VirtualNetworkMetaTypedDict]
|
|
77
88
|
|
|
78
89
|
|
|
79
90
|
class VirtualNetwork1(BaseModel):
|
|
@@ -82,3 +93,7 @@ class VirtualNetwork1(BaseModel):
|
|
|
82
93
|
type: Optional[VirtualNetworkType] = None
|
|
83
94
|
|
|
84
95
|
attributes: Optional[VirtualNetworkAttributes] = None
|
|
96
|
+
|
|
97
|
+
data: Optional[VirtualNetworkData] = None
|
|
98
|
+
|
|
99
|
+
meta: Optional[VirtualNetworkMeta] = None
|