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,65 @@
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
+ description: NotRequired[str]
38
+ status: NotRequired[str]
39
+ server: NotRequired[VirtualNetworkAssignmentDataServerTypedDict]
40
+
41
+
42
+ class VirtualNetworkAssignmentDataAttributes(BaseModel):
43
+ virtual_network_id: Optional[str] = None
44
+
45
+ vid: Optional[int] = None
46
+
47
+ description: Optional[str] = None
48
+
49
+ status: Optional[str] = None
50
+
51
+ server: Optional[VirtualNetworkAssignmentDataServer] = None
52
+
53
+
54
+ class VirtualNetworkAssignmentDataTypedDict(TypedDict):
55
+ id: NotRequired[str]
56
+ type: NotRequired[VirtualNetworkAssignmentDataType]
57
+ attributes: NotRequired[VirtualNetworkAssignmentDataAttributesTypedDict]
58
+
59
+
60
+ class VirtualNetworkAssignmentData(BaseModel):
61
+ id: Optional[str] = None
62
+
63
+ type: Optional[VirtualNetworkAssignmentDataType] = None
64
+
65
+ attributes: Optional[VirtualNetworkAssignmentDataAttributes] = None
@@ -0,0 +1,29 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .virtual_network_assignment_data import (
5
+ VirtualNetworkAssignmentData,
6
+ VirtualNetworkAssignmentDataTypedDict,
7
+ )
8
+ from latitudesh_python_sdk.types import BaseModel
9
+ from typing import List, Optional
10
+ from typing_extensions import NotRequired, TypedDict
11
+
12
+
13
+ class VirtualNetworkAssignmentsMetaTypedDict(TypedDict):
14
+ pass
15
+
16
+
17
+ class VirtualNetworkAssignmentsMeta(BaseModel):
18
+ pass
19
+
20
+
21
+ class VirtualNetworkAssignmentsTypedDict(TypedDict):
22
+ data: NotRequired[List[VirtualNetworkAssignmentDataTypedDict]]
23
+ meta: NotRequired[VirtualNetworkAssignmentsMetaTypedDict]
24
+
25
+
26
+ class VirtualNetworkAssignments(BaseModel):
27
+ data: Optional[List[VirtualNetworkAssignmentData]] = None
28
+
29
+ meta: Optional[VirtualNetworkAssignmentsMeta] = None
@@ -0,0 +1,114 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .project_include import ProjectInclude, ProjectIncludeTypedDict
5
+ from datetime import datetime
6
+ from enum import Enum
7
+ from latitudesh_python_sdk.types import BaseModel
8
+ from typing import List, Optional
9
+ from typing_extensions import NotRequired, TypedDict
10
+
11
+
12
+ class VirtualNetworkDataType(str, Enum):
13
+ VIRTUAL_NETWORKS = "virtual_networks"
14
+
15
+
16
+ class VirtualNetworkDataSiteTypedDict(TypedDict):
17
+ id: NotRequired[str]
18
+ facility: NotRequired[str]
19
+ name: NotRequired[str]
20
+ slug: NotRequired[str]
21
+
22
+
23
+ class VirtualNetworkDataSite(BaseModel):
24
+ id: Optional[str] = None
25
+
26
+ facility: Optional[str] = None
27
+
28
+ name: Optional[str] = None
29
+
30
+ slug: Optional[str] = None
31
+
32
+
33
+ class VirtualNetworkDataRegionTypedDict(TypedDict):
34
+ city: NotRequired[str]
35
+ country: NotRequired[str]
36
+ site: NotRequired[VirtualNetworkDataSiteTypedDict]
37
+
38
+
39
+ class VirtualNetworkDataRegion(BaseModel):
40
+ city: Optional[str] = None
41
+
42
+ country: Optional[str] = None
43
+
44
+ site: Optional[VirtualNetworkDataSite] = None
45
+
46
+
47
+ class TagsModelTypedDict(TypedDict):
48
+ id: NotRequired[str]
49
+ name: NotRequired[str]
50
+ description: NotRequired[str]
51
+ color: NotRequired[str]
52
+
53
+
54
+ class TagsModel(BaseModel):
55
+ id: Optional[str] = None
56
+
57
+ name: Optional[str] = None
58
+
59
+ description: Optional[str] = None
60
+
61
+ color: Optional[str] = None
62
+
63
+
64
+ class VirtualNetworkDataAttributesTypedDict(TypedDict):
65
+ vid: NotRequired[int]
66
+ r"""vlan ID of the virtual network"""
67
+ name: NotRequired[str]
68
+ r"""Name of the virtual network"""
69
+ description: NotRequired[str]
70
+ r"""Description of the virtual network"""
71
+ project: NotRequired[ProjectIncludeTypedDict]
72
+ region: NotRequired[VirtualNetworkDataRegionTypedDict]
73
+ created_at: NotRequired[datetime]
74
+ assignments_count: NotRequired[int]
75
+ r"""Amount of devices assigned to the virtual network"""
76
+ tags: NotRequired[List[TagsModelTypedDict]]
77
+ r"""Tags associated with the virtual network"""
78
+
79
+
80
+ class VirtualNetworkDataAttributes(BaseModel):
81
+ vid: Optional[int] = None
82
+ r"""vlan ID of the virtual network"""
83
+
84
+ name: Optional[str] = None
85
+ r"""Name of the virtual network"""
86
+
87
+ description: Optional[str] = None
88
+ r"""Description of the virtual network"""
89
+
90
+ project: Optional[ProjectInclude] = None
91
+
92
+ region: Optional[VirtualNetworkDataRegion] = None
93
+
94
+ created_at: Optional[datetime] = None
95
+
96
+ assignments_count: Optional[int] = None
97
+ r"""Amount of devices assigned to the virtual network"""
98
+
99
+ tags: Optional[List[TagsModel]] = None
100
+ r"""Tags associated with the virtual network"""
101
+
102
+
103
+ class VirtualNetworkDataTypedDict(TypedDict):
104
+ id: NotRequired[str]
105
+ type: NotRequired[VirtualNetworkDataType]
106
+ attributes: NotRequired[VirtualNetworkDataAttributesTypedDict]
107
+
108
+
109
+ class VirtualNetworkData(BaseModel):
110
+ id: Optional[str] = None
111
+
112
+ type: Optional[VirtualNetworkDataType] = None
113
+
114
+ attributes: Optional[VirtualNetworkDataAttributes] = None
@@ -0,0 +1,26 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .virtual_network_data import VirtualNetworkData, VirtualNetworkDataTypedDict
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 VirtualNetworksMetaTypedDict(TypedDict):
11
+ pass
12
+
13
+
14
+ class VirtualNetworksMeta(BaseModel):
15
+ pass
16
+
17
+
18
+ class VirtualNetworksTypedDict(TypedDict):
19
+ data: NotRequired[List[VirtualNetworkDataTypedDict]]
20
+ meta: NotRequired[VirtualNetworksMetaTypedDict]
21
+
22
+
23
+ class VirtualNetworks(BaseModel):
24
+ data: Optional[List[VirtualNetworkData]] = None
25
+
26
+ meta: Optional[VirtualNetworksMeta] = None
@@ -0,0 +1,111 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .project_include import ProjectInclude, ProjectIncludeTypedDict
5
+ from .team_include import TeamInclude, TeamIncludeTypedDict
6
+ from datetime import datetime
7
+ from enum import Enum
8
+ from latitudesh_python_sdk.types import (
9
+ BaseModel,
10
+ Nullable,
11
+ OptionalNullable,
12
+ UNSET,
13
+ UNSET_SENTINEL,
14
+ )
15
+ from pydantic import model_serializer
16
+ from typing import List, Optional
17
+ from typing_extensions import NotRequired, TypedDict
18
+
19
+
20
+ class VolumeDataType(str, Enum):
21
+ VOLUMES = "volumes"
22
+
23
+
24
+ class InitiatorsTypedDict(TypedDict):
25
+ nqn: NotRequired[str]
26
+
27
+
28
+ class Initiators(BaseModel):
29
+ nqn: Optional[str] = None
30
+
31
+
32
+ class VolumeDataAttributesTypedDict(TypedDict):
33
+ name: NotRequired[str]
34
+ size_in_gb: NotRequired[int]
35
+ created_at: NotRequired[datetime]
36
+ namespace_id: NotRequired[Nullable[str]]
37
+ connector_id: NotRequired[str]
38
+ initiators: NotRequired[List[InitiatorsTypedDict]]
39
+ project: NotRequired[ProjectIncludeTypedDict]
40
+ team: NotRequired[TeamIncludeTypedDict]
41
+
42
+
43
+ class VolumeDataAttributes(BaseModel):
44
+ name: Optional[str] = None
45
+
46
+ size_in_gb: Optional[int] = None
47
+
48
+ created_at: Optional[datetime] = None
49
+
50
+ namespace_id: OptionalNullable[str] = UNSET
51
+
52
+ connector_id: Optional[str] = None
53
+
54
+ initiators: Optional[List[Initiators]] = None
55
+
56
+ project: Optional[ProjectInclude] = None
57
+
58
+ team: Optional[TeamInclude] = None
59
+
60
+ @model_serializer(mode="wrap")
61
+ def serialize_model(self, handler):
62
+ optional_fields = [
63
+ "name",
64
+ "size_in_gb",
65
+ "created_at",
66
+ "namespace_id",
67
+ "connector_id",
68
+ "initiators",
69
+ "project",
70
+ "team",
71
+ ]
72
+ nullable_fields = ["namespace_id"]
73
+ null_default_fields = []
74
+
75
+ serialized = handler(self)
76
+
77
+ m = {}
78
+
79
+ for n, f in type(self).model_fields.items():
80
+ k = f.alias or n
81
+ val = serialized.get(k)
82
+ serialized.pop(k, None)
83
+
84
+ optional_nullable = k in optional_fields and k in nullable_fields
85
+ is_set = (
86
+ self.__pydantic_fields_set__.intersection({n})
87
+ or k in null_default_fields
88
+ ) # pylint: disable=no-member
89
+
90
+ if val is not None and val != UNSET_SENTINEL:
91
+ m[k] = val
92
+ elif val != UNSET_SENTINEL and (
93
+ not k in optional_fields or (optional_nullable and is_set)
94
+ ):
95
+ m[k] = val
96
+
97
+ return m
98
+
99
+
100
+ class VolumeDataTypedDict(TypedDict):
101
+ id: NotRequired[str]
102
+ type: NotRequired[VolumeDataType]
103
+ attributes: NotRequired[VolumeDataAttributesTypedDict]
104
+
105
+
106
+ class VolumeData(BaseModel):
107
+ id: Optional[str] = None
108
+
109
+ type: Optional[VolumeDataType] = None
110
+
111
+ attributes: Optional[VolumeDataAttributes] = None
@@ -0,0 +1,77 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .region_resource_data import RegionResourceData, RegionResourceDataTypedDict
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 VpnSessionDataWithPasswordType(str, Enum):
12
+ VPN_SESSIONS = "vpn_sessions"
13
+
14
+
15
+ class VpnSessionDataWithPasswordStatus(str, Enum):
16
+ r"""from Firewall Response"""
17
+
18
+ ENABLE = "enable"
19
+ DISABLE = "disable"
20
+
21
+
22
+ class VpnSessionDataWithPasswordAttributesTypedDict(TypedDict):
23
+ user_name: NotRequired[str]
24
+ r"""VPN username"""
25
+ password: NotRequired[str]
26
+ r"""VPN password"""
27
+ port: NotRequired[str]
28
+ r"""VPN port"""
29
+ host: NotRequired[str]
30
+ r"""VPN host"""
31
+ region: NotRequired[RegionResourceDataTypedDict]
32
+ status: NotRequired[VpnSessionDataWithPasswordStatus]
33
+ r"""from Firewall Response"""
34
+ expires_at: NotRequired[str]
35
+ r"""Time to expiry"""
36
+ created_at: NotRequired[str]
37
+ updated_at: NotRequired[str]
38
+
39
+
40
+ class VpnSessionDataWithPasswordAttributes(BaseModel):
41
+ user_name: Optional[str] = None
42
+ r"""VPN username"""
43
+
44
+ password: Optional[str] = None
45
+ r"""VPN password"""
46
+
47
+ port: Optional[str] = None
48
+ r"""VPN port"""
49
+
50
+ host: Optional[str] = None
51
+ r"""VPN host"""
52
+
53
+ region: Optional[RegionResourceData] = None
54
+
55
+ status: Optional[VpnSessionDataWithPasswordStatus] = None
56
+ r"""from Firewall Response"""
57
+
58
+ expires_at: Optional[str] = None
59
+ r"""Time to expiry"""
60
+
61
+ created_at: Optional[str] = None
62
+
63
+ updated_at: Optional[str] = None
64
+
65
+
66
+ class VpnSessionDataWithPasswordTypedDict(TypedDict):
67
+ id: NotRequired[str]
68
+ type: NotRequired[VpnSessionDataWithPasswordType]
69
+ attributes: NotRequired[VpnSessionDataWithPasswordAttributesTypedDict]
70
+
71
+
72
+ class VpnSessionDataWithPassword(BaseModel):
73
+ id: Optional[str] = None
74
+
75
+ type: Optional[VpnSessionDataWithPasswordType] = None
76
+
77
+ attributes: Optional[VpnSessionDataWithPasswordAttributes] = None
@@ -0,0 +1,18 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .vpn_session_data_with_password import (
5
+ VpnSessionDataWithPassword,
6
+ VpnSessionDataWithPasswordTypedDict,
7
+ )
8
+ from latitudesh_python_sdk.types import BaseModel
9
+ from typing import Optional
10
+ from typing_extensions import NotRequired, TypedDict
11
+
12
+
13
+ class VpnSessionWithPasswordTypedDict(TypedDict):
14
+ data: NotRequired[VpnSessionDataWithPasswordTypedDict]
15
+
16
+
17
+ class VpnSessionWithPassword(BaseModel):
18
+ data: Optional[VpnSessionDataWithPassword] = None
@@ -0,0 +1,238 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from .basesdk import BaseSDK
4
+ from jsonpath import JSONPath
5
+ from latitudesh_python_sdk import models, utils
6
+ from latitudesh_python_sdk._hooks import HookContext
7
+ from latitudesh_python_sdk.types import OptionalNullable, UNSET
8
+ from latitudesh_python_sdk.utils import get_security_from_env
9
+ from latitudesh_python_sdk.utils.unmarshal_json_response import unmarshal_json_response
10
+ from typing import Any, Dict, List, Mapping, Optional, Union
11
+
12
+
13
+ class OperatingSystemsSDK(BaseSDK):
14
+ def list(
15
+ self,
16
+ *,
17
+ page_size: Optional[int] = 20,
18
+ page_number: Optional[int] = 1,
19
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
20
+ server_url: Optional[str] = None,
21
+ timeout_ms: Optional[int] = None,
22
+ http_headers: Optional[Mapping[str, str]] = None,
23
+ ) -> Optional[models.GetPlansOperatingSystemResponse]:
24
+ r"""List all operating systems available
25
+
26
+ Lists all operating systems available to deploy and reinstall.
27
+
28
+
29
+ :param page_size: Number of items to return per page
30
+ :param page_number: Page number to return (starts at 1)
31
+ :param retries: Override the default retry configuration for this method
32
+ :param server_url: Override the default server URL for this method
33
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
34
+ :param http_headers: Additional headers to set or replace on requests.
35
+ """
36
+ base_url = None
37
+ url_variables = None
38
+ if timeout_ms is None:
39
+ timeout_ms = self.sdk_configuration.timeout_ms
40
+
41
+ if server_url is not None:
42
+ base_url = server_url
43
+ else:
44
+ base_url = self._get_url(base_url, url_variables)
45
+
46
+ request = models.GetPlansOperatingSystemRequest(
47
+ page_size=page_size,
48
+ page_number=page_number,
49
+ )
50
+
51
+ req = self._build_request(
52
+ method="GET",
53
+ path="/plans/operating_systems",
54
+ base_url=base_url,
55
+ url_variables=url_variables,
56
+ request=request,
57
+ request_body_required=False,
58
+ request_has_path_params=False,
59
+ request_has_query_params=True,
60
+ user_agent_header="user-agent",
61
+ accept_header_value="application/vnd.api+json",
62
+ http_headers=http_headers,
63
+ security=self.sdk_configuration.security,
64
+ allow_empty_value=None,
65
+ timeout_ms=timeout_ms,
66
+ )
67
+
68
+ if retries == UNSET:
69
+ if self.sdk_configuration.retry_config is not UNSET:
70
+ retries = self.sdk_configuration.retry_config
71
+
72
+ retry_config = None
73
+ if isinstance(retries, utils.RetryConfig):
74
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
75
+
76
+ http_res = self.do_request(
77
+ hook_ctx=HookContext(
78
+ config=self.sdk_configuration,
79
+ base_url=base_url or "",
80
+ operation_id="get-plans-operating-system",
81
+ oauth2_scopes=None,
82
+ security_source=get_security_from_env(
83
+ self.sdk_configuration.security, models.Security
84
+ ),
85
+ ),
86
+ request=req,
87
+ error_status_codes=["4XX", "5XX"],
88
+ retry_config=retry_config,
89
+ )
90
+
91
+ def next_func() -> Optional[models.GetPlansOperatingSystemResponse]:
92
+ body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]])
93
+ page = request.page_number if not request.page_number is None else 1
94
+ next_page = page + 1
95
+
96
+ if not http_res.text:
97
+ return None
98
+ results = JSONPath("$.data").parse(body)
99
+ if len(results) == 0 or len(results[0]) == 0:
100
+ return None
101
+ limit = request.page_size if not request.page_size is None else 20
102
+ if len(results[0]) < limit:
103
+ return None
104
+
105
+ return self.list(
106
+ page_size=page_size,
107
+ page_number=next_page,
108
+ retries=retries,
109
+ )
110
+
111
+ if utils.match_response(http_res, "200", "application/vnd.api+json"):
112
+ return models.GetPlansOperatingSystemResponse(
113
+ result=unmarshal_json_response(
114
+ models.GetPlansOperatingSystemResponseBody, http_res
115
+ ),
116
+ next=next_func,
117
+ )
118
+ if utils.match_response(http_res, "4XX", "*"):
119
+ http_res_text = utils.stream_to_text(http_res)
120
+ raise models.APIError("API error occurred", http_res, http_res_text)
121
+ if utils.match_response(http_res, "5XX", "*"):
122
+ http_res_text = utils.stream_to_text(http_res)
123
+ raise models.APIError("API error occurred", http_res, http_res_text)
124
+
125
+ raise models.APIError("Unexpected response received", http_res)
126
+
127
+ async def list_async(
128
+ self,
129
+ *,
130
+ page_size: Optional[int] = 20,
131
+ page_number: Optional[int] = 1,
132
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
133
+ server_url: Optional[str] = None,
134
+ timeout_ms: Optional[int] = None,
135
+ http_headers: Optional[Mapping[str, str]] = None,
136
+ ) -> Optional[models.GetPlansOperatingSystemResponse]:
137
+ r"""List all operating systems available
138
+
139
+ Lists all operating systems available to deploy and reinstall.
140
+
141
+
142
+ :param page_size: Number of items to return per page
143
+ :param page_number: Page number to return (starts at 1)
144
+ :param retries: Override the default retry configuration for this method
145
+ :param server_url: Override the default server URL for this method
146
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
147
+ :param http_headers: Additional headers to set or replace on requests.
148
+ """
149
+ base_url = None
150
+ url_variables = None
151
+ if timeout_ms is None:
152
+ timeout_ms = self.sdk_configuration.timeout_ms
153
+
154
+ if server_url is not None:
155
+ base_url = server_url
156
+ else:
157
+ base_url = self._get_url(base_url, url_variables)
158
+
159
+ request = models.GetPlansOperatingSystemRequest(
160
+ page_size=page_size,
161
+ page_number=page_number,
162
+ )
163
+
164
+ req = self._build_request_async(
165
+ method="GET",
166
+ path="/plans/operating_systems",
167
+ base_url=base_url,
168
+ url_variables=url_variables,
169
+ request=request,
170
+ request_body_required=False,
171
+ request_has_path_params=False,
172
+ request_has_query_params=True,
173
+ user_agent_header="user-agent",
174
+ accept_header_value="application/vnd.api+json",
175
+ http_headers=http_headers,
176
+ security=self.sdk_configuration.security,
177
+ allow_empty_value=None,
178
+ timeout_ms=timeout_ms,
179
+ )
180
+
181
+ if retries == UNSET:
182
+ if self.sdk_configuration.retry_config is not UNSET:
183
+ retries = self.sdk_configuration.retry_config
184
+
185
+ retry_config = None
186
+ if isinstance(retries, utils.RetryConfig):
187
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
188
+
189
+ http_res = await self.do_request_async(
190
+ hook_ctx=HookContext(
191
+ config=self.sdk_configuration,
192
+ base_url=base_url or "",
193
+ operation_id="get-plans-operating-system",
194
+ oauth2_scopes=None,
195
+ security_source=get_security_from_env(
196
+ self.sdk_configuration.security, models.Security
197
+ ),
198
+ ),
199
+ request=req,
200
+ error_status_codes=["4XX", "5XX"],
201
+ retry_config=retry_config,
202
+ )
203
+
204
+ def next_func() -> Optional[models.GetPlansOperatingSystemResponse]:
205
+ body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]])
206
+ page = request.page_number if not request.page_number is None else 1
207
+ next_page = page + 1
208
+
209
+ if not http_res.text:
210
+ return None
211
+ results = JSONPath("$.data").parse(body)
212
+ if len(results) == 0 or len(results[0]) == 0:
213
+ return None
214
+ limit = request.page_size if not request.page_size is None else 20
215
+ if len(results[0]) < limit:
216
+ return None
217
+
218
+ return self.list(
219
+ page_size=page_size,
220
+ page_number=next_page,
221
+ retries=retries,
222
+ )
223
+
224
+ if utils.match_response(http_res, "200", "application/vnd.api+json"):
225
+ return models.GetPlansOperatingSystemResponse(
226
+ result=unmarshal_json_response(
227
+ models.GetPlansOperatingSystemResponseBody, http_res
228
+ ),
229
+ next=next_func,
230
+ )
231
+ if utils.match_response(http_res, "4XX", "*"):
232
+ http_res_text = await utils.stream_to_text_async(http_res)
233
+ raise models.APIError("API error occurred", http_res, http_res_text)
234
+ if utils.match_response(http_res, "5XX", "*"):
235
+ http_res_text = await utils.stream_to_text_async(http_res)
236
+ raise models.APIError("API error occurred", http_res, http_res_text)
237
+
238
+ raise models.APIError("Unexpected response received", http_res)