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,1492 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Infrahub-API
5
+
6
+ Leverage the Infrahub API and Hyperstack platform to easily create, manage, and scale powerful GPU virtual machines and their associated resources. Access this SDK to automate the deployment of your workloads and streamline your infrastructure management. To contribute, please raise an issue with a bug report, feature request, feedback, or general inquiry.
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictBytes, StrictInt, StrictStr
20
+ from typing import Optional, Tuple, Union
21
+ from typing_extensions import Annotated
22
+ from ..models.response_model import ResponseModel
23
+ from ..models.template import Template
24
+ from ..models.templates import Templates
25
+ from ..models.update_template import UpdateTemplate
26
+
27
+ from ..api_client import ApiClient, RequestSerialized
28
+ from ..api_response import ApiResponse
29
+ from ..rest import RESTResponseType
30
+
31
+
32
+ class TemplateApi:
33
+ """NOTE: This class is auto generated by OpenAPI Generator
34
+ Ref: https://openapi-generator.tech
35
+
36
+ Do not edit the class manually.
37
+ """
38
+
39
+ def __init__(self, api_client=None) -> None:
40
+ if api_client is None:
41
+ api_client = ApiClient.get_default()
42
+ self.api_client = api_client
43
+
44
+
45
+ @validate_call
46
+ async def create_template(
47
+ self,
48
+ content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="YAML file is required")],
49
+ description: Annotated[StrictStr, Field(description="description is required")],
50
+ is_public: Annotated[StrictStr, Field(description="is_public is required")],
51
+ name: Annotated[StrictStr, Field(description="name is required")],
52
+ _request_timeout: Union[
53
+ None,
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Tuple[
56
+ Annotated[StrictFloat, Field(gt=0)],
57
+ Annotated[StrictFloat, Field(gt=0)]
58
+ ]
59
+ ] = None,
60
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
61
+ _content_type: Optional[StrictStr] = None,
62
+ _headers: Optional[Dict[StrictStr, Any]] = None,
63
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
64
+ ) -> Template:
65
+ """Create template
66
+
67
+ Creates a resource template for deployment.
68
+
69
+ :param content: YAML file is required (required)
70
+ :type content: bytearray
71
+ :param description: description is required (required)
72
+ :type description: str
73
+ :param is_public: is_public is required (required)
74
+ :type is_public: str
75
+ :param name: name is required (required)
76
+ :type name: str
77
+ :param _request_timeout: timeout setting for this request. If one
78
+ number provided, it will be total request
79
+ timeout. It can also be a pair (tuple) of
80
+ (connection, read) timeouts.
81
+ :type _request_timeout: int, tuple(int, int), optional
82
+ :param _request_auth: set to override the auth_settings for an a single
83
+ request; this effectively ignores the
84
+ authentication in the spec for a single request.
85
+ :type _request_auth: dict, optional
86
+ :param _content_type: force content-type for the request.
87
+ :type _content_type: str, Optional
88
+ :param _headers: set to override the headers for a single
89
+ request; this effectively ignores the headers
90
+ in the spec for a single request.
91
+ :type _headers: dict, optional
92
+ :param _host_index: set to override the host_index for a single
93
+ request; this effectively ignores the host_index
94
+ in the spec for a single request.
95
+ :type _host_index: int, optional
96
+ :return: Returns the result object.
97
+ """ # noqa: E501
98
+
99
+ _param = self._create_template_serialize(
100
+ content=content,
101
+ description=description,
102
+ is_public=is_public,
103
+ name=name,
104
+ _request_auth=_request_auth,
105
+ _content_type=_content_type,
106
+ _headers=_headers,
107
+ _host_index=_host_index
108
+ )
109
+
110
+ _response_types_map: Dict[str, Optional[str]] = {
111
+ '201': "Template",
112
+ '400': "ErrorResponseModel",
113
+ '401': "ErrorResponseModel",
114
+ '500': None,
115
+ }
116
+ response_data = await self.api_client.call_api(
117
+ *_param,
118
+ _request_timeout=_request_timeout
119
+ )
120
+ await response_data.read()
121
+ return self.api_client.response_deserialize(
122
+ response_data=response_data,
123
+ response_types_map=_response_types_map,
124
+ ).data
125
+
126
+
127
+ @validate_call
128
+ async def create_template_with_http_info(
129
+ self,
130
+ content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="YAML file is required")],
131
+ description: Annotated[StrictStr, Field(description="description is required")],
132
+ is_public: Annotated[StrictStr, Field(description="is_public is required")],
133
+ name: Annotated[StrictStr, Field(description="name is required")],
134
+ _request_timeout: Union[
135
+ None,
136
+ Annotated[StrictFloat, Field(gt=0)],
137
+ Tuple[
138
+ Annotated[StrictFloat, Field(gt=0)],
139
+ Annotated[StrictFloat, Field(gt=0)]
140
+ ]
141
+ ] = None,
142
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
143
+ _content_type: Optional[StrictStr] = None,
144
+ _headers: Optional[Dict[StrictStr, Any]] = None,
145
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
146
+ ) -> ApiResponse[Template]:
147
+ """Create template
148
+
149
+ Creates a resource template for deployment.
150
+
151
+ :param content: YAML file is required (required)
152
+ :type content: bytearray
153
+ :param description: description is required (required)
154
+ :type description: str
155
+ :param is_public: is_public is required (required)
156
+ :type is_public: str
157
+ :param name: name is required (required)
158
+ :type name: str
159
+ :param _request_timeout: timeout setting for this request. If one
160
+ number provided, it will be total request
161
+ timeout. It can also be a pair (tuple) of
162
+ (connection, read) timeouts.
163
+ :type _request_timeout: int, tuple(int, int), optional
164
+ :param _request_auth: set to override the auth_settings for an a single
165
+ request; this effectively ignores the
166
+ authentication in the spec for a single request.
167
+ :type _request_auth: dict, optional
168
+ :param _content_type: force content-type for the request.
169
+ :type _content_type: str, Optional
170
+ :param _headers: set to override the headers for a single
171
+ request; this effectively ignores the headers
172
+ in the spec for a single request.
173
+ :type _headers: dict, optional
174
+ :param _host_index: set to override the host_index for a single
175
+ request; this effectively ignores the host_index
176
+ in the spec for a single request.
177
+ :type _host_index: int, optional
178
+ :return: Returns the result object.
179
+ """ # noqa: E501
180
+
181
+ _param = self._create_template_serialize(
182
+ content=content,
183
+ description=description,
184
+ is_public=is_public,
185
+ name=name,
186
+ _request_auth=_request_auth,
187
+ _content_type=_content_type,
188
+ _headers=_headers,
189
+ _host_index=_host_index
190
+ )
191
+
192
+ _response_types_map: Dict[str, Optional[str]] = {
193
+ '201': "Template",
194
+ '400': "ErrorResponseModel",
195
+ '401': "ErrorResponseModel",
196
+ '500': None,
197
+ }
198
+ response_data = await self.api_client.call_api(
199
+ *_param,
200
+ _request_timeout=_request_timeout
201
+ )
202
+ await response_data.read()
203
+ return self.api_client.response_deserialize(
204
+ response_data=response_data,
205
+ response_types_map=_response_types_map,
206
+ )
207
+
208
+
209
+ @validate_call
210
+ async def create_template_without_preload_content(
211
+ self,
212
+ content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="YAML file is required")],
213
+ description: Annotated[StrictStr, Field(description="description is required")],
214
+ is_public: Annotated[StrictStr, Field(description="is_public is required")],
215
+ name: Annotated[StrictStr, Field(description="name is required")],
216
+ _request_timeout: Union[
217
+ None,
218
+ Annotated[StrictFloat, Field(gt=0)],
219
+ Tuple[
220
+ Annotated[StrictFloat, Field(gt=0)],
221
+ Annotated[StrictFloat, Field(gt=0)]
222
+ ]
223
+ ] = None,
224
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
225
+ _content_type: Optional[StrictStr] = None,
226
+ _headers: Optional[Dict[StrictStr, Any]] = None,
227
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
228
+ ) -> RESTResponseType:
229
+ """Create template
230
+
231
+ Creates a resource template for deployment.
232
+
233
+ :param content: YAML file is required (required)
234
+ :type content: bytearray
235
+ :param description: description is required (required)
236
+ :type description: str
237
+ :param is_public: is_public is required (required)
238
+ :type is_public: str
239
+ :param name: name is required (required)
240
+ :type name: str
241
+ :param _request_timeout: timeout setting for this request. If one
242
+ number provided, it will be total request
243
+ timeout. It can also be a pair (tuple) of
244
+ (connection, read) timeouts.
245
+ :type _request_timeout: int, tuple(int, int), optional
246
+ :param _request_auth: set to override the auth_settings for an a single
247
+ request; this effectively ignores the
248
+ authentication in the spec for a single request.
249
+ :type _request_auth: dict, optional
250
+ :param _content_type: force content-type for the request.
251
+ :type _content_type: str, Optional
252
+ :param _headers: set to override the headers for a single
253
+ request; this effectively ignores the headers
254
+ in the spec for a single request.
255
+ :type _headers: dict, optional
256
+ :param _host_index: set to override the host_index for a single
257
+ request; this effectively ignores the host_index
258
+ in the spec for a single request.
259
+ :type _host_index: int, optional
260
+ :return: Returns the result object.
261
+ """ # noqa: E501
262
+
263
+ _param = self._create_template_serialize(
264
+ content=content,
265
+ description=description,
266
+ is_public=is_public,
267
+ name=name,
268
+ _request_auth=_request_auth,
269
+ _content_type=_content_type,
270
+ _headers=_headers,
271
+ _host_index=_host_index
272
+ )
273
+
274
+ _response_types_map: Dict[str, Optional[str]] = {
275
+ '201': "Template",
276
+ '400': "ErrorResponseModel",
277
+ '401': "ErrorResponseModel",
278
+ '500': None,
279
+ }
280
+ response_data = await self.api_client.call_api(
281
+ *_param,
282
+ _request_timeout=_request_timeout
283
+ )
284
+ return response_data.response
285
+
286
+
287
+ def _create_template_serialize(
288
+ self,
289
+ content,
290
+ description,
291
+ is_public,
292
+ name,
293
+ _request_auth,
294
+ _content_type,
295
+ _headers,
296
+ _host_index,
297
+ ) -> RequestSerialized:
298
+
299
+ _host = None
300
+
301
+ _collection_formats: Dict[str, str] = {
302
+ }
303
+
304
+ _path_params: Dict[str, str] = {}
305
+ _query_params: List[Tuple[str, str]] = []
306
+ _header_params: Dict[str, Optional[str]] = _headers or {}
307
+ _form_params: List[Tuple[str, str]] = []
308
+ _files: Dict[
309
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
310
+ ] = {}
311
+ _body_params: Optional[bytes] = None
312
+
313
+ # process the path parameters
314
+ # process the query parameters
315
+ # process the header parameters
316
+ # process the form parameters
317
+ if content is not None:
318
+ _files['content'] = content
319
+ if description is not None:
320
+ _form_params.append(('description', description))
321
+ if is_public is not None:
322
+ _form_params.append(('is_public', is_public))
323
+ if name is not None:
324
+ _form_params.append(('name', name))
325
+ # process the body parameter
326
+
327
+
328
+ # set the HTTP header `Accept`
329
+ if 'Accept' not in _header_params:
330
+ _header_params['Accept'] = self.api_client.select_header_accept(
331
+ [
332
+ 'application/json'
333
+ ]
334
+ )
335
+
336
+ # set the HTTP header `Content-Type`
337
+ if _content_type:
338
+ _header_params['Content-Type'] = _content_type
339
+ else:
340
+ _default_content_type = (
341
+ self.api_client.select_header_content_type(
342
+ [
343
+ 'multipart/form-data'
344
+ ]
345
+ )
346
+ )
347
+ if _default_content_type is not None:
348
+ _header_params['Content-Type'] = _default_content_type
349
+
350
+ # authentication setting
351
+ _auth_settings: List[str] = [
352
+ 'apiKey'
353
+ ]
354
+
355
+ return self.api_client.param_serialize(
356
+ method='POST',
357
+ resource_path='/core/marketplace/templates',
358
+ path_params=_path_params,
359
+ query_params=_query_params,
360
+ header_params=_header_params,
361
+ body=_body_params,
362
+ post_params=_form_params,
363
+ files=_files,
364
+ auth_settings=_auth_settings,
365
+ collection_formats=_collection_formats,
366
+ _host=_host,
367
+ _request_auth=_request_auth
368
+ )
369
+
370
+
371
+
372
+
373
+ @validate_call
374
+ async def delete_template(
375
+ self,
376
+ id: StrictInt,
377
+ _request_timeout: Union[
378
+ None,
379
+ Annotated[StrictFloat, Field(gt=0)],
380
+ Tuple[
381
+ Annotated[StrictFloat, Field(gt=0)],
382
+ Annotated[StrictFloat, Field(gt=0)]
383
+ ]
384
+ ] = None,
385
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
386
+ _content_type: Optional[StrictStr] = None,
387
+ _headers: Optional[Dict[StrictStr, Any]] = None,
388
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
389
+ ) -> ResponseModel:
390
+ """Delete template
391
+
392
+ Permanently deletes a template. Supply the template ID in the path to delete the specified template.
393
+
394
+ :param id: (required)
395
+ :type id: int
396
+ :param _request_timeout: timeout setting for this request. If one
397
+ number provided, it will be total request
398
+ timeout. It can also be a pair (tuple) of
399
+ (connection, read) timeouts.
400
+ :type _request_timeout: int, tuple(int, int), optional
401
+ :param _request_auth: set to override the auth_settings for an a single
402
+ request; this effectively ignores the
403
+ authentication in the spec for a single request.
404
+ :type _request_auth: dict, optional
405
+ :param _content_type: force content-type for the request.
406
+ :type _content_type: str, Optional
407
+ :param _headers: set to override the headers for a single
408
+ request; this effectively ignores the headers
409
+ in the spec for a single request.
410
+ :type _headers: dict, optional
411
+ :param _host_index: set to override the host_index for a single
412
+ request; this effectively ignores the host_index
413
+ in the spec for a single request.
414
+ :type _host_index: int, optional
415
+ :return: Returns the result object.
416
+ """ # noqa: E501
417
+
418
+ _param = self._delete_template_serialize(
419
+ id=id,
420
+ _request_auth=_request_auth,
421
+ _content_type=_content_type,
422
+ _headers=_headers,
423
+ _host_index=_host_index
424
+ )
425
+
426
+ _response_types_map: Dict[str, Optional[str]] = {
427
+ '200': "ResponseModel",
428
+ '400': "ErrorResponseModel",
429
+ '401': "ErrorResponseModel",
430
+ '404': "ErrorResponseModel",
431
+ '500': None,
432
+ }
433
+ response_data = await self.api_client.call_api(
434
+ *_param,
435
+ _request_timeout=_request_timeout
436
+ )
437
+ await response_data.read()
438
+ return self.api_client.response_deserialize(
439
+ response_data=response_data,
440
+ response_types_map=_response_types_map,
441
+ ).data
442
+
443
+
444
+ @validate_call
445
+ async def delete_template_with_http_info(
446
+ self,
447
+ id: StrictInt,
448
+ _request_timeout: Union[
449
+ None,
450
+ Annotated[StrictFloat, Field(gt=0)],
451
+ Tuple[
452
+ Annotated[StrictFloat, Field(gt=0)],
453
+ Annotated[StrictFloat, Field(gt=0)]
454
+ ]
455
+ ] = None,
456
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
457
+ _content_type: Optional[StrictStr] = None,
458
+ _headers: Optional[Dict[StrictStr, Any]] = None,
459
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
460
+ ) -> ApiResponse[ResponseModel]:
461
+ """Delete template
462
+
463
+ Permanently deletes a template. Supply the template ID in the path to delete the specified template.
464
+
465
+ :param id: (required)
466
+ :type id: int
467
+ :param _request_timeout: timeout setting for this request. If one
468
+ number provided, it will be total request
469
+ timeout. It can also be a pair (tuple) of
470
+ (connection, read) timeouts.
471
+ :type _request_timeout: int, tuple(int, int), optional
472
+ :param _request_auth: set to override the auth_settings for an a single
473
+ request; this effectively ignores the
474
+ authentication in the spec for a single request.
475
+ :type _request_auth: dict, optional
476
+ :param _content_type: force content-type for the request.
477
+ :type _content_type: str, Optional
478
+ :param _headers: set to override the headers for a single
479
+ request; this effectively ignores the headers
480
+ in the spec for a single request.
481
+ :type _headers: dict, optional
482
+ :param _host_index: set to override the host_index for a single
483
+ request; this effectively ignores the host_index
484
+ in the spec for a single request.
485
+ :type _host_index: int, optional
486
+ :return: Returns the result object.
487
+ """ # noqa: E501
488
+
489
+ _param = self._delete_template_serialize(
490
+ id=id,
491
+ _request_auth=_request_auth,
492
+ _content_type=_content_type,
493
+ _headers=_headers,
494
+ _host_index=_host_index
495
+ )
496
+
497
+ _response_types_map: Dict[str, Optional[str]] = {
498
+ '200': "ResponseModel",
499
+ '400': "ErrorResponseModel",
500
+ '401': "ErrorResponseModel",
501
+ '404': "ErrorResponseModel",
502
+ '500': None,
503
+ }
504
+ response_data = await self.api_client.call_api(
505
+ *_param,
506
+ _request_timeout=_request_timeout
507
+ )
508
+ await response_data.read()
509
+ return self.api_client.response_deserialize(
510
+ response_data=response_data,
511
+ response_types_map=_response_types_map,
512
+ )
513
+
514
+
515
+ @validate_call
516
+ async def delete_template_without_preload_content(
517
+ self,
518
+ id: StrictInt,
519
+ _request_timeout: Union[
520
+ None,
521
+ Annotated[StrictFloat, Field(gt=0)],
522
+ Tuple[
523
+ Annotated[StrictFloat, Field(gt=0)],
524
+ Annotated[StrictFloat, Field(gt=0)]
525
+ ]
526
+ ] = None,
527
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
528
+ _content_type: Optional[StrictStr] = None,
529
+ _headers: Optional[Dict[StrictStr, Any]] = None,
530
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
531
+ ) -> RESTResponseType:
532
+ """Delete template
533
+
534
+ Permanently deletes a template. Supply the template ID in the path to delete the specified template.
535
+
536
+ :param id: (required)
537
+ :type id: int
538
+ :param _request_timeout: timeout setting for this request. If one
539
+ number provided, it will be total request
540
+ timeout. It can also be a pair (tuple) of
541
+ (connection, read) timeouts.
542
+ :type _request_timeout: int, tuple(int, int), optional
543
+ :param _request_auth: set to override the auth_settings for an a single
544
+ request; this effectively ignores the
545
+ authentication in the spec for a single request.
546
+ :type _request_auth: dict, optional
547
+ :param _content_type: force content-type for the request.
548
+ :type _content_type: str, Optional
549
+ :param _headers: set to override the headers for a single
550
+ request; this effectively ignores the headers
551
+ in the spec for a single request.
552
+ :type _headers: dict, optional
553
+ :param _host_index: set to override the host_index for a single
554
+ request; this effectively ignores the host_index
555
+ in the spec for a single request.
556
+ :type _host_index: int, optional
557
+ :return: Returns the result object.
558
+ """ # noqa: E501
559
+
560
+ _param = self._delete_template_serialize(
561
+ id=id,
562
+ _request_auth=_request_auth,
563
+ _content_type=_content_type,
564
+ _headers=_headers,
565
+ _host_index=_host_index
566
+ )
567
+
568
+ _response_types_map: Dict[str, Optional[str]] = {
569
+ '200': "ResponseModel",
570
+ '400': "ErrorResponseModel",
571
+ '401': "ErrorResponseModel",
572
+ '404': "ErrorResponseModel",
573
+ '500': None,
574
+ }
575
+ response_data = await self.api_client.call_api(
576
+ *_param,
577
+ _request_timeout=_request_timeout
578
+ )
579
+ return response_data.response
580
+
581
+
582
+ def _delete_template_serialize(
583
+ self,
584
+ id,
585
+ _request_auth,
586
+ _content_type,
587
+ _headers,
588
+ _host_index,
589
+ ) -> RequestSerialized:
590
+
591
+ _host = None
592
+
593
+ _collection_formats: Dict[str, str] = {
594
+ }
595
+
596
+ _path_params: Dict[str, str] = {}
597
+ _query_params: List[Tuple[str, str]] = []
598
+ _header_params: Dict[str, Optional[str]] = _headers or {}
599
+ _form_params: List[Tuple[str, str]] = []
600
+ _files: Dict[
601
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
602
+ ] = {}
603
+ _body_params: Optional[bytes] = None
604
+
605
+ # process the path parameters
606
+ if id is not None:
607
+ _path_params['id'] = id
608
+ # process the query parameters
609
+ # process the header parameters
610
+ # process the form parameters
611
+ # process the body parameter
612
+
613
+
614
+ # set the HTTP header `Accept`
615
+ if 'Accept' not in _header_params:
616
+ _header_params['Accept'] = self.api_client.select_header_accept(
617
+ [
618
+ 'application/json'
619
+ ]
620
+ )
621
+
622
+
623
+ # authentication setting
624
+ _auth_settings: List[str] = [
625
+ 'apiKey'
626
+ ]
627
+
628
+ return self.api_client.param_serialize(
629
+ method='DELETE',
630
+ resource_path='/core/marketplace/templates/{id}',
631
+ path_params=_path_params,
632
+ query_params=_query_params,
633
+ header_params=_header_params,
634
+ body=_body_params,
635
+ post_params=_form_params,
636
+ files=_files,
637
+ auth_settings=_auth_settings,
638
+ collection_formats=_collection_formats,
639
+ _host=_host,
640
+ _request_auth=_request_auth
641
+ )
642
+
643
+
644
+
645
+
646
+ @validate_call
647
+ async def get_template(
648
+ self,
649
+ id: StrictInt,
650
+ _request_timeout: Union[
651
+ None,
652
+ Annotated[StrictFloat, Field(gt=0)],
653
+ Tuple[
654
+ Annotated[StrictFloat, Field(gt=0)],
655
+ Annotated[StrictFloat, Field(gt=0)]
656
+ ]
657
+ ] = None,
658
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
659
+ _content_type: Optional[StrictStr] = None,
660
+ _headers: Optional[Dict[StrictStr, Any]] = None,
661
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
662
+ ) -> Template:
663
+ """Retrieve template details
664
+
665
+ Retrieves the resource configuration details for a specified template.Provide the template ID in the path to retrieve details for the specified template.For additional information on template configuration details,[**click here**](https://docs.hyperstack.cloud/docs/api-references/).
666
+
667
+ :param id: (required)
668
+ :type id: int
669
+ :param _request_timeout: timeout setting for this request. If one
670
+ number provided, it will be total request
671
+ timeout. It can also be a pair (tuple) of
672
+ (connection, read) timeouts.
673
+ :type _request_timeout: int, tuple(int, int), optional
674
+ :param _request_auth: set to override the auth_settings for an a single
675
+ request; this effectively ignores the
676
+ authentication in the spec for a single request.
677
+ :type _request_auth: dict, optional
678
+ :param _content_type: force content-type for the request.
679
+ :type _content_type: str, Optional
680
+ :param _headers: set to override the headers for a single
681
+ request; this effectively ignores the headers
682
+ in the spec for a single request.
683
+ :type _headers: dict, optional
684
+ :param _host_index: set to override the host_index for a single
685
+ request; this effectively ignores the host_index
686
+ in the spec for a single request.
687
+ :type _host_index: int, optional
688
+ :return: Returns the result object.
689
+ """ # noqa: E501
690
+
691
+ _param = self._get_template_serialize(
692
+ id=id,
693
+ _request_auth=_request_auth,
694
+ _content_type=_content_type,
695
+ _headers=_headers,
696
+ _host_index=_host_index
697
+ )
698
+
699
+ _response_types_map: Dict[str, Optional[str]] = {
700
+ '200': "Template",
701
+ '400': "ErrorResponseModel",
702
+ '401': "ErrorResponseModel",
703
+ '404': "ErrorResponseModel",
704
+ '500': None,
705
+ }
706
+ response_data = await self.api_client.call_api(
707
+ *_param,
708
+ _request_timeout=_request_timeout
709
+ )
710
+ await response_data.read()
711
+ return self.api_client.response_deserialize(
712
+ response_data=response_data,
713
+ response_types_map=_response_types_map,
714
+ ).data
715
+
716
+
717
+ @validate_call
718
+ async def get_template_with_http_info(
719
+ self,
720
+ id: StrictInt,
721
+ _request_timeout: Union[
722
+ None,
723
+ Annotated[StrictFloat, Field(gt=0)],
724
+ Tuple[
725
+ Annotated[StrictFloat, Field(gt=0)],
726
+ Annotated[StrictFloat, Field(gt=0)]
727
+ ]
728
+ ] = None,
729
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
730
+ _content_type: Optional[StrictStr] = None,
731
+ _headers: Optional[Dict[StrictStr, Any]] = None,
732
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
733
+ ) -> ApiResponse[Template]:
734
+ """Retrieve template details
735
+
736
+ Retrieves the resource configuration details for a specified template.Provide the template ID in the path to retrieve details for the specified template.For additional information on template configuration details,[**click here**](https://docs.hyperstack.cloud/docs/api-references/).
737
+
738
+ :param id: (required)
739
+ :type id: int
740
+ :param _request_timeout: timeout setting for this request. If one
741
+ number provided, it will be total request
742
+ timeout. It can also be a pair (tuple) of
743
+ (connection, read) timeouts.
744
+ :type _request_timeout: int, tuple(int, int), optional
745
+ :param _request_auth: set to override the auth_settings for an a single
746
+ request; this effectively ignores the
747
+ authentication in the spec for a single request.
748
+ :type _request_auth: dict, optional
749
+ :param _content_type: force content-type for the request.
750
+ :type _content_type: str, Optional
751
+ :param _headers: set to override the headers for a single
752
+ request; this effectively ignores the headers
753
+ in the spec for a single request.
754
+ :type _headers: dict, optional
755
+ :param _host_index: set to override the host_index for a single
756
+ request; this effectively ignores the host_index
757
+ in the spec for a single request.
758
+ :type _host_index: int, optional
759
+ :return: Returns the result object.
760
+ """ # noqa: E501
761
+
762
+ _param = self._get_template_serialize(
763
+ id=id,
764
+ _request_auth=_request_auth,
765
+ _content_type=_content_type,
766
+ _headers=_headers,
767
+ _host_index=_host_index
768
+ )
769
+
770
+ _response_types_map: Dict[str, Optional[str]] = {
771
+ '200': "Template",
772
+ '400': "ErrorResponseModel",
773
+ '401': "ErrorResponseModel",
774
+ '404': "ErrorResponseModel",
775
+ '500': None,
776
+ }
777
+ response_data = await self.api_client.call_api(
778
+ *_param,
779
+ _request_timeout=_request_timeout
780
+ )
781
+ await response_data.read()
782
+ return self.api_client.response_deserialize(
783
+ response_data=response_data,
784
+ response_types_map=_response_types_map,
785
+ )
786
+
787
+
788
+ @validate_call
789
+ async def get_template_without_preload_content(
790
+ self,
791
+ id: StrictInt,
792
+ _request_timeout: Union[
793
+ None,
794
+ Annotated[StrictFloat, Field(gt=0)],
795
+ Tuple[
796
+ Annotated[StrictFloat, Field(gt=0)],
797
+ Annotated[StrictFloat, Field(gt=0)]
798
+ ]
799
+ ] = None,
800
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
801
+ _content_type: Optional[StrictStr] = None,
802
+ _headers: Optional[Dict[StrictStr, Any]] = None,
803
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
804
+ ) -> RESTResponseType:
805
+ """Retrieve template details
806
+
807
+ Retrieves the resource configuration details for a specified template.Provide the template ID in the path to retrieve details for the specified template.For additional information on template configuration details,[**click here**](https://docs.hyperstack.cloud/docs/api-references/).
808
+
809
+ :param id: (required)
810
+ :type id: int
811
+ :param _request_timeout: timeout setting for this request. If one
812
+ number provided, it will be total request
813
+ timeout. It can also be a pair (tuple) of
814
+ (connection, read) timeouts.
815
+ :type _request_timeout: int, tuple(int, int), optional
816
+ :param _request_auth: set to override the auth_settings for an a single
817
+ request; this effectively ignores the
818
+ authentication in the spec for a single request.
819
+ :type _request_auth: dict, optional
820
+ :param _content_type: force content-type for the request.
821
+ :type _content_type: str, Optional
822
+ :param _headers: set to override the headers for a single
823
+ request; this effectively ignores the headers
824
+ in the spec for a single request.
825
+ :type _headers: dict, optional
826
+ :param _host_index: set to override the host_index for a single
827
+ request; this effectively ignores the host_index
828
+ in the spec for a single request.
829
+ :type _host_index: int, optional
830
+ :return: Returns the result object.
831
+ """ # noqa: E501
832
+
833
+ _param = self._get_template_serialize(
834
+ id=id,
835
+ _request_auth=_request_auth,
836
+ _content_type=_content_type,
837
+ _headers=_headers,
838
+ _host_index=_host_index
839
+ )
840
+
841
+ _response_types_map: Dict[str, Optional[str]] = {
842
+ '200': "Template",
843
+ '400': "ErrorResponseModel",
844
+ '401': "ErrorResponseModel",
845
+ '404': "ErrorResponseModel",
846
+ '500': None,
847
+ }
848
+ response_data = await self.api_client.call_api(
849
+ *_param,
850
+ _request_timeout=_request_timeout
851
+ )
852
+ return response_data.response
853
+
854
+
855
+ def _get_template_serialize(
856
+ self,
857
+ id,
858
+ _request_auth,
859
+ _content_type,
860
+ _headers,
861
+ _host_index,
862
+ ) -> RequestSerialized:
863
+
864
+ _host = None
865
+
866
+ _collection_formats: Dict[str, str] = {
867
+ }
868
+
869
+ _path_params: Dict[str, str] = {}
870
+ _query_params: List[Tuple[str, str]] = []
871
+ _header_params: Dict[str, Optional[str]] = _headers or {}
872
+ _form_params: List[Tuple[str, str]] = []
873
+ _files: Dict[
874
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
875
+ ] = {}
876
+ _body_params: Optional[bytes] = None
877
+
878
+ # process the path parameters
879
+ if id is not None:
880
+ _path_params['id'] = id
881
+ # process the query parameters
882
+ # process the header parameters
883
+ # process the form parameters
884
+ # process the body parameter
885
+
886
+
887
+ # set the HTTP header `Accept`
888
+ if 'Accept' not in _header_params:
889
+ _header_params['Accept'] = self.api_client.select_header_accept(
890
+ [
891
+ 'application/json'
892
+ ]
893
+ )
894
+
895
+
896
+ # authentication setting
897
+ _auth_settings: List[str] = [
898
+ 'apiKey'
899
+ ]
900
+
901
+ return self.api_client.param_serialize(
902
+ method='GET',
903
+ resource_path='/core/marketplace/templates/{id}',
904
+ path_params=_path_params,
905
+ query_params=_query_params,
906
+ header_params=_header_params,
907
+ body=_body_params,
908
+ post_params=_form_params,
909
+ files=_files,
910
+ auth_settings=_auth_settings,
911
+ collection_formats=_collection_formats,
912
+ _host=_host,
913
+ _request_auth=_request_auth
914
+ )
915
+
916
+
917
+
918
+
919
+ @validate_call
920
+ async def list_templates(
921
+ self,
922
+ visibility: Annotated[Optional[StrictStr], Field(description="Specify the `visibility` status as either `public` or `private` to filter and retrieve templates with the desired visibility.")] = None,
923
+ _request_timeout: Union[
924
+ None,
925
+ Annotated[StrictFloat, Field(gt=0)],
926
+ Tuple[
927
+ Annotated[StrictFloat, Field(gt=0)],
928
+ Annotated[StrictFloat, Field(gt=0)]
929
+ ]
930
+ ] = None,
931
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
932
+ _content_type: Optional[StrictStr] = None,
933
+ _headers: Optional[Dict[StrictStr, Any]] = None,
934
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
935
+ ) -> Templates:
936
+ """List templates
937
+
938
+ Returns a comprehensive list of templates, providing resource configuration details for each. Optionally, specify the `visibility` as `public` or `private` to retrieve templates with the desired visibility status. To learn more about the templates feature, [**click here**](https://docs.hyperstack.cloud/docs/features/templates#view-a-list-of-templates).
939
+
940
+ :param visibility: Specify the `visibility` status as either `public` or `private` to filter and retrieve templates with the desired visibility.
941
+ :type visibility: str
942
+ :param _request_timeout: timeout setting for this request. If one
943
+ number provided, it will be total request
944
+ timeout. It can also be a pair (tuple) of
945
+ (connection, read) timeouts.
946
+ :type _request_timeout: int, tuple(int, int), optional
947
+ :param _request_auth: set to override the auth_settings for an a single
948
+ request; this effectively ignores the
949
+ authentication in the spec for a single request.
950
+ :type _request_auth: dict, optional
951
+ :param _content_type: force content-type for the request.
952
+ :type _content_type: str, Optional
953
+ :param _headers: set to override the headers for a single
954
+ request; this effectively ignores the headers
955
+ in the spec for a single request.
956
+ :type _headers: dict, optional
957
+ :param _host_index: set to override the host_index for a single
958
+ request; this effectively ignores the host_index
959
+ in the spec for a single request.
960
+ :type _host_index: int, optional
961
+ :return: Returns the result object.
962
+ """ # noqa: E501
963
+
964
+ _param = self._list_templates_serialize(
965
+ visibility=visibility,
966
+ _request_auth=_request_auth,
967
+ _content_type=_content_type,
968
+ _headers=_headers,
969
+ _host_index=_host_index
970
+ )
971
+
972
+ _response_types_map: Dict[str, Optional[str]] = {
973
+ '200': "Templates",
974
+ '400': "ErrorResponseModel",
975
+ '401': "ErrorResponseModel",
976
+ '406': "ErrorResponseModel",
977
+ '500': None,
978
+ }
979
+ response_data = await self.api_client.call_api(
980
+ *_param,
981
+ _request_timeout=_request_timeout
982
+ )
983
+ await response_data.read()
984
+ return self.api_client.response_deserialize(
985
+ response_data=response_data,
986
+ response_types_map=_response_types_map,
987
+ ).data
988
+
989
+
990
+ @validate_call
991
+ async def list_templates_with_http_info(
992
+ self,
993
+ visibility: Annotated[Optional[StrictStr], Field(description="Specify the `visibility` status as either `public` or `private` to filter and retrieve templates with the desired visibility.")] = None,
994
+ _request_timeout: Union[
995
+ None,
996
+ Annotated[StrictFloat, Field(gt=0)],
997
+ Tuple[
998
+ Annotated[StrictFloat, Field(gt=0)],
999
+ Annotated[StrictFloat, Field(gt=0)]
1000
+ ]
1001
+ ] = None,
1002
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1003
+ _content_type: Optional[StrictStr] = None,
1004
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1005
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1006
+ ) -> ApiResponse[Templates]:
1007
+ """List templates
1008
+
1009
+ Returns a comprehensive list of templates, providing resource configuration details for each. Optionally, specify the `visibility` as `public` or `private` to retrieve templates with the desired visibility status. To learn more about the templates feature, [**click here**](https://docs.hyperstack.cloud/docs/features/templates#view-a-list-of-templates).
1010
+
1011
+ :param visibility: Specify the `visibility` status as either `public` or `private` to filter and retrieve templates with the desired visibility.
1012
+ :type visibility: str
1013
+ :param _request_timeout: timeout setting for this request. If one
1014
+ number provided, it will be total request
1015
+ timeout. It can also be a pair (tuple) of
1016
+ (connection, read) timeouts.
1017
+ :type _request_timeout: int, tuple(int, int), optional
1018
+ :param _request_auth: set to override the auth_settings for an a single
1019
+ request; this effectively ignores the
1020
+ authentication in the spec for a single request.
1021
+ :type _request_auth: dict, optional
1022
+ :param _content_type: force content-type for the request.
1023
+ :type _content_type: str, Optional
1024
+ :param _headers: set to override the headers for a single
1025
+ request; this effectively ignores the headers
1026
+ in the spec for a single request.
1027
+ :type _headers: dict, optional
1028
+ :param _host_index: set to override the host_index for a single
1029
+ request; this effectively ignores the host_index
1030
+ in the spec for a single request.
1031
+ :type _host_index: int, optional
1032
+ :return: Returns the result object.
1033
+ """ # noqa: E501
1034
+
1035
+ _param = self._list_templates_serialize(
1036
+ visibility=visibility,
1037
+ _request_auth=_request_auth,
1038
+ _content_type=_content_type,
1039
+ _headers=_headers,
1040
+ _host_index=_host_index
1041
+ )
1042
+
1043
+ _response_types_map: Dict[str, Optional[str]] = {
1044
+ '200': "Templates",
1045
+ '400': "ErrorResponseModel",
1046
+ '401': "ErrorResponseModel",
1047
+ '406': "ErrorResponseModel",
1048
+ '500': None,
1049
+ }
1050
+ response_data = await self.api_client.call_api(
1051
+ *_param,
1052
+ _request_timeout=_request_timeout
1053
+ )
1054
+ await response_data.read()
1055
+ return self.api_client.response_deserialize(
1056
+ response_data=response_data,
1057
+ response_types_map=_response_types_map,
1058
+ )
1059
+
1060
+
1061
+ @validate_call
1062
+ async def list_templates_without_preload_content(
1063
+ self,
1064
+ visibility: Annotated[Optional[StrictStr], Field(description="Specify the `visibility` status as either `public` or `private` to filter and retrieve templates with the desired visibility.")] = None,
1065
+ _request_timeout: Union[
1066
+ None,
1067
+ Annotated[StrictFloat, Field(gt=0)],
1068
+ Tuple[
1069
+ Annotated[StrictFloat, Field(gt=0)],
1070
+ Annotated[StrictFloat, Field(gt=0)]
1071
+ ]
1072
+ ] = None,
1073
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1074
+ _content_type: Optional[StrictStr] = None,
1075
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1076
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1077
+ ) -> RESTResponseType:
1078
+ """List templates
1079
+
1080
+ Returns a comprehensive list of templates, providing resource configuration details for each. Optionally, specify the `visibility` as `public` or `private` to retrieve templates with the desired visibility status. To learn more about the templates feature, [**click here**](https://docs.hyperstack.cloud/docs/features/templates#view-a-list-of-templates).
1081
+
1082
+ :param visibility: Specify the `visibility` status as either `public` or `private` to filter and retrieve templates with the desired visibility.
1083
+ :type visibility: str
1084
+ :param _request_timeout: timeout setting for this request. If one
1085
+ number provided, it will be total request
1086
+ timeout. It can also be a pair (tuple) of
1087
+ (connection, read) timeouts.
1088
+ :type _request_timeout: int, tuple(int, int), optional
1089
+ :param _request_auth: set to override the auth_settings for an a single
1090
+ request; this effectively ignores the
1091
+ authentication in the spec for a single request.
1092
+ :type _request_auth: dict, optional
1093
+ :param _content_type: force content-type for the request.
1094
+ :type _content_type: str, Optional
1095
+ :param _headers: set to override the headers for a single
1096
+ request; this effectively ignores the headers
1097
+ in the spec for a single request.
1098
+ :type _headers: dict, optional
1099
+ :param _host_index: set to override the host_index for a single
1100
+ request; this effectively ignores the host_index
1101
+ in the spec for a single request.
1102
+ :type _host_index: int, optional
1103
+ :return: Returns the result object.
1104
+ """ # noqa: E501
1105
+
1106
+ _param = self._list_templates_serialize(
1107
+ visibility=visibility,
1108
+ _request_auth=_request_auth,
1109
+ _content_type=_content_type,
1110
+ _headers=_headers,
1111
+ _host_index=_host_index
1112
+ )
1113
+
1114
+ _response_types_map: Dict[str, Optional[str]] = {
1115
+ '200': "Templates",
1116
+ '400': "ErrorResponseModel",
1117
+ '401': "ErrorResponseModel",
1118
+ '406': "ErrorResponseModel",
1119
+ '500': None,
1120
+ }
1121
+ response_data = await self.api_client.call_api(
1122
+ *_param,
1123
+ _request_timeout=_request_timeout
1124
+ )
1125
+ return response_data.response
1126
+
1127
+
1128
+ def _list_templates_serialize(
1129
+ self,
1130
+ visibility,
1131
+ _request_auth,
1132
+ _content_type,
1133
+ _headers,
1134
+ _host_index,
1135
+ ) -> RequestSerialized:
1136
+
1137
+ _host = None
1138
+
1139
+ _collection_formats: Dict[str, str] = {
1140
+ }
1141
+
1142
+ _path_params: Dict[str, str] = {}
1143
+ _query_params: List[Tuple[str, str]] = []
1144
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1145
+ _form_params: List[Tuple[str, str]] = []
1146
+ _files: Dict[
1147
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1148
+ ] = {}
1149
+ _body_params: Optional[bytes] = None
1150
+
1151
+ # process the path parameters
1152
+ # process the query parameters
1153
+ if visibility is not None:
1154
+
1155
+ _query_params.append(('visibility', visibility))
1156
+
1157
+ # process the header parameters
1158
+ # process the form parameters
1159
+ # process the body parameter
1160
+
1161
+
1162
+ # set the HTTP header `Accept`
1163
+ if 'Accept' not in _header_params:
1164
+ _header_params['Accept'] = self.api_client.select_header_accept(
1165
+ [
1166
+ 'application/json'
1167
+ ]
1168
+ )
1169
+
1170
+
1171
+ # authentication setting
1172
+ _auth_settings: List[str] = [
1173
+ 'apiKey'
1174
+ ]
1175
+
1176
+ return self.api_client.param_serialize(
1177
+ method='GET',
1178
+ resource_path='/core/marketplace/templates',
1179
+ path_params=_path_params,
1180
+ query_params=_query_params,
1181
+ header_params=_header_params,
1182
+ body=_body_params,
1183
+ post_params=_form_params,
1184
+ files=_files,
1185
+ auth_settings=_auth_settings,
1186
+ collection_formats=_collection_formats,
1187
+ _host=_host,
1188
+ _request_auth=_request_auth
1189
+ )
1190
+
1191
+
1192
+
1193
+
1194
+ @validate_call
1195
+ async def update_template(
1196
+ self,
1197
+ id: StrictInt,
1198
+ payload: UpdateTemplate,
1199
+ _request_timeout: Union[
1200
+ None,
1201
+ Annotated[StrictFloat, Field(gt=0)],
1202
+ Tuple[
1203
+ Annotated[StrictFloat, Field(gt=0)],
1204
+ Annotated[StrictFloat, Field(gt=0)]
1205
+ ]
1206
+ ] = None,
1207
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1208
+ _content_type: Optional[StrictStr] = None,
1209
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1210
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1211
+ ) -> Template:
1212
+ """Update template
1213
+
1214
+ Updates the details of a template. Modify the template name, description and/or`is_public` status to change the public/private visibility of the template.
1215
+
1216
+ :param id: (required)
1217
+ :type id: int
1218
+ :param payload: (required)
1219
+ :type payload: UpdateTemplate
1220
+ :param _request_timeout: timeout setting for this request. If one
1221
+ number provided, it will be total request
1222
+ timeout. It can also be a pair (tuple) of
1223
+ (connection, read) timeouts.
1224
+ :type _request_timeout: int, tuple(int, int), optional
1225
+ :param _request_auth: set to override the auth_settings for an a single
1226
+ request; this effectively ignores the
1227
+ authentication in the spec for a single request.
1228
+ :type _request_auth: dict, optional
1229
+ :param _content_type: force content-type for the request.
1230
+ :type _content_type: str, Optional
1231
+ :param _headers: set to override the headers for a single
1232
+ request; this effectively ignores the headers
1233
+ in the spec for a single request.
1234
+ :type _headers: dict, optional
1235
+ :param _host_index: set to override the host_index for a single
1236
+ request; this effectively ignores the host_index
1237
+ in the spec for a single request.
1238
+ :type _host_index: int, optional
1239
+ :return: Returns the result object.
1240
+ """ # noqa: E501
1241
+
1242
+ _param = self._update_template_serialize(
1243
+ id=id,
1244
+ payload=payload,
1245
+ _request_auth=_request_auth,
1246
+ _content_type=_content_type,
1247
+ _headers=_headers,
1248
+ _host_index=_host_index
1249
+ )
1250
+
1251
+ _response_types_map: Dict[str, Optional[str]] = {
1252
+ '200': "Template",
1253
+ '400': "ErrorResponseModel",
1254
+ '401': "ErrorResponseModel",
1255
+ '404': "ErrorResponseModel",
1256
+ '500': None,
1257
+ }
1258
+ response_data = await self.api_client.call_api(
1259
+ *_param,
1260
+ _request_timeout=_request_timeout
1261
+ )
1262
+ await response_data.read()
1263
+ return self.api_client.response_deserialize(
1264
+ response_data=response_data,
1265
+ response_types_map=_response_types_map,
1266
+ ).data
1267
+
1268
+
1269
+ @validate_call
1270
+ async def update_template_with_http_info(
1271
+ self,
1272
+ id: StrictInt,
1273
+ payload: UpdateTemplate,
1274
+ _request_timeout: Union[
1275
+ None,
1276
+ Annotated[StrictFloat, Field(gt=0)],
1277
+ Tuple[
1278
+ Annotated[StrictFloat, Field(gt=0)],
1279
+ Annotated[StrictFloat, Field(gt=0)]
1280
+ ]
1281
+ ] = None,
1282
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1283
+ _content_type: Optional[StrictStr] = None,
1284
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1285
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1286
+ ) -> ApiResponse[Template]:
1287
+ """Update template
1288
+
1289
+ Updates the details of a template. Modify the template name, description and/or`is_public` status to change the public/private visibility of the template.
1290
+
1291
+ :param id: (required)
1292
+ :type id: int
1293
+ :param payload: (required)
1294
+ :type payload: UpdateTemplate
1295
+ :param _request_timeout: timeout setting for this request. If one
1296
+ number provided, it will be total request
1297
+ timeout. It can also be a pair (tuple) of
1298
+ (connection, read) timeouts.
1299
+ :type _request_timeout: int, tuple(int, int), optional
1300
+ :param _request_auth: set to override the auth_settings for an a single
1301
+ request; this effectively ignores the
1302
+ authentication in the spec for a single request.
1303
+ :type _request_auth: dict, optional
1304
+ :param _content_type: force content-type for the request.
1305
+ :type _content_type: str, Optional
1306
+ :param _headers: set to override the headers for a single
1307
+ request; this effectively ignores the headers
1308
+ in the spec for a single request.
1309
+ :type _headers: dict, optional
1310
+ :param _host_index: set to override the host_index for a single
1311
+ request; this effectively ignores the host_index
1312
+ in the spec for a single request.
1313
+ :type _host_index: int, optional
1314
+ :return: Returns the result object.
1315
+ """ # noqa: E501
1316
+
1317
+ _param = self._update_template_serialize(
1318
+ id=id,
1319
+ payload=payload,
1320
+ _request_auth=_request_auth,
1321
+ _content_type=_content_type,
1322
+ _headers=_headers,
1323
+ _host_index=_host_index
1324
+ )
1325
+
1326
+ _response_types_map: Dict[str, Optional[str]] = {
1327
+ '200': "Template",
1328
+ '400': "ErrorResponseModel",
1329
+ '401': "ErrorResponseModel",
1330
+ '404': "ErrorResponseModel",
1331
+ '500': None,
1332
+ }
1333
+ response_data = await self.api_client.call_api(
1334
+ *_param,
1335
+ _request_timeout=_request_timeout
1336
+ )
1337
+ await response_data.read()
1338
+ return self.api_client.response_deserialize(
1339
+ response_data=response_data,
1340
+ response_types_map=_response_types_map,
1341
+ )
1342
+
1343
+
1344
+ @validate_call
1345
+ async def update_template_without_preload_content(
1346
+ self,
1347
+ id: StrictInt,
1348
+ payload: UpdateTemplate,
1349
+ _request_timeout: Union[
1350
+ None,
1351
+ Annotated[StrictFloat, Field(gt=0)],
1352
+ Tuple[
1353
+ Annotated[StrictFloat, Field(gt=0)],
1354
+ Annotated[StrictFloat, Field(gt=0)]
1355
+ ]
1356
+ ] = None,
1357
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1358
+ _content_type: Optional[StrictStr] = None,
1359
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1360
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1361
+ ) -> RESTResponseType:
1362
+ """Update template
1363
+
1364
+ Updates the details of a template. Modify the template name, description and/or`is_public` status to change the public/private visibility of the template.
1365
+
1366
+ :param id: (required)
1367
+ :type id: int
1368
+ :param payload: (required)
1369
+ :type payload: UpdateTemplate
1370
+ :param _request_timeout: timeout setting for this request. If one
1371
+ number provided, it will be total request
1372
+ timeout. It can also be a pair (tuple) of
1373
+ (connection, read) timeouts.
1374
+ :type _request_timeout: int, tuple(int, int), optional
1375
+ :param _request_auth: set to override the auth_settings for an a single
1376
+ request; this effectively ignores the
1377
+ authentication in the spec for a single request.
1378
+ :type _request_auth: dict, optional
1379
+ :param _content_type: force content-type for the request.
1380
+ :type _content_type: str, Optional
1381
+ :param _headers: set to override the headers for a single
1382
+ request; this effectively ignores the headers
1383
+ in the spec for a single request.
1384
+ :type _headers: dict, optional
1385
+ :param _host_index: set to override the host_index for a single
1386
+ request; this effectively ignores the host_index
1387
+ in the spec for a single request.
1388
+ :type _host_index: int, optional
1389
+ :return: Returns the result object.
1390
+ """ # noqa: E501
1391
+
1392
+ _param = self._update_template_serialize(
1393
+ id=id,
1394
+ payload=payload,
1395
+ _request_auth=_request_auth,
1396
+ _content_type=_content_type,
1397
+ _headers=_headers,
1398
+ _host_index=_host_index
1399
+ )
1400
+
1401
+ _response_types_map: Dict[str, Optional[str]] = {
1402
+ '200': "Template",
1403
+ '400': "ErrorResponseModel",
1404
+ '401': "ErrorResponseModel",
1405
+ '404': "ErrorResponseModel",
1406
+ '500': None,
1407
+ }
1408
+ response_data = await self.api_client.call_api(
1409
+ *_param,
1410
+ _request_timeout=_request_timeout
1411
+ )
1412
+ return response_data.response
1413
+
1414
+
1415
+ def _update_template_serialize(
1416
+ self,
1417
+ id,
1418
+ payload,
1419
+ _request_auth,
1420
+ _content_type,
1421
+ _headers,
1422
+ _host_index,
1423
+ ) -> RequestSerialized:
1424
+
1425
+ _host = None
1426
+
1427
+ _collection_formats: Dict[str, str] = {
1428
+ }
1429
+
1430
+ _path_params: Dict[str, str] = {}
1431
+ _query_params: List[Tuple[str, str]] = []
1432
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1433
+ _form_params: List[Tuple[str, str]] = []
1434
+ _files: Dict[
1435
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1436
+ ] = {}
1437
+ _body_params: Optional[bytes] = None
1438
+
1439
+ # process the path parameters
1440
+ if id is not None:
1441
+ _path_params['id'] = id
1442
+ # process the query parameters
1443
+ # process the header parameters
1444
+ # process the form parameters
1445
+ # process the body parameter
1446
+ if payload is not None:
1447
+ _body_params = payload
1448
+
1449
+
1450
+ # set the HTTP header `Accept`
1451
+ if 'Accept' not in _header_params:
1452
+ _header_params['Accept'] = self.api_client.select_header_accept(
1453
+ [
1454
+ 'application/json'
1455
+ ]
1456
+ )
1457
+
1458
+ # set the HTTP header `Content-Type`
1459
+ if _content_type:
1460
+ _header_params['Content-Type'] = _content_type
1461
+ else:
1462
+ _default_content_type = (
1463
+ self.api_client.select_header_content_type(
1464
+ [
1465
+ 'application/json'
1466
+ ]
1467
+ )
1468
+ )
1469
+ if _default_content_type is not None:
1470
+ _header_params['Content-Type'] = _default_content_type
1471
+
1472
+ # authentication setting
1473
+ _auth_settings: List[str] = [
1474
+ 'apiKey'
1475
+ ]
1476
+
1477
+ return self.api_client.param_serialize(
1478
+ method='PUT',
1479
+ resource_path='/core/marketplace/templates/{id}',
1480
+ path_params=_path_params,
1481
+ query_params=_query_params,
1482
+ header_params=_header_params,
1483
+ body=_body_params,
1484
+ post_params=_form_params,
1485
+ files=_files,
1486
+ auth_settings=_auth_settings,
1487
+ collection_formats=_collection_formats,
1488
+ _host=_host,
1489
+ _request_auth=_request_auth
1490
+ )
1491
+
1492
+