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