hyperstack 1.25.0a0__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 (401) hide show
  1. hyperstack/__init__.py +420 -0
  2. hyperstack/api/__init__.py +48 -0
  3. hyperstack/api/alive_api.py +270 -0
  4. hyperstack/api/api_key_api.py +1161 -0
  5. hyperstack/api/assigning_member_role_api.py +615 -0
  6. hyperstack/api/auth_api.py +292 -0
  7. hyperstack/api/billing_api.py +5946 -0
  8. hyperstack/api/calculate_api.py +326 -0
  9. hyperstack/api/callbacks_api.py +1795 -0
  10. hyperstack/api/cluster_events_api.py +308 -0
  11. hyperstack/api/clusters_api.py +1651 -0
  12. hyperstack/api/compliance_api.py +1169 -0
  13. hyperstack/api/credit_api.py +295 -0
  14. hyperstack/api/customer_contract_api.py +922 -0
  15. hyperstack/api/dashboard_api.py +292 -0
  16. hyperstack/api/deployment_api.py +1122 -0
  17. hyperstack/api/environment_api.py +1490 -0
  18. hyperstack/api/firewall_attachment_api.py +343 -0
  19. hyperstack/api/firewalls_api.py +1819 -0
  20. hyperstack/api/flavor_api.py +315 -0
  21. hyperstack/api/floating_ip_api.py +585 -0
  22. hyperstack/api/gpu_api.py +292 -0
  23. hyperstack/api/image_api.py +1228 -0
  24. hyperstack/api/invite_api.py +857 -0
  25. hyperstack/api/keypair_api.py +1217 -0
  26. hyperstack/api/organization_api.py +864 -0
  27. hyperstack/api/payment_api.py +584 -0
  28. hyperstack/api/permission_api.py +292 -0
  29. hyperstack/api/policy_api.py +292 -0
  30. hyperstack/api/pricebook_api.py +293 -0
  31. hyperstack/api/profile_api.py +1131 -0
  32. hyperstack/api/rbac_role_api.py +1434 -0
  33. hyperstack/api/region_api.py +292 -0
  34. hyperstack/api/security_rules_api.py +292 -0
  35. hyperstack/api/snapshot_events_api.py +291 -0
  36. hyperstack/api/snapshots_api.py +1779 -0
  37. hyperstack/api/stock_api.py +292 -0
  38. hyperstack/api/template_api.py +1497 -0
  39. hyperstack/api/user_api.py +871 -0
  40. hyperstack/api/user_detail_choice_api.py +295 -0
  41. hyperstack/api/user_permission_api.py +567 -0
  42. hyperstack/api/virtual_machine_api.py +5289 -0
  43. hyperstack/api/virtual_machine_events_api.py +311 -0
  44. hyperstack/api/vnc_url_api.py +595 -0
  45. hyperstack/api/volume_api.py +1742 -0
  46. hyperstack/api/volume_attachment_api.py +650 -0
  47. hyperstack/api_client.py +797 -0
  48. hyperstack/api_response.py +21 -0
  49. hyperstack/configuration.py +605 -0
  50. hyperstack/exceptions.py +199 -0
  51. hyperstack/models/__init__.py +360 -0
  52. hyperstack/models/add_update_flavor_organization_payload.py +111 -0
  53. hyperstack/models/add_user_info_success_response_model.py +95 -0
  54. hyperstack/models/allocated_gpu_count_graph.py +89 -0
  55. hyperstack/models/api_key_fields.py +96 -0
  56. hyperstack/models/api_key_verify_fields.py +93 -0
  57. hyperstack/models/assign_rbac_role_payload.py +87 -0
  58. hyperstack/models/attach_callback_payload.py +87 -0
  59. hyperstack/models/attach_callback_response.py +91 -0
  60. hyperstack/models/attach_firewall_with_vm.py +87 -0
  61. hyperstack/models/attach_firewalls_to_vm_payload.py +87 -0
  62. hyperstack/models/attach_volume_fields.py +96 -0
  63. hyperstack/models/attach_volumes.py +99 -0
  64. hyperstack/models/attach_volumes_payload.py +87 -0
  65. hyperstack/models/auth_get_token_response_model.py +97 -0
  66. hyperstack/models/auth_request_login_fields.py +89 -0
  67. hyperstack/models/auth_request_login_response_model.py +95 -0
  68. hyperstack/models/auth_user_fields.py +94 -0
  69. hyperstack/models/auth_user_info_response_model.py +95 -0
  70. hyperstack/models/billing_immune_resources_response.py +95 -0
  71. hyperstack/models/billing_response.py +100 -0
  72. hyperstack/models/billingmetricesfields.py +108 -0
  73. hyperstack/models/billingmetricesresponse.py +99 -0
  74. hyperstack/models/cluster_events.py +99 -0
  75. hyperstack/models/cluster_events_fields.py +104 -0
  76. hyperstack/models/cluster_fields.py +114 -0
  77. hyperstack/models/cluster_list_response.py +99 -0
  78. hyperstack/models/cluster_response.py +95 -0
  79. hyperstack/models/cluster_versions.py +91 -0
  80. hyperstack/models/common_response_model.py +89 -0
  81. hyperstack/models/compliance_fields.py +93 -0
  82. hyperstack/models/compliance_model_fields.py +99 -0
  83. hyperstack/models/compliance_payload.py +97 -0
  84. hyperstack/models/compliance_response.py +95 -0
  85. hyperstack/models/container_overview_fields.py +95 -0
  86. hyperstack/models/contract.py +105 -0
  87. hyperstack/models/contract_billing_history.py +97 -0
  88. hyperstack/models/contract_billing_history_response_attributes.py +99 -0
  89. hyperstack/models/contract_billing_history_response_model.py +95 -0
  90. hyperstack/models/contract_change_payload.py +101 -0
  91. hyperstack/models/contract_discount_plan_fields.py +103 -0
  92. hyperstack/models/contract_eligible_instance_fields.py +99 -0
  93. hyperstack/models/contract_eligible_instances_response.py +101 -0
  94. hyperstack/models/contract_event_create_model.py +91 -0
  95. hyperstack/models/contract_gpu_allocation_graph_response.py +95 -0
  96. hyperstack/models/contract_instance_fields.py +102 -0
  97. hyperstack/models/contract_instances_response.py +99 -0
  98. hyperstack/models/contract_resource_payload.py +95 -0
  99. hyperstack/models/contractl_billing_history_response_metrics.py +87 -0
  100. hyperstack/models/create_cluster_payload.py +101 -0
  101. hyperstack/models/create_contract_fields.py +110 -0
  102. hyperstack/models/create_contract_payload.py +106 -0
  103. hyperstack/models/create_discount_response.py +95 -0
  104. hyperstack/models/create_discounts_payload.py +112 -0
  105. hyperstack/models/create_environment.py +90 -0
  106. hyperstack/models/create_firewall_payload.py +91 -0
  107. hyperstack/models/create_firewall_rule_payload.py +104 -0
  108. hyperstack/models/create_gpu.py +91 -0
  109. hyperstack/models/create_image.py +91 -0
  110. hyperstack/models/create_image_payload.py +89 -0
  111. hyperstack/models/create_instances_payload.py +134 -0
  112. hyperstack/models/create_instances_response.py +99 -0
  113. hyperstack/models/create_profile_payload.py +92 -0
  114. hyperstack/models/create_profile_response.py +95 -0
  115. hyperstack/models/create_security_rule_payload.py +104 -0
  116. hyperstack/models/create_snapshot_payload.py +93 -0
  117. hyperstack/models/create_snapshot_response.py +95 -0
  118. hyperstack/models/create_update_compliance_response.py +95 -0
  119. hyperstack/models/create_update_permission_payload.py +93 -0
  120. hyperstack/models/create_update_permission_response_model.py +95 -0
  121. hyperstack/models/create_update_policy_payload.py +93 -0
  122. hyperstack/models/create_update_policy_response_model.py +95 -0
  123. hyperstack/models/create_update_rbac_role_payload.py +94 -0
  124. hyperstack/models/create_volume_payload.py +100 -0
  125. hyperstack/models/creditrechargelimitfield.py +93 -0
  126. hyperstack/models/creditrechargelimitresponse.py +99 -0
  127. hyperstack/models/creditrequestresponse.py +99 -0
  128. hyperstack/models/creditrequests.py +96 -0
  129. hyperstack/models/customer_contract_detail_response_model.py +95 -0
  130. hyperstack/models/customer_contract_fields.py +112 -0
  131. hyperstack/models/customer_fields.py +89 -0
  132. hyperstack/models/customer_payload.py +89 -0
  133. hyperstack/models/dashboard_info_response.py +95 -0
  134. hyperstack/models/data.py +91 -0
  135. hyperstack/models/deployment_fields.py +98 -0
  136. hyperstack/models/deployment_fieldsforstartdeployments.py +100 -0
  137. hyperstack/models/deployments.py +99 -0
  138. hyperstack/models/detach_volumes.py +99 -0
  139. hyperstack/models/detach_volumes_payload.py +87 -0
  140. hyperstack/models/discount_entity_model.py +97 -0
  141. hyperstack/models/discount_fields.py +100 -0
  142. hyperstack/models/discount_plan_fields.py +108 -0
  143. hyperstack/models/discount_resource_fields.py +93 -0
  144. hyperstack/models/discount_resource_payload.py +93 -0
  145. hyperstack/models/editlabelofanexisting_vm_payload.py +87 -0
  146. hyperstack/models/environment.py +95 -0
  147. hyperstack/models/environment_features.py +87 -0
  148. hyperstack/models/environment_fields.py +100 -0
  149. hyperstack/models/environment_fieldsfor_volume.py +87 -0
  150. hyperstack/models/environments.py +105 -0
  151. hyperstack/models/error_response_model.py +91 -0
  152. hyperstack/models/exclude_billing_post_payload.py +91 -0
  153. hyperstack/models/exclude_billing_post_response.py +91 -0
  154. hyperstack/models/export_billing_data_request.py +105 -0
  155. hyperstack/models/export_billing_data_response.py +89 -0
  156. hyperstack/models/field_change.py +91 -0
  157. hyperstack/models/firewall_attachment_model.py +98 -0
  158. hyperstack/models/firewall_attachment_vm_model.py +98 -0
  159. hyperstack/models/firewall_detail_fields.py +122 -0
  160. hyperstack/models/firewall_detail_response.py +95 -0
  161. hyperstack/models/firewall_environment_fields.py +91 -0
  162. hyperstack/models/firewall_fields.py +102 -0
  163. hyperstack/models/firewall_response.py +95 -0
  164. hyperstack/models/firewall_rule.py +95 -0
  165. hyperstack/models/firewalls_list_response.py +105 -0
  166. hyperstack/models/flavor_fields.py +120 -0
  167. hyperstack/models/flavor_item_get_response.py +99 -0
  168. hyperstack/models/flavor_list_response.py +99 -0
  169. hyperstack/models/flavor_object_fields.py +95 -0
  170. hyperstack/models/flavor_payload.py +101 -0
  171. hyperstack/models/flavor_response.py +95 -0
  172. hyperstack/models/flavor_vm_fields.py +100 -0
  173. hyperstack/models/flavor_vms_response.py +99 -0
  174. hyperstack/models/future_node_model.py +106 -0
  175. hyperstack/models/future_node_response_model.py +97 -0
  176. hyperstack/models/future_node_stock_model.py +93 -0
  177. hyperstack/models/future_node_update_model.py +98 -0
  178. hyperstack/models/future_nodes_stock_model.py +95 -0
  179. hyperstack/models/generate_update_api_key_payload.py +89 -0
  180. hyperstack/models/generate_update_api_key_response_model.py +95 -0
  181. hyperstack/models/get_all_contract_fields.py +100 -0
  182. hyperstack/models/get_all_contracts_response_model.py +99 -0
  183. hyperstack/models/get_all_discount_for_all_organization_response.py +99 -0
  184. hyperstack/models/get_all_discounts_fields.py +106 -0
  185. hyperstack/models/get_api_keys_response_model.py +99 -0
  186. hyperstack/models/get_customer_contracts_list_response_model.py +101 -0
  187. hyperstack/models/get_discount_detail_response.py +95 -0
  188. hyperstack/models/get_discount_response.py +99 -0
  189. hyperstack/models/get_entity_discount_detail_response.py +108 -0
  190. hyperstack/models/get_invites_response_model.py +99 -0
  191. hyperstack/models/get_organization_response_model.py +95 -0
  192. hyperstack/models/get_permissions_response_model.py +99 -0
  193. hyperstack/models/get_policies_response_model.py +99 -0
  194. hyperstack/models/get_rbac_roles_response_model.py +99 -0
  195. hyperstack/models/get_token_payload.py +89 -0
  196. hyperstack/models/get_user_permissions_response_model.py +99 -0
  197. hyperstack/models/get_version_response.py +91 -0
  198. hyperstack/models/getcreditandthresholdinfo.py +91 -0
  199. hyperstack/models/getcreditandthresholdinfoinresponse.py +95 -0
  200. hyperstack/models/gpu.py +95 -0
  201. hyperstack/models/gpu_fields.py +106 -0
  202. hyperstack/models/gpu_list.py +99 -0
  203. hyperstack/models/gpu_region_fields.py +89 -0
  204. hyperstack/models/graph_datetime_value_model.py +89 -0
  205. hyperstack/models/historical_instance.py +101 -0
  206. hyperstack/models/historical_instances_fields.py +110 -0
  207. hyperstack/models/image.py +91 -0
  208. hyperstack/models/image_fields.py +113 -0
  209. hyperstack/models/image_get_response.py +101 -0
  210. hyperstack/models/image_logos.py +99 -0
  211. hyperstack/models/images.py +99 -0
  212. hyperstack/models/import_keypair_payload.py +92 -0
  213. hyperstack/models/import_keypair_response.py +95 -0
  214. hyperstack/models/infrahub_resource_object_response.py +119 -0
  215. hyperstack/models/infrahub_resource_object_response_for_customer.py +109 -0
  216. hyperstack/models/insert_discount_plan_fields.py +112 -0
  217. hyperstack/models/instance.py +95 -0
  218. hyperstack/models/instance_environment_fields.py +99 -0
  219. hyperstack/models/instance_events.py +99 -0
  220. hyperstack/models/instance_events_fields.py +102 -0
  221. hyperstack/models/instance_fields.py +162 -0
  222. hyperstack/models/instance_flavor_fields.py +101 -0
  223. hyperstack/models/instance_image_fields.py +87 -0
  224. hyperstack/models/instance_keypair_fields.py +87 -0
  225. hyperstack/models/instance_overview_fields.py +95 -0
  226. hyperstack/models/instance_resize_payload.py +93 -0
  227. hyperstack/models/instances.py +105 -0
  228. hyperstack/models/instances_summary_fields.py +120 -0
  229. hyperstack/models/internal_environment_fields.py +94 -0
  230. hyperstack/models/internal_instance_fields.py +156 -0
  231. hyperstack/models/internal_instance_flavor_fields.py +104 -0
  232. hyperstack/models/internal_instance_image_fields.py +95 -0
  233. hyperstack/models/internal_instance_keypair_fields.py +98 -0
  234. hyperstack/models/internal_instances_response.py +99 -0
  235. hyperstack/models/internal_security_rules_fields_for_instance.py +104 -0
  236. hyperstack/models/internal_volume_attachment_fields.py +98 -0
  237. hyperstack/models/internal_volume_fields.py +95 -0
  238. hyperstack/models/internal_volumes_response.py +99 -0
  239. hyperstack/models/invite_fields.py +94 -0
  240. hyperstack/models/invite_user_payload.py +88 -0
  241. hyperstack/models/invite_user_response_model.py +95 -0
  242. hyperstack/models/keypair_fields.py +98 -0
  243. hyperstack/models/keypairs.py +105 -0
  244. hyperstack/models/lable_resonse.py +89 -0
  245. hyperstack/models/lastdaycostfields.py +93 -0
  246. hyperstack/models/lastdaycostresponse.py +95 -0
  247. hyperstack/models/logo_get_response.py +91 -0
  248. hyperstack/models/logout_payload.py +87 -0
  249. hyperstack/models/metric_item_fields.py +91 -0
  250. hyperstack/models/metrics_fields.py +116 -0
  251. hyperstack/models/name_available_model.py +91 -0
  252. hyperstack/models/new_configurations_response.py +95 -0
  253. hyperstack/models/new_model_response.py +101 -0
  254. hyperstack/models/new_stock_response.py +99 -0
  255. hyperstack/models/new_stock_retrive_response.py +95 -0
  256. hyperstack/models/new_stock_update_response_model.py +89 -0
  257. hyperstack/models/node_model.py +114 -0
  258. hyperstack/models/node_payload_model.py +97 -0
  259. hyperstack/models/node_power_usage_model.py +120 -0
  260. hyperstack/models/node_response_model.py +97 -0
  261. hyperstack/models/node_stock_payload_model.py +95 -0
  262. hyperstack/models/node_stock_response_model.py +95 -0
  263. hyperstack/models/node_stocks_payload.py +93 -0
  264. hyperstack/models/organization_fields.py +114 -0
  265. hyperstack/models/organization_level_billing_history.py +99 -0
  266. hyperstack/models/organization_level_billing_history_resources.py +97 -0
  267. hyperstack/models/organization_level_billing_history_response_attributes.py +87 -0
  268. hyperstack/models/organization_level_billing_history_response_metrics.py +97 -0
  269. hyperstack/models/organization_level_billing_history_response_model.py +95 -0
  270. hyperstack/models/organization_object_response.py +97 -0
  271. hyperstack/models/organization_thresholdfields.py +95 -0
  272. hyperstack/models/organization_user_response_model.py +112 -0
  273. hyperstack/models/organizationcreditrechargelimitresponse.py +95 -0
  274. hyperstack/models/organizationthresholdsresponse.py +99 -0
  275. hyperstack/models/organizationthresholdupdateresponse.py +95 -0
  276. hyperstack/models/overview_info.py +103 -0
  277. hyperstack/models/pagination_data.py +91 -0
  278. hyperstack/models/payment_details_fields.py +106 -0
  279. hyperstack/models/payment_details_response.py +95 -0
  280. hyperstack/models/payment_initiate_fields.py +87 -0
  281. hyperstack/models/payment_initiate_payload.py +87 -0
  282. hyperstack/models/payment_initiate_response.py +95 -0
  283. hyperstack/models/permission_fields.py +98 -0
  284. hyperstack/models/policy_fields.py +104 -0
  285. hyperstack/models/policy_permission_fields.py +91 -0
  286. hyperstack/models/power_usage_model.py +89 -0
  287. hyperstack/models/pricebook_model.py +100 -0
  288. hyperstack/models/pricebook_resource_object_response.py +107 -0
  289. hyperstack/models/pricebook_resource_object_response_for_customer.py +99 -0
  290. hyperstack/models/profile_fields.py +96 -0
  291. hyperstack/models/profile_list_response.py +99 -0
  292. hyperstack/models/profile_object_fields.py +89 -0
  293. hyperstack/models/rbac_role_detail_response_model.py +95 -0
  294. hyperstack/models/rbac_role_detail_response_model_fixed.py +95 -0
  295. hyperstack/models/rbac_role_field.py +87 -0
  296. hyperstack/models/rbac_role_fields.py +114 -0
  297. hyperstack/models/refresh_token_payload.py +89 -0
  298. hyperstack/models/region_fields.py +91 -0
  299. hyperstack/models/region_payload.py +89 -0
  300. hyperstack/models/region_response.py +95 -0
  301. hyperstack/models/regions.py +99 -0
  302. hyperstack/models/remove_member_from_organization_response_model.py +89 -0
  303. hyperstack/models/remove_member_payload.py +88 -0
  304. hyperstack/models/request_console.py +91 -0
  305. hyperstack/models/resource_billing_events_history_metrics.py +95 -0
  306. hyperstack/models/resource_billing_events_history_response.py +99 -0
  307. hyperstack/models/resource_billing_response_for_customer.py +95 -0
  308. hyperstack/models/resource_level_billing_details_attributes.py +91 -0
  309. hyperstack/models/resource_level_billing_details_metrics.py +101 -0
  310. hyperstack/models/resource_level_billing_details_vm.py +99 -0
  311. hyperstack/models/resource_level_billing_details_volume.py +99 -0
  312. hyperstack/models/resource_level_billing_details_volume_attributes.py +95 -0
  313. hyperstack/models/resource_level_billing_details_volume_metrics.py +95 -0
  314. hyperstack/models/resource_level_billing_history.py +105 -0
  315. hyperstack/models/resource_level_billing_history_resources.py +97 -0
  316. hyperstack/models/resource_level_billing_history_response_attributes.py +93 -0
  317. hyperstack/models/resource_level_billing_history_response_metrics.py +91 -0
  318. hyperstack/models/resource_level_billing_vm_details_resources.py +97 -0
  319. hyperstack/models/resource_level_billing_volume_details_resources.py +97 -0
  320. hyperstack/models/resource_level_graph_billing_detail_volume.py +101 -0
  321. hyperstack/models/resource_level_graph_billing_details_attributes.py +91 -0
  322. hyperstack/models/resource_level_graph_billing_details_metrics.py +97 -0
  323. hyperstack/models/resource_level_graph_billing_details_vm.py +101 -0
  324. hyperstack/models/resource_level_graph_billing_vm_details_resources.py +97 -0
  325. hyperstack/models/resource_level_graph_billing_volume_details_resources.py +97 -0
  326. hyperstack/models/resource_level_vm_billing_details_response_model.py +95 -0
  327. hyperstack/models/resource_level_vm_billing_history_response_model.py +95 -0
  328. hyperstack/models/resource_level_vm_graph_billing_details_response_model.py +95 -0
  329. hyperstack/models/resource_level_volume_billing_details_response_model.py +95 -0
  330. hyperstack/models/resource_level_volume_billing_history_response_model.py +95 -0
  331. hyperstack/models/resource_level_volume_graph_billing_details_response_model.py +95 -0
  332. hyperstack/models/resource_object_response_for_customer.py +93 -0
  333. hyperstack/models/response_model.py +89 -0
  334. hyperstack/models/role_permission_fields.py +91 -0
  335. hyperstack/models/role_policy_fields.py +91 -0
  336. hyperstack/models/security_group_rule.py +95 -0
  337. hyperstack/models/security_group_rule_fields.py +104 -0
  338. hyperstack/models/security_rules_fieldsfor_instance.py +104 -0
  339. hyperstack/models/security_rules_protocol_fields.py +91 -0
  340. hyperstack/models/set_defaults_payload.py +89 -0
  341. hyperstack/models/single_visibility_user_response.py +91 -0
  342. hyperstack/models/snapshot_fields.py +105 -0
  343. hyperstack/models/snapshot_restore_request.py +89 -0
  344. hyperstack/models/snapshot_retrieve.py +95 -0
  345. hyperstack/models/snapshot_retrieve_fields.py +103 -0
  346. hyperstack/models/snapshots.py +105 -0
  347. hyperstack/models/start_deployment.py +95 -0
  348. hyperstack/models/start_deployment_payload.py +93 -0
  349. hyperstack/models/stock_visibility_user_list_response.py +99 -0
  350. hyperstack/models/stock_visibility_user_payload.py +87 -0
  351. hyperstack/models/sub_resource_graph_billing_details_metrics.py +152 -0
  352. hyperstack/models/sub_resources_costs_response_model.py +101 -0
  353. hyperstack/models/sub_resources_graph_billing_history_fields.py +97 -0
  354. hyperstack/models/sub_resources_graph_response_model.py +95 -0
  355. hyperstack/models/subscribeorunsubscribeupdatepayload.py +87 -0
  356. hyperstack/models/success_response_model.py +89 -0
  357. hyperstack/models/template.py +95 -0
  358. hyperstack/models/template_fields.py +98 -0
  359. hyperstack/models/templates.py +99 -0
  360. hyperstack/models/token_fields.py +91 -0
  361. hyperstack/models/update_contract_payload.py +104 -0
  362. hyperstack/models/update_discounts_payload.py +102 -0
  363. hyperstack/models/update_discounts_status_payload.py +87 -0
  364. hyperstack/models/update_environment.py +88 -0
  365. hyperstack/models/update_gpu.py +91 -0
  366. hyperstack/models/update_keypair_name.py +88 -0
  367. hyperstack/models/update_keypairnameresponse.py +95 -0
  368. hyperstack/models/update_organization_payload.py +88 -0
  369. hyperstack/models/update_organization_response_model.py +89 -0
  370. hyperstack/models/update_template.py +91 -0
  371. hyperstack/models/user_default_choice_for_user_fields.py +91 -0
  372. hyperstack/models/user_default_choices_for_user_response.py +99 -0
  373. hyperstack/models/user_permission_fields.py +91 -0
  374. hyperstack/models/user_transfer_payload.py +89 -0
  375. hyperstack/models/userinfopostpayload.py +107 -0
  376. hyperstack/models/users_info_fields.py +114 -0
  377. hyperstack/models/users_info_list_response.py +95 -0
  378. hyperstack/models/verify_api_key_payload.py +87 -0
  379. hyperstack/models/verify_api_key_response_model.py +95 -0
  380. hyperstack/models/virtual_machine_usage.py +93 -0
  381. hyperstack/models/vm_usage_request_payload.py +87 -0
  382. hyperstack/models/vm_usage_response.py +101 -0
  383. hyperstack/models/vncurl.py +95 -0
  384. hyperstack/models/vncurl_fields.py +89 -0
  385. hyperstack/models/volume.py +95 -0
  386. hyperstack/models/volume_attachment_fields.py +98 -0
  387. hyperstack/models/volume_fields.py +116 -0
  388. hyperstack/models/volume_fieldsfor_instance.py +97 -0
  389. hyperstack/models/volume_overview_fields.py +91 -0
  390. hyperstack/models/volume_status_change_fields.py +96 -0
  391. hyperstack/models/volume_types.py +91 -0
  392. hyperstack/models/volumes.py +99 -0
  393. hyperstack/models/volumes_last_status_change_response.py +99 -0
  394. hyperstack/models/warning_mail_log_fields.py +99 -0
  395. hyperstack/models/warning_mail_log_response.py +101 -0
  396. hyperstack/py.typed +0 -0
  397. hyperstack/rest.py +257 -0
  398. hyperstack-1.25.0a0.dist-info/METADATA +23 -0
  399. hyperstack-1.25.0a0.dist-info/RECORD +401 -0
  400. hyperstack-1.25.0a0.dist-info/WHEEL +5 -0
  401. hyperstack-1.25.0a0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1742 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Infrahub-API
5
+
6
+ Leverage the Infrahub API and Hyperstack platform to easily create, manage, and scale powerful GPU virtual machines and their associated resources. Access this SDK to automate the deployment of your workloads and streamline your infrastructure management. To contribute, please raise an issue with a bug report, feature request, feedback, or general inquiry.
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictInt, StrictStr
20
+ from typing import Optional
21
+ from typing_extensions import Annotated
22
+ from ..models.create_volume_payload import CreateVolumePayload
23
+ from ..models.name_available_model import NameAvailableModel
24
+ from ..models.response_model import ResponseModel
25
+ from ..models.volume import Volume
26
+ from ..models.volume_types import VolumeTypes
27
+ from ..models.volumes import Volumes
28
+
29
+ from ..api_client import ApiClient, RequestSerialized
30
+ from ..api_response import ApiResponse
31
+ from ..rest import RESTResponseType
32
+
33
+
34
+ class VolumeApi:
35
+ """NOTE: This class is auto generated by OpenAPI Generator
36
+ Ref: https://openapi-generator.tech
37
+
38
+ Do not edit the class manually.
39
+ """
40
+
41
+ def __init__(self, api_client=None) -> None:
42
+ if api_client is None:
43
+ api_client = ApiClient.get_default()
44
+ self.api_client = api_client
45
+
46
+
47
+ @validate_call
48
+ def create_volume(
49
+ self,
50
+ payload: CreateVolumePayload,
51
+ _request_timeout: Union[
52
+ None,
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Tuple[
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Annotated[StrictFloat, Field(gt=0)]
57
+ ]
58
+ ] = None,
59
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
60
+ _content_type: Optional[StrictStr] = None,
61
+ _headers: Optional[Dict[StrictStr, Any]] = None,
62
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
63
+ ) -> Volume:
64
+ """Create volume
65
+
66
+ Creates a volume that can be attached to a virtual machine, expanding its storage capacity. Specify the volume type and custom configuration in the request body. For additional details on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features).
67
+
68
+ :param payload: (required)
69
+ :type payload: CreateVolumePayload
70
+ :param _request_timeout: timeout setting for this request. If one
71
+ number provided, it will be total request
72
+ timeout. It can also be a pair (tuple) of
73
+ (connection, read) timeouts.
74
+ :type _request_timeout: int, tuple(int, int), optional
75
+ :param _request_auth: set to override the auth_settings for an a single
76
+ request; this effectively ignores the
77
+ authentication in the spec for a single request.
78
+ :type _request_auth: dict, optional
79
+ :param _content_type: force content-type for the request.
80
+ :type _content_type: str, Optional
81
+ :param _headers: set to override the headers for a single
82
+ request; this effectively ignores the headers
83
+ in the spec for a single request.
84
+ :type _headers: dict, optional
85
+ :param _host_index: set to override the host_index for a single
86
+ request; this effectively ignores the host_index
87
+ in the spec for a single request.
88
+ :type _host_index: int, optional
89
+ :return: Returns the result object.
90
+ """ # noqa: E501
91
+
92
+ _param = self._create_volume_serialize(
93
+ payload=payload,
94
+ _request_auth=_request_auth,
95
+ _content_type=_content_type,
96
+ _headers=_headers,
97
+ _host_index=_host_index
98
+ )
99
+
100
+ _response_types_map: Dict[str, Optional[str]] = {
101
+ '200': "Volume",
102
+ '400': "ErrorResponseModel",
103
+ '401': "ErrorResponseModel",
104
+ '404': "ErrorResponseModel",
105
+ '405': "ErrorResponseModel",
106
+ '409': "ErrorResponseModel",
107
+ '500': None,
108
+ }
109
+ response_data = self.api_client.call_api(
110
+ *_param,
111
+ _request_timeout=_request_timeout
112
+ )
113
+ response_data.read()
114
+ return self.api_client.response_deserialize(
115
+ response_data=response_data,
116
+ response_types_map=_response_types_map,
117
+ ).data
118
+
119
+
120
+ @validate_call
121
+ def create_volume_with_http_info(
122
+ self,
123
+ payload: CreateVolumePayload,
124
+ _request_timeout: Union[
125
+ None,
126
+ Annotated[StrictFloat, Field(gt=0)],
127
+ Tuple[
128
+ Annotated[StrictFloat, Field(gt=0)],
129
+ Annotated[StrictFloat, Field(gt=0)]
130
+ ]
131
+ ] = None,
132
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
133
+ _content_type: Optional[StrictStr] = None,
134
+ _headers: Optional[Dict[StrictStr, Any]] = None,
135
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
136
+ ) -> ApiResponse[Volume]:
137
+ """Create volume
138
+
139
+ Creates a volume that can be attached to a virtual machine, expanding its storage capacity. Specify the volume type and custom configuration in the request body. For additional details on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features).
140
+
141
+ :param payload: (required)
142
+ :type payload: CreateVolumePayload
143
+ :param _request_timeout: timeout setting for this request. If one
144
+ number provided, it will be total request
145
+ timeout. It can also be a pair (tuple) of
146
+ (connection, read) timeouts.
147
+ :type _request_timeout: int, tuple(int, int), optional
148
+ :param _request_auth: set to override the auth_settings for an a single
149
+ request; this effectively ignores the
150
+ authentication in the spec for a single request.
151
+ :type _request_auth: dict, optional
152
+ :param _content_type: force content-type for the request.
153
+ :type _content_type: str, Optional
154
+ :param _headers: set to override the headers for a single
155
+ request; this effectively ignores the headers
156
+ in the spec for a single request.
157
+ :type _headers: dict, optional
158
+ :param _host_index: set to override the host_index for a single
159
+ request; this effectively ignores the host_index
160
+ in the spec for a single request.
161
+ :type _host_index: int, optional
162
+ :return: Returns the result object.
163
+ """ # noqa: E501
164
+
165
+ _param = self._create_volume_serialize(
166
+ payload=payload,
167
+ _request_auth=_request_auth,
168
+ _content_type=_content_type,
169
+ _headers=_headers,
170
+ _host_index=_host_index
171
+ )
172
+
173
+ _response_types_map: Dict[str, Optional[str]] = {
174
+ '200': "Volume",
175
+ '400': "ErrorResponseModel",
176
+ '401': "ErrorResponseModel",
177
+ '404': "ErrorResponseModel",
178
+ '405': "ErrorResponseModel",
179
+ '409': "ErrorResponseModel",
180
+ '500': None,
181
+ }
182
+ response_data = self.api_client.call_api(
183
+ *_param,
184
+ _request_timeout=_request_timeout
185
+ )
186
+ response_data.read()
187
+ return self.api_client.response_deserialize(
188
+ response_data=response_data,
189
+ response_types_map=_response_types_map,
190
+ )
191
+
192
+
193
+ @validate_call
194
+ def create_volume_without_preload_content(
195
+ self,
196
+ payload: CreateVolumePayload,
197
+ _request_timeout: Union[
198
+ None,
199
+ Annotated[StrictFloat, Field(gt=0)],
200
+ Tuple[
201
+ Annotated[StrictFloat, Field(gt=0)],
202
+ Annotated[StrictFloat, Field(gt=0)]
203
+ ]
204
+ ] = None,
205
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
206
+ _content_type: Optional[StrictStr] = None,
207
+ _headers: Optional[Dict[StrictStr, Any]] = None,
208
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
209
+ ) -> RESTResponseType:
210
+ """Create volume
211
+
212
+ Creates a volume that can be attached to a virtual machine, expanding its storage capacity. Specify the volume type and custom configuration in the request body. For additional details on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features).
213
+
214
+ :param payload: (required)
215
+ :type payload: CreateVolumePayload
216
+ :param _request_timeout: timeout setting for this request. If one
217
+ number provided, it will be total request
218
+ timeout. It can also be a pair (tuple) of
219
+ (connection, read) timeouts.
220
+ :type _request_timeout: int, tuple(int, int), optional
221
+ :param _request_auth: set to override the auth_settings for an a single
222
+ request; this effectively ignores the
223
+ authentication in the spec for a single request.
224
+ :type _request_auth: dict, optional
225
+ :param _content_type: force content-type for the request.
226
+ :type _content_type: str, Optional
227
+ :param _headers: set to override the headers for a single
228
+ request; this effectively ignores the headers
229
+ in the spec for a single request.
230
+ :type _headers: dict, optional
231
+ :param _host_index: set to override the host_index for a single
232
+ request; this effectively ignores the host_index
233
+ in the spec for a single request.
234
+ :type _host_index: int, optional
235
+ :return: Returns the result object.
236
+ """ # noqa: E501
237
+
238
+ _param = self._create_volume_serialize(
239
+ payload=payload,
240
+ _request_auth=_request_auth,
241
+ _content_type=_content_type,
242
+ _headers=_headers,
243
+ _host_index=_host_index
244
+ )
245
+
246
+ _response_types_map: Dict[str, Optional[str]] = {
247
+ '200': "Volume",
248
+ '400': "ErrorResponseModel",
249
+ '401': "ErrorResponseModel",
250
+ '404': "ErrorResponseModel",
251
+ '405': "ErrorResponseModel",
252
+ '409': "ErrorResponseModel",
253
+ '500': None,
254
+ }
255
+ response_data = self.api_client.call_api(
256
+ *_param,
257
+ _request_timeout=_request_timeout
258
+ )
259
+ return response_data.response
260
+
261
+
262
+ def _create_volume_serialize(
263
+ self,
264
+ payload,
265
+ _request_auth,
266
+ _content_type,
267
+ _headers,
268
+ _host_index,
269
+ ) -> RequestSerialized:
270
+
271
+ _host = None
272
+
273
+ _collection_formats: Dict[str, str] = {
274
+ }
275
+
276
+ _path_params: Dict[str, str] = {}
277
+ _query_params: List[Tuple[str, str]] = []
278
+ _header_params: Dict[str, Optional[str]] = _headers or {}
279
+ _form_params: List[Tuple[str, str]] = []
280
+ _files: Dict[
281
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
282
+ ] = {}
283
+ _body_params: Optional[bytes] = None
284
+
285
+ # process the path parameters
286
+ # process the query parameters
287
+ # process the header parameters
288
+ # process the form parameters
289
+ # process the body parameter
290
+ if payload is not None:
291
+ _body_params = payload
292
+
293
+
294
+ # set the HTTP header `Accept`
295
+ if 'Accept' not in _header_params:
296
+ _header_params['Accept'] = self.api_client.select_header_accept(
297
+ [
298
+ 'application/json'
299
+ ]
300
+ )
301
+
302
+ # set the HTTP header `Content-Type`
303
+ if _content_type:
304
+ _header_params['Content-Type'] = _content_type
305
+ else:
306
+ _default_content_type = (
307
+ self.api_client.select_header_content_type(
308
+ [
309
+ 'application/json'
310
+ ]
311
+ )
312
+ )
313
+ if _default_content_type is not None:
314
+ _header_params['Content-Type'] = _default_content_type
315
+
316
+ # authentication setting
317
+ _auth_settings: List[str] = [
318
+ 'apiKey',
319
+ 'accessToken'
320
+ ]
321
+
322
+ return self.api_client.param_serialize(
323
+ method='POST',
324
+ resource_path='/core/volumes',
325
+ path_params=_path_params,
326
+ query_params=_query_params,
327
+ header_params=_header_params,
328
+ body=_body_params,
329
+ post_params=_form_params,
330
+ files=_files,
331
+ auth_settings=_auth_settings,
332
+ collection_formats=_collection_formats,
333
+ _host=_host,
334
+ _request_auth=_request_auth
335
+ )
336
+
337
+
338
+
339
+
340
+ @validate_call
341
+ def delete_volume(
342
+ self,
343
+ id: StrictInt,
344
+ _request_timeout: Union[
345
+ None,
346
+ Annotated[StrictFloat, Field(gt=0)],
347
+ Tuple[
348
+ Annotated[StrictFloat, Field(gt=0)],
349
+ Annotated[StrictFloat, Field(gt=0)]
350
+ ]
351
+ ] = None,
352
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
353
+ _content_type: Optional[StrictStr] = None,
354
+ _headers: Optional[Dict[StrictStr, Any]] = None,
355
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
356
+ ) -> ResponseModel:
357
+ """Delete volume
358
+
359
+ Deletes a volume permanently. Provide the volume ID in the path to specify the volume to be deleted.
360
+
361
+ :param id: (required)
362
+ :type id: int
363
+ :param _request_timeout: timeout setting for this request. If one
364
+ number provided, it will be total request
365
+ timeout. It can also be a pair (tuple) of
366
+ (connection, read) timeouts.
367
+ :type _request_timeout: int, tuple(int, int), optional
368
+ :param _request_auth: set to override the auth_settings for an a single
369
+ request; this effectively ignores the
370
+ authentication in the spec for a single request.
371
+ :type _request_auth: dict, optional
372
+ :param _content_type: force content-type for the request.
373
+ :type _content_type: str, Optional
374
+ :param _headers: set to override the headers for a single
375
+ request; this effectively ignores the headers
376
+ in the spec for a single request.
377
+ :type _headers: dict, optional
378
+ :param _host_index: set to override the host_index for a single
379
+ request; this effectively ignores the host_index
380
+ in the spec for a single request.
381
+ :type _host_index: int, optional
382
+ :return: Returns the result object.
383
+ """ # noqa: E501
384
+
385
+ _param = self._delete_volume_serialize(
386
+ id=id,
387
+ _request_auth=_request_auth,
388
+ _content_type=_content_type,
389
+ _headers=_headers,
390
+ _host_index=_host_index
391
+ )
392
+
393
+ _response_types_map: Dict[str, Optional[str]] = {
394
+ '200': "ResponseModel",
395
+ '400': "ErrorResponseModel",
396
+ '401': "ErrorResponseModel",
397
+ '404': "ErrorResponseModel",
398
+ '500': None,
399
+ }
400
+ response_data = self.api_client.call_api(
401
+ *_param,
402
+ _request_timeout=_request_timeout
403
+ )
404
+ response_data.read()
405
+ return self.api_client.response_deserialize(
406
+ response_data=response_data,
407
+ response_types_map=_response_types_map,
408
+ ).data
409
+
410
+
411
+ @validate_call
412
+ def delete_volume_with_http_info(
413
+ self,
414
+ id: StrictInt,
415
+ _request_timeout: Union[
416
+ None,
417
+ Annotated[StrictFloat, Field(gt=0)],
418
+ Tuple[
419
+ Annotated[StrictFloat, Field(gt=0)],
420
+ Annotated[StrictFloat, Field(gt=0)]
421
+ ]
422
+ ] = None,
423
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
424
+ _content_type: Optional[StrictStr] = None,
425
+ _headers: Optional[Dict[StrictStr, Any]] = None,
426
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
427
+ ) -> ApiResponse[ResponseModel]:
428
+ """Delete volume
429
+
430
+ Deletes a volume permanently. Provide the volume ID in the path to specify the volume to be deleted.
431
+
432
+ :param id: (required)
433
+ :type id: int
434
+ :param _request_timeout: timeout setting for this request. If one
435
+ number provided, it will be total request
436
+ timeout. It can also be a pair (tuple) of
437
+ (connection, read) timeouts.
438
+ :type _request_timeout: int, tuple(int, int), optional
439
+ :param _request_auth: set to override the auth_settings for an a single
440
+ request; this effectively ignores the
441
+ authentication in the spec for a single request.
442
+ :type _request_auth: dict, optional
443
+ :param _content_type: force content-type for the request.
444
+ :type _content_type: str, Optional
445
+ :param _headers: set to override the headers for a single
446
+ request; this effectively ignores the headers
447
+ in the spec for a single request.
448
+ :type _headers: dict, optional
449
+ :param _host_index: set to override the host_index for a single
450
+ request; this effectively ignores the host_index
451
+ in the spec for a single request.
452
+ :type _host_index: int, optional
453
+ :return: Returns the result object.
454
+ """ # noqa: E501
455
+
456
+ _param = self._delete_volume_serialize(
457
+ id=id,
458
+ _request_auth=_request_auth,
459
+ _content_type=_content_type,
460
+ _headers=_headers,
461
+ _host_index=_host_index
462
+ )
463
+
464
+ _response_types_map: Dict[str, Optional[str]] = {
465
+ '200': "ResponseModel",
466
+ '400': "ErrorResponseModel",
467
+ '401': "ErrorResponseModel",
468
+ '404': "ErrorResponseModel",
469
+ '500': None,
470
+ }
471
+ response_data = self.api_client.call_api(
472
+ *_param,
473
+ _request_timeout=_request_timeout
474
+ )
475
+ response_data.read()
476
+ return self.api_client.response_deserialize(
477
+ response_data=response_data,
478
+ response_types_map=_response_types_map,
479
+ )
480
+
481
+
482
+ @validate_call
483
+ def delete_volume_without_preload_content(
484
+ self,
485
+ id: StrictInt,
486
+ _request_timeout: Union[
487
+ None,
488
+ Annotated[StrictFloat, Field(gt=0)],
489
+ Tuple[
490
+ Annotated[StrictFloat, Field(gt=0)],
491
+ Annotated[StrictFloat, Field(gt=0)]
492
+ ]
493
+ ] = None,
494
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
495
+ _content_type: Optional[StrictStr] = None,
496
+ _headers: Optional[Dict[StrictStr, Any]] = None,
497
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
498
+ ) -> RESTResponseType:
499
+ """Delete volume
500
+
501
+ Deletes a volume permanently. Provide the volume ID in the path to specify the volume to be deleted.
502
+
503
+ :param id: (required)
504
+ :type id: int
505
+ :param _request_timeout: timeout setting for this request. If one
506
+ number provided, it will be total request
507
+ timeout. It can also be a pair (tuple) of
508
+ (connection, read) timeouts.
509
+ :type _request_timeout: int, tuple(int, int), optional
510
+ :param _request_auth: set to override the auth_settings for an a single
511
+ request; this effectively ignores the
512
+ authentication in the spec for a single request.
513
+ :type _request_auth: dict, optional
514
+ :param _content_type: force content-type for the request.
515
+ :type _content_type: str, Optional
516
+ :param _headers: set to override the headers for a single
517
+ request; this effectively ignores the headers
518
+ in the spec for a single request.
519
+ :type _headers: dict, optional
520
+ :param _host_index: set to override the host_index for a single
521
+ request; this effectively ignores the host_index
522
+ in the spec for a single request.
523
+ :type _host_index: int, optional
524
+ :return: Returns the result object.
525
+ """ # noqa: E501
526
+
527
+ _param = self._delete_volume_serialize(
528
+ id=id,
529
+ _request_auth=_request_auth,
530
+ _content_type=_content_type,
531
+ _headers=_headers,
532
+ _host_index=_host_index
533
+ )
534
+
535
+ _response_types_map: Dict[str, Optional[str]] = {
536
+ '200': "ResponseModel",
537
+ '400': "ErrorResponseModel",
538
+ '401': "ErrorResponseModel",
539
+ '404': "ErrorResponseModel",
540
+ '500': None,
541
+ }
542
+ response_data = self.api_client.call_api(
543
+ *_param,
544
+ _request_timeout=_request_timeout
545
+ )
546
+ return response_data.response
547
+
548
+
549
+ def _delete_volume_serialize(
550
+ self,
551
+ id,
552
+ _request_auth,
553
+ _content_type,
554
+ _headers,
555
+ _host_index,
556
+ ) -> RequestSerialized:
557
+
558
+ _host = None
559
+
560
+ _collection_formats: Dict[str, str] = {
561
+ }
562
+
563
+ _path_params: Dict[str, str] = {}
564
+ _query_params: List[Tuple[str, str]] = []
565
+ _header_params: Dict[str, Optional[str]] = _headers or {}
566
+ _form_params: List[Tuple[str, str]] = []
567
+ _files: Dict[
568
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
569
+ ] = {}
570
+ _body_params: Optional[bytes] = None
571
+
572
+ # process the path parameters
573
+ if id is not None:
574
+ _path_params['id'] = id
575
+ # process the query parameters
576
+ # process the header parameters
577
+ # process the form parameters
578
+ # process the body parameter
579
+
580
+
581
+ # set the HTTP header `Accept`
582
+ if 'Accept' not in _header_params:
583
+ _header_params['Accept'] = self.api_client.select_header_accept(
584
+ [
585
+ 'application/json'
586
+ ]
587
+ )
588
+
589
+
590
+ # authentication setting
591
+ _auth_settings: List[str] = [
592
+ 'apiKey',
593
+ 'accessToken'
594
+ ]
595
+
596
+ return self.api_client.param_serialize(
597
+ method='DELETE',
598
+ resource_path='/core/volumes/{id}',
599
+ path_params=_path_params,
600
+ query_params=_query_params,
601
+ header_params=_header_params,
602
+ body=_body_params,
603
+ post_params=_form_params,
604
+ files=_files,
605
+ auth_settings=_auth_settings,
606
+ collection_formats=_collection_formats,
607
+ _host=_host,
608
+ _request_auth=_request_auth
609
+ )
610
+
611
+
612
+
613
+
614
+ @validate_call
615
+ def fetch_volume_details(
616
+ self,
617
+ volume_id: StrictInt,
618
+ _request_timeout: Union[
619
+ None,
620
+ Annotated[StrictFloat, Field(gt=0)],
621
+ Tuple[
622
+ Annotated[StrictFloat, Field(gt=0)],
623
+ Annotated[StrictFloat, Field(gt=0)]
624
+ ]
625
+ ] = None,
626
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
627
+ _content_type: Optional[StrictStr] = None,
628
+ _headers: Optional[Dict[StrictStr, Any]] = None,
629
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
630
+ ) -> Volumes:
631
+ """Fetch Volume Details
632
+
633
+ Fetch volume details for specific volume. This endpoint returns id, name, volume size, volume type, status, description, image_id, os_image, created_at, updated_at etc.
634
+
635
+ :param volume_id: (required)
636
+ :type volume_id: int
637
+ :param _request_timeout: timeout setting for this request. If one
638
+ number provided, it will be total request
639
+ timeout. It can also be a pair (tuple) of
640
+ (connection, read) timeouts.
641
+ :type _request_timeout: int, tuple(int, int), optional
642
+ :param _request_auth: set to override the auth_settings for an a single
643
+ request; this effectively ignores the
644
+ authentication in the spec for a single request.
645
+ :type _request_auth: dict, optional
646
+ :param _content_type: force content-type for the request.
647
+ :type _content_type: str, Optional
648
+ :param _headers: set to override the headers for a single
649
+ request; this effectively ignores the headers
650
+ in the spec for a single request.
651
+ :type _headers: dict, optional
652
+ :param _host_index: set to override the host_index for a single
653
+ request; this effectively ignores the host_index
654
+ in the spec for a single request.
655
+ :type _host_index: int, optional
656
+ :return: Returns the result object.
657
+ """ # noqa: E501
658
+
659
+ _param = self._fetch_volume_details_serialize(
660
+ volume_id=volume_id,
661
+ _request_auth=_request_auth,
662
+ _content_type=_content_type,
663
+ _headers=_headers,
664
+ _host_index=_host_index
665
+ )
666
+
667
+ _response_types_map: Dict[str, Optional[str]] = {
668
+ '200': "Volumes",
669
+ '400': "ErrorResponseModel",
670
+ '401': "ErrorResponseModel",
671
+ '403': "ErrorResponseModel",
672
+ '405': "ErrorResponseModel",
673
+ '500': None,
674
+ }
675
+ response_data = self.api_client.call_api(
676
+ *_param,
677
+ _request_timeout=_request_timeout
678
+ )
679
+ response_data.read()
680
+ return self.api_client.response_deserialize(
681
+ response_data=response_data,
682
+ response_types_map=_response_types_map,
683
+ ).data
684
+
685
+
686
+ @validate_call
687
+ def fetch_volume_details_with_http_info(
688
+ self,
689
+ volume_id: StrictInt,
690
+ _request_timeout: Union[
691
+ None,
692
+ Annotated[StrictFloat, Field(gt=0)],
693
+ Tuple[
694
+ Annotated[StrictFloat, Field(gt=0)],
695
+ Annotated[StrictFloat, Field(gt=0)]
696
+ ]
697
+ ] = None,
698
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
699
+ _content_type: Optional[StrictStr] = None,
700
+ _headers: Optional[Dict[StrictStr, Any]] = None,
701
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
702
+ ) -> ApiResponse[Volumes]:
703
+ """Fetch Volume Details
704
+
705
+ Fetch volume details for specific volume. This endpoint returns id, name, volume size, volume type, status, description, image_id, os_image, created_at, updated_at etc.
706
+
707
+ :param volume_id: (required)
708
+ :type volume_id: int
709
+ :param _request_timeout: timeout setting for this request. If one
710
+ number provided, it will be total request
711
+ timeout. It can also be a pair (tuple) of
712
+ (connection, read) timeouts.
713
+ :type _request_timeout: int, tuple(int, int), optional
714
+ :param _request_auth: set to override the auth_settings for an a single
715
+ request; this effectively ignores the
716
+ authentication in the spec for a single request.
717
+ :type _request_auth: dict, optional
718
+ :param _content_type: force content-type for the request.
719
+ :type _content_type: str, Optional
720
+ :param _headers: set to override the headers for a single
721
+ request; this effectively ignores the headers
722
+ in the spec for a single request.
723
+ :type _headers: dict, optional
724
+ :param _host_index: set to override the host_index for a single
725
+ request; this effectively ignores the host_index
726
+ in the spec for a single request.
727
+ :type _host_index: int, optional
728
+ :return: Returns the result object.
729
+ """ # noqa: E501
730
+
731
+ _param = self._fetch_volume_details_serialize(
732
+ volume_id=volume_id,
733
+ _request_auth=_request_auth,
734
+ _content_type=_content_type,
735
+ _headers=_headers,
736
+ _host_index=_host_index
737
+ )
738
+
739
+ _response_types_map: Dict[str, Optional[str]] = {
740
+ '200': "Volumes",
741
+ '400': "ErrorResponseModel",
742
+ '401': "ErrorResponseModel",
743
+ '403': "ErrorResponseModel",
744
+ '405': "ErrorResponseModel",
745
+ '500': None,
746
+ }
747
+ response_data = self.api_client.call_api(
748
+ *_param,
749
+ _request_timeout=_request_timeout
750
+ )
751
+ response_data.read()
752
+ return self.api_client.response_deserialize(
753
+ response_data=response_data,
754
+ response_types_map=_response_types_map,
755
+ )
756
+
757
+
758
+ @validate_call
759
+ def fetch_volume_details_without_preload_content(
760
+ self,
761
+ volume_id: StrictInt,
762
+ _request_timeout: Union[
763
+ None,
764
+ Annotated[StrictFloat, Field(gt=0)],
765
+ Tuple[
766
+ Annotated[StrictFloat, Field(gt=0)],
767
+ Annotated[StrictFloat, Field(gt=0)]
768
+ ]
769
+ ] = None,
770
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
771
+ _content_type: Optional[StrictStr] = None,
772
+ _headers: Optional[Dict[StrictStr, Any]] = None,
773
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
774
+ ) -> RESTResponseType:
775
+ """Fetch Volume Details
776
+
777
+ Fetch volume details for specific volume. This endpoint returns id, name, volume size, volume type, status, description, image_id, os_image, created_at, updated_at etc.
778
+
779
+ :param volume_id: (required)
780
+ :type volume_id: int
781
+ :param _request_timeout: timeout setting for this request. If one
782
+ number provided, it will be total request
783
+ timeout. It can also be a pair (tuple) of
784
+ (connection, read) timeouts.
785
+ :type _request_timeout: int, tuple(int, int), optional
786
+ :param _request_auth: set to override the auth_settings for an a single
787
+ request; this effectively ignores the
788
+ authentication in the spec for a single request.
789
+ :type _request_auth: dict, optional
790
+ :param _content_type: force content-type for the request.
791
+ :type _content_type: str, Optional
792
+ :param _headers: set to override the headers for a single
793
+ request; this effectively ignores the headers
794
+ in the spec for a single request.
795
+ :type _headers: dict, optional
796
+ :param _host_index: set to override the host_index for a single
797
+ request; this effectively ignores the host_index
798
+ in the spec for a single request.
799
+ :type _host_index: int, optional
800
+ :return: Returns the result object.
801
+ """ # noqa: E501
802
+
803
+ _param = self._fetch_volume_details_serialize(
804
+ volume_id=volume_id,
805
+ _request_auth=_request_auth,
806
+ _content_type=_content_type,
807
+ _headers=_headers,
808
+ _host_index=_host_index
809
+ )
810
+
811
+ _response_types_map: Dict[str, Optional[str]] = {
812
+ '200': "Volumes",
813
+ '400': "ErrorResponseModel",
814
+ '401': "ErrorResponseModel",
815
+ '403': "ErrorResponseModel",
816
+ '405': "ErrorResponseModel",
817
+ '500': None,
818
+ }
819
+ response_data = self.api_client.call_api(
820
+ *_param,
821
+ _request_timeout=_request_timeout
822
+ )
823
+ return response_data.response
824
+
825
+
826
+ def _fetch_volume_details_serialize(
827
+ self,
828
+ volume_id,
829
+ _request_auth,
830
+ _content_type,
831
+ _headers,
832
+ _host_index,
833
+ ) -> RequestSerialized:
834
+
835
+ _host = None
836
+
837
+ _collection_formats: Dict[str, str] = {
838
+ }
839
+
840
+ _path_params: Dict[str, str] = {}
841
+ _query_params: List[Tuple[str, str]] = []
842
+ _header_params: Dict[str, Optional[str]] = _headers or {}
843
+ _form_params: List[Tuple[str, str]] = []
844
+ _files: Dict[
845
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
846
+ ] = {}
847
+ _body_params: Optional[bytes] = None
848
+
849
+ # process the path parameters
850
+ if volume_id is not None:
851
+ _path_params['volume_id'] = volume_id
852
+ # process the query parameters
853
+ # process the header parameters
854
+ # process the form parameters
855
+ # process the body parameter
856
+
857
+
858
+ # set the HTTP header `Accept`
859
+ if 'Accept' not in _header_params:
860
+ _header_params['Accept'] = self.api_client.select_header_accept(
861
+ [
862
+ 'application/json'
863
+ ]
864
+ )
865
+
866
+
867
+ # authentication setting
868
+ _auth_settings: List[str] = [
869
+ 'apiKey',
870
+ 'accessToken'
871
+ ]
872
+
873
+ return self.api_client.param_serialize(
874
+ method='GET',
875
+ resource_path='/core/volume/{volume_id}',
876
+ path_params=_path_params,
877
+ query_params=_query_params,
878
+ header_params=_header_params,
879
+ body=_body_params,
880
+ post_params=_form_params,
881
+ files=_files,
882
+ auth_settings=_auth_settings,
883
+ collection_formats=_collection_formats,
884
+ _host=_host,
885
+ _request_auth=_request_auth
886
+ )
887
+
888
+
889
+
890
+
891
+ @validate_call
892
+ def fetch_volume_name_availability(
893
+ self,
894
+ name: StrictStr,
895
+ _request_timeout: Union[
896
+ None,
897
+ Annotated[StrictFloat, Field(gt=0)],
898
+ Tuple[
899
+ Annotated[StrictFloat, Field(gt=0)],
900
+ Annotated[StrictFloat, Field(gt=0)]
901
+ ]
902
+ ] = None,
903
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
904
+ _content_type: Optional[StrictStr] = None,
905
+ _headers: Optional[Dict[StrictStr, Any]] = None,
906
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
907
+ ) -> NameAvailableModel:
908
+ """Fetch volume name availability
909
+
910
+ Check if a Volume name is available
911
+
912
+ :param name: (required)
913
+ :type name: str
914
+ :param _request_timeout: timeout setting for this request. If one
915
+ number provided, it will be total request
916
+ timeout. It can also be a pair (tuple) of
917
+ (connection, read) timeouts.
918
+ :type _request_timeout: int, tuple(int, int), optional
919
+ :param _request_auth: set to override the auth_settings for an a single
920
+ request; this effectively ignores the
921
+ authentication in the spec for a single request.
922
+ :type _request_auth: dict, optional
923
+ :param _content_type: force content-type for the request.
924
+ :type _content_type: str, Optional
925
+ :param _headers: set to override the headers for a single
926
+ request; this effectively ignores the headers
927
+ in the spec for a single request.
928
+ :type _headers: dict, optional
929
+ :param _host_index: set to override the host_index for a single
930
+ request; this effectively ignores the host_index
931
+ in the spec for a single request.
932
+ :type _host_index: int, optional
933
+ :return: Returns the result object.
934
+ """ # noqa: E501
935
+
936
+ _param = self._fetch_volume_name_availability_serialize(
937
+ name=name,
938
+ _request_auth=_request_auth,
939
+ _content_type=_content_type,
940
+ _headers=_headers,
941
+ _host_index=_host_index
942
+ )
943
+
944
+ _response_types_map: Dict[str, Optional[str]] = {
945
+ '200': "NameAvailableModel",
946
+ '400': "ErrorResponseModel",
947
+ '401': "ErrorResponseModel",
948
+ '404': "ErrorResponseModel",
949
+ '500': None,
950
+ }
951
+ response_data = self.api_client.call_api(
952
+ *_param,
953
+ _request_timeout=_request_timeout
954
+ )
955
+ response_data.read()
956
+ return self.api_client.response_deserialize(
957
+ response_data=response_data,
958
+ response_types_map=_response_types_map,
959
+ ).data
960
+
961
+
962
+ @validate_call
963
+ def fetch_volume_name_availability_with_http_info(
964
+ self,
965
+ name: StrictStr,
966
+ _request_timeout: Union[
967
+ None,
968
+ Annotated[StrictFloat, Field(gt=0)],
969
+ Tuple[
970
+ Annotated[StrictFloat, Field(gt=0)],
971
+ Annotated[StrictFloat, Field(gt=0)]
972
+ ]
973
+ ] = None,
974
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
975
+ _content_type: Optional[StrictStr] = None,
976
+ _headers: Optional[Dict[StrictStr, Any]] = None,
977
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
978
+ ) -> ApiResponse[NameAvailableModel]:
979
+ """Fetch volume name availability
980
+
981
+ Check if a Volume name is available
982
+
983
+ :param name: (required)
984
+ :type name: str
985
+ :param _request_timeout: timeout setting for this request. If one
986
+ number provided, it will be total request
987
+ timeout. It can also be a pair (tuple) of
988
+ (connection, read) timeouts.
989
+ :type _request_timeout: int, tuple(int, int), optional
990
+ :param _request_auth: set to override the auth_settings for an a single
991
+ request; this effectively ignores the
992
+ authentication in the spec for a single request.
993
+ :type _request_auth: dict, optional
994
+ :param _content_type: force content-type for the request.
995
+ :type _content_type: str, Optional
996
+ :param _headers: set to override the headers for a single
997
+ request; this effectively ignores the headers
998
+ in the spec for a single request.
999
+ :type _headers: dict, optional
1000
+ :param _host_index: set to override the host_index for a single
1001
+ request; this effectively ignores the host_index
1002
+ in the spec for a single request.
1003
+ :type _host_index: int, optional
1004
+ :return: Returns the result object.
1005
+ """ # noqa: E501
1006
+
1007
+ _param = self._fetch_volume_name_availability_serialize(
1008
+ name=name,
1009
+ _request_auth=_request_auth,
1010
+ _content_type=_content_type,
1011
+ _headers=_headers,
1012
+ _host_index=_host_index
1013
+ )
1014
+
1015
+ _response_types_map: Dict[str, Optional[str]] = {
1016
+ '200': "NameAvailableModel",
1017
+ '400': "ErrorResponseModel",
1018
+ '401': "ErrorResponseModel",
1019
+ '404': "ErrorResponseModel",
1020
+ '500': None,
1021
+ }
1022
+ response_data = self.api_client.call_api(
1023
+ *_param,
1024
+ _request_timeout=_request_timeout
1025
+ )
1026
+ response_data.read()
1027
+ return self.api_client.response_deserialize(
1028
+ response_data=response_data,
1029
+ response_types_map=_response_types_map,
1030
+ )
1031
+
1032
+
1033
+ @validate_call
1034
+ def fetch_volume_name_availability_without_preload_content(
1035
+ self,
1036
+ name: StrictStr,
1037
+ _request_timeout: Union[
1038
+ None,
1039
+ Annotated[StrictFloat, Field(gt=0)],
1040
+ Tuple[
1041
+ Annotated[StrictFloat, Field(gt=0)],
1042
+ Annotated[StrictFloat, Field(gt=0)]
1043
+ ]
1044
+ ] = None,
1045
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1046
+ _content_type: Optional[StrictStr] = None,
1047
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1048
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1049
+ ) -> RESTResponseType:
1050
+ """Fetch volume name availability
1051
+
1052
+ Check if a Volume name is available
1053
+
1054
+ :param name: (required)
1055
+ :type name: str
1056
+ :param _request_timeout: timeout setting for this request. If one
1057
+ number provided, it will be total request
1058
+ timeout. It can also be a pair (tuple) of
1059
+ (connection, read) timeouts.
1060
+ :type _request_timeout: int, tuple(int, int), optional
1061
+ :param _request_auth: set to override the auth_settings for an a single
1062
+ request; this effectively ignores the
1063
+ authentication in the spec for a single request.
1064
+ :type _request_auth: dict, optional
1065
+ :param _content_type: force content-type for the request.
1066
+ :type _content_type: str, Optional
1067
+ :param _headers: set to override the headers for a single
1068
+ request; this effectively ignores the headers
1069
+ in the spec for a single request.
1070
+ :type _headers: dict, optional
1071
+ :param _host_index: set to override the host_index for a single
1072
+ request; this effectively ignores the host_index
1073
+ in the spec for a single request.
1074
+ :type _host_index: int, optional
1075
+ :return: Returns the result object.
1076
+ """ # noqa: E501
1077
+
1078
+ _param = self._fetch_volume_name_availability_serialize(
1079
+ name=name,
1080
+ _request_auth=_request_auth,
1081
+ _content_type=_content_type,
1082
+ _headers=_headers,
1083
+ _host_index=_host_index
1084
+ )
1085
+
1086
+ _response_types_map: Dict[str, Optional[str]] = {
1087
+ '200': "NameAvailableModel",
1088
+ '400': "ErrorResponseModel",
1089
+ '401': "ErrorResponseModel",
1090
+ '404': "ErrorResponseModel",
1091
+ '500': None,
1092
+ }
1093
+ response_data = self.api_client.call_api(
1094
+ *_param,
1095
+ _request_timeout=_request_timeout
1096
+ )
1097
+ return response_data.response
1098
+
1099
+
1100
+ def _fetch_volume_name_availability_serialize(
1101
+ self,
1102
+ name,
1103
+ _request_auth,
1104
+ _content_type,
1105
+ _headers,
1106
+ _host_index,
1107
+ ) -> RequestSerialized:
1108
+
1109
+ _host = None
1110
+
1111
+ _collection_formats: Dict[str, str] = {
1112
+ }
1113
+
1114
+ _path_params: Dict[str, str] = {}
1115
+ _query_params: List[Tuple[str, str]] = []
1116
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1117
+ _form_params: List[Tuple[str, str]] = []
1118
+ _files: Dict[
1119
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1120
+ ] = {}
1121
+ _body_params: Optional[bytes] = None
1122
+
1123
+ # process the path parameters
1124
+ if name is not None:
1125
+ _path_params['name'] = name
1126
+ # process the query parameters
1127
+ # process the header parameters
1128
+ # process the form parameters
1129
+ # process the body parameter
1130
+
1131
+
1132
+ # set the HTTP header `Accept`
1133
+ if 'Accept' not in _header_params:
1134
+ _header_params['Accept'] = self.api_client.select_header_accept(
1135
+ [
1136
+ 'application/json'
1137
+ ]
1138
+ )
1139
+
1140
+
1141
+ # authentication setting
1142
+ _auth_settings: List[str] = [
1143
+ 'apiKey',
1144
+ 'accessToken'
1145
+ ]
1146
+
1147
+ return self.api_client.param_serialize(
1148
+ method='GET',
1149
+ resource_path='/core/volume/name-availability/{name}',
1150
+ path_params=_path_params,
1151
+ query_params=_query_params,
1152
+ header_params=_header_params,
1153
+ body=_body_params,
1154
+ post_params=_form_params,
1155
+ files=_files,
1156
+ auth_settings=_auth_settings,
1157
+ collection_formats=_collection_formats,
1158
+ _host=_host,
1159
+ _request_auth=_request_auth
1160
+ )
1161
+
1162
+
1163
+
1164
+
1165
+ @validate_call
1166
+ def list_volume_types(
1167
+ self,
1168
+ _request_timeout: Union[
1169
+ None,
1170
+ Annotated[StrictFloat, Field(gt=0)],
1171
+ Tuple[
1172
+ Annotated[StrictFloat, Field(gt=0)],
1173
+ Annotated[StrictFloat, Field(gt=0)]
1174
+ ]
1175
+ ] = None,
1176
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1177
+ _content_type: Optional[StrictStr] = None,
1178
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1179
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1180
+ ) -> VolumeTypes:
1181
+ """List volume types
1182
+
1183
+ Retrieves a list of available volume types that can be used in the creation of a new volume.
1184
+
1185
+ :param _request_timeout: timeout setting for this request. If one
1186
+ number provided, it will be total request
1187
+ timeout. It can also be a pair (tuple) of
1188
+ (connection, read) timeouts.
1189
+ :type _request_timeout: int, tuple(int, int), optional
1190
+ :param _request_auth: set to override the auth_settings for an a single
1191
+ request; this effectively ignores the
1192
+ authentication in the spec for a single request.
1193
+ :type _request_auth: dict, optional
1194
+ :param _content_type: force content-type for the request.
1195
+ :type _content_type: str, Optional
1196
+ :param _headers: set to override the headers for a single
1197
+ request; this effectively ignores the headers
1198
+ in the spec for a single request.
1199
+ :type _headers: dict, optional
1200
+ :param _host_index: set to override the host_index for a single
1201
+ request; this effectively ignores the host_index
1202
+ in the spec for a single request.
1203
+ :type _host_index: int, optional
1204
+ :return: Returns the result object.
1205
+ """ # noqa: E501
1206
+
1207
+ _param = self._list_volume_types_serialize(
1208
+ _request_auth=_request_auth,
1209
+ _content_type=_content_type,
1210
+ _headers=_headers,
1211
+ _host_index=_host_index
1212
+ )
1213
+
1214
+ _response_types_map: Dict[str, Optional[str]] = {
1215
+ '200': "VolumeTypes",
1216
+ '400': "ErrorResponseModel",
1217
+ '401': "ErrorResponseModel",
1218
+ '500': None,
1219
+ }
1220
+ response_data = self.api_client.call_api(
1221
+ *_param,
1222
+ _request_timeout=_request_timeout
1223
+ )
1224
+ response_data.read()
1225
+ return self.api_client.response_deserialize(
1226
+ response_data=response_data,
1227
+ response_types_map=_response_types_map,
1228
+ ).data
1229
+
1230
+
1231
+ @validate_call
1232
+ def list_volume_types_with_http_info(
1233
+ self,
1234
+ _request_timeout: Union[
1235
+ None,
1236
+ Annotated[StrictFloat, Field(gt=0)],
1237
+ Tuple[
1238
+ Annotated[StrictFloat, Field(gt=0)],
1239
+ Annotated[StrictFloat, Field(gt=0)]
1240
+ ]
1241
+ ] = None,
1242
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1243
+ _content_type: Optional[StrictStr] = None,
1244
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1245
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1246
+ ) -> ApiResponse[VolumeTypes]:
1247
+ """List volume types
1248
+
1249
+ Retrieves a list of available volume types that can be used in the creation of a new volume.
1250
+
1251
+ :param _request_timeout: timeout setting for this request. If one
1252
+ number provided, it will be total request
1253
+ timeout. It can also be a pair (tuple) of
1254
+ (connection, read) timeouts.
1255
+ :type _request_timeout: int, tuple(int, int), optional
1256
+ :param _request_auth: set to override the auth_settings for an a single
1257
+ request; this effectively ignores the
1258
+ authentication in the spec for a single request.
1259
+ :type _request_auth: dict, optional
1260
+ :param _content_type: force content-type for the request.
1261
+ :type _content_type: str, Optional
1262
+ :param _headers: set to override the headers for a single
1263
+ request; this effectively ignores the headers
1264
+ in the spec for a single request.
1265
+ :type _headers: dict, optional
1266
+ :param _host_index: set to override the host_index for a single
1267
+ request; this effectively ignores the host_index
1268
+ in the spec for a single request.
1269
+ :type _host_index: int, optional
1270
+ :return: Returns the result object.
1271
+ """ # noqa: E501
1272
+
1273
+ _param = self._list_volume_types_serialize(
1274
+ _request_auth=_request_auth,
1275
+ _content_type=_content_type,
1276
+ _headers=_headers,
1277
+ _host_index=_host_index
1278
+ )
1279
+
1280
+ _response_types_map: Dict[str, Optional[str]] = {
1281
+ '200': "VolumeTypes",
1282
+ '400': "ErrorResponseModel",
1283
+ '401': "ErrorResponseModel",
1284
+ '500': None,
1285
+ }
1286
+ response_data = self.api_client.call_api(
1287
+ *_param,
1288
+ _request_timeout=_request_timeout
1289
+ )
1290
+ response_data.read()
1291
+ return self.api_client.response_deserialize(
1292
+ response_data=response_data,
1293
+ response_types_map=_response_types_map,
1294
+ )
1295
+
1296
+
1297
+ @validate_call
1298
+ def list_volume_types_without_preload_content(
1299
+ self,
1300
+ _request_timeout: Union[
1301
+ None,
1302
+ Annotated[StrictFloat, Field(gt=0)],
1303
+ Tuple[
1304
+ Annotated[StrictFloat, Field(gt=0)],
1305
+ Annotated[StrictFloat, Field(gt=0)]
1306
+ ]
1307
+ ] = None,
1308
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1309
+ _content_type: Optional[StrictStr] = None,
1310
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1311
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1312
+ ) -> RESTResponseType:
1313
+ """List volume types
1314
+
1315
+ Retrieves a list of available volume types that can be used in the creation of a new volume.
1316
+
1317
+ :param _request_timeout: timeout setting for this request. If one
1318
+ number provided, it will be total request
1319
+ timeout. It can also be a pair (tuple) of
1320
+ (connection, read) timeouts.
1321
+ :type _request_timeout: int, tuple(int, int), optional
1322
+ :param _request_auth: set to override the auth_settings for an a single
1323
+ request; this effectively ignores the
1324
+ authentication in the spec for a single request.
1325
+ :type _request_auth: dict, optional
1326
+ :param _content_type: force content-type for the request.
1327
+ :type _content_type: str, Optional
1328
+ :param _headers: set to override the headers for a single
1329
+ request; this effectively ignores the headers
1330
+ in the spec for a single request.
1331
+ :type _headers: dict, optional
1332
+ :param _host_index: set to override the host_index for a single
1333
+ request; this effectively ignores the host_index
1334
+ in the spec for a single request.
1335
+ :type _host_index: int, optional
1336
+ :return: Returns the result object.
1337
+ """ # noqa: E501
1338
+
1339
+ _param = self._list_volume_types_serialize(
1340
+ _request_auth=_request_auth,
1341
+ _content_type=_content_type,
1342
+ _headers=_headers,
1343
+ _host_index=_host_index
1344
+ )
1345
+
1346
+ _response_types_map: Dict[str, Optional[str]] = {
1347
+ '200': "VolumeTypes",
1348
+ '400': "ErrorResponseModel",
1349
+ '401': "ErrorResponseModel",
1350
+ '500': None,
1351
+ }
1352
+ response_data = self.api_client.call_api(
1353
+ *_param,
1354
+ _request_timeout=_request_timeout
1355
+ )
1356
+ return response_data.response
1357
+
1358
+
1359
+ def _list_volume_types_serialize(
1360
+ self,
1361
+ _request_auth,
1362
+ _content_type,
1363
+ _headers,
1364
+ _host_index,
1365
+ ) -> RequestSerialized:
1366
+
1367
+ _host = None
1368
+
1369
+ _collection_formats: Dict[str, str] = {
1370
+ }
1371
+
1372
+ _path_params: Dict[str, str] = {}
1373
+ _query_params: List[Tuple[str, str]] = []
1374
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1375
+ _form_params: List[Tuple[str, str]] = []
1376
+ _files: Dict[
1377
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1378
+ ] = {}
1379
+ _body_params: Optional[bytes] = None
1380
+
1381
+ # process the path parameters
1382
+ # process the query parameters
1383
+ # process the header parameters
1384
+ # process the form parameters
1385
+ # process the body parameter
1386
+
1387
+
1388
+ # set the HTTP header `Accept`
1389
+ if 'Accept' not in _header_params:
1390
+ _header_params['Accept'] = self.api_client.select_header_accept(
1391
+ [
1392
+ 'application/json'
1393
+ ]
1394
+ )
1395
+
1396
+
1397
+ # authentication setting
1398
+ _auth_settings: List[str] = [
1399
+ 'apiKey',
1400
+ 'accessToken'
1401
+ ]
1402
+
1403
+ return self.api_client.param_serialize(
1404
+ method='GET',
1405
+ resource_path='/core/volume-types',
1406
+ path_params=_path_params,
1407
+ query_params=_query_params,
1408
+ header_params=_header_params,
1409
+ body=_body_params,
1410
+ post_params=_form_params,
1411
+ files=_files,
1412
+ auth_settings=_auth_settings,
1413
+ collection_formats=_collection_formats,
1414
+ _host=_host,
1415
+ _request_auth=_request_auth
1416
+ )
1417
+
1418
+
1419
+
1420
+
1421
+ @validate_call
1422
+ def list_volumes(
1423
+ self,
1424
+ page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
1425
+ page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
1426
+ search: Optional[StrictStr] = None,
1427
+ environment: Annotated[Optional[StrictStr], Field(description="Filter Environment ID or Name")] = None,
1428
+ _request_timeout: Union[
1429
+ None,
1430
+ Annotated[StrictFloat, Field(gt=0)],
1431
+ Tuple[
1432
+ Annotated[StrictFloat, Field(gt=0)],
1433
+ Annotated[StrictFloat, Field(gt=0)]
1434
+ ]
1435
+ ] = None,
1436
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1437
+ _content_type: Optional[StrictStr] = None,
1438
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1439
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1440
+ ) -> Volumes:
1441
+ """List volumes
1442
+
1443
+ Returns a list of your existing volumes, providing details for each. For more information on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features).
1444
+
1445
+ :param page: Page Number
1446
+ :type page: str
1447
+ :param page_size: Data Per Page
1448
+ :type page_size: str
1449
+ :param search:
1450
+ :type search: str
1451
+ :param environment: Filter Environment ID or Name
1452
+ :type environment: str
1453
+ :param _request_timeout: timeout setting for this request. If one
1454
+ number provided, it will be total request
1455
+ timeout. It can also be a pair (tuple) of
1456
+ (connection, read) timeouts.
1457
+ :type _request_timeout: int, tuple(int, int), optional
1458
+ :param _request_auth: set to override the auth_settings for an a single
1459
+ request; this effectively ignores the
1460
+ authentication in the spec for a single request.
1461
+ :type _request_auth: dict, optional
1462
+ :param _content_type: force content-type for the request.
1463
+ :type _content_type: str, Optional
1464
+ :param _headers: set to override the headers for a single
1465
+ request; this effectively ignores the headers
1466
+ in the spec for a single request.
1467
+ :type _headers: dict, optional
1468
+ :param _host_index: set to override the host_index for a single
1469
+ request; this effectively ignores the host_index
1470
+ in the spec for a single request.
1471
+ :type _host_index: int, optional
1472
+ :return: Returns the result object.
1473
+ """ # noqa: E501
1474
+
1475
+ _param = self._list_volumes_serialize(
1476
+ page=page,
1477
+ page_size=page_size,
1478
+ search=search,
1479
+ environment=environment,
1480
+ _request_auth=_request_auth,
1481
+ _content_type=_content_type,
1482
+ _headers=_headers,
1483
+ _host_index=_host_index
1484
+ )
1485
+
1486
+ _response_types_map: Dict[str, Optional[str]] = {
1487
+ '200': "Volumes",
1488
+ '400': "ErrorResponseModel",
1489
+ '401': "ErrorResponseModel",
1490
+ '500': None,
1491
+ }
1492
+ response_data = self.api_client.call_api(
1493
+ *_param,
1494
+ _request_timeout=_request_timeout
1495
+ )
1496
+ response_data.read()
1497
+ return self.api_client.response_deserialize(
1498
+ response_data=response_data,
1499
+ response_types_map=_response_types_map,
1500
+ ).data
1501
+
1502
+
1503
+ @validate_call
1504
+ def list_volumes_with_http_info(
1505
+ self,
1506
+ page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
1507
+ page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
1508
+ search: Optional[StrictStr] = None,
1509
+ environment: Annotated[Optional[StrictStr], Field(description="Filter Environment ID or Name")] = None,
1510
+ _request_timeout: Union[
1511
+ None,
1512
+ Annotated[StrictFloat, Field(gt=0)],
1513
+ Tuple[
1514
+ Annotated[StrictFloat, Field(gt=0)],
1515
+ Annotated[StrictFloat, Field(gt=0)]
1516
+ ]
1517
+ ] = None,
1518
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1519
+ _content_type: Optional[StrictStr] = None,
1520
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1521
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1522
+ ) -> ApiResponse[Volumes]:
1523
+ """List volumes
1524
+
1525
+ Returns a list of your existing volumes, providing details for each. For more information on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features).
1526
+
1527
+ :param page: Page Number
1528
+ :type page: str
1529
+ :param page_size: Data Per Page
1530
+ :type page_size: str
1531
+ :param search:
1532
+ :type search: str
1533
+ :param environment: Filter Environment ID or Name
1534
+ :type environment: str
1535
+ :param _request_timeout: timeout setting for this request. If one
1536
+ number provided, it will be total request
1537
+ timeout. It can also be a pair (tuple) of
1538
+ (connection, read) timeouts.
1539
+ :type _request_timeout: int, tuple(int, int), optional
1540
+ :param _request_auth: set to override the auth_settings for an a single
1541
+ request; this effectively ignores the
1542
+ authentication in the spec for a single request.
1543
+ :type _request_auth: dict, optional
1544
+ :param _content_type: force content-type for the request.
1545
+ :type _content_type: str, Optional
1546
+ :param _headers: set to override the headers for a single
1547
+ request; this effectively ignores the headers
1548
+ in the spec for a single request.
1549
+ :type _headers: dict, optional
1550
+ :param _host_index: set to override the host_index for a single
1551
+ request; this effectively ignores the host_index
1552
+ in the spec for a single request.
1553
+ :type _host_index: int, optional
1554
+ :return: Returns the result object.
1555
+ """ # noqa: E501
1556
+
1557
+ _param = self._list_volumes_serialize(
1558
+ page=page,
1559
+ page_size=page_size,
1560
+ search=search,
1561
+ environment=environment,
1562
+ _request_auth=_request_auth,
1563
+ _content_type=_content_type,
1564
+ _headers=_headers,
1565
+ _host_index=_host_index
1566
+ )
1567
+
1568
+ _response_types_map: Dict[str, Optional[str]] = {
1569
+ '200': "Volumes",
1570
+ '400': "ErrorResponseModel",
1571
+ '401': "ErrorResponseModel",
1572
+ '500': None,
1573
+ }
1574
+ response_data = self.api_client.call_api(
1575
+ *_param,
1576
+ _request_timeout=_request_timeout
1577
+ )
1578
+ response_data.read()
1579
+ return self.api_client.response_deserialize(
1580
+ response_data=response_data,
1581
+ response_types_map=_response_types_map,
1582
+ )
1583
+
1584
+
1585
+ @validate_call
1586
+ def list_volumes_without_preload_content(
1587
+ self,
1588
+ page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
1589
+ page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
1590
+ search: Optional[StrictStr] = None,
1591
+ environment: Annotated[Optional[StrictStr], Field(description="Filter Environment ID or Name")] = None,
1592
+ _request_timeout: Union[
1593
+ None,
1594
+ Annotated[StrictFloat, Field(gt=0)],
1595
+ Tuple[
1596
+ Annotated[StrictFloat, Field(gt=0)],
1597
+ Annotated[StrictFloat, Field(gt=0)]
1598
+ ]
1599
+ ] = None,
1600
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1601
+ _content_type: Optional[StrictStr] = None,
1602
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1603
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1604
+ ) -> RESTResponseType:
1605
+ """List volumes
1606
+
1607
+ Returns a list of your existing volumes, providing details for each. For more information on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features).
1608
+
1609
+ :param page: Page Number
1610
+ :type page: str
1611
+ :param page_size: Data Per Page
1612
+ :type page_size: str
1613
+ :param search:
1614
+ :type search: str
1615
+ :param environment: Filter Environment ID or Name
1616
+ :type environment: str
1617
+ :param _request_timeout: timeout setting for this request. If one
1618
+ number provided, it will be total request
1619
+ timeout. It can also be a pair (tuple) of
1620
+ (connection, read) timeouts.
1621
+ :type _request_timeout: int, tuple(int, int), optional
1622
+ :param _request_auth: set to override the auth_settings for an a single
1623
+ request; this effectively ignores the
1624
+ authentication in the spec for a single request.
1625
+ :type _request_auth: dict, optional
1626
+ :param _content_type: force content-type for the request.
1627
+ :type _content_type: str, Optional
1628
+ :param _headers: set to override the headers for a single
1629
+ request; this effectively ignores the headers
1630
+ in the spec for a single request.
1631
+ :type _headers: dict, optional
1632
+ :param _host_index: set to override the host_index for a single
1633
+ request; this effectively ignores the host_index
1634
+ in the spec for a single request.
1635
+ :type _host_index: int, optional
1636
+ :return: Returns the result object.
1637
+ """ # noqa: E501
1638
+
1639
+ _param = self._list_volumes_serialize(
1640
+ page=page,
1641
+ page_size=page_size,
1642
+ search=search,
1643
+ environment=environment,
1644
+ _request_auth=_request_auth,
1645
+ _content_type=_content_type,
1646
+ _headers=_headers,
1647
+ _host_index=_host_index
1648
+ )
1649
+
1650
+ _response_types_map: Dict[str, Optional[str]] = {
1651
+ '200': "Volumes",
1652
+ '400': "ErrorResponseModel",
1653
+ '401': "ErrorResponseModel",
1654
+ '500': None,
1655
+ }
1656
+ response_data = self.api_client.call_api(
1657
+ *_param,
1658
+ _request_timeout=_request_timeout
1659
+ )
1660
+ return response_data.response
1661
+
1662
+
1663
+ def _list_volumes_serialize(
1664
+ self,
1665
+ page,
1666
+ page_size,
1667
+ search,
1668
+ environment,
1669
+ _request_auth,
1670
+ _content_type,
1671
+ _headers,
1672
+ _host_index,
1673
+ ) -> RequestSerialized:
1674
+
1675
+ _host = None
1676
+
1677
+ _collection_formats: Dict[str, str] = {
1678
+ }
1679
+
1680
+ _path_params: Dict[str, str] = {}
1681
+ _query_params: List[Tuple[str, str]] = []
1682
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1683
+ _form_params: List[Tuple[str, str]] = []
1684
+ _files: Dict[
1685
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1686
+ ] = {}
1687
+ _body_params: Optional[bytes] = None
1688
+
1689
+ # process the path parameters
1690
+ # process the query parameters
1691
+ if page is not None:
1692
+
1693
+ _query_params.append(('page', page))
1694
+
1695
+ if page_size is not None:
1696
+
1697
+ _query_params.append(('pageSize', page_size))
1698
+
1699
+ if search is not None:
1700
+
1701
+ _query_params.append(('search', search))
1702
+
1703
+ if environment is not None:
1704
+
1705
+ _query_params.append(('environment', environment))
1706
+
1707
+ # process the header parameters
1708
+ # process the form parameters
1709
+ # process the body parameter
1710
+
1711
+
1712
+ # set the HTTP header `Accept`
1713
+ if 'Accept' not in _header_params:
1714
+ _header_params['Accept'] = self.api_client.select_header_accept(
1715
+ [
1716
+ 'application/json'
1717
+ ]
1718
+ )
1719
+
1720
+
1721
+ # authentication setting
1722
+ _auth_settings: List[str] = [
1723
+ 'apiKey',
1724
+ 'accessToken'
1725
+ ]
1726
+
1727
+ return self.api_client.param_serialize(
1728
+ method='GET',
1729
+ resource_path='/core/volumes',
1730
+ path_params=_path_params,
1731
+ query_params=_query_params,
1732
+ header_params=_header_params,
1733
+ body=_body_params,
1734
+ post_params=_form_params,
1735
+ files=_files,
1736
+ auth_settings=_auth_settings,
1737
+ collection_formats=_collection_formats,
1738
+ _host=_host,
1739
+ _request_auth=_request_auth
1740
+ )
1741
+
1742
+