latitudesh-python-sdk 2.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. latitudesh_python_sdk/__init__.py +18 -0
  2. latitudesh_python_sdk/_hooks/__init__.py +5 -0
  3. latitudesh_python_sdk/_hooks/registration.py +13 -0
  4. latitudesh_python_sdk/_hooks/sdkhooks.py +76 -0
  5. latitudesh_python_sdk/_hooks/types.py +113 -0
  6. latitudesh_python_sdk/_version.py +17 -0
  7. latitudesh_python_sdk/apikeys.py +703 -0
  8. latitudesh_python_sdk/basesdk.py +374 -0
  9. latitudesh_python_sdk/billing.py +197 -0
  10. latitudesh_python_sdk/events_sdk.py +298 -0
  11. latitudesh_python_sdk/firewalls_sdk.py +1786 -0
  12. latitudesh_python_sdk/httpclient.py +125 -0
  13. latitudesh_python_sdk/ipaddresses_sdk.py +470 -0
  14. latitudesh_python_sdk/models/__init__.py +3581 -0
  15. latitudesh_python_sdk/models/api_key.py +81 -0
  16. latitudesh_python_sdk/models/apierror.py +40 -0
  17. latitudesh_python_sdk/models/assign_server_virtual_networkop.py +43 -0
  18. latitudesh_python_sdk/models/bandwidth_packages.py +67 -0
  19. latitudesh_python_sdk/models/bandwidth_plan_data.py +72 -0
  20. latitudesh_python_sdk/models/bandwidth_plans.py +26 -0
  21. latitudesh_python_sdk/models/billing_usage.py +249 -0
  22. latitudesh_python_sdk/models/container_plan_data.py +163 -0
  23. latitudesh_python_sdk/models/create_api_key.py +40 -0
  24. latitudesh_python_sdk/models/create_firewall_assignmentop.py +61 -0
  25. latitudesh_python_sdk/models/create_firewallop.py +73 -0
  26. latitudesh_python_sdk/models/create_ipmi_sessionop.py +16 -0
  27. latitudesh_python_sdk/models/create_projectop.py +79 -0
  28. latitudesh_python_sdk/models/create_server_actionop.py +69 -0
  29. latitudesh_python_sdk/models/create_server_out_of_bandop.py +61 -0
  30. latitudesh_python_sdk/models/create_server_reinstallop.py +140 -0
  31. latitudesh_python_sdk/models/create_serverop.py +173 -0
  32. latitudesh_python_sdk/models/create_tagop.py +50 -0
  33. latitudesh_python_sdk/models/create_virtual_machine_actionop.py +63 -0
  34. latitudesh_python_sdk/models/create_virtual_networkop.py +72 -0
  35. latitudesh_python_sdk/models/custom_tag.py +26 -0
  36. latitudesh_python_sdk/models/custom_tag_data.py +54 -0
  37. latitudesh_python_sdk/models/custom_tags.py +26 -0
  38. latitudesh_python_sdk/models/delete_api_keyop.py +16 -0
  39. latitudesh_python_sdk/models/delete_firewall_assignmentop.py +25 -0
  40. latitudesh_python_sdk/models/delete_firewallop.py +18 -0
  41. latitudesh_python_sdk/models/delete_project_ssh_keyop.py +23 -0
  42. latitudesh_python_sdk/models/delete_project_user_dataop.py +23 -0
  43. latitudesh_python_sdk/models/delete_projectop.py +18 -0
  44. latitudesh_python_sdk/models/delete_ssh_keyop.py +16 -0
  45. latitudesh_python_sdk/models/delete_storage_filesystemsop.py +16 -0
  46. latitudesh_python_sdk/models/delete_storage_volumesop.py +16 -0
  47. latitudesh_python_sdk/models/delete_user_dataop.py +16 -0
  48. latitudesh_python_sdk/models/delete_virtual_networks_assignmentsop.py +16 -0
  49. latitudesh_python_sdk/models/delete_vpn_sessionop.py +16 -0
  50. latitudesh_python_sdk/models/deploy_config.py +62 -0
  51. latitudesh_python_sdk/models/destroy_serverop.py +31 -0
  52. latitudesh_python_sdk/models/destroy_tagop.py +16 -0
  53. latitudesh_python_sdk/models/destroy_team_memberop.py +18 -0
  54. latitudesh_python_sdk/models/destroy_virtual_machineop.py +16 -0
  55. latitudesh_python_sdk/models/destroy_virtual_networkop.py +18 -0
  56. latitudesh_python_sdk/models/event_data.py +98 -0
  57. latitudesh_python_sdk/models/events.py +26 -0
  58. latitudesh_python_sdk/models/filesystem_data.py +57 -0
  59. latitudesh_python_sdk/models/firewall.py +26 -0
  60. latitudesh_python_sdk/models/firewall_assignment_data.py +50 -0
  61. latitudesh_python_sdk/models/firewall_assignments.py +29 -0
  62. latitudesh_python_sdk/models/firewall_data.py +75 -0
  63. latitudesh_python_sdk/models/firewall_server.py +36 -0
  64. latitudesh_python_sdk/models/firewalls.py +26 -0
  65. latitudesh_python_sdk/models/get_all_firewall_assignmentsop.py +51 -0
  66. latitudesh_python_sdk/models/get_bandwidth_plansop.py +62 -0
  67. latitudesh_python_sdk/models/get_billing_usageop.py +46 -0
  68. latitudesh_python_sdk/models/get_containers_planop.py +18 -0
  69. latitudesh_python_sdk/models/get_eventsop.py +126 -0
  70. latitudesh_python_sdk/models/get_firewall_assignmentsop.py +53 -0
  71. latitudesh_python_sdk/models/get_firewallop.py +18 -0
  72. latitudesh_python_sdk/models/get_ipop.py +33 -0
  73. latitudesh_python_sdk/models/get_ipsop.py +120 -0
  74. latitudesh_python_sdk/models/get_planop.py +16 -0
  75. latitudesh_python_sdk/models/get_plans_operating_systemop.py +54 -0
  76. latitudesh_python_sdk/models/get_plansop.py +125 -0
  77. latitudesh_python_sdk/models/get_project_ssh_keyop.py +37 -0
  78. latitudesh_python_sdk/models/get_project_ssh_keysop.py +33 -0
  79. latitudesh_python_sdk/models/get_project_user_dataop.py +38 -0
  80. latitudesh_python_sdk/models/get_project_users_dataop.py +46 -0
  81. latitudesh_python_sdk/models/get_projectsop.py +105 -0
  82. latitudesh_python_sdk/models/get_regionop.py +18 -0
  83. latitudesh_python_sdk/models/get_regionsop.py +42 -0
  84. latitudesh_python_sdk/models/get_role_idop.py +16 -0
  85. latitudesh_python_sdk/models/get_rolesop.py +54 -0
  86. latitudesh_python_sdk/models/get_server_deploy_configop.py +18 -0
  87. latitudesh_python_sdk/models/get_server_out_of_bandop.py +18 -0
  88. latitudesh_python_sdk/models/get_serverop.py +33 -0
  89. latitudesh_python_sdk/models/get_serversop.py +185 -0
  90. latitudesh_python_sdk/models/get_ssh_keyop.py +30 -0
  91. latitudesh_python_sdk/models/get_ssh_keysop.py +31 -0
  92. latitudesh_python_sdk/models/get_storage_filesystemsop.py +22 -0
  93. latitudesh_python_sdk/models/get_storage_volumeop.py +32 -0
  94. latitudesh_python_sdk/models/get_storage_volumesop.py +35 -0
  95. latitudesh_python_sdk/models/get_team_membersop.py +42 -0
  96. latitudesh_python_sdk/models/get_traffic_consumptionop.py +49 -0
  97. latitudesh_python_sdk/models/get_traffic_quotaop.py +20 -0
  98. latitudesh_python_sdk/models/get_user_dataop.py +31 -0
  99. latitudesh_python_sdk/models/get_user_profileop.py +19 -0
  100. latitudesh_python_sdk/models/get_users_dataop.py +44 -0
  101. latitudesh_python_sdk/models/get_virtual_networkop.py +32 -0
  102. latitudesh_python_sdk/models/get_virtual_networks_assignmentsop.py +72 -0
  103. latitudesh_python_sdk/models/get_virtual_networksop.py +69 -0
  104. latitudesh_python_sdk/models/get_vpn_sessionsop.py +70 -0
  105. latitudesh_python_sdk/models/index_virtual_machineop.py +31 -0
  106. latitudesh_python_sdk/models/ip_address.py +122 -0
  107. latitudesh_python_sdk/models/ip_addresses.py +15 -0
  108. latitudesh_python_sdk/models/ipmi_session.py +53 -0
  109. latitudesh_python_sdk/models/latitudesherror.py +30 -0
  110. latitudesh_python_sdk/models/list_firewallsop.py +49 -0
  111. latitudesh_python_sdk/models/membership.py +63 -0
  112. latitudesh_python_sdk/models/no_response_error.py +17 -0
  113. latitudesh_python_sdk/models/operating_system_data.py +65 -0
  114. latitudesh_python_sdk/models/operating_systems.py +26 -0
  115. latitudesh_python_sdk/models/out_of_band_connection.py +88 -0
  116. latitudesh_python_sdk/models/patch_current_teamop.py +91 -0
  117. latitudesh_python_sdk/models/patch_storage_filesystemsop.py +79 -0
  118. latitudesh_python_sdk/models/patch_user_dataop.py +69 -0
  119. latitudesh_python_sdk/models/patch_user_profileop.py +88 -0
  120. latitudesh_python_sdk/models/plan.py +15 -0
  121. latitudesh_python_sdk/models/plan_data.py +210 -0
  122. latitudesh_python_sdk/models/post_api_keyop.py +19 -0
  123. latitudesh_python_sdk/models/post_project_ssh_keyop.py +81 -0
  124. latitudesh_python_sdk/models/post_project_user_dataop.py +68 -0
  125. latitudesh_python_sdk/models/post_ssh_keyop.py +63 -0
  126. latitudesh_python_sdk/models/post_storage_filesystemsop.py +63 -0
  127. latitudesh_python_sdk/models/post_storage_volumes_mountop.py +62 -0
  128. latitudesh_python_sdk/models/post_storage_volumesop.py +63 -0
  129. latitudesh_python_sdk/models/post_team_membersop.py +54 -0
  130. latitudesh_python_sdk/models/post_teamop.py +67 -0
  131. latitudesh_python_sdk/models/post_user_dataop.py +50 -0
  132. latitudesh_python_sdk/models/post_vpn_sessionop.py +63 -0
  133. latitudesh_python_sdk/models/project.py +131 -0
  134. latitudesh_python_sdk/models/project_include.py +75 -0
  135. latitudesh_python_sdk/models/projects.py +15 -0
  136. latitudesh_python_sdk/models/put_project_ssh_keyop.py +87 -0
  137. latitudesh_python_sdk/models/put_project_user_dataop.py +76 -0
  138. latitudesh_python_sdk/models/put_ssh_keyop.py +80 -0
  139. latitudesh_python_sdk/models/put_vpn_sessionop.py +16 -0
  140. latitudesh_python_sdk/models/region.py +50 -0
  141. latitudesh_python_sdk/models/region_resource_data.py +37 -0
  142. latitudesh_python_sdk/models/regions.py +50 -0
  143. latitudesh_python_sdk/models/responsevalidationerror.py +27 -0
  144. latitudesh_python_sdk/models/role.py +26 -0
  145. latitudesh_python_sdk/models/role_data.py +35 -0
  146. latitudesh_python_sdk/models/security.py +25 -0
  147. latitudesh_python_sdk/models/server.py +26 -0
  148. latitudesh_python_sdk/models/server_action.py +52 -0
  149. latitudesh_python_sdk/models/server_data.py +280 -0
  150. latitudesh_python_sdk/models/server_exit_rescue_modeop.py +16 -0
  151. latitudesh_python_sdk/models/server_lockop.py +16 -0
  152. latitudesh_python_sdk/models/server_region_resource_data.py +40 -0
  153. latitudesh_python_sdk/models/server_rescue.py +22 -0
  154. latitudesh_python_sdk/models/server_schedule_deletion.py +44 -0
  155. latitudesh_python_sdk/models/server_schedule_deletionop.py +16 -0
  156. latitudesh_python_sdk/models/server_start_rescue_modeop.py +16 -0
  157. latitudesh_python_sdk/models/server_unlockop.py +16 -0
  158. latitudesh_python_sdk/models/server_unschedule_deletionop.py +16 -0
  159. latitudesh_python_sdk/models/servers.py +26 -0
  160. latitudesh_python_sdk/models/show_virtual_machineop.py +16 -0
  161. latitudesh_python_sdk/models/ssh_key_data.py +55 -0
  162. latitudesh_python_sdk/models/ssh_keys.py +26 -0
  163. latitudesh_python_sdk/models/storage_plan_data.py +47 -0
  164. latitudesh_python_sdk/models/storage_plans.py +26 -0
  165. latitudesh_python_sdk/models/team.py +74 -0
  166. latitudesh_python_sdk/models/team_include.py +43 -0
  167. latitudesh_python_sdk/models/team_members.py +51 -0
  168. latitudesh_python_sdk/models/teams.py +26 -0
  169. latitudesh_python_sdk/models/traffic.py +133 -0
  170. latitudesh_python_sdk/models/traffic_quota.py +106 -0
  171. latitudesh_python_sdk/models/update_api_key.py +48 -0
  172. latitudesh_python_sdk/models/update_api_keyop.py +41 -0
  173. latitudesh_python_sdk/models/update_firewallop.py +89 -0
  174. latitudesh_python_sdk/models/update_plans_bandwidthop.py +50 -0
  175. latitudesh_python_sdk/models/update_projectop.py +95 -0
  176. latitudesh_python_sdk/models/update_server_deploy_configop.py +122 -0
  177. latitudesh_python_sdk/models/update_serverop.py +85 -0
  178. latitudesh_python_sdk/models/update_tagop.py +74 -0
  179. latitudesh_python_sdk/models/update_virtual_networkop.py +67 -0
  180. latitudesh_python_sdk/models/user.py +59 -0
  181. latitudesh_python_sdk/models/user_data.py +26 -0
  182. latitudesh_python_sdk/models/user_data_properties.py +46 -0
  183. latitudesh_python_sdk/models/user_include.py +52 -0
  184. latitudesh_python_sdk/models/user_team.py +61 -0
  185. latitudesh_python_sdk/models/user_teams.py +26 -0
  186. latitudesh_python_sdk/models/user_update.py +37 -0
  187. latitudesh_python_sdk/models/virtual_machine.py +29 -0
  188. latitudesh_python_sdk/models/virtual_machine_attributes.py +115 -0
  189. latitudesh_python_sdk/models/virtual_machine_payload.py +47 -0
  190. latitudesh_python_sdk/models/virtual_machine_plans.py +181 -0
  191. latitudesh_python_sdk/models/virtual_network.py +26 -0
  192. latitudesh_python_sdk/models/virtual_network_assignment.py +29 -0
  193. latitudesh_python_sdk/models/virtual_network_assignment_data.py +65 -0
  194. latitudesh_python_sdk/models/virtual_network_assignments.py +29 -0
  195. latitudesh_python_sdk/models/virtual_network_data.py +114 -0
  196. latitudesh_python_sdk/models/virtual_networks.py +26 -0
  197. latitudesh_python_sdk/models/volume_data.py +111 -0
  198. latitudesh_python_sdk/models/vpn_session_data_with_password.py +77 -0
  199. latitudesh_python_sdk/models/vpn_session_with_password.py +18 -0
  200. latitudesh_python_sdk/operatingsystems_sdk.py +238 -0
  201. latitudesh_python_sdk/plans.py +1304 -0
  202. latitudesh_python_sdk/privatenetworks.py +1612 -0
  203. latitudesh_python_sdk/projects_sdk.py +830 -0
  204. latitudesh_python_sdk/py.typed +1 -0
  205. latitudesh_python_sdk/regions_sdk.py +398 -0
  206. latitudesh_python_sdk/roles.py +398 -0
  207. latitudesh_python_sdk/sdk.py +264 -0
  208. latitudesh_python_sdk/sdkconfiguration.py +50 -0
  209. latitudesh_python_sdk/servers_sdk.py +3414 -0
  210. latitudesh_python_sdk/sshkeys_sdk.py +1882 -0
  211. latitudesh_python_sdk/storage.py +1651 -0
  212. latitudesh_python_sdk/tags.py +715 -0
  213. latitudesh_python_sdk/teams_sdk.py +527 -0
  214. latitudesh_python_sdk/teamsmembers.py +576 -0
  215. latitudesh_python_sdk/traffic_sdk.py +357 -0
  216. latitudesh_python_sdk/types/__init__.py +21 -0
  217. latitudesh_python_sdk/types/basemodel.py +39 -0
  218. latitudesh_python_sdk/userdata_sdk.py +1888 -0
  219. latitudesh_python_sdk/userprofile.py +531 -0
  220. latitudesh_python_sdk/utils/__init__.py +200 -0
  221. latitudesh_python_sdk/utils/annotations.py +79 -0
  222. latitudesh_python_sdk/utils/datetimes.py +23 -0
  223. latitudesh_python_sdk/utils/enums.py +74 -0
  224. latitudesh_python_sdk/utils/eventstreaming.py +248 -0
  225. latitudesh_python_sdk/utils/forms.py +234 -0
  226. latitudesh_python_sdk/utils/headers.py +136 -0
  227. latitudesh_python_sdk/utils/logger.py +27 -0
  228. latitudesh_python_sdk/utils/metadata.py +118 -0
  229. latitudesh_python_sdk/utils/queryparams.py +217 -0
  230. latitudesh_python_sdk/utils/requestbodies.py +66 -0
  231. latitudesh_python_sdk/utils/retries.py +281 -0
  232. latitudesh_python_sdk/utils/security.py +192 -0
  233. latitudesh_python_sdk/utils/serializers.py +249 -0
  234. latitudesh_python_sdk/utils/unmarshal_json_response.py +38 -0
  235. latitudesh_python_sdk/utils/url.py +155 -0
  236. latitudesh_python_sdk/utils/values.py +137 -0
  237. latitudesh_python_sdk/virtualmachines.py +941 -0
  238. latitudesh_python_sdk/vpnsessions.py +715 -0
  239. latitudesh_python_sdk-2.3.0.dist-info/METADATA +787 -0
  240. latitudesh_python_sdk-2.3.0.dist-info/RECORD +242 -0
  241. latitudesh_python_sdk-2.3.0.dist-info/WHEEL +4 -0
  242. latitudesh_python_sdk-2.3.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,81 @@
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 Type(str, Enum):
12
+ API_KEYS = "api_keys"
13
+
14
+
15
+ class APIKeyUserTypedDict(TypedDict):
16
+ r"""The owner of the API Key"""
17
+
18
+ id: NotRequired[str]
19
+ email: NotRequired[str]
20
+
21
+
22
+ class APIKeyUser(BaseModel):
23
+ r"""The owner of the API Key"""
24
+
25
+ id: Optional[str] = None
26
+
27
+ email: Optional[str] = None
28
+
29
+
30
+ class AttributesTypedDict(TypedDict):
31
+ name: NotRequired[str]
32
+ r"""Name of the API Key"""
33
+ api_version: NotRequired[str]
34
+ r"""The API version associated with this API Key"""
35
+ token_last_slice: NotRequired[str]
36
+ r"""The last 5 characters of the token created for this API Key"""
37
+ last_used_at: NotRequired[datetime]
38
+ r"""The last time a request was made to the API using this API Key"""
39
+ user: NotRequired[APIKeyUserTypedDict]
40
+ r"""The owner of the API Key"""
41
+ created_at: NotRequired[datetime]
42
+ r"""The time when the API Key was created"""
43
+ updated_at: NotRequired[datetime]
44
+ r"""The time when the API Key was updated"""
45
+
46
+
47
+ class Attributes(BaseModel):
48
+ name: Optional[str] = None
49
+ r"""Name of the API Key"""
50
+
51
+ api_version: Optional[str] = None
52
+ r"""The API version associated with this API Key"""
53
+
54
+ token_last_slice: Optional[str] = None
55
+ r"""The last 5 characters of the token created for this API Key"""
56
+
57
+ last_used_at: Optional[datetime] = None
58
+ r"""The last time a request was made to the API using this API Key"""
59
+
60
+ user: Optional[APIKeyUser] = None
61
+ r"""The owner of the API Key"""
62
+
63
+ created_at: Optional[datetime] = None
64
+ r"""The time when the API Key was created"""
65
+
66
+ updated_at: Optional[datetime] = None
67
+ r"""The time when the API Key was updated"""
68
+
69
+
70
+ class APIKeyTypedDict(TypedDict):
71
+ id: NotRequired[str]
72
+ type: NotRequired[Type]
73
+ attributes: NotRequired[AttributesTypedDict]
74
+
75
+
76
+ class APIKey(BaseModel):
77
+ id: Optional[str] = None
78
+
79
+ type: Optional[Type] = None
80
+
81
+ attributes: Optional[Attributes] = None
@@ -0,0 +1,40 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ import httpx
4
+ from typing import Optional
5
+ from dataclasses import dataclass
6
+
7
+ from latitudesh_python_sdk.models import LatitudeshError
8
+
9
+ MAX_MESSAGE_LEN = 10_000
10
+
11
+
12
+ @dataclass(unsafe_hash=True)
13
+ class APIError(LatitudeshError):
14
+ """The fallback error class if no more specific error class is matched."""
15
+
16
+ def __init__(
17
+ self, message: str, raw_response: httpx.Response, body: Optional[str] = None
18
+ ):
19
+ body_display = body or raw_response.text or '""'
20
+
21
+ if message:
22
+ message += ": "
23
+ message += f"Status {raw_response.status_code}"
24
+
25
+ headers = raw_response.headers
26
+ content_type = headers.get("content-type", '""')
27
+ if content_type != "application/json":
28
+ if " " in content_type:
29
+ content_type = f'"{content_type}"'
30
+ message += f" Content-Type {content_type}"
31
+
32
+ if len(body_display) > MAX_MESSAGE_LEN:
33
+ truncated = body_display[:MAX_MESSAGE_LEN]
34
+ remaining = len(body_display) - MAX_MESSAGE_LEN
35
+ body_display = f"{truncated}...and {remaining} more chars"
36
+
37
+ message += f". Body: {body_display}"
38
+ message = message.strip()
39
+
40
+ super().__init__(message, raw_response, body)
@@ -0,0 +1,43 @@
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 AssignServerVirtualNetworkPrivateNetworksType(str, Enum):
11
+ VIRTUAL_NETWORK_ASSIGNMENT = "virtual_network_assignment"
12
+
13
+
14
+ class AssignServerVirtualNetworkPrivateNetworksAttributesTypedDict(TypedDict):
15
+ server_id: str
16
+ virtual_network_id: str
17
+
18
+
19
+ class AssignServerVirtualNetworkPrivateNetworksAttributes(BaseModel):
20
+ server_id: str
21
+
22
+ virtual_network_id: str
23
+
24
+
25
+ class AssignServerVirtualNetworkPrivateNetworksDataTypedDict(TypedDict):
26
+ type: AssignServerVirtualNetworkPrivateNetworksType
27
+ attributes: NotRequired[
28
+ AssignServerVirtualNetworkPrivateNetworksAttributesTypedDict
29
+ ]
30
+
31
+
32
+ class AssignServerVirtualNetworkPrivateNetworksData(BaseModel):
33
+ type: AssignServerVirtualNetworkPrivateNetworksType
34
+
35
+ attributes: Optional[AssignServerVirtualNetworkPrivateNetworksAttributes] = None
36
+
37
+
38
+ class AssignServerVirtualNetworkPrivateNetworksRequestBodyTypedDict(TypedDict):
39
+ data: NotRequired[AssignServerVirtualNetworkPrivateNetworksDataTypedDict]
40
+
41
+
42
+ class AssignServerVirtualNetworkPrivateNetworksRequestBody(BaseModel):
43
+ data: Optional[AssignServerVirtualNetworkPrivateNetworksData] = None
@@ -0,0 +1,67 @@
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 BandwidthPackagesType(str, Enum):
11
+ BANDWIDTH_PACKAGES = "bandwidth_packages"
12
+
13
+
14
+ class BandwidthPackagesProjectTypedDict(TypedDict):
15
+ id: NotRequired[int]
16
+ name: NotRequired[str]
17
+ slug: NotRequired[str]
18
+
19
+
20
+ class BandwidthPackagesProject(BaseModel):
21
+ id: Optional[int] = None
22
+
23
+ name: Optional[str] = None
24
+
25
+ slug: Optional[str] = None
26
+
27
+
28
+ class PackagesTypedDict(TypedDict):
29
+ region_slug: NotRequired[str]
30
+ currency: NotRequired[str]
31
+ unit_price: NotRequired[float]
32
+ contracted: NotRequired[int]
33
+ total_price: NotRequired[float]
34
+
35
+
36
+ class Packages(BaseModel):
37
+ region_slug: Optional[str] = None
38
+
39
+ currency: Optional[str] = None
40
+
41
+ unit_price: Optional[float] = None
42
+
43
+ contracted: Optional[int] = None
44
+
45
+ total_price: Optional[float] = None
46
+
47
+
48
+ class BandwidthPackagesAttributesTypedDict(TypedDict):
49
+ project: NotRequired[BandwidthPackagesProjectTypedDict]
50
+ packages: NotRequired[List[PackagesTypedDict]]
51
+
52
+
53
+ class BandwidthPackagesAttributes(BaseModel):
54
+ project: Optional[BandwidthPackagesProject] = None
55
+
56
+ packages: Optional[List[Packages]] = None
57
+
58
+
59
+ class BandwidthPackagesTypedDict(TypedDict):
60
+ type: NotRequired[BandwidthPackagesType]
61
+ attributes: NotRequired[BandwidthPackagesAttributesTypedDict]
62
+
63
+
64
+ class BandwidthPackages(BaseModel):
65
+ type: Optional[BandwidthPackagesType] = None
66
+
67
+ attributes: Optional[BandwidthPackagesAttributes] = None
@@ -0,0 +1,72 @@
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 BandwidthPlanDataType(str, Enum):
11
+ BANDWIDTH_PLAN = "bandwidth_plan"
12
+
13
+
14
+ class UsdTypedDict(TypedDict):
15
+ monthly: NotRequired[int]
16
+ hourly: NotRequired[int]
17
+
18
+
19
+ class Usd(BaseModel):
20
+ monthly: Optional[int] = None
21
+
22
+ hourly: Optional[int] = None
23
+
24
+
25
+ class BrlTypedDict(TypedDict):
26
+ monthly: NotRequired[int]
27
+ hourly: NotRequired[int]
28
+
29
+
30
+ class Brl(BaseModel):
31
+ monthly: Optional[int] = None
32
+
33
+ hourly: Optional[int] = None
34
+
35
+
36
+ class PricingTypedDict(TypedDict):
37
+ usd: NotRequired[UsdTypedDict]
38
+ brl: NotRequired[BrlTypedDict]
39
+
40
+
41
+ class Pricing(BaseModel):
42
+ usd: Optional[Usd] = None
43
+
44
+ brl: Optional[Brl] = None
45
+
46
+
47
+ class BandwidthPlanDataAttributesTypedDict(TypedDict):
48
+ region: NotRequired[str]
49
+ locations: NotRequired[List[str]]
50
+ pricing: NotRequired[PricingTypedDict]
51
+
52
+
53
+ class BandwidthPlanDataAttributes(BaseModel):
54
+ region: Optional[str] = None
55
+
56
+ locations: Optional[List[str]] = None
57
+
58
+ pricing: Optional[Pricing] = None
59
+
60
+
61
+ class BandwidthPlanDataTypedDict(TypedDict):
62
+ id: NotRequired[str]
63
+ type: NotRequired[BandwidthPlanDataType]
64
+ attributes: NotRequired[BandwidthPlanDataAttributesTypedDict]
65
+
66
+
67
+ class BandwidthPlanData(BaseModel):
68
+ id: Optional[str] = None
69
+
70
+ type: Optional[BandwidthPlanDataType] = None
71
+
72
+ attributes: Optional[BandwidthPlanDataAttributes] = None
@@ -0,0 +1,26 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .bandwidth_plan_data import BandwidthPlanData, BandwidthPlanDataTypedDict
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 BandwidthPlansMetaTypedDict(TypedDict):
11
+ pass
12
+
13
+
14
+ class BandwidthPlansMeta(BaseModel):
15
+ pass
16
+
17
+
18
+ class BandwidthPlansTypedDict(TypedDict):
19
+ data: NotRequired[List[BandwidthPlanDataTypedDict]]
20
+ meta: NotRequired[BandwidthPlansMetaTypedDict]
21
+
22
+
23
+ class BandwidthPlans(BaseModel):
24
+ data: Optional[List[BandwidthPlanData]] = None
25
+
26
+ meta: Optional[BandwidthPlansMeta] = None
@@ -0,0 +1,249 @@
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 (
7
+ BaseModel,
8
+ Nullable,
9
+ OptionalNullable,
10
+ UNSET,
11
+ UNSET_SENTINEL,
12
+ )
13
+ from pydantic import model_serializer
14
+ from typing import List, Optional
15
+ from typing_extensions import NotRequired, TypedDict
16
+
17
+
18
+ class BillingUsageProjectTypedDict(TypedDict):
19
+ r"""The project in which the returned usage belongs to"""
20
+
21
+ id: NotRequired[str]
22
+ slug: NotRequired[str]
23
+ name: NotRequired[str]
24
+
25
+
26
+ class BillingUsageProject(BaseModel):
27
+ r"""The project in which the returned usage belongs to"""
28
+
29
+ id: Optional[str] = None
30
+
31
+ slug: Optional[str] = None
32
+
33
+ name: Optional[str] = None
34
+
35
+
36
+ class PeriodTypedDict(TypedDict):
37
+ r"""The period from the returned billing cycle"""
38
+
39
+ start: NotRequired[datetime]
40
+ end: NotRequired[datetime]
41
+
42
+
43
+ class Period(BaseModel):
44
+ r"""The period from the returned billing cycle"""
45
+
46
+ start: Optional[datetime] = None
47
+
48
+ end: Optional[datetime] = None
49
+
50
+
51
+ class BillingUsageType(str, Enum):
52
+ r"""Type of discount (percentage or fixed amount)"""
53
+
54
+ PERCENT = "percent"
55
+ AMOUNT = "amount"
56
+
57
+
58
+ class DiscountsTypedDict(TypedDict):
59
+ description: str
60
+ r"""Description of the discount"""
61
+ type: BillingUsageType
62
+ r"""Type of discount (percentage or fixed amount)"""
63
+ value: float
64
+ r"""Value of the discount (percentage or amount)"""
65
+
66
+
67
+ class Discounts(BaseModel):
68
+ description: str
69
+ r"""Description of the discount"""
70
+
71
+ type: BillingUsageType
72
+ r"""Type of discount (percentage or fixed amount)"""
73
+
74
+ value: float
75
+ r"""Value of the discount (percentage or amount)"""
76
+
77
+
78
+ class Unit(str, Enum):
79
+ QUANTITY = "quantity"
80
+ HOUR = "hour"
81
+ MINUTE = "minute"
82
+
83
+
84
+ class UsageType(str, Enum):
85
+ LICENSED = "licensed"
86
+ METERED = "metered"
87
+
88
+
89
+ class MetadataTypedDict(TypedDict):
90
+ id: NotRequired[str]
91
+ hostname: NotRequired[str]
92
+ plan: NotRequired[str]
93
+ tags: NotRequired[List[str]]
94
+
95
+
96
+ class Metadata(BaseModel):
97
+ id: Optional[str] = None
98
+
99
+ hostname: Optional[str] = None
100
+
101
+ plan: Optional[str] = None
102
+
103
+ tags: Optional[List[str]] = None
104
+
105
+
106
+ class ProductsTypedDict(TypedDict):
107
+ id: NotRequired[str]
108
+ resource: NotRequired[str]
109
+ name: NotRequired[str]
110
+ proration: NotRequired[bool]
111
+ discounts: NotRequired[List[DiscountsTypedDict]]
112
+ discountable: NotRequired[bool]
113
+ description: NotRequired[str]
114
+ amount_without_discount: NotRequired[int]
115
+ start: NotRequired[datetime]
116
+ end: NotRequired[datetime]
117
+ unit: NotRequired[Unit]
118
+ unit_price: NotRequired[float]
119
+ r"""The unit price of the product in cents"""
120
+ usage_type: NotRequired[UsageType]
121
+ quantity: NotRequired[float]
122
+ price: NotRequired[float]
123
+ r"""The total usage price of the product in cents"""
124
+ metadata: NotRequired[MetadataTypedDict]
125
+
126
+
127
+ class Products(BaseModel):
128
+ id: Optional[str] = None
129
+
130
+ resource: Optional[str] = None
131
+
132
+ name: Optional[str] = None
133
+
134
+ proration: Optional[bool] = None
135
+
136
+ discounts: Optional[List[Discounts]] = None
137
+
138
+ discountable: Optional[bool] = None
139
+
140
+ description: Optional[str] = None
141
+
142
+ amount_without_discount: Optional[int] = None
143
+
144
+ start: Optional[datetime] = None
145
+
146
+ end: Optional[datetime] = None
147
+
148
+ unit: Optional[Unit] = None
149
+
150
+ unit_price: Optional[float] = None
151
+ r"""The unit price of the product in cents"""
152
+
153
+ usage_type: Optional[UsageType] = None
154
+
155
+ quantity: Optional[float] = None
156
+
157
+ price: Optional[float] = None
158
+ r"""The total usage price of the product in cents"""
159
+
160
+ metadata: Optional[Metadata] = None
161
+
162
+
163
+ class BillingUsageAttributesTypedDict(TypedDict):
164
+ project: NotRequired[BillingUsageProjectTypedDict]
165
+ r"""The project in which the returned usage belongs to"""
166
+ period: NotRequired[PeriodTypedDict]
167
+ r"""The period from the returned billing cycle"""
168
+ available_credit_balance: NotRequired[int]
169
+ r"""The available credit balance in cents"""
170
+ price: NotRequired[float]
171
+ r"""The total usage price in cents"""
172
+ threshold: NotRequired[Nullable[float]]
173
+ r"""The threshold which we use to charge your usage, in cents"""
174
+ products: NotRequired[List[ProductsTypedDict]]
175
+
176
+
177
+ class BillingUsageAttributes(BaseModel):
178
+ project: Optional[BillingUsageProject] = None
179
+ r"""The project in which the returned usage belongs to"""
180
+
181
+ period: Optional[Period] = None
182
+ r"""The period from the returned billing cycle"""
183
+
184
+ available_credit_balance: Optional[int] = None
185
+ r"""The available credit balance in cents"""
186
+
187
+ price: Optional[float] = None
188
+ r"""The total usage price in cents"""
189
+
190
+ threshold: OptionalNullable[float] = UNSET
191
+ r"""The threshold which we use to charge your usage, in cents"""
192
+
193
+ products: Optional[List[Products]] = None
194
+
195
+ @model_serializer(mode="wrap")
196
+ def serialize_model(self, handler):
197
+ optional_fields = [
198
+ "project",
199
+ "period",
200
+ "available_credit_balance",
201
+ "price",
202
+ "threshold",
203
+ "products",
204
+ ]
205
+ nullable_fields = ["threshold"]
206
+ null_default_fields = []
207
+
208
+ serialized = handler(self)
209
+
210
+ m = {}
211
+
212
+ for n, f in type(self).model_fields.items():
213
+ k = f.alias or n
214
+ val = serialized.get(k)
215
+ serialized.pop(k, None)
216
+
217
+ optional_nullable = k in optional_fields and k in nullable_fields
218
+ is_set = (
219
+ self.__pydantic_fields_set__.intersection({n})
220
+ or k in null_default_fields
221
+ ) # pylint: disable=no-member
222
+
223
+ if val is not None and val != UNSET_SENTINEL:
224
+ m[k] = val
225
+ elif val != UNSET_SENTINEL and (
226
+ not k in optional_fields or (optional_nullable and is_set)
227
+ ):
228
+ m[k] = val
229
+
230
+ return m
231
+
232
+
233
+ class BillingUsageDataTypedDict(TypedDict):
234
+ id: NotRequired[str]
235
+ attributes: NotRequired[BillingUsageAttributesTypedDict]
236
+
237
+
238
+ class BillingUsageData(BaseModel):
239
+ id: Optional[str] = None
240
+
241
+ attributes: Optional[BillingUsageAttributes] = None
242
+
243
+
244
+ class BillingUsageTypedDict(TypedDict):
245
+ data: NotRequired[BillingUsageDataTypedDict]
246
+
247
+
248
+ class BillingUsage(BaseModel):
249
+ data: Optional[BillingUsageData] = None