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
|
@@ -1,17 +1,42 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
from .virtual_network_assignment_data import (
|
|
5
|
+
VirtualNetworkAssignmentData,
|
|
6
|
+
VirtualNetworkAssignmentDataTypedDict,
|
|
7
|
+
)
|
|
4
8
|
from latitudesh_python_sdk.types import BaseModel
|
|
5
9
|
from typing import Optional
|
|
6
10
|
from typing_extensions import NotRequired, TypedDict
|
|
7
11
|
|
|
8
12
|
|
|
13
|
+
class VirtualNetworkAssignmentServerTypedDict(TypedDict):
|
|
14
|
+
id: NotRequired[str]
|
|
15
|
+
hostname: NotRequired[str]
|
|
16
|
+
label: NotRequired[str]
|
|
17
|
+
locked: NotRequired[bool]
|
|
18
|
+
status: NotRequired[str]
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class VirtualNetworkAssignmentServer(BaseModel):
|
|
22
|
+
id: Optional[str] = None
|
|
23
|
+
|
|
24
|
+
hostname: Optional[str] = None
|
|
25
|
+
|
|
26
|
+
label: Optional[str] = None
|
|
27
|
+
|
|
28
|
+
locked: Optional[bool] = None
|
|
29
|
+
|
|
30
|
+
status: Optional[str] = None
|
|
31
|
+
|
|
32
|
+
|
|
9
33
|
class VirtualNetworkAssignmentAttributesTypedDict(TypedDict):
|
|
10
34
|
virtual_network_id: NotRequired[str]
|
|
11
35
|
vid: NotRequired[int]
|
|
12
36
|
server_id: NotRequired[str]
|
|
13
37
|
description: NotRequired[str]
|
|
14
38
|
status: NotRequired[str]
|
|
39
|
+
server: NotRequired[VirtualNetworkAssignmentServerTypedDict]
|
|
15
40
|
|
|
16
41
|
|
|
17
42
|
class VirtualNetworkAssignmentAttributes(BaseModel):
|
|
@@ -25,13 +50,29 @@ class VirtualNetworkAssignmentAttributes(BaseModel):
|
|
|
25
50
|
|
|
26
51
|
status: Optional[str] = None
|
|
27
52
|
|
|
53
|
+
server: Optional[VirtualNetworkAssignmentServer] = None
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class VirtualNetworkAssignmentMetaTypedDict(TypedDict):
|
|
57
|
+
pass
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class VirtualNetworkAssignmentMeta(BaseModel):
|
|
61
|
+
pass
|
|
62
|
+
|
|
28
63
|
|
|
29
64
|
class VirtualNetworkAssignmentTypedDict(TypedDict):
|
|
30
65
|
id: NotRequired[str]
|
|
31
66
|
attributes: NotRequired[VirtualNetworkAssignmentAttributesTypedDict]
|
|
67
|
+
data: NotRequired[VirtualNetworkAssignmentDataTypedDict]
|
|
68
|
+
meta: NotRequired[VirtualNetworkAssignmentMetaTypedDict]
|
|
32
69
|
|
|
33
70
|
|
|
34
71
|
class VirtualNetworkAssignment(BaseModel):
|
|
35
72
|
id: Optional[str] = None
|
|
36
73
|
|
|
37
74
|
attributes: Optional[VirtualNetworkAssignmentAttributes] = None
|
|
75
|
+
|
|
76
|
+
data: Optional[VirtualNetworkAssignmentData] = None
|
|
77
|
+
|
|
78
|
+
meta: Optional[VirtualNetworkAssignmentMeta] = None
|
|
@@ -0,0 +1,68 @@
|
|
|
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 Optional
|
|
7
|
+
from typing_extensions import NotRequired, TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class VirtualNetworkAssignmentDataType(str, Enum):
|
|
11
|
+
VIRTUAL_NETWORK_ASSIGNMENT = "virtual_network_assignment"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class VirtualNetworkAssignmentDataServerTypedDict(TypedDict):
|
|
15
|
+
id: NotRequired[str]
|
|
16
|
+
hostname: NotRequired[str]
|
|
17
|
+
label: NotRequired[str]
|
|
18
|
+
locked: NotRequired[bool]
|
|
19
|
+
status: NotRequired[str]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class VirtualNetworkAssignmentDataServer(BaseModel):
|
|
23
|
+
id: Optional[str] = None
|
|
24
|
+
|
|
25
|
+
hostname: Optional[str] = None
|
|
26
|
+
|
|
27
|
+
label: Optional[str] = None
|
|
28
|
+
|
|
29
|
+
locked: Optional[bool] = None
|
|
30
|
+
|
|
31
|
+
status: Optional[str] = None
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class VirtualNetworkAssignmentDataAttributesTypedDict(TypedDict):
|
|
35
|
+
virtual_network_id: NotRequired[str]
|
|
36
|
+
vid: NotRequired[int]
|
|
37
|
+
server_id: NotRequired[str]
|
|
38
|
+
description: NotRequired[str]
|
|
39
|
+
status: NotRequired[str]
|
|
40
|
+
server: NotRequired[VirtualNetworkAssignmentDataServerTypedDict]
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class VirtualNetworkAssignmentDataAttributes(BaseModel):
|
|
44
|
+
virtual_network_id: Optional[str] = None
|
|
45
|
+
|
|
46
|
+
vid: Optional[int] = None
|
|
47
|
+
|
|
48
|
+
server_id: Optional[str] = None
|
|
49
|
+
|
|
50
|
+
description: Optional[str] = None
|
|
51
|
+
|
|
52
|
+
status: Optional[str] = None
|
|
53
|
+
|
|
54
|
+
server: Optional[VirtualNetworkAssignmentDataServer] = None
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class VirtualNetworkAssignmentDataTypedDict(TypedDict):
|
|
58
|
+
id: NotRequired[str]
|
|
59
|
+
type: NotRequired[VirtualNetworkAssignmentDataType]
|
|
60
|
+
attributes: NotRequired[VirtualNetworkAssignmentDataAttributesTypedDict]
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class VirtualNetworkAssignmentData(BaseModel):
|
|
64
|
+
id: Optional[str] = None
|
|
65
|
+
|
|
66
|
+
type: Optional[VirtualNetworkAssignmentDataType] = None
|
|
67
|
+
|
|
68
|
+
attributes: Optional[VirtualNetworkAssignmentDataAttributes] = None
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
from .virtual_network_assignment_data import (
|
|
5
|
+
VirtualNetworkAssignmentData,
|
|
6
|
+
VirtualNetworkAssignmentDataTypedDict,
|
|
7
7
|
)
|
|
8
8
|
from latitudesh_python_sdk.types import BaseModel
|
|
9
9
|
from typing import List, Optional
|
|
@@ -19,11 +19,11 @@ class VirtualNetworkAssignmentsMeta(BaseModel):
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class VirtualNetworkAssignmentsTypedDict(TypedDict):
|
|
22
|
-
data: NotRequired[List[
|
|
22
|
+
data: NotRequired[List[VirtualNetworkAssignmentDataTypedDict]]
|
|
23
23
|
meta: NotRequired[VirtualNetworkAssignmentsMetaTypedDict]
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class VirtualNetworkAssignments(BaseModel):
|
|
27
|
-
data: Optional[List[
|
|
27
|
+
data: Optional[List[VirtualNetworkAssignmentData]] = None
|
|
28
28
|
|
|
29
29
|
meta: Optional[VirtualNetworkAssignmentsMeta] = None
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from enum import Enum
|
|
6
|
+
from latitudesh_python_sdk.types import BaseModel
|
|
7
|
+
from typing import Optional
|
|
8
|
+
from typing_extensions import NotRequired, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class VirtualNetworkDataType(str, Enum):
|
|
12
|
+
VIRTUAL_NETWORKS = "virtual_networks"
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class VirtualNetworkDataSiteTypedDict(TypedDict):
|
|
16
|
+
id: NotRequired[str]
|
|
17
|
+
facility: NotRequired[str]
|
|
18
|
+
name: NotRequired[str]
|
|
19
|
+
slug: NotRequired[str]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class VirtualNetworkDataSite(BaseModel):
|
|
23
|
+
id: Optional[str] = None
|
|
24
|
+
|
|
25
|
+
facility: Optional[str] = None
|
|
26
|
+
|
|
27
|
+
name: Optional[str] = None
|
|
28
|
+
|
|
29
|
+
slug: Optional[str] = None
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class VirtualNetworkDataRegionTypedDict(TypedDict):
|
|
33
|
+
city: NotRequired[str]
|
|
34
|
+
country: NotRequired[str]
|
|
35
|
+
site: NotRequired[VirtualNetworkDataSiteTypedDict]
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class VirtualNetworkDataRegion(BaseModel):
|
|
39
|
+
city: Optional[str] = None
|
|
40
|
+
|
|
41
|
+
country: Optional[str] = None
|
|
42
|
+
|
|
43
|
+
site: Optional[VirtualNetworkDataSite] = None
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class VirtualNetworkDataAttributesTypedDict(TypedDict):
|
|
47
|
+
vid: NotRequired[int]
|
|
48
|
+
r"""vlan ID of the virtual network"""
|
|
49
|
+
name: NotRequired[str]
|
|
50
|
+
r"""Name of the virtual network"""
|
|
51
|
+
description: NotRequired[str]
|
|
52
|
+
r"""Description of the virtual network"""
|
|
53
|
+
region: NotRequired[VirtualNetworkDataRegionTypedDict]
|
|
54
|
+
assignments_count: NotRequired[int]
|
|
55
|
+
r"""Amount of devices assigned to the virtual network"""
|
|
56
|
+
created_at: NotRequired[datetime]
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class VirtualNetworkDataAttributes(BaseModel):
|
|
60
|
+
vid: Optional[int] = None
|
|
61
|
+
r"""vlan ID of the virtual network"""
|
|
62
|
+
|
|
63
|
+
name: Optional[str] = None
|
|
64
|
+
r"""Name of the virtual network"""
|
|
65
|
+
|
|
66
|
+
description: Optional[str] = None
|
|
67
|
+
r"""Description of the virtual network"""
|
|
68
|
+
|
|
69
|
+
region: Optional[VirtualNetworkDataRegion] = None
|
|
70
|
+
|
|
71
|
+
assignments_count: Optional[int] = None
|
|
72
|
+
r"""Amount of devices assigned to the virtual network"""
|
|
73
|
+
|
|
74
|
+
created_at: Optional[datetime] = None
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class VirtualNetworkDataTypedDict(TypedDict):
|
|
78
|
+
id: NotRequired[str]
|
|
79
|
+
type: NotRequired[VirtualNetworkDataType]
|
|
80
|
+
attributes: NotRequired[VirtualNetworkDataAttributesTypedDict]
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class VirtualNetworkData(BaseModel):
|
|
84
|
+
id: Optional[str] = None
|
|
85
|
+
|
|
86
|
+
type: Optional[VirtualNetworkDataType] = None
|
|
87
|
+
|
|
88
|
+
attributes: Optional[VirtualNetworkDataAttributes] = None
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .
|
|
4
|
+
from .virtual_network_data import VirtualNetworkData, VirtualNetworkDataTypedDict
|
|
5
5
|
from latitudesh_python_sdk.types import BaseModel
|
|
6
6
|
from typing import List, Optional
|
|
7
7
|
from typing_extensions import NotRequired, TypedDict
|
|
@@ -16,11 +16,11 @@ class VirtualNetworksMeta(BaseModel):
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class VirtualNetworksTypedDict(TypedDict):
|
|
19
|
-
data: NotRequired[List[
|
|
19
|
+
data: NotRequired[List[VirtualNetworkDataTypedDict]]
|
|
20
20
|
meta: NotRequired[VirtualNetworksMetaTypedDict]
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
class VirtualNetworks(BaseModel):
|
|
24
|
-
data: Optional[List[
|
|
24
|
+
data: Optional[List[VirtualNetworkData]] = None
|
|
25
25
|
|
|
26
26
|
meta: Optional[VirtualNetworksMeta] = None
|
|
@@ -6,6 +6,7 @@ from latitudesh_python_sdk import models, utils
|
|
|
6
6
|
from latitudesh_python_sdk._hooks import HookContext
|
|
7
7
|
from latitudesh_python_sdk.types import OptionalNullable, UNSET
|
|
8
8
|
from latitudesh_python_sdk.utils import get_security_from_env
|
|
9
|
+
from latitudesh_python_sdk.utils.unmarshal_json_response import unmarshal_json_response
|
|
9
10
|
from typing import Any, Dict, List, Mapping, Optional, Union
|
|
10
11
|
|
|
11
12
|
|
|
@@ -73,6 +74,7 @@ class OperatingSystemsSDK(BaseSDK):
|
|
|
73
74
|
|
|
74
75
|
http_res = self.do_request(
|
|
75
76
|
hook_ctx=HookContext(
|
|
77
|
+
config=self.sdk_configuration,
|
|
76
78
|
base_url=base_url or "",
|
|
77
79
|
operation_id="get-plans-operating-system",
|
|
78
80
|
oauth2_scopes=[],
|
|
@@ -107,30 +109,19 @@ class OperatingSystemsSDK(BaseSDK):
|
|
|
107
109
|
|
|
108
110
|
if utils.match_response(http_res, "200", "application/vnd.api+json"):
|
|
109
111
|
return models.GetPlansOperatingSystemResponse(
|
|
110
|
-
result=
|
|
111
|
-
|
|
112
|
+
result=unmarshal_json_response(
|
|
113
|
+
models.GetPlansOperatingSystemResponseBody, http_res
|
|
112
114
|
),
|
|
113
115
|
next=next_func,
|
|
114
116
|
)
|
|
115
117
|
if utils.match_response(http_res, "4XX", "*"):
|
|
116
118
|
http_res_text = utils.stream_to_text(http_res)
|
|
117
|
-
raise models.APIError(
|
|
118
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
119
|
-
)
|
|
119
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
120
120
|
if utils.match_response(http_res, "5XX", "*"):
|
|
121
121
|
http_res_text = utils.stream_to_text(http_res)
|
|
122
|
-
raise models.APIError(
|
|
123
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
124
|
-
)
|
|
122
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
125
123
|
|
|
126
|
-
|
|
127
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
128
|
-
raise models.APIError(
|
|
129
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
130
|
-
http_res.status_code,
|
|
131
|
-
http_res_text,
|
|
132
|
-
http_res,
|
|
133
|
-
)
|
|
124
|
+
raise models.APIError("Unexpected response received", http_res)
|
|
134
125
|
|
|
135
126
|
async def list_async(
|
|
136
127
|
self,
|
|
@@ -195,6 +186,7 @@ class OperatingSystemsSDK(BaseSDK):
|
|
|
195
186
|
|
|
196
187
|
http_res = await self.do_request_async(
|
|
197
188
|
hook_ctx=HookContext(
|
|
189
|
+
config=self.sdk_configuration,
|
|
198
190
|
base_url=base_url or "",
|
|
199
191
|
operation_id="get-plans-operating-system",
|
|
200
192
|
oauth2_scopes=[],
|
|
@@ -229,27 +221,16 @@ class OperatingSystemsSDK(BaseSDK):
|
|
|
229
221
|
|
|
230
222
|
if utils.match_response(http_res, "200", "application/vnd.api+json"):
|
|
231
223
|
return models.GetPlansOperatingSystemResponse(
|
|
232
|
-
result=
|
|
233
|
-
|
|
224
|
+
result=unmarshal_json_response(
|
|
225
|
+
models.GetPlansOperatingSystemResponseBody, http_res
|
|
234
226
|
),
|
|
235
227
|
next=next_func,
|
|
236
228
|
)
|
|
237
229
|
if utils.match_response(http_res, "4XX", "*"):
|
|
238
230
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
239
|
-
raise models.APIError(
|
|
240
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
241
|
-
)
|
|
231
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
242
232
|
if utils.match_response(http_res, "5XX", "*"):
|
|
243
233
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
244
|
-
raise models.APIError(
|
|
245
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
246
|
-
)
|
|
234
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
247
235
|
|
|
248
|
-
|
|
249
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
250
|
-
raise models.APIError(
|
|
251
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
252
|
-
http_res.status_code,
|
|
253
|
-
http_res_text,
|
|
254
|
-
http_res,
|
|
255
|
-
)
|
|
236
|
+
raise models.APIError("Unexpected response received", http_res)
|