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,1789 @@
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 StrictInt
20
+ from ..models.attach_callback_payload import AttachCallbackPayload
21
+ from ..models.attach_callback_response import AttachCallbackResponse
22
+ from ..models.response_model import ResponseModel
23
+
24
+ from ..api_client import ApiClient, RequestSerialized
25
+ from ..api_response import ApiResponse
26
+ from ..rest import RESTResponseType
27
+
28
+
29
+ class CallbacksApi:
30
+ """NOTE: This class is auto generated by OpenAPI Generator
31
+ Ref: https://openapi-generator.tech
32
+
33
+ Do not edit the class manually.
34
+ """
35
+
36
+ def __init__(self, api_client=None) -> None:
37
+ if api_client is None:
38
+ api_client = ApiClient.get_default()
39
+ self.api_client = api_client
40
+
41
+
42
+ @validate_call
43
+ async def attach_callback_to_vm(
44
+ self,
45
+ vm_id: StrictInt,
46
+ payload: AttachCallbackPayload,
47
+ _request_timeout: Union[
48
+ None,
49
+ Annotated[StrictFloat, Field(gt=0)],
50
+ Tuple[
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Annotated[StrictFloat, Field(gt=0)]
53
+ ]
54
+ ] = None,
55
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
56
+ _content_type: Optional[StrictStr] = None,
57
+ _headers: Optional[Dict[StrictStr, Any]] = None,
58
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
59
+ ) -> AttachCallbackResponse:
60
+ """Attach callback to virtual machine
61
+
62
+ Creates a callback URL for a specified virtual machine, enabling the posting of action events executed on the virtual machine to the specified URL. Provide the callback URL in the request body and the ID of the virtual machine to which it is being attached in the path. For more details on virtual machine callback URLs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/virtual-machines/callbacks-vms/attach-callback-vm).
63
+
64
+ :param vm_id: (required)
65
+ :type vm_id: int
66
+ :param payload: (required)
67
+ :type payload: AttachCallbackPayload
68
+ :param _request_timeout: timeout setting for this request. If one
69
+ number provided, it will be total request
70
+ timeout. It can also be a pair (tuple) of
71
+ (connection, read) timeouts.
72
+ :type _request_timeout: int, tuple(int, int), optional
73
+ :param _request_auth: set to override the auth_settings for an a single
74
+ request; this effectively ignores the
75
+ authentication in the spec for a single request.
76
+ :type _request_auth: dict, optional
77
+ :param _content_type: force content-type for the request.
78
+ :type _content_type: str, Optional
79
+ :param _headers: set to override the headers for a single
80
+ request; this effectively ignores the headers
81
+ in the spec for a single request.
82
+ :type _headers: dict, optional
83
+ :param _host_index: set to override the host_index for a single
84
+ request; this effectively ignores the host_index
85
+ in the spec for a single request.
86
+ :type _host_index: int, optional
87
+ :return: Returns the result object.
88
+ """ # noqa: E501
89
+
90
+ _param = self._attach_callback_to_vm_serialize(
91
+ vm_id=vm_id,
92
+ payload=payload,
93
+ _request_auth=_request_auth,
94
+ _content_type=_content_type,
95
+ _headers=_headers,
96
+ _host_index=_host_index
97
+ )
98
+
99
+ _response_types_map: Dict[str, Optional[str]] = {
100
+ '200': "AttachCallbackResponse",
101
+ '400': "ErrorResponseModel",
102
+ '401': "ErrorResponseModel",
103
+ '404': "ErrorResponseModel",
104
+ '500': None,
105
+ }
106
+ response_data = await self.api_client.call_api(
107
+ *_param,
108
+ _request_timeout=_request_timeout
109
+ )
110
+ await response_data.read()
111
+ return self.api_client.response_deserialize(
112
+ response_data=response_data,
113
+ response_types_map=_response_types_map,
114
+ ).data
115
+
116
+
117
+ @validate_call
118
+ async def attach_callback_to_vm_with_http_info(
119
+ self,
120
+ vm_id: StrictInt,
121
+ payload: AttachCallbackPayload,
122
+ _request_timeout: Union[
123
+ None,
124
+ Annotated[StrictFloat, Field(gt=0)],
125
+ Tuple[
126
+ Annotated[StrictFloat, Field(gt=0)],
127
+ Annotated[StrictFloat, Field(gt=0)]
128
+ ]
129
+ ] = None,
130
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
131
+ _content_type: Optional[StrictStr] = None,
132
+ _headers: Optional[Dict[StrictStr, Any]] = None,
133
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
134
+ ) -> ApiResponse[AttachCallbackResponse]:
135
+ """Attach callback to virtual machine
136
+
137
+ Creates a callback URL for a specified virtual machine, enabling the posting of action events executed on the virtual machine to the specified URL. Provide the callback URL in the request body and the ID of the virtual machine to which it is being attached in the path. For more details on virtual machine callback URLs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/virtual-machines/callbacks-vms/attach-callback-vm).
138
+
139
+ :param vm_id: (required)
140
+ :type vm_id: int
141
+ :param payload: (required)
142
+ :type payload: AttachCallbackPayload
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._attach_callback_to_vm_serialize(
166
+ vm_id=vm_id,
167
+ payload=payload,
168
+ _request_auth=_request_auth,
169
+ _content_type=_content_type,
170
+ _headers=_headers,
171
+ _host_index=_host_index
172
+ )
173
+
174
+ _response_types_map: Dict[str, Optional[str]] = {
175
+ '200': "AttachCallbackResponse",
176
+ '400': "ErrorResponseModel",
177
+ '401': "ErrorResponseModel",
178
+ '404': "ErrorResponseModel",
179
+ '500': None,
180
+ }
181
+ response_data = await self.api_client.call_api(
182
+ *_param,
183
+ _request_timeout=_request_timeout
184
+ )
185
+ await response_data.read()
186
+ return self.api_client.response_deserialize(
187
+ response_data=response_data,
188
+ response_types_map=_response_types_map,
189
+ )
190
+
191
+
192
+ @validate_call
193
+ async def attach_callback_to_vm_without_preload_content(
194
+ self,
195
+ vm_id: StrictInt,
196
+ payload: AttachCallbackPayload,
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
+ """Attach callback to virtual machine
211
+
212
+ Creates a callback URL for a specified virtual machine, enabling the posting of action events executed on the virtual machine to the specified URL. Provide the callback URL in the request body and the ID of the virtual machine to which it is being attached in the path. For more details on virtual machine callback URLs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/virtual-machines/callbacks-vms/attach-callback-vm).
213
+
214
+ :param vm_id: (required)
215
+ :type vm_id: int
216
+ :param payload: (required)
217
+ :type payload: AttachCallbackPayload
218
+ :param _request_timeout: timeout setting for this request. If one
219
+ number provided, it will be total request
220
+ timeout. It can also be a pair (tuple) of
221
+ (connection, read) timeouts.
222
+ :type _request_timeout: int, tuple(int, int), optional
223
+ :param _request_auth: set to override the auth_settings for an a single
224
+ request; this effectively ignores the
225
+ authentication in the spec for a single request.
226
+ :type _request_auth: dict, optional
227
+ :param _content_type: force content-type for the request.
228
+ :type _content_type: str, Optional
229
+ :param _headers: set to override the headers for a single
230
+ request; this effectively ignores the headers
231
+ in the spec for a single request.
232
+ :type _headers: dict, optional
233
+ :param _host_index: set to override the host_index for a single
234
+ request; this effectively ignores the host_index
235
+ in the spec for a single request.
236
+ :type _host_index: int, optional
237
+ :return: Returns the result object.
238
+ """ # noqa: E501
239
+
240
+ _param = self._attach_callback_to_vm_serialize(
241
+ vm_id=vm_id,
242
+ payload=payload,
243
+ _request_auth=_request_auth,
244
+ _content_type=_content_type,
245
+ _headers=_headers,
246
+ _host_index=_host_index
247
+ )
248
+
249
+ _response_types_map: Dict[str, Optional[str]] = {
250
+ '200': "AttachCallbackResponse",
251
+ '400': "ErrorResponseModel",
252
+ '401': "ErrorResponseModel",
253
+ '404': "ErrorResponseModel",
254
+ '500': None,
255
+ }
256
+ response_data = await self.api_client.call_api(
257
+ *_param,
258
+ _request_timeout=_request_timeout
259
+ )
260
+ return response_data.response
261
+
262
+
263
+ def _attach_callback_to_vm_serialize(
264
+ self,
265
+ vm_id,
266
+ payload,
267
+ _request_auth,
268
+ _content_type,
269
+ _headers,
270
+ _host_index,
271
+ ) -> RequestSerialized:
272
+
273
+ _host = None
274
+
275
+ _collection_formats: Dict[str, str] = {
276
+ }
277
+
278
+ _path_params: Dict[str, str] = {}
279
+ _query_params: List[Tuple[str, str]] = []
280
+ _header_params: Dict[str, Optional[str]] = _headers or {}
281
+ _form_params: List[Tuple[str, str]] = []
282
+ _files: Dict[
283
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
284
+ ] = {}
285
+ _body_params: Optional[bytes] = None
286
+
287
+ # process the path parameters
288
+ if vm_id is not None:
289
+ _path_params['vm_id'] = vm_id
290
+ # process the query parameters
291
+ # process the header parameters
292
+ # process the form parameters
293
+ # process the body parameter
294
+ if payload is not None:
295
+ _body_params = payload
296
+
297
+
298
+ # set the HTTP header `Accept`
299
+ if 'Accept' not in _header_params:
300
+ _header_params['Accept'] = self.api_client.select_header_accept(
301
+ [
302
+ 'application/json'
303
+ ]
304
+ )
305
+
306
+ # set the HTTP header `Content-Type`
307
+ if _content_type:
308
+ _header_params['Content-Type'] = _content_type
309
+ else:
310
+ _default_content_type = (
311
+ self.api_client.select_header_content_type(
312
+ [
313
+ 'application/json'
314
+ ]
315
+ )
316
+ )
317
+ if _default_content_type is not None:
318
+ _header_params['Content-Type'] = _default_content_type
319
+
320
+ # authentication setting
321
+ _auth_settings: List[str] = [
322
+ 'apiKey'
323
+ ]
324
+
325
+ return self.api_client.param_serialize(
326
+ method='POST',
327
+ resource_path='/core/virtual-machines/{vm_id}/attach-callback',
328
+ path_params=_path_params,
329
+ query_params=_query_params,
330
+ header_params=_header_params,
331
+ body=_body_params,
332
+ post_params=_form_params,
333
+ files=_files,
334
+ auth_settings=_auth_settings,
335
+ collection_formats=_collection_formats,
336
+ _host=_host,
337
+ _request_auth=_request_auth
338
+ )
339
+
340
+
341
+
342
+
343
+ @validate_call
344
+ async def attach_callback_to_volume(
345
+ self,
346
+ volume_id: StrictInt,
347
+ payload: AttachCallbackPayload,
348
+ _request_timeout: Union[
349
+ None,
350
+ Annotated[StrictFloat, Field(gt=0)],
351
+ Tuple[
352
+ Annotated[StrictFloat, Field(gt=0)],
353
+ Annotated[StrictFloat, Field(gt=0)]
354
+ ]
355
+ ] = None,
356
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
357
+ _content_type: Optional[StrictStr] = None,
358
+ _headers: Optional[Dict[StrictStr, Any]] = None,
359
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
360
+ ) -> AttachCallbackResponse:
361
+ """Attach callback to volume
362
+
363
+ Creates a callback URL for a specified volume, enabling the posting of action events executed on the volume to the specified URL. Provide the callback URL in the request body and the ID of the volume to which it is being attached in the path. For more details on volume callback URLs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/volumes/volume-callbacks/attach-callback-volume).
364
+
365
+ :param volume_id: (required)
366
+ :type volume_id: int
367
+ :param payload: (required)
368
+ :type payload: AttachCallbackPayload
369
+ :param _request_timeout: timeout setting for this request. If one
370
+ number provided, it will be total request
371
+ timeout. It can also be a pair (tuple) of
372
+ (connection, read) timeouts.
373
+ :type _request_timeout: int, tuple(int, int), optional
374
+ :param _request_auth: set to override the auth_settings for an a single
375
+ request; this effectively ignores the
376
+ authentication in the spec for a single request.
377
+ :type _request_auth: dict, optional
378
+ :param _content_type: force content-type for the request.
379
+ :type _content_type: str, Optional
380
+ :param _headers: set to override the headers for a single
381
+ request; this effectively ignores the headers
382
+ in the spec for a single request.
383
+ :type _headers: dict, optional
384
+ :param _host_index: set to override the host_index for a single
385
+ request; this effectively ignores the host_index
386
+ in the spec for a single request.
387
+ :type _host_index: int, optional
388
+ :return: Returns the result object.
389
+ """ # noqa: E501
390
+
391
+ _param = self._attach_callback_to_volume_serialize(
392
+ volume_id=volume_id,
393
+ payload=payload,
394
+ _request_auth=_request_auth,
395
+ _content_type=_content_type,
396
+ _headers=_headers,
397
+ _host_index=_host_index
398
+ )
399
+
400
+ _response_types_map: Dict[str, Optional[str]] = {
401
+ '200': "AttachCallbackResponse",
402
+ '400': "ErrorResponseModel",
403
+ '401': "ErrorResponseModel",
404
+ '404': "ErrorResponseModel",
405
+ '500': None,
406
+ }
407
+ response_data = await self.api_client.call_api(
408
+ *_param,
409
+ _request_timeout=_request_timeout
410
+ )
411
+ await response_data.read()
412
+ return self.api_client.response_deserialize(
413
+ response_data=response_data,
414
+ response_types_map=_response_types_map,
415
+ ).data
416
+
417
+
418
+ @validate_call
419
+ async def attach_callback_to_volume_with_http_info(
420
+ self,
421
+ volume_id: StrictInt,
422
+ payload: AttachCallbackPayload,
423
+ _request_timeout: Union[
424
+ None,
425
+ Annotated[StrictFloat, Field(gt=0)],
426
+ Tuple[
427
+ Annotated[StrictFloat, Field(gt=0)],
428
+ Annotated[StrictFloat, Field(gt=0)]
429
+ ]
430
+ ] = None,
431
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
432
+ _content_type: Optional[StrictStr] = None,
433
+ _headers: Optional[Dict[StrictStr, Any]] = None,
434
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
435
+ ) -> ApiResponse[AttachCallbackResponse]:
436
+ """Attach callback to volume
437
+
438
+ Creates a callback URL for a specified volume, enabling the posting of action events executed on the volume to the specified URL. Provide the callback URL in the request body and the ID of the volume to which it is being attached in the path. For more details on volume callback URLs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/volumes/volume-callbacks/attach-callback-volume).
439
+
440
+ :param volume_id: (required)
441
+ :type volume_id: int
442
+ :param payload: (required)
443
+ :type payload: AttachCallbackPayload
444
+ :param _request_timeout: timeout setting for this request. If one
445
+ number provided, it will be total request
446
+ timeout. It can also be a pair (tuple) of
447
+ (connection, read) timeouts.
448
+ :type _request_timeout: int, tuple(int, int), optional
449
+ :param _request_auth: set to override the auth_settings for an a single
450
+ request; this effectively ignores the
451
+ authentication in the spec for a single request.
452
+ :type _request_auth: dict, optional
453
+ :param _content_type: force content-type for the request.
454
+ :type _content_type: str, Optional
455
+ :param _headers: set to override the headers for a single
456
+ request; this effectively ignores the headers
457
+ in the spec for a single request.
458
+ :type _headers: dict, optional
459
+ :param _host_index: set to override the host_index for a single
460
+ request; this effectively ignores the host_index
461
+ in the spec for a single request.
462
+ :type _host_index: int, optional
463
+ :return: Returns the result object.
464
+ """ # noqa: E501
465
+
466
+ _param = self._attach_callback_to_volume_serialize(
467
+ volume_id=volume_id,
468
+ payload=payload,
469
+ _request_auth=_request_auth,
470
+ _content_type=_content_type,
471
+ _headers=_headers,
472
+ _host_index=_host_index
473
+ )
474
+
475
+ _response_types_map: Dict[str, Optional[str]] = {
476
+ '200': "AttachCallbackResponse",
477
+ '400': "ErrorResponseModel",
478
+ '401': "ErrorResponseModel",
479
+ '404': "ErrorResponseModel",
480
+ '500': None,
481
+ }
482
+ response_data = await self.api_client.call_api(
483
+ *_param,
484
+ _request_timeout=_request_timeout
485
+ )
486
+ await response_data.read()
487
+ return self.api_client.response_deserialize(
488
+ response_data=response_data,
489
+ response_types_map=_response_types_map,
490
+ )
491
+
492
+
493
+ @validate_call
494
+ async def attach_callback_to_volume_without_preload_content(
495
+ self,
496
+ volume_id: StrictInt,
497
+ payload: AttachCallbackPayload,
498
+ _request_timeout: Union[
499
+ None,
500
+ Annotated[StrictFloat, Field(gt=0)],
501
+ Tuple[
502
+ Annotated[StrictFloat, Field(gt=0)],
503
+ Annotated[StrictFloat, Field(gt=0)]
504
+ ]
505
+ ] = None,
506
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
507
+ _content_type: Optional[StrictStr] = None,
508
+ _headers: Optional[Dict[StrictStr, Any]] = None,
509
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
510
+ ) -> RESTResponseType:
511
+ """Attach callback to volume
512
+
513
+ Creates a callback URL for a specified volume, enabling the posting of action events executed on the volume to the specified URL. Provide the callback URL in the request body and the ID of the volume to which it is being attached in the path. For more details on volume callback URLs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/volumes/volume-callbacks/attach-callback-volume).
514
+
515
+ :param volume_id: (required)
516
+ :type volume_id: int
517
+ :param payload: (required)
518
+ :type payload: AttachCallbackPayload
519
+ :param _request_timeout: timeout setting for this request. If one
520
+ number provided, it will be total request
521
+ timeout. It can also be a pair (tuple) of
522
+ (connection, read) timeouts.
523
+ :type _request_timeout: int, tuple(int, int), optional
524
+ :param _request_auth: set to override the auth_settings for an a single
525
+ request; this effectively ignores the
526
+ authentication in the spec for a single request.
527
+ :type _request_auth: dict, optional
528
+ :param _content_type: force content-type for the request.
529
+ :type _content_type: str, Optional
530
+ :param _headers: set to override the headers for a single
531
+ request; this effectively ignores the headers
532
+ in the spec for a single request.
533
+ :type _headers: dict, optional
534
+ :param _host_index: set to override the host_index for a single
535
+ request; this effectively ignores the host_index
536
+ in the spec for a single request.
537
+ :type _host_index: int, optional
538
+ :return: Returns the result object.
539
+ """ # noqa: E501
540
+
541
+ _param = self._attach_callback_to_volume_serialize(
542
+ volume_id=volume_id,
543
+ payload=payload,
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': "AttachCallbackResponse",
552
+ '400': "ErrorResponseModel",
553
+ '401': "ErrorResponseModel",
554
+ '404': "ErrorResponseModel",
555
+ '500': None,
556
+ }
557
+ response_data = await self.api_client.call_api(
558
+ *_param,
559
+ _request_timeout=_request_timeout
560
+ )
561
+ return response_data.response
562
+
563
+
564
+ def _attach_callback_to_volume_serialize(
565
+ self,
566
+ volume_id,
567
+ payload,
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 volume_id is not None:
590
+ _path_params['volume_id'] = volume_id
591
+ # process the query parameters
592
+ # process the header parameters
593
+ # process the form parameters
594
+ # process the body parameter
595
+ if payload is not None:
596
+ _body_params = payload
597
+
598
+
599
+ # set the HTTP header `Accept`
600
+ if 'Accept' not in _header_params:
601
+ _header_params['Accept'] = self.api_client.select_header_accept(
602
+ [
603
+ 'application/json'
604
+ ]
605
+ )
606
+
607
+ # set the HTTP header `Content-Type`
608
+ if _content_type:
609
+ _header_params['Content-Type'] = _content_type
610
+ else:
611
+ _default_content_type = (
612
+ self.api_client.select_header_content_type(
613
+ [
614
+ 'application/json'
615
+ ]
616
+ )
617
+ )
618
+ if _default_content_type is not None:
619
+ _header_params['Content-Type'] = _default_content_type
620
+
621
+ # authentication setting
622
+ _auth_settings: List[str] = [
623
+ 'apiKey'
624
+ ]
625
+
626
+ return self.api_client.param_serialize(
627
+ method='POST',
628
+ resource_path='/core/volumes/{volume_id}/attach-callback',
629
+ path_params=_path_params,
630
+ query_params=_query_params,
631
+ header_params=_header_params,
632
+ body=_body_params,
633
+ post_params=_form_params,
634
+ files=_files,
635
+ auth_settings=_auth_settings,
636
+ collection_formats=_collection_formats,
637
+ _host=_host,
638
+ _request_auth=_request_auth
639
+ )
640
+
641
+
642
+
643
+
644
+ @validate_call
645
+ async def delete_vm_callback(
646
+ self,
647
+ vm_id: StrictInt,
648
+ _request_timeout: Union[
649
+ None,
650
+ Annotated[StrictFloat, Field(gt=0)],
651
+ Tuple[
652
+ Annotated[StrictFloat, Field(gt=0)],
653
+ Annotated[StrictFloat, Field(gt=0)]
654
+ ]
655
+ ] = None,
656
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
657
+ _content_type: Optional[StrictStr] = None,
658
+ _headers: Optional[Dict[StrictStr, Any]] = None,
659
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
660
+ ) -> ResponseModel:
661
+ """Delete virtual machine callback
662
+
663
+ Permanently deletes the callback URL associated with a specified virtual machine by providing the virtual machine ID in the request path. For additional information on virtual machine callback URLs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/virtual-machines/callbacks-vms/delete-callback-vm).
664
+
665
+ :param vm_id: (required)
666
+ :type vm_id: int
667
+ :param _request_timeout: timeout setting for this request. If one
668
+ number provided, it will be total request
669
+ timeout. It can also be a pair (tuple) of
670
+ (connection, read) timeouts.
671
+ :type _request_timeout: int, tuple(int, int), optional
672
+ :param _request_auth: set to override the auth_settings for an a single
673
+ request; this effectively ignores the
674
+ authentication in the spec for a single request.
675
+ :type _request_auth: dict, optional
676
+ :param _content_type: force content-type for the request.
677
+ :type _content_type: str, Optional
678
+ :param _headers: set to override the headers for a single
679
+ request; this effectively ignores the headers
680
+ in the spec for a single request.
681
+ :type _headers: dict, optional
682
+ :param _host_index: set to override the host_index for a single
683
+ request; this effectively ignores the host_index
684
+ in the spec for a single request.
685
+ :type _host_index: int, optional
686
+ :return: Returns the result object.
687
+ """ # noqa: E501
688
+
689
+ _param = self._delete_vm_callback_serialize(
690
+ vm_id=vm_id,
691
+ _request_auth=_request_auth,
692
+ _content_type=_content_type,
693
+ _headers=_headers,
694
+ _host_index=_host_index
695
+ )
696
+
697
+ _response_types_map: Dict[str, Optional[str]] = {
698
+ '200': "ResponseModel",
699
+ '400': "ErrorResponseModel",
700
+ '401': "ErrorResponseModel",
701
+ '404': "ErrorResponseModel",
702
+ '500': None,
703
+ }
704
+ response_data = await self.api_client.call_api(
705
+ *_param,
706
+ _request_timeout=_request_timeout
707
+ )
708
+ await response_data.read()
709
+ return self.api_client.response_deserialize(
710
+ response_data=response_data,
711
+ response_types_map=_response_types_map,
712
+ ).data
713
+
714
+
715
+ @validate_call
716
+ async def delete_vm_callback_with_http_info(
717
+ self,
718
+ vm_id: StrictInt,
719
+ _request_timeout: Union[
720
+ None,
721
+ Annotated[StrictFloat, Field(gt=0)],
722
+ Tuple[
723
+ Annotated[StrictFloat, Field(gt=0)],
724
+ Annotated[StrictFloat, Field(gt=0)]
725
+ ]
726
+ ] = None,
727
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
728
+ _content_type: Optional[StrictStr] = None,
729
+ _headers: Optional[Dict[StrictStr, Any]] = None,
730
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
731
+ ) -> ApiResponse[ResponseModel]:
732
+ """Delete virtual machine callback
733
+
734
+ Permanently deletes the callback URL associated with a specified virtual machine by providing the virtual machine ID in the request path. For additional information on virtual machine callback URLs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/virtual-machines/callbacks-vms/delete-callback-vm).
735
+
736
+ :param vm_id: (required)
737
+ :type vm_id: int
738
+ :param _request_timeout: timeout setting for this request. If one
739
+ number provided, it will be total request
740
+ timeout. It can also be a pair (tuple) of
741
+ (connection, read) timeouts.
742
+ :type _request_timeout: int, tuple(int, int), optional
743
+ :param _request_auth: set to override the auth_settings for an a single
744
+ request; this effectively ignores the
745
+ authentication in the spec for a single request.
746
+ :type _request_auth: dict, optional
747
+ :param _content_type: force content-type for the request.
748
+ :type _content_type: str, Optional
749
+ :param _headers: set to override the headers for a single
750
+ request; this effectively ignores the headers
751
+ in the spec for a single request.
752
+ :type _headers: dict, optional
753
+ :param _host_index: set to override the host_index for a single
754
+ request; this effectively ignores the host_index
755
+ in the spec for a single request.
756
+ :type _host_index: int, optional
757
+ :return: Returns the result object.
758
+ """ # noqa: E501
759
+
760
+ _param = self._delete_vm_callback_serialize(
761
+ vm_id=vm_id,
762
+ _request_auth=_request_auth,
763
+ _content_type=_content_type,
764
+ _headers=_headers,
765
+ _host_index=_host_index
766
+ )
767
+
768
+ _response_types_map: Dict[str, Optional[str]] = {
769
+ '200': "ResponseModel",
770
+ '400': "ErrorResponseModel",
771
+ '401': "ErrorResponseModel",
772
+ '404': "ErrorResponseModel",
773
+ '500': None,
774
+ }
775
+ response_data = await self.api_client.call_api(
776
+ *_param,
777
+ _request_timeout=_request_timeout
778
+ )
779
+ await response_data.read()
780
+ return self.api_client.response_deserialize(
781
+ response_data=response_data,
782
+ response_types_map=_response_types_map,
783
+ )
784
+
785
+
786
+ @validate_call
787
+ async def delete_vm_callback_without_preload_content(
788
+ self,
789
+ vm_id: StrictInt,
790
+ _request_timeout: Union[
791
+ None,
792
+ Annotated[StrictFloat, Field(gt=0)],
793
+ Tuple[
794
+ Annotated[StrictFloat, Field(gt=0)],
795
+ Annotated[StrictFloat, Field(gt=0)]
796
+ ]
797
+ ] = None,
798
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
799
+ _content_type: Optional[StrictStr] = None,
800
+ _headers: Optional[Dict[StrictStr, Any]] = None,
801
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
802
+ ) -> RESTResponseType:
803
+ """Delete virtual machine callback
804
+
805
+ Permanently deletes the callback URL associated with a specified virtual machine by providing the virtual machine ID in the request path. For additional information on virtual machine callback URLs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/virtual-machines/callbacks-vms/delete-callback-vm).
806
+
807
+ :param vm_id: (required)
808
+ :type vm_id: int
809
+ :param _request_timeout: timeout setting for this request. If one
810
+ number provided, it will be total request
811
+ timeout. It can also be a pair (tuple) of
812
+ (connection, read) timeouts.
813
+ :type _request_timeout: int, tuple(int, int), optional
814
+ :param _request_auth: set to override the auth_settings for an a single
815
+ request; this effectively ignores the
816
+ authentication in the spec for a single request.
817
+ :type _request_auth: dict, optional
818
+ :param _content_type: force content-type for the request.
819
+ :type _content_type: str, Optional
820
+ :param _headers: set to override the headers for a single
821
+ request; this effectively ignores the headers
822
+ in the spec for a single request.
823
+ :type _headers: dict, optional
824
+ :param _host_index: set to override the host_index for a single
825
+ request; this effectively ignores the host_index
826
+ in the spec for a single request.
827
+ :type _host_index: int, optional
828
+ :return: Returns the result object.
829
+ """ # noqa: E501
830
+
831
+ _param = self._delete_vm_callback_serialize(
832
+ vm_id=vm_id,
833
+ _request_auth=_request_auth,
834
+ _content_type=_content_type,
835
+ _headers=_headers,
836
+ _host_index=_host_index
837
+ )
838
+
839
+ _response_types_map: Dict[str, Optional[str]] = {
840
+ '200': "ResponseModel",
841
+ '400': "ErrorResponseModel",
842
+ '401': "ErrorResponseModel",
843
+ '404': "ErrorResponseModel",
844
+ '500': None,
845
+ }
846
+ response_data = await self.api_client.call_api(
847
+ *_param,
848
+ _request_timeout=_request_timeout
849
+ )
850
+ return response_data.response
851
+
852
+
853
+ def _delete_vm_callback_serialize(
854
+ self,
855
+ vm_id,
856
+ _request_auth,
857
+ _content_type,
858
+ _headers,
859
+ _host_index,
860
+ ) -> RequestSerialized:
861
+
862
+ _host = None
863
+
864
+ _collection_formats: Dict[str, str] = {
865
+ }
866
+
867
+ _path_params: Dict[str, str] = {}
868
+ _query_params: List[Tuple[str, str]] = []
869
+ _header_params: Dict[str, Optional[str]] = _headers or {}
870
+ _form_params: List[Tuple[str, str]] = []
871
+ _files: Dict[
872
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
873
+ ] = {}
874
+ _body_params: Optional[bytes] = None
875
+
876
+ # process the path parameters
877
+ if vm_id is not None:
878
+ _path_params['vm_id'] = vm_id
879
+ # process the query parameters
880
+ # process the header parameters
881
+ # process the form parameters
882
+ # process the body parameter
883
+
884
+
885
+ # set the HTTP header `Accept`
886
+ if 'Accept' not in _header_params:
887
+ _header_params['Accept'] = self.api_client.select_header_accept(
888
+ [
889
+ 'application/json'
890
+ ]
891
+ )
892
+
893
+
894
+ # authentication setting
895
+ _auth_settings: List[str] = [
896
+ 'apiKey'
897
+ ]
898
+
899
+ return self.api_client.param_serialize(
900
+ method='DELETE',
901
+ resource_path='/core/virtual-machines/{vm_id}/delete-callback',
902
+ path_params=_path_params,
903
+ query_params=_query_params,
904
+ header_params=_header_params,
905
+ body=_body_params,
906
+ post_params=_form_params,
907
+ files=_files,
908
+ auth_settings=_auth_settings,
909
+ collection_formats=_collection_formats,
910
+ _host=_host,
911
+ _request_auth=_request_auth
912
+ )
913
+
914
+
915
+
916
+
917
+ @validate_call
918
+ async def delete_volume_callback(
919
+ self,
920
+ volume_id: StrictInt,
921
+ _request_timeout: Union[
922
+ None,
923
+ Annotated[StrictFloat, Field(gt=0)],
924
+ Tuple[
925
+ Annotated[StrictFloat, Field(gt=0)],
926
+ Annotated[StrictFloat, Field(gt=0)]
927
+ ]
928
+ ] = None,
929
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
930
+ _content_type: Optional[StrictStr] = None,
931
+ _headers: Optional[Dict[StrictStr, Any]] = None,
932
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
933
+ ) -> ResponseModel:
934
+ """Delete volume callback
935
+
936
+ Permanently deletes the callback URL associated with a specified volume by providing the volume ID in the request path. For additional information on volume callback URLs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/volumes/volume-callbacks/delete-callback-volume).
937
+
938
+ :param volume_id: (required)
939
+ :type volume_id: int
940
+ :param _request_timeout: timeout setting for this request. If one
941
+ number provided, it will be total request
942
+ timeout. It can also be a pair (tuple) of
943
+ (connection, read) timeouts.
944
+ :type _request_timeout: int, tuple(int, int), optional
945
+ :param _request_auth: set to override the auth_settings for an a single
946
+ request; this effectively ignores the
947
+ authentication in the spec for a single request.
948
+ :type _request_auth: dict, optional
949
+ :param _content_type: force content-type for the request.
950
+ :type _content_type: str, Optional
951
+ :param _headers: set to override the headers for a single
952
+ request; this effectively ignores the headers
953
+ in the spec for a single request.
954
+ :type _headers: dict, optional
955
+ :param _host_index: set to override the host_index for a single
956
+ request; this effectively ignores the host_index
957
+ in the spec for a single request.
958
+ :type _host_index: int, optional
959
+ :return: Returns the result object.
960
+ """ # noqa: E501
961
+
962
+ _param = self._delete_volume_callback_serialize(
963
+ volume_id=volume_id,
964
+ _request_auth=_request_auth,
965
+ _content_type=_content_type,
966
+ _headers=_headers,
967
+ _host_index=_host_index
968
+ )
969
+
970
+ _response_types_map: Dict[str, Optional[str]] = {
971
+ '200': "ResponseModel",
972
+ '400': "ErrorResponseModel",
973
+ '401': "ErrorResponseModel",
974
+ '404': "ErrorResponseModel",
975
+ '500': None,
976
+ }
977
+ response_data = await self.api_client.call_api(
978
+ *_param,
979
+ _request_timeout=_request_timeout
980
+ )
981
+ await response_data.read()
982
+ return self.api_client.response_deserialize(
983
+ response_data=response_data,
984
+ response_types_map=_response_types_map,
985
+ ).data
986
+
987
+
988
+ @validate_call
989
+ async def delete_volume_callback_with_http_info(
990
+ self,
991
+ volume_id: StrictInt,
992
+ _request_timeout: Union[
993
+ None,
994
+ Annotated[StrictFloat, Field(gt=0)],
995
+ Tuple[
996
+ Annotated[StrictFloat, Field(gt=0)],
997
+ Annotated[StrictFloat, Field(gt=0)]
998
+ ]
999
+ ] = None,
1000
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1001
+ _content_type: Optional[StrictStr] = None,
1002
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1003
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1004
+ ) -> ApiResponse[ResponseModel]:
1005
+ """Delete volume callback
1006
+
1007
+ Permanently deletes the callback URL associated with a specified volume by providing the volume ID in the request path. For additional information on volume callback URLs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/volumes/volume-callbacks/delete-callback-volume).
1008
+
1009
+ :param volume_id: (required)
1010
+ :type volume_id: int
1011
+ :param _request_timeout: timeout setting for this request. If one
1012
+ number provided, it will be total request
1013
+ timeout. It can also be a pair (tuple) of
1014
+ (connection, read) timeouts.
1015
+ :type _request_timeout: int, tuple(int, int), optional
1016
+ :param _request_auth: set to override the auth_settings for an a single
1017
+ request; this effectively ignores the
1018
+ authentication in the spec for a single request.
1019
+ :type _request_auth: dict, optional
1020
+ :param _content_type: force content-type for the request.
1021
+ :type _content_type: str, Optional
1022
+ :param _headers: set to override the headers for a single
1023
+ request; this effectively ignores the headers
1024
+ in the spec for a single request.
1025
+ :type _headers: dict, optional
1026
+ :param _host_index: set to override the host_index for a single
1027
+ request; this effectively ignores the host_index
1028
+ in the spec for a single request.
1029
+ :type _host_index: int, optional
1030
+ :return: Returns the result object.
1031
+ """ # noqa: E501
1032
+
1033
+ _param = self._delete_volume_callback_serialize(
1034
+ volume_id=volume_id,
1035
+ _request_auth=_request_auth,
1036
+ _content_type=_content_type,
1037
+ _headers=_headers,
1038
+ _host_index=_host_index
1039
+ )
1040
+
1041
+ _response_types_map: Dict[str, Optional[str]] = {
1042
+ '200': "ResponseModel",
1043
+ '400': "ErrorResponseModel",
1044
+ '401': "ErrorResponseModel",
1045
+ '404': "ErrorResponseModel",
1046
+ '500': None,
1047
+ }
1048
+ response_data = await self.api_client.call_api(
1049
+ *_param,
1050
+ _request_timeout=_request_timeout
1051
+ )
1052
+ await response_data.read()
1053
+ return self.api_client.response_deserialize(
1054
+ response_data=response_data,
1055
+ response_types_map=_response_types_map,
1056
+ )
1057
+
1058
+
1059
+ @validate_call
1060
+ async def delete_volume_callback_without_preload_content(
1061
+ self,
1062
+ volume_id: StrictInt,
1063
+ _request_timeout: Union[
1064
+ None,
1065
+ Annotated[StrictFloat, Field(gt=0)],
1066
+ Tuple[
1067
+ Annotated[StrictFloat, Field(gt=0)],
1068
+ Annotated[StrictFloat, Field(gt=0)]
1069
+ ]
1070
+ ] = None,
1071
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1072
+ _content_type: Optional[StrictStr] = None,
1073
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1074
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1075
+ ) -> RESTResponseType:
1076
+ """Delete volume callback
1077
+
1078
+ Permanently deletes the callback URL associated with a specified volume by providing the volume ID in the request path. For additional information on volume callback URLs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/volumes/volume-callbacks/delete-callback-volume).
1079
+
1080
+ :param volume_id: (required)
1081
+ :type volume_id: int
1082
+ :param _request_timeout: timeout setting for this request. If one
1083
+ number provided, it will be total request
1084
+ timeout. It can also be a pair (tuple) of
1085
+ (connection, read) timeouts.
1086
+ :type _request_timeout: int, tuple(int, int), optional
1087
+ :param _request_auth: set to override the auth_settings for an a single
1088
+ request; this effectively ignores the
1089
+ authentication in the spec for a single request.
1090
+ :type _request_auth: dict, optional
1091
+ :param _content_type: force content-type for the request.
1092
+ :type _content_type: str, Optional
1093
+ :param _headers: set to override the headers for a single
1094
+ request; this effectively ignores the headers
1095
+ in the spec for a single request.
1096
+ :type _headers: dict, optional
1097
+ :param _host_index: set to override the host_index for a single
1098
+ request; this effectively ignores the host_index
1099
+ in the spec for a single request.
1100
+ :type _host_index: int, optional
1101
+ :return: Returns the result object.
1102
+ """ # noqa: E501
1103
+
1104
+ _param = self._delete_volume_callback_serialize(
1105
+ volume_id=volume_id,
1106
+ _request_auth=_request_auth,
1107
+ _content_type=_content_type,
1108
+ _headers=_headers,
1109
+ _host_index=_host_index
1110
+ )
1111
+
1112
+ _response_types_map: Dict[str, Optional[str]] = {
1113
+ '200': "ResponseModel",
1114
+ '400': "ErrorResponseModel",
1115
+ '401': "ErrorResponseModel",
1116
+ '404': "ErrorResponseModel",
1117
+ '500': None,
1118
+ }
1119
+ response_data = await self.api_client.call_api(
1120
+ *_param,
1121
+ _request_timeout=_request_timeout
1122
+ )
1123
+ return response_data.response
1124
+
1125
+
1126
+ def _delete_volume_callback_serialize(
1127
+ self,
1128
+ volume_id,
1129
+ _request_auth,
1130
+ _content_type,
1131
+ _headers,
1132
+ _host_index,
1133
+ ) -> RequestSerialized:
1134
+
1135
+ _host = None
1136
+
1137
+ _collection_formats: Dict[str, str] = {
1138
+ }
1139
+
1140
+ _path_params: Dict[str, str] = {}
1141
+ _query_params: List[Tuple[str, str]] = []
1142
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1143
+ _form_params: List[Tuple[str, str]] = []
1144
+ _files: Dict[
1145
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1146
+ ] = {}
1147
+ _body_params: Optional[bytes] = None
1148
+
1149
+ # process the path parameters
1150
+ if volume_id is not None:
1151
+ _path_params['volume_id'] = volume_id
1152
+ # process the query parameters
1153
+ # process the header parameters
1154
+ # process the form parameters
1155
+ # process the body parameter
1156
+
1157
+
1158
+ # set the HTTP header `Accept`
1159
+ if 'Accept' not in _header_params:
1160
+ _header_params['Accept'] = self.api_client.select_header_accept(
1161
+ [
1162
+ 'application/json'
1163
+ ]
1164
+ )
1165
+
1166
+
1167
+ # authentication setting
1168
+ _auth_settings: List[str] = [
1169
+ 'apiKey'
1170
+ ]
1171
+
1172
+ return self.api_client.param_serialize(
1173
+ method='DELETE',
1174
+ resource_path='/core/volumes/{volume_id}/delete-callback',
1175
+ path_params=_path_params,
1176
+ query_params=_query_params,
1177
+ header_params=_header_params,
1178
+ body=_body_params,
1179
+ post_params=_form_params,
1180
+ files=_files,
1181
+ auth_settings=_auth_settings,
1182
+ collection_formats=_collection_formats,
1183
+ _host=_host,
1184
+ _request_auth=_request_auth
1185
+ )
1186
+
1187
+
1188
+
1189
+
1190
+ @validate_call
1191
+ async def update_vm_callback(
1192
+ self,
1193
+ vm_id: StrictInt,
1194
+ payload: AttachCallbackPayload,
1195
+ _request_timeout: Union[
1196
+ None,
1197
+ Annotated[StrictFloat, Field(gt=0)],
1198
+ Tuple[
1199
+ Annotated[StrictFloat, Field(gt=0)],
1200
+ Annotated[StrictFloat, Field(gt=0)]
1201
+ ]
1202
+ ] = None,
1203
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1204
+ _content_type: Optional[StrictStr] = None,
1205
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1206
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1207
+ ) -> AttachCallbackResponse:
1208
+ """Update virtual machine callback
1209
+
1210
+ Updates the callback URL for a specified virtual machine. Provide the new callback URL in the request body, along with the ID of the associated virtual machine in the path. For additional information on virtual machine callback URLs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/virtual-machines/callbacks-vms).
1211
+
1212
+ :param vm_id: (required)
1213
+ :type vm_id: int
1214
+ :param payload: (required)
1215
+ :type payload: AttachCallbackPayload
1216
+ :param _request_timeout: timeout setting for this request. If one
1217
+ number provided, it will be total request
1218
+ timeout. It can also be a pair (tuple) of
1219
+ (connection, read) timeouts.
1220
+ :type _request_timeout: int, tuple(int, int), optional
1221
+ :param _request_auth: set to override the auth_settings for an a single
1222
+ request; this effectively ignores the
1223
+ authentication in the spec for a single request.
1224
+ :type _request_auth: dict, optional
1225
+ :param _content_type: force content-type for the request.
1226
+ :type _content_type: str, Optional
1227
+ :param _headers: set to override the headers for a single
1228
+ request; this effectively ignores the headers
1229
+ in the spec for a single request.
1230
+ :type _headers: dict, optional
1231
+ :param _host_index: set to override the host_index for a single
1232
+ request; this effectively ignores the host_index
1233
+ in the spec for a single request.
1234
+ :type _host_index: int, optional
1235
+ :return: Returns the result object.
1236
+ """ # noqa: E501
1237
+
1238
+ _param = self._update_vm_callback_serialize(
1239
+ vm_id=vm_id,
1240
+ payload=payload,
1241
+ _request_auth=_request_auth,
1242
+ _content_type=_content_type,
1243
+ _headers=_headers,
1244
+ _host_index=_host_index
1245
+ )
1246
+
1247
+ _response_types_map: Dict[str, Optional[str]] = {
1248
+ '200': "AttachCallbackResponse",
1249
+ '400': "ErrorResponseModel",
1250
+ '401': "ErrorResponseModel",
1251
+ '404': "ErrorResponseModel",
1252
+ '500': None,
1253
+ }
1254
+ response_data = await self.api_client.call_api(
1255
+ *_param,
1256
+ _request_timeout=_request_timeout
1257
+ )
1258
+ await response_data.read()
1259
+ return self.api_client.response_deserialize(
1260
+ response_data=response_data,
1261
+ response_types_map=_response_types_map,
1262
+ ).data
1263
+
1264
+
1265
+ @validate_call
1266
+ async def update_vm_callback_with_http_info(
1267
+ self,
1268
+ vm_id: StrictInt,
1269
+ payload: AttachCallbackPayload,
1270
+ _request_timeout: Union[
1271
+ None,
1272
+ Annotated[StrictFloat, Field(gt=0)],
1273
+ Tuple[
1274
+ Annotated[StrictFloat, Field(gt=0)],
1275
+ Annotated[StrictFloat, Field(gt=0)]
1276
+ ]
1277
+ ] = None,
1278
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1279
+ _content_type: Optional[StrictStr] = None,
1280
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1281
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1282
+ ) -> ApiResponse[AttachCallbackResponse]:
1283
+ """Update virtual machine callback
1284
+
1285
+ Updates the callback URL for a specified virtual machine. Provide the new callback URL in the request body, along with the ID of the associated virtual machine in the path. For additional information on virtual machine callback URLs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/virtual-machines/callbacks-vms).
1286
+
1287
+ :param vm_id: (required)
1288
+ :type vm_id: int
1289
+ :param payload: (required)
1290
+ :type payload: AttachCallbackPayload
1291
+ :param _request_timeout: timeout setting for this request. If one
1292
+ number provided, it will be total request
1293
+ timeout. It can also be a pair (tuple) of
1294
+ (connection, read) timeouts.
1295
+ :type _request_timeout: int, tuple(int, int), optional
1296
+ :param _request_auth: set to override the auth_settings for an a single
1297
+ request; this effectively ignores the
1298
+ authentication in the spec for a single request.
1299
+ :type _request_auth: dict, optional
1300
+ :param _content_type: force content-type for the request.
1301
+ :type _content_type: str, Optional
1302
+ :param _headers: set to override the headers for a single
1303
+ request; this effectively ignores the headers
1304
+ in the spec for a single request.
1305
+ :type _headers: dict, optional
1306
+ :param _host_index: set to override the host_index for a single
1307
+ request; this effectively ignores the host_index
1308
+ in the spec for a single request.
1309
+ :type _host_index: int, optional
1310
+ :return: Returns the result object.
1311
+ """ # noqa: E501
1312
+
1313
+ _param = self._update_vm_callback_serialize(
1314
+ vm_id=vm_id,
1315
+ payload=payload,
1316
+ _request_auth=_request_auth,
1317
+ _content_type=_content_type,
1318
+ _headers=_headers,
1319
+ _host_index=_host_index
1320
+ )
1321
+
1322
+ _response_types_map: Dict[str, Optional[str]] = {
1323
+ '200': "AttachCallbackResponse",
1324
+ '400': "ErrorResponseModel",
1325
+ '401': "ErrorResponseModel",
1326
+ '404': "ErrorResponseModel",
1327
+ '500': None,
1328
+ }
1329
+ response_data = await self.api_client.call_api(
1330
+ *_param,
1331
+ _request_timeout=_request_timeout
1332
+ )
1333
+ await response_data.read()
1334
+ return self.api_client.response_deserialize(
1335
+ response_data=response_data,
1336
+ response_types_map=_response_types_map,
1337
+ )
1338
+
1339
+
1340
+ @validate_call
1341
+ async def update_vm_callback_without_preload_content(
1342
+ self,
1343
+ vm_id: StrictInt,
1344
+ payload: AttachCallbackPayload,
1345
+ _request_timeout: Union[
1346
+ None,
1347
+ Annotated[StrictFloat, Field(gt=0)],
1348
+ Tuple[
1349
+ Annotated[StrictFloat, Field(gt=0)],
1350
+ Annotated[StrictFloat, Field(gt=0)]
1351
+ ]
1352
+ ] = None,
1353
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1354
+ _content_type: Optional[StrictStr] = None,
1355
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1356
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1357
+ ) -> RESTResponseType:
1358
+ """Update virtual machine callback
1359
+
1360
+ Updates the callback URL for a specified virtual machine. Provide the new callback URL in the request body, along with the ID of the associated virtual machine in the path. For additional information on virtual machine callback URLs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/virtual-machines/callbacks-vms).
1361
+
1362
+ :param vm_id: (required)
1363
+ :type vm_id: int
1364
+ :param payload: (required)
1365
+ :type payload: AttachCallbackPayload
1366
+ :param _request_timeout: timeout setting for this request. If one
1367
+ number provided, it will be total request
1368
+ timeout. It can also be a pair (tuple) of
1369
+ (connection, read) timeouts.
1370
+ :type _request_timeout: int, tuple(int, int), optional
1371
+ :param _request_auth: set to override the auth_settings for an a single
1372
+ request; this effectively ignores the
1373
+ authentication in the spec for a single request.
1374
+ :type _request_auth: dict, optional
1375
+ :param _content_type: force content-type for the request.
1376
+ :type _content_type: str, Optional
1377
+ :param _headers: set to override the headers for a single
1378
+ request; this effectively ignores the headers
1379
+ in the spec for a single request.
1380
+ :type _headers: dict, optional
1381
+ :param _host_index: set to override the host_index for a single
1382
+ request; this effectively ignores the host_index
1383
+ in the spec for a single request.
1384
+ :type _host_index: int, optional
1385
+ :return: Returns the result object.
1386
+ """ # noqa: E501
1387
+
1388
+ _param = self._update_vm_callback_serialize(
1389
+ vm_id=vm_id,
1390
+ payload=payload,
1391
+ _request_auth=_request_auth,
1392
+ _content_type=_content_type,
1393
+ _headers=_headers,
1394
+ _host_index=_host_index
1395
+ )
1396
+
1397
+ _response_types_map: Dict[str, Optional[str]] = {
1398
+ '200': "AttachCallbackResponse",
1399
+ '400': "ErrorResponseModel",
1400
+ '401': "ErrorResponseModel",
1401
+ '404': "ErrorResponseModel",
1402
+ '500': None,
1403
+ }
1404
+ response_data = await self.api_client.call_api(
1405
+ *_param,
1406
+ _request_timeout=_request_timeout
1407
+ )
1408
+ return response_data.response
1409
+
1410
+
1411
+ def _update_vm_callback_serialize(
1412
+ self,
1413
+ vm_id,
1414
+ payload,
1415
+ _request_auth,
1416
+ _content_type,
1417
+ _headers,
1418
+ _host_index,
1419
+ ) -> RequestSerialized:
1420
+
1421
+ _host = None
1422
+
1423
+ _collection_formats: Dict[str, str] = {
1424
+ }
1425
+
1426
+ _path_params: Dict[str, str] = {}
1427
+ _query_params: List[Tuple[str, str]] = []
1428
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1429
+ _form_params: List[Tuple[str, str]] = []
1430
+ _files: Dict[
1431
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1432
+ ] = {}
1433
+ _body_params: Optional[bytes] = None
1434
+
1435
+ # process the path parameters
1436
+ if vm_id is not None:
1437
+ _path_params['vm_id'] = vm_id
1438
+ # process the query parameters
1439
+ # process the header parameters
1440
+ # process the form parameters
1441
+ # process the body parameter
1442
+ if payload is not None:
1443
+ _body_params = payload
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
+ # set the HTTP header `Content-Type`
1455
+ if _content_type:
1456
+ _header_params['Content-Type'] = _content_type
1457
+ else:
1458
+ _default_content_type = (
1459
+ self.api_client.select_header_content_type(
1460
+ [
1461
+ 'application/json'
1462
+ ]
1463
+ )
1464
+ )
1465
+ if _default_content_type is not None:
1466
+ _header_params['Content-Type'] = _default_content_type
1467
+
1468
+ # authentication setting
1469
+ _auth_settings: List[str] = [
1470
+ 'apiKey'
1471
+ ]
1472
+
1473
+ return self.api_client.param_serialize(
1474
+ method='PUT',
1475
+ resource_path='/core/virtual-machines/{vm_id}/update-callback',
1476
+ path_params=_path_params,
1477
+ query_params=_query_params,
1478
+ header_params=_header_params,
1479
+ body=_body_params,
1480
+ post_params=_form_params,
1481
+ files=_files,
1482
+ auth_settings=_auth_settings,
1483
+ collection_formats=_collection_formats,
1484
+ _host=_host,
1485
+ _request_auth=_request_auth
1486
+ )
1487
+
1488
+
1489
+
1490
+
1491
+ @validate_call
1492
+ async def update_volume_callback(
1493
+ self,
1494
+ volume_id: StrictInt,
1495
+ payload: AttachCallbackPayload,
1496
+ _request_timeout: Union[
1497
+ None,
1498
+ Annotated[StrictFloat, Field(gt=0)],
1499
+ Tuple[
1500
+ Annotated[StrictFloat, Field(gt=0)],
1501
+ Annotated[StrictFloat, Field(gt=0)]
1502
+ ]
1503
+ ] = None,
1504
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1505
+ _content_type: Optional[StrictStr] = None,
1506
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1507
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1508
+ ) -> AttachCallbackResponse:
1509
+ """Update volume callback
1510
+
1511
+ Updates the callback URL for a specified volume. Provide the new callback URL in the request body, along with the ID of the associated volume in the path. For additional information on volume callback URLs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/volumes/volume-callbacks/update-callback-volume/).
1512
+
1513
+ :param volume_id: (required)
1514
+ :type volume_id: int
1515
+ :param payload: (required)
1516
+ :type payload: AttachCallbackPayload
1517
+ :param _request_timeout: timeout setting for this request. If one
1518
+ number provided, it will be total request
1519
+ timeout. It can also be a pair (tuple) of
1520
+ (connection, read) timeouts.
1521
+ :type _request_timeout: int, tuple(int, int), optional
1522
+ :param _request_auth: set to override the auth_settings for an a single
1523
+ request; this effectively ignores the
1524
+ authentication in the spec for a single request.
1525
+ :type _request_auth: dict, optional
1526
+ :param _content_type: force content-type for the request.
1527
+ :type _content_type: str, Optional
1528
+ :param _headers: set to override the headers for a single
1529
+ request; this effectively ignores the headers
1530
+ in the spec for a single request.
1531
+ :type _headers: dict, optional
1532
+ :param _host_index: set to override the host_index for a single
1533
+ request; this effectively ignores the host_index
1534
+ in the spec for a single request.
1535
+ :type _host_index: int, optional
1536
+ :return: Returns the result object.
1537
+ """ # noqa: E501
1538
+
1539
+ _param = self._update_volume_callback_serialize(
1540
+ volume_id=volume_id,
1541
+ payload=payload,
1542
+ _request_auth=_request_auth,
1543
+ _content_type=_content_type,
1544
+ _headers=_headers,
1545
+ _host_index=_host_index
1546
+ )
1547
+
1548
+ _response_types_map: Dict[str, Optional[str]] = {
1549
+ '200': "AttachCallbackResponse",
1550
+ '400': "ErrorResponseModel",
1551
+ '401': "ErrorResponseModel",
1552
+ '404': "ErrorResponseModel",
1553
+ '500': None,
1554
+ }
1555
+ response_data = await self.api_client.call_api(
1556
+ *_param,
1557
+ _request_timeout=_request_timeout
1558
+ )
1559
+ await response_data.read()
1560
+ return self.api_client.response_deserialize(
1561
+ response_data=response_data,
1562
+ response_types_map=_response_types_map,
1563
+ ).data
1564
+
1565
+
1566
+ @validate_call
1567
+ async def update_volume_callback_with_http_info(
1568
+ self,
1569
+ volume_id: StrictInt,
1570
+ payload: AttachCallbackPayload,
1571
+ _request_timeout: Union[
1572
+ None,
1573
+ Annotated[StrictFloat, Field(gt=0)],
1574
+ Tuple[
1575
+ Annotated[StrictFloat, Field(gt=0)],
1576
+ Annotated[StrictFloat, Field(gt=0)]
1577
+ ]
1578
+ ] = None,
1579
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1580
+ _content_type: Optional[StrictStr] = None,
1581
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1582
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1583
+ ) -> ApiResponse[AttachCallbackResponse]:
1584
+ """Update volume callback
1585
+
1586
+ Updates the callback URL for a specified volume. Provide the new callback URL in the request body, along with the ID of the associated volume in the path. For additional information on volume callback URLs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/volumes/volume-callbacks/update-callback-volume/).
1587
+
1588
+ :param volume_id: (required)
1589
+ :type volume_id: int
1590
+ :param payload: (required)
1591
+ :type payload: AttachCallbackPayload
1592
+ :param _request_timeout: timeout setting for this request. If one
1593
+ number provided, it will be total request
1594
+ timeout. It can also be a pair (tuple) of
1595
+ (connection, read) timeouts.
1596
+ :type _request_timeout: int, tuple(int, int), optional
1597
+ :param _request_auth: set to override the auth_settings for an a single
1598
+ request; this effectively ignores the
1599
+ authentication in the spec for a single request.
1600
+ :type _request_auth: dict, optional
1601
+ :param _content_type: force content-type for the request.
1602
+ :type _content_type: str, Optional
1603
+ :param _headers: set to override the headers for a single
1604
+ request; this effectively ignores the headers
1605
+ in the spec for a single request.
1606
+ :type _headers: dict, optional
1607
+ :param _host_index: set to override the host_index for a single
1608
+ request; this effectively ignores the host_index
1609
+ in the spec for a single request.
1610
+ :type _host_index: int, optional
1611
+ :return: Returns the result object.
1612
+ """ # noqa: E501
1613
+
1614
+ _param = self._update_volume_callback_serialize(
1615
+ volume_id=volume_id,
1616
+ payload=payload,
1617
+ _request_auth=_request_auth,
1618
+ _content_type=_content_type,
1619
+ _headers=_headers,
1620
+ _host_index=_host_index
1621
+ )
1622
+
1623
+ _response_types_map: Dict[str, Optional[str]] = {
1624
+ '200': "AttachCallbackResponse",
1625
+ '400': "ErrorResponseModel",
1626
+ '401': "ErrorResponseModel",
1627
+ '404': "ErrorResponseModel",
1628
+ '500': None,
1629
+ }
1630
+ response_data = await self.api_client.call_api(
1631
+ *_param,
1632
+ _request_timeout=_request_timeout
1633
+ )
1634
+ await response_data.read()
1635
+ return self.api_client.response_deserialize(
1636
+ response_data=response_data,
1637
+ response_types_map=_response_types_map,
1638
+ )
1639
+
1640
+
1641
+ @validate_call
1642
+ async def update_volume_callback_without_preload_content(
1643
+ self,
1644
+ volume_id: StrictInt,
1645
+ payload: AttachCallbackPayload,
1646
+ _request_timeout: Union[
1647
+ None,
1648
+ Annotated[StrictFloat, Field(gt=0)],
1649
+ Tuple[
1650
+ Annotated[StrictFloat, Field(gt=0)],
1651
+ Annotated[StrictFloat, Field(gt=0)]
1652
+ ]
1653
+ ] = None,
1654
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1655
+ _content_type: Optional[StrictStr] = None,
1656
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1657
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1658
+ ) -> RESTResponseType:
1659
+ """Update volume callback
1660
+
1661
+ Updates the callback URL for a specified volume. Provide the new callback URL in the request body, along with the ID of the associated volume in the path. For additional information on volume callback URLs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/volumes/volume-callbacks/update-callback-volume/).
1662
+
1663
+ :param volume_id: (required)
1664
+ :type volume_id: int
1665
+ :param payload: (required)
1666
+ :type payload: AttachCallbackPayload
1667
+ :param _request_timeout: timeout setting for this request. If one
1668
+ number provided, it will be total request
1669
+ timeout. It can also be a pair (tuple) of
1670
+ (connection, read) timeouts.
1671
+ :type _request_timeout: int, tuple(int, int), optional
1672
+ :param _request_auth: set to override the auth_settings for an a single
1673
+ request; this effectively ignores the
1674
+ authentication in the spec for a single request.
1675
+ :type _request_auth: dict, optional
1676
+ :param _content_type: force content-type for the request.
1677
+ :type _content_type: str, Optional
1678
+ :param _headers: set to override the headers for a single
1679
+ request; this effectively ignores the headers
1680
+ in the spec for a single request.
1681
+ :type _headers: dict, optional
1682
+ :param _host_index: set to override the host_index for a single
1683
+ request; this effectively ignores the host_index
1684
+ in the spec for a single request.
1685
+ :type _host_index: int, optional
1686
+ :return: Returns the result object.
1687
+ """ # noqa: E501
1688
+
1689
+ _param = self._update_volume_callback_serialize(
1690
+ volume_id=volume_id,
1691
+ payload=payload,
1692
+ _request_auth=_request_auth,
1693
+ _content_type=_content_type,
1694
+ _headers=_headers,
1695
+ _host_index=_host_index
1696
+ )
1697
+
1698
+ _response_types_map: Dict[str, Optional[str]] = {
1699
+ '200': "AttachCallbackResponse",
1700
+ '400': "ErrorResponseModel",
1701
+ '401': "ErrorResponseModel",
1702
+ '404': "ErrorResponseModel",
1703
+ '500': None,
1704
+ }
1705
+ response_data = await self.api_client.call_api(
1706
+ *_param,
1707
+ _request_timeout=_request_timeout
1708
+ )
1709
+ return response_data.response
1710
+
1711
+
1712
+ def _update_volume_callback_serialize(
1713
+ self,
1714
+ volume_id,
1715
+ payload,
1716
+ _request_auth,
1717
+ _content_type,
1718
+ _headers,
1719
+ _host_index,
1720
+ ) -> RequestSerialized:
1721
+
1722
+ _host = None
1723
+
1724
+ _collection_formats: Dict[str, str] = {
1725
+ }
1726
+
1727
+ _path_params: Dict[str, str] = {}
1728
+ _query_params: List[Tuple[str, str]] = []
1729
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1730
+ _form_params: List[Tuple[str, str]] = []
1731
+ _files: Dict[
1732
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1733
+ ] = {}
1734
+ _body_params: Optional[bytes] = None
1735
+
1736
+ # process the path parameters
1737
+ if volume_id is not None:
1738
+ _path_params['volume_id'] = volume_id
1739
+ # process the query parameters
1740
+ # process the header parameters
1741
+ # process the form parameters
1742
+ # process the body parameter
1743
+ if payload is not None:
1744
+ _body_params = payload
1745
+
1746
+
1747
+ # set the HTTP header `Accept`
1748
+ if 'Accept' not in _header_params:
1749
+ _header_params['Accept'] = self.api_client.select_header_accept(
1750
+ [
1751
+ 'application/json'
1752
+ ]
1753
+ )
1754
+
1755
+ # set the HTTP header `Content-Type`
1756
+ if _content_type:
1757
+ _header_params['Content-Type'] = _content_type
1758
+ else:
1759
+ _default_content_type = (
1760
+ self.api_client.select_header_content_type(
1761
+ [
1762
+ 'application/json'
1763
+ ]
1764
+ )
1765
+ )
1766
+ if _default_content_type is not None:
1767
+ _header_params['Content-Type'] = _default_content_type
1768
+
1769
+ # authentication setting
1770
+ _auth_settings: List[str] = [
1771
+ 'apiKey'
1772
+ ]
1773
+
1774
+ return self.api_client.param_serialize(
1775
+ method='PUT',
1776
+ resource_path='/core/volumes/{volume_id}/update-callback',
1777
+ path_params=_path_params,
1778
+ query_params=_query_params,
1779
+ header_params=_header_params,
1780
+ body=_body_params,
1781
+ post_params=_form_params,
1782
+ files=_files,
1783
+ auth_settings=_auth_settings,
1784
+ collection_formats=_collection_formats,
1785
+ _host=_host,
1786
+ _request_auth=_request_auth
1787
+ )
1788
+
1789
+