hyperstack 1.25.0a0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (401) hide show
  1. hyperstack/__init__.py +420 -0
  2. hyperstack/api/__init__.py +48 -0
  3. hyperstack/api/alive_api.py +270 -0
  4. hyperstack/api/api_key_api.py +1161 -0
  5. hyperstack/api/assigning_member_role_api.py +615 -0
  6. hyperstack/api/auth_api.py +292 -0
  7. hyperstack/api/billing_api.py +5946 -0
  8. hyperstack/api/calculate_api.py +326 -0
  9. hyperstack/api/callbacks_api.py +1795 -0
  10. hyperstack/api/cluster_events_api.py +308 -0
  11. hyperstack/api/clusters_api.py +1651 -0
  12. hyperstack/api/compliance_api.py +1169 -0
  13. hyperstack/api/credit_api.py +295 -0
  14. hyperstack/api/customer_contract_api.py +922 -0
  15. hyperstack/api/dashboard_api.py +292 -0
  16. hyperstack/api/deployment_api.py +1122 -0
  17. hyperstack/api/environment_api.py +1490 -0
  18. hyperstack/api/firewall_attachment_api.py +343 -0
  19. hyperstack/api/firewalls_api.py +1819 -0
  20. hyperstack/api/flavor_api.py +315 -0
  21. hyperstack/api/floating_ip_api.py +585 -0
  22. hyperstack/api/gpu_api.py +292 -0
  23. hyperstack/api/image_api.py +1228 -0
  24. hyperstack/api/invite_api.py +857 -0
  25. hyperstack/api/keypair_api.py +1217 -0
  26. hyperstack/api/organization_api.py +864 -0
  27. hyperstack/api/payment_api.py +584 -0
  28. hyperstack/api/permission_api.py +292 -0
  29. hyperstack/api/policy_api.py +292 -0
  30. hyperstack/api/pricebook_api.py +293 -0
  31. hyperstack/api/profile_api.py +1131 -0
  32. hyperstack/api/rbac_role_api.py +1434 -0
  33. hyperstack/api/region_api.py +292 -0
  34. hyperstack/api/security_rules_api.py +292 -0
  35. hyperstack/api/snapshot_events_api.py +291 -0
  36. hyperstack/api/snapshots_api.py +1779 -0
  37. hyperstack/api/stock_api.py +292 -0
  38. hyperstack/api/template_api.py +1497 -0
  39. hyperstack/api/user_api.py +871 -0
  40. hyperstack/api/user_detail_choice_api.py +295 -0
  41. hyperstack/api/user_permission_api.py +567 -0
  42. hyperstack/api/virtual_machine_api.py +5289 -0
  43. hyperstack/api/virtual_machine_events_api.py +311 -0
  44. hyperstack/api/vnc_url_api.py +595 -0
  45. hyperstack/api/volume_api.py +1742 -0
  46. hyperstack/api/volume_attachment_api.py +650 -0
  47. hyperstack/api_client.py +797 -0
  48. hyperstack/api_response.py +21 -0
  49. hyperstack/configuration.py +605 -0
  50. hyperstack/exceptions.py +199 -0
  51. hyperstack/models/__init__.py +360 -0
  52. hyperstack/models/add_update_flavor_organization_payload.py +111 -0
  53. hyperstack/models/add_user_info_success_response_model.py +95 -0
  54. hyperstack/models/allocated_gpu_count_graph.py +89 -0
  55. hyperstack/models/api_key_fields.py +96 -0
  56. hyperstack/models/api_key_verify_fields.py +93 -0
  57. hyperstack/models/assign_rbac_role_payload.py +87 -0
  58. hyperstack/models/attach_callback_payload.py +87 -0
  59. hyperstack/models/attach_callback_response.py +91 -0
  60. hyperstack/models/attach_firewall_with_vm.py +87 -0
  61. hyperstack/models/attach_firewalls_to_vm_payload.py +87 -0
  62. hyperstack/models/attach_volume_fields.py +96 -0
  63. hyperstack/models/attach_volumes.py +99 -0
  64. hyperstack/models/attach_volumes_payload.py +87 -0
  65. hyperstack/models/auth_get_token_response_model.py +97 -0
  66. hyperstack/models/auth_request_login_fields.py +89 -0
  67. hyperstack/models/auth_request_login_response_model.py +95 -0
  68. hyperstack/models/auth_user_fields.py +94 -0
  69. hyperstack/models/auth_user_info_response_model.py +95 -0
  70. hyperstack/models/billing_immune_resources_response.py +95 -0
  71. hyperstack/models/billing_response.py +100 -0
  72. hyperstack/models/billingmetricesfields.py +108 -0
  73. hyperstack/models/billingmetricesresponse.py +99 -0
  74. hyperstack/models/cluster_events.py +99 -0
  75. hyperstack/models/cluster_events_fields.py +104 -0
  76. hyperstack/models/cluster_fields.py +114 -0
  77. hyperstack/models/cluster_list_response.py +99 -0
  78. hyperstack/models/cluster_response.py +95 -0
  79. hyperstack/models/cluster_versions.py +91 -0
  80. hyperstack/models/common_response_model.py +89 -0
  81. hyperstack/models/compliance_fields.py +93 -0
  82. hyperstack/models/compliance_model_fields.py +99 -0
  83. hyperstack/models/compliance_payload.py +97 -0
  84. hyperstack/models/compliance_response.py +95 -0
  85. hyperstack/models/container_overview_fields.py +95 -0
  86. hyperstack/models/contract.py +105 -0
  87. hyperstack/models/contract_billing_history.py +97 -0
  88. hyperstack/models/contract_billing_history_response_attributes.py +99 -0
  89. hyperstack/models/contract_billing_history_response_model.py +95 -0
  90. hyperstack/models/contract_change_payload.py +101 -0
  91. hyperstack/models/contract_discount_plan_fields.py +103 -0
  92. hyperstack/models/contract_eligible_instance_fields.py +99 -0
  93. hyperstack/models/contract_eligible_instances_response.py +101 -0
  94. hyperstack/models/contract_event_create_model.py +91 -0
  95. hyperstack/models/contract_gpu_allocation_graph_response.py +95 -0
  96. hyperstack/models/contract_instance_fields.py +102 -0
  97. hyperstack/models/contract_instances_response.py +99 -0
  98. hyperstack/models/contract_resource_payload.py +95 -0
  99. hyperstack/models/contractl_billing_history_response_metrics.py +87 -0
  100. hyperstack/models/create_cluster_payload.py +101 -0
  101. hyperstack/models/create_contract_fields.py +110 -0
  102. hyperstack/models/create_contract_payload.py +106 -0
  103. hyperstack/models/create_discount_response.py +95 -0
  104. hyperstack/models/create_discounts_payload.py +112 -0
  105. hyperstack/models/create_environment.py +90 -0
  106. hyperstack/models/create_firewall_payload.py +91 -0
  107. hyperstack/models/create_firewall_rule_payload.py +104 -0
  108. hyperstack/models/create_gpu.py +91 -0
  109. hyperstack/models/create_image.py +91 -0
  110. hyperstack/models/create_image_payload.py +89 -0
  111. hyperstack/models/create_instances_payload.py +134 -0
  112. hyperstack/models/create_instances_response.py +99 -0
  113. hyperstack/models/create_profile_payload.py +92 -0
  114. hyperstack/models/create_profile_response.py +95 -0
  115. hyperstack/models/create_security_rule_payload.py +104 -0
  116. hyperstack/models/create_snapshot_payload.py +93 -0
  117. hyperstack/models/create_snapshot_response.py +95 -0
  118. hyperstack/models/create_update_compliance_response.py +95 -0
  119. hyperstack/models/create_update_permission_payload.py +93 -0
  120. hyperstack/models/create_update_permission_response_model.py +95 -0
  121. hyperstack/models/create_update_policy_payload.py +93 -0
  122. hyperstack/models/create_update_policy_response_model.py +95 -0
  123. hyperstack/models/create_update_rbac_role_payload.py +94 -0
  124. hyperstack/models/create_volume_payload.py +100 -0
  125. hyperstack/models/creditrechargelimitfield.py +93 -0
  126. hyperstack/models/creditrechargelimitresponse.py +99 -0
  127. hyperstack/models/creditrequestresponse.py +99 -0
  128. hyperstack/models/creditrequests.py +96 -0
  129. hyperstack/models/customer_contract_detail_response_model.py +95 -0
  130. hyperstack/models/customer_contract_fields.py +112 -0
  131. hyperstack/models/customer_fields.py +89 -0
  132. hyperstack/models/customer_payload.py +89 -0
  133. hyperstack/models/dashboard_info_response.py +95 -0
  134. hyperstack/models/data.py +91 -0
  135. hyperstack/models/deployment_fields.py +98 -0
  136. hyperstack/models/deployment_fieldsforstartdeployments.py +100 -0
  137. hyperstack/models/deployments.py +99 -0
  138. hyperstack/models/detach_volumes.py +99 -0
  139. hyperstack/models/detach_volumes_payload.py +87 -0
  140. hyperstack/models/discount_entity_model.py +97 -0
  141. hyperstack/models/discount_fields.py +100 -0
  142. hyperstack/models/discount_plan_fields.py +108 -0
  143. hyperstack/models/discount_resource_fields.py +93 -0
  144. hyperstack/models/discount_resource_payload.py +93 -0
  145. hyperstack/models/editlabelofanexisting_vm_payload.py +87 -0
  146. hyperstack/models/environment.py +95 -0
  147. hyperstack/models/environment_features.py +87 -0
  148. hyperstack/models/environment_fields.py +100 -0
  149. hyperstack/models/environment_fieldsfor_volume.py +87 -0
  150. hyperstack/models/environments.py +105 -0
  151. hyperstack/models/error_response_model.py +91 -0
  152. hyperstack/models/exclude_billing_post_payload.py +91 -0
  153. hyperstack/models/exclude_billing_post_response.py +91 -0
  154. hyperstack/models/export_billing_data_request.py +105 -0
  155. hyperstack/models/export_billing_data_response.py +89 -0
  156. hyperstack/models/field_change.py +91 -0
  157. hyperstack/models/firewall_attachment_model.py +98 -0
  158. hyperstack/models/firewall_attachment_vm_model.py +98 -0
  159. hyperstack/models/firewall_detail_fields.py +122 -0
  160. hyperstack/models/firewall_detail_response.py +95 -0
  161. hyperstack/models/firewall_environment_fields.py +91 -0
  162. hyperstack/models/firewall_fields.py +102 -0
  163. hyperstack/models/firewall_response.py +95 -0
  164. hyperstack/models/firewall_rule.py +95 -0
  165. hyperstack/models/firewalls_list_response.py +105 -0
  166. hyperstack/models/flavor_fields.py +120 -0
  167. hyperstack/models/flavor_item_get_response.py +99 -0
  168. hyperstack/models/flavor_list_response.py +99 -0
  169. hyperstack/models/flavor_object_fields.py +95 -0
  170. hyperstack/models/flavor_payload.py +101 -0
  171. hyperstack/models/flavor_response.py +95 -0
  172. hyperstack/models/flavor_vm_fields.py +100 -0
  173. hyperstack/models/flavor_vms_response.py +99 -0
  174. hyperstack/models/future_node_model.py +106 -0
  175. hyperstack/models/future_node_response_model.py +97 -0
  176. hyperstack/models/future_node_stock_model.py +93 -0
  177. hyperstack/models/future_node_update_model.py +98 -0
  178. hyperstack/models/future_nodes_stock_model.py +95 -0
  179. hyperstack/models/generate_update_api_key_payload.py +89 -0
  180. hyperstack/models/generate_update_api_key_response_model.py +95 -0
  181. hyperstack/models/get_all_contract_fields.py +100 -0
  182. hyperstack/models/get_all_contracts_response_model.py +99 -0
  183. hyperstack/models/get_all_discount_for_all_organization_response.py +99 -0
  184. hyperstack/models/get_all_discounts_fields.py +106 -0
  185. hyperstack/models/get_api_keys_response_model.py +99 -0
  186. hyperstack/models/get_customer_contracts_list_response_model.py +101 -0
  187. hyperstack/models/get_discount_detail_response.py +95 -0
  188. hyperstack/models/get_discount_response.py +99 -0
  189. hyperstack/models/get_entity_discount_detail_response.py +108 -0
  190. hyperstack/models/get_invites_response_model.py +99 -0
  191. hyperstack/models/get_organization_response_model.py +95 -0
  192. hyperstack/models/get_permissions_response_model.py +99 -0
  193. hyperstack/models/get_policies_response_model.py +99 -0
  194. hyperstack/models/get_rbac_roles_response_model.py +99 -0
  195. hyperstack/models/get_token_payload.py +89 -0
  196. hyperstack/models/get_user_permissions_response_model.py +99 -0
  197. hyperstack/models/get_version_response.py +91 -0
  198. hyperstack/models/getcreditandthresholdinfo.py +91 -0
  199. hyperstack/models/getcreditandthresholdinfoinresponse.py +95 -0
  200. hyperstack/models/gpu.py +95 -0
  201. hyperstack/models/gpu_fields.py +106 -0
  202. hyperstack/models/gpu_list.py +99 -0
  203. hyperstack/models/gpu_region_fields.py +89 -0
  204. hyperstack/models/graph_datetime_value_model.py +89 -0
  205. hyperstack/models/historical_instance.py +101 -0
  206. hyperstack/models/historical_instances_fields.py +110 -0
  207. hyperstack/models/image.py +91 -0
  208. hyperstack/models/image_fields.py +113 -0
  209. hyperstack/models/image_get_response.py +101 -0
  210. hyperstack/models/image_logos.py +99 -0
  211. hyperstack/models/images.py +99 -0
  212. hyperstack/models/import_keypair_payload.py +92 -0
  213. hyperstack/models/import_keypair_response.py +95 -0
  214. hyperstack/models/infrahub_resource_object_response.py +119 -0
  215. hyperstack/models/infrahub_resource_object_response_for_customer.py +109 -0
  216. hyperstack/models/insert_discount_plan_fields.py +112 -0
  217. hyperstack/models/instance.py +95 -0
  218. hyperstack/models/instance_environment_fields.py +99 -0
  219. hyperstack/models/instance_events.py +99 -0
  220. hyperstack/models/instance_events_fields.py +102 -0
  221. hyperstack/models/instance_fields.py +162 -0
  222. hyperstack/models/instance_flavor_fields.py +101 -0
  223. hyperstack/models/instance_image_fields.py +87 -0
  224. hyperstack/models/instance_keypair_fields.py +87 -0
  225. hyperstack/models/instance_overview_fields.py +95 -0
  226. hyperstack/models/instance_resize_payload.py +93 -0
  227. hyperstack/models/instances.py +105 -0
  228. hyperstack/models/instances_summary_fields.py +120 -0
  229. hyperstack/models/internal_environment_fields.py +94 -0
  230. hyperstack/models/internal_instance_fields.py +156 -0
  231. hyperstack/models/internal_instance_flavor_fields.py +104 -0
  232. hyperstack/models/internal_instance_image_fields.py +95 -0
  233. hyperstack/models/internal_instance_keypair_fields.py +98 -0
  234. hyperstack/models/internal_instances_response.py +99 -0
  235. hyperstack/models/internal_security_rules_fields_for_instance.py +104 -0
  236. hyperstack/models/internal_volume_attachment_fields.py +98 -0
  237. hyperstack/models/internal_volume_fields.py +95 -0
  238. hyperstack/models/internal_volumes_response.py +99 -0
  239. hyperstack/models/invite_fields.py +94 -0
  240. hyperstack/models/invite_user_payload.py +88 -0
  241. hyperstack/models/invite_user_response_model.py +95 -0
  242. hyperstack/models/keypair_fields.py +98 -0
  243. hyperstack/models/keypairs.py +105 -0
  244. hyperstack/models/lable_resonse.py +89 -0
  245. hyperstack/models/lastdaycostfields.py +93 -0
  246. hyperstack/models/lastdaycostresponse.py +95 -0
  247. hyperstack/models/logo_get_response.py +91 -0
  248. hyperstack/models/logout_payload.py +87 -0
  249. hyperstack/models/metric_item_fields.py +91 -0
  250. hyperstack/models/metrics_fields.py +116 -0
  251. hyperstack/models/name_available_model.py +91 -0
  252. hyperstack/models/new_configurations_response.py +95 -0
  253. hyperstack/models/new_model_response.py +101 -0
  254. hyperstack/models/new_stock_response.py +99 -0
  255. hyperstack/models/new_stock_retrive_response.py +95 -0
  256. hyperstack/models/new_stock_update_response_model.py +89 -0
  257. hyperstack/models/node_model.py +114 -0
  258. hyperstack/models/node_payload_model.py +97 -0
  259. hyperstack/models/node_power_usage_model.py +120 -0
  260. hyperstack/models/node_response_model.py +97 -0
  261. hyperstack/models/node_stock_payload_model.py +95 -0
  262. hyperstack/models/node_stock_response_model.py +95 -0
  263. hyperstack/models/node_stocks_payload.py +93 -0
  264. hyperstack/models/organization_fields.py +114 -0
  265. hyperstack/models/organization_level_billing_history.py +99 -0
  266. hyperstack/models/organization_level_billing_history_resources.py +97 -0
  267. hyperstack/models/organization_level_billing_history_response_attributes.py +87 -0
  268. hyperstack/models/organization_level_billing_history_response_metrics.py +97 -0
  269. hyperstack/models/organization_level_billing_history_response_model.py +95 -0
  270. hyperstack/models/organization_object_response.py +97 -0
  271. hyperstack/models/organization_thresholdfields.py +95 -0
  272. hyperstack/models/organization_user_response_model.py +112 -0
  273. hyperstack/models/organizationcreditrechargelimitresponse.py +95 -0
  274. hyperstack/models/organizationthresholdsresponse.py +99 -0
  275. hyperstack/models/organizationthresholdupdateresponse.py +95 -0
  276. hyperstack/models/overview_info.py +103 -0
  277. hyperstack/models/pagination_data.py +91 -0
  278. hyperstack/models/payment_details_fields.py +106 -0
  279. hyperstack/models/payment_details_response.py +95 -0
  280. hyperstack/models/payment_initiate_fields.py +87 -0
  281. hyperstack/models/payment_initiate_payload.py +87 -0
  282. hyperstack/models/payment_initiate_response.py +95 -0
  283. hyperstack/models/permission_fields.py +98 -0
  284. hyperstack/models/policy_fields.py +104 -0
  285. hyperstack/models/policy_permission_fields.py +91 -0
  286. hyperstack/models/power_usage_model.py +89 -0
  287. hyperstack/models/pricebook_model.py +100 -0
  288. hyperstack/models/pricebook_resource_object_response.py +107 -0
  289. hyperstack/models/pricebook_resource_object_response_for_customer.py +99 -0
  290. hyperstack/models/profile_fields.py +96 -0
  291. hyperstack/models/profile_list_response.py +99 -0
  292. hyperstack/models/profile_object_fields.py +89 -0
  293. hyperstack/models/rbac_role_detail_response_model.py +95 -0
  294. hyperstack/models/rbac_role_detail_response_model_fixed.py +95 -0
  295. hyperstack/models/rbac_role_field.py +87 -0
  296. hyperstack/models/rbac_role_fields.py +114 -0
  297. hyperstack/models/refresh_token_payload.py +89 -0
  298. hyperstack/models/region_fields.py +91 -0
  299. hyperstack/models/region_payload.py +89 -0
  300. hyperstack/models/region_response.py +95 -0
  301. hyperstack/models/regions.py +99 -0
  302. hyperstack/models/remove_member_from_organization_response_model.py +89 -0
  303. hyperstack/models/remove_member_payload.py +88 -0
  304. hyperstack/models/request_console.py +91 -0
  305. hyperstack/models/resource_billing_events_history_metrics.py +95 -0
  306. hyperstack/models/resource_billing_events_history_response.py +99 -0
  307. hyperstack/models/resource_billing_response_for_customer.py +95 -0
  308. hyperstack/models/resource_level_billing_details_attributes.py +91 -0
  309. hyperstack/models/resource_level_billing_details_metrics.py +101 -0
  310. hyperstack/models/resource_level_billing_details_vm.py +99 -0
  311. hyperstack/models/resource_level_billing_details_volume.py +99 -0
  312. hyperstack/models/resource_level_billing_details_volume_attributes.py +95 -0
  313. hyperstack/models/resource_level_billing_details_volume_metrics.py +95 -0
  314. hyperstack/models/resource_level_billing_history.py +105 -0
  315. hyperstack/models/resource_level_billing_history_resources.py +97 -0
  316. hyperstack/models/resource_level_billing_history_response_attributes.py +93 -0
  317. hyperstack/models/resource_level_billing_history_response_metrics.py +91 -0
  318. hyperstack/models/resource_level_billing_vm_details_resources.py +97 -0
  319. hyperstack/models/resource_level_billing_volume_details_resources.py +97 -0
  320. hyperstack/models/resource_level_graph_billing_detail_volume.py +101 -0
  321. hyperstack/models/resource_level_graph_billing_details_attributes.py +91 -0
  322. hyperstack/models/resource_level_graph_billing_details_metrics.py +97 -0
  323. hyperstack/models/resource_level_graph_billing_details_vm.py +101 -0
  324. hyperstack/models/resource_level_graph_billing_vm_details_resources.py +97 -0
  325. hyperstack/models/resource_level_graph_billing_volume_details_resources.py +97 -0
  326. hyperstack/models/resource_level_vm_billing_details_response_model.py +95 -0
  327. hyperstack/models/resource_level_vm_billing_history_response_model.py +95 -0
  328. hyperstack/models/resource_level_vm_graph_billing_details_response_model.py +95 -0
  329. hyperstack/models/resource_level_volume_billing_details_response_model.py +95 -0
  330. hyperstack/models/resource_level_volume_billing_history_response_model.py +95 -0
  331. hyperstack/models/resource_level_volume_graph_billing_details_response_model.py +95 -0
  332. hyperstack/models/resource_object_response_for_customer.py +93 -0
  333. hyperstack/models/response_model.py +89 -0
  334. hyperstack/models/role_permission_fields.py +91 -0
  335. hyperstack/models/role_policy_fields.py +91 -0
  336. hyperstack/models/security_group_rule.py +95 -0
  337. hyperstack/models/security_group_rule_fields.py +104 -0
  338. hyperstack/models/security_rules_fieldsfor_instance.py +104 -0
  339. hyperstack/models/security_rules_protocol_fields.py +91 -0
  340. hyperstack/models/set_defaults_payload.py +89 -0
  341. hyperstack/models/single_visibility_user_response.py +91 -0
  342. hyperstack/models/snapshot_fields.py +105 -0
  343. hyperstack/models/snapshot_restore_request.py +89 -0
  344. hyperstack/models/snapshot_retrieve.py +95 -0
  345. hyperstack/models/snapshot_retrieve_fields.py +103 -0
  346. hyperstack/models/snapshots.py +105 -0
  347. hyperstack/models/start_deployment.py +95 -0
  348. hyperstack/models/start_deployment_payload.py +93 -0
  349. hyperstack/models/stock_visibility_user_list_response.py +99 -0
  350. hyperstack/models/stock_visibility_user_payload.py +87 -0
  351. hyperstack/models/sub_resource_graph_billing_details_metrics.py +152 -0
  352. hyperstack/models/sub_resources_costs_response_model.py +101 -0
  353. hyperstack/models/sub_resources_graph_billing_history_fields.py +97 -0
  354. hyperstack/models/sub_resources_graph_response_model.py +95 -0
  355. hyperstack/models/subscribeorunsubscribeupdatepayload.py +87 -0
  356. hyperstack/models/success_response_model.py +89 -0
  357. hyperstack/models/template.py +95 -0
  358. hyperstack/models/template_fields.py +98 -0
  359. hyperstack/models/templates.py +99 -0
  360. hyperstack/models/token_fields.py +91 -0
  361. hyperstack/models/update_contract_payload.py +104 -0
  362. hyperstack/models/update_discounts_payload.py +102 -0
  363. hyperstack/models/update_discounts_status_payload.py +87 -0
  364. hyperstack/models/update_environment.py +88 -0
  365. hyperstack/models/update_gpu.py +91 -0
  366. hyperstack/models/update_keypair_name.py +88 -0
  367. hyperstack/models/update_keypairnameresponse.py +95 -0
  368. hyperstack/models/update_organization_payload.py +88 -0
  369. hyperstack/models/update_organization_response_model.py +89 -0
  370. hyperstack/models/update_template.py +91 -0
  371. hyperstack/models/user_default_choice_for_user_fields.py +91 -0
  372. hyperstack/models/user_default_choices_for_user_response.py +99 -0
  373. hyperstack/models/user_permission_fields.py +91 -0
  374. hyperstack/models/user_transfer_payload.py +89 -0
  375. hyperstack/models/userinfopostpayload.py +107 -0
  376. hyperstack/models/users_info_fields.py +114 -0
  377. hyperstack/models/users_info_list_response.py +95 -0
  378. hyperstack/models/verify_api_key_payload.py +87 -0
  379. hyperstack/models/verify_api_key_response_model.py +95 -0
  380. hyperstack/models/virtual_machine_usage.py +93 -0
  381. hyperstack/models/vm_usage_request_payload.py +87 -0
  382. hyperstack/models/vm_usage_response.py +101 -0
  383. hyperstack/models/vncurl.py +95 -0
  384. hyperstack/models/vncurl_fields.py +89 -0
  385. hyperstack/models/volume.py +95 -0
  386. hyperstack/models/volume_attachment_fields.py +98 -0
  387. hyperstack/models/volume_fields.py +116 -0
  388. hyperstack/models/volume_fieldsfor_instance.py +97 -0
  389. hyperstack/models/volume_overview_fields.py +91 -0
  390. hyperstack/models/volume_status_change_fields.py +96 -0
  391. hyperstack/models/volume_types.py +91 -0
  392. hyperstack/models/volumes.py +99 -0
  393. hyperstack/models/volumes_last_status_change_response.py +99 -0
  394. hyperstack/models/warning_mail_log_fields.py +99 -0
  395. hyperstack/models/warning_mail_log_response.py +101 -0
  396. hyperstack/py.typed +0 -0
  397. hyperstack/rest.py +257 -0
  398. hyperstack-1.25.0a0.dist-info/METADATA +23 -0
  399. hyperstack-1.25.0a0.dist-info/RECORD +401 -0
  400. hyperstack-1.25.0a0.dist-info/WHEEL +5 -0
  401. hyperstack-1.25.0a0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1490 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Infrahub-API
5
+
6
+ Leverage the Infrahub API and Hyperstack platform to easily create, manage, and scale powerful GPU virtual machines and their associated resources. Access this SDK to automate the deployment of your workloads and streamline your infrastructure management. To contribute, please raise an issue with a bug report, feature request, feedback, or general inquiry.
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictInt, StrictStr
20
+ from typing import Optional
21
+ from typing_extensions import Annotated
22
+ from ..models.create_environment import CreateEnvironment
23
+ from ..models.environment import Environment
24
+ from ..models.environments import Environments
25
+ from ..models.response_model import ResponseModel
26
+ from ..models.update_environment import UpdateEnvironment
27
+
28
+ from ..api_client import ApiClient, RequestSerialized
29
+ from ..api_response import ApiResponse
30
+ from ..rest import RESTResponseType
31
+
32
+
33
+ class EnvironmentApi:
34
+ """NOTE: This class is auto generated by OpenAPI Generator
35
+ Ref: https://openapi-generator.tech
36
+
37
+ Do not edit the class manually.
38
+ """
39
+
40
+ def __init__(self, api_client=None) -> None:
41
+ if api_client is None:
42
+ api_client = ApiClient.get_default()
43
+ self.api_client = api_client
44
+
45
+
46
+ @validate_call
47
+ def create_environment(
48
+ self,
49
+ payload: CreateEnvironment,
50
+ _request_timeout: Union[
51
+ None,
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Tuple[
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Annotated[StrictFloat, Field(gt=0)]
56
+ ]
57
+ ] = None,
58
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
59
+ _content_type: Optional[StrictStr] = None,
60
+ _headers: Optional[Dict[StrictStr, Any]] = None,
61
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
62
+ ) -> Environment:
63
+ """Create environment
64
+
65
+ Creates an environment—a container to organize your resources, including SSH key pairs, virtual machines, and volumes. To create your environment, provide your desired environment name, and [**region**](https://infrahub-doc.nexgencloud.com/docs/features/regions) in the request body.
66
+
67
+ :param payload: (required)
68
+ :type payload: CreateEnvironment
69
+ :param _request_timeout: timeout setting for this request. If one
70
+ number provided, it will be total request
71
+ timeout. It can also be a pair (tuple) of
72
+ (connection, read) timeouts.
73
+ :type _request_timeout: int, tuple(int, int), optional
74
+ :param _request_auth: set to override the auth_settings for an a single
75
+ request; this effectively ignores the
76
+ authentication in the spec for a single request.
77
+ :type _request_auth: dict, optional
78
+ :param _content_type: force content-type for the request.
79
+ :type _content_type: str, Optional
80
+ :param _headers: set to override the headers for a single
81
+ request; this effectively ignores the headers
82
+ in the spec for a single request.
83
+ :type _headers: dict, optional
84
+ :param _host_index: set to override the host_index for a single
85
+ request; this effectively ignores the host_index
86
+ in the spec for a single request.
87
+ :type _host_index: int, optional
88
+ :return: Returns the result object.
89
+ """ # noqa: E501
90
+
91
+ _param = self._create_environment_serialize(
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': "Environment",
101
+ '400': "ErrorResponseModel",
102
+ '401': "ErrorResponseModel",
103
+ '404': "ErrorResponseModel",
104
+ '409': "ErrorResponseModel",
105
+ '500': None,
106
+ }
107
+ response_data = self.api_client.call_api(
108
+ *_param,
109
+ _request_timeout=_request_timeout
110
+ )
111
+ response_data.read()
112
+ return self.api_client.response_deserialize(
113
+ response_data=response_data,
114
+ response_types_map=_response_types_map,
115
+ ).data
116
+
117
+
118
+ @validate_call
119
+ def create_environment_with_http_info(
120
+ self,
121
+ payload: CreateEnvironment,
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[Environment]:
135
+ """Create environment
136
+
137
+ Creates an environment—a container to organize your resources, including SSH key pairs, virtual machines, and volumes. To create your environment, provide your desired environment name, and [**region**](https://infrahub-doc.nexgencloud.com/docs/features/regions) in the request body.
138
+
139
+ :param payload: (required)
140
+ :type payload: CreateEnvironment
141
+ :param _request_timeout: timeout setting for this request. If one
142
+ number provided, it will be total request
143
+ timeout. It can also be a pair (tuple) of
144
+ (connection, read) timeouts.
145
+ :type _request_timeout: int, tuple(int, int), optional
146
+ :param _request_auth: set to override the auth_settings for an a single
147
+ request; this effectively ignores the
148
+ authentication in the spec for a single request.
149
+ :type _request_auth: dict, optional
150
+ :param _content_type: force content-type for the request.
151
+ :type _content_type: str, Optional
152
+ :param _headers: set to override the headers for a single
153
+ request; this effectively ignores the headers
154
+ in the spec for a single request.
155
+ :type _headers: dict, optional
156
+ :param _host_index: set to override the host_index for a single
157
+ request; this effectively ignores the host_index
158
+ in the spec for a single request.
159
+ :type _host_index: int, optional
160
+ :return: Returns the result object.
161
+ """ # noqa: E501
162
+
163
+ _param = self._create_environment_serialize(
164
+ payload=payload,
165
+ _request_auth=_request_auth,
166
+ _content_type=_content_type,
167
+ _headers=_headers,
168
+ _host_index=_host_index
169
+ )
170
+
171
+ _response_types_map: Dict[str, Optional[str]] = {
172
+ '200': "Environment",
173
+ '400': "ErrorResponseModel",
174
+ '401': "ErrorResponseModel",
175
+ '404': "ErrorResponseModel",
176
+ '409': "ErrorResponseModel",
177
+ '500': None,
178
+ }
179
+ response_data = self.api_client.call_api(
180
+ *_param,
181
+ _request_timeout=_request_timeout
182
+ )
183
+ response_data.read()
184
+ return self.api_client.response_deserialize(
185
+ response_data=response_data,
186
+ response_types_map=_response_types_map,
187
+ )
188
+
189
+
190
+ @validate_call
191
+ def create_environment_without_preload_content(
192
+ self,
193
+ payload: CreateEnvironment,
194
+ _request_timeout: Union[
195
+ None,
196
+ Annotated[StrictFloat, Field(gt=0)],
197
+ Tuple[
198
+ Annotated[StrictFloat, Field(gt=0)],
199
+ Annotated[StrictFloat, Field(gt=0)]
200
+ ]
201
+ ] = None,
202
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
203
+ _content_type: Optional[StrictStr] = None,
204
+ _headers: Optional[Dict[StrictStr, Any]] = None,
205
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
206
+ ) -> RESTResponseType:
207
+ """Create environment
208
+
209
+ Creates an environment—a container to organize your resources, including SSH key pairs, virtual machines, and volumes. To create your environment, provide your desired environment name, and [**region**](https://infrahub-doc.nexgencloud.com/docs/features/regions) in the request body.
210
+
211
+ :param payload: (required)
212
+ :type payload: CreateEnvironment
213
+ :param _request_timeout: timeout setting for this request. If one
214
+ number provided, it will be total request
215
+ timeout. It can also be a pair (tuple) of
216
+ (connection, read) timeouts.
217
+ :type _request_timeout: int, tuple(int, int), optional
218
+ :param _request_auth: set to override the auth_settings for an a single
219
+ request; this effectively ignores the
220
+ authentication in the spec for a single request.
221
+ :type _request_auth: dict, optional
222
+ :param _content_type: force content-type for the request.
223
+ :type _content_type: str, Optional
224
+ :param _headers: set to override the headers for a single
225
+ request; this effectively ignores the headers
226
+ in the spec for a single request.
227
+ :type _headers: dict, optional
228
+ :param _host_index: set to override the host_index for a single
229
+ request; this effectively ignores the host_index
230
+ in the spec for a single request.
231
+ :type _host_index: int, optional
232
+ :return: Returns the result object.
233
+ """ # noqa: E501
234
+
235
+ _param = self._create_environment_serialize(
236
+ payload=payload,
237
+ _request_auth=_request_auth,
238
+ _content_type=_content_type,
239
+ _headers=_headers,
240
+ _host_index=_host_index
241
+ )
242
+
243
+ _response_types_map: Dict[str, Optional[str]] = {
244
+ '200': "Environment",
245
+ '400': "ErrorResponseModel",
246
+ '401': "ErrorResponseModel",
247
+ '404': "ErrorResponseModel",
248
+ '409': "ErrorResponseModel",
249
+ '500': None,
250
+ }
251
+ response_data = self.api_client.call_api(
252
+ *_param,
253
+ _request_timeout=_request_timeout
254
+ )
255
+ return response_data.response
256
+
257
+
258
+ def _create_environment_serialize(
259
+ self,
260
+ payload,
261
+ _request_auth,
262
+ _content_type,
263
+ _headers,
264
+ _host_index,
265
+ ) -> RequestSerialized:
266
+
267
+ _host = None
268
+
269
+ _collection_formats: Dict[str, str] = {
270
+ }
271
+
272
+ _path_params: Dict[str, str] = {}
273
+ _query_params: List[Tuple[str, str]] = []
274
+ _header_params: Dict[str, Optional[str]] = _headers or {}
275
+ _form_params: List[Tuple[str, str]] = []
276
+ _files: Dict[
277
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
278
+ ] = {}
279
+ _body_params: Optional[bytes] = None
280
+
281
+ # process the path parameters
282
+ # process the query parameters
283
+ # process the header parameters
284
+ # process the form parameters
285
+ # process the body parameter
286
+ if payload is not None:
287
+ _body_params = payload
288
+
289
+
290
+ # set the HTTP header `Accept`
291
+ if 'Accept' not in _header_params:
292
+ _header_params['Accept'] = self.api_client.select_header_accept(
293
+ [
294
+ 'application/json'
295
+ ]
296
+ )
297
+
298
+ # set the HTTP header `Content-Type`
299
+ if _content_type:
300
+ _header_params['Content-Type'] = _content_type
301
+ else:
302
+ _default_content_type = (
303
+ self.api_client.select_header_content_type(
304
+ [
305
+ 'application/json'
306
+ ]
307
+ )
308
+ )
309
+ if _default_content_type is not None:
310
+ _header_params['Content-Type'] = _default_content_type
311
+
312
+ # authentication setting
313
+ _auth_settings: List[str] = [
314
+ 'apiKey',
315
+ 'accessToken'
316
+ ]
317
+
318
+ return self.api_client.param_serialize(
319
+ method='POST',
320
+ resource_path='/core/environments',
321
+ path_params=_path_params,
322
+ query_params=_query_params,
323
+ header_params=_header_params,
324
+ body=_body_params,
325
+ post_params=_form_params,
326
+ files=_files,
327
+ auth_settings=_auth_settings,
328
+ collection_formats=_collection_formats,
329
+ _host=_host,
330
+ _request_auth=_request_auth
331
+ )
332
+
333
+
334
+
335
+
336
+ @validate_call
337
+ def delete_environment(
338
+ self,
339
+ id: StrictInt,
340
+ _request_timeout: Union[
341
+ None,
342
+ Annotated[StrictFloat, Field(gt=0)],
343
+ Tuple[
344
+ Annotated[StrictFloat, Field(gt=0)],
345
+ Annotated[StrictFloat, Field(gt=0)]
346
+ ]
347
+ ] = None,
348
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
349
+ _content_type: Optional[StrictStr] = None,
350
+ _headers: Optional[Dict[StrictStr, Any]] = None,
351
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
352
+ ) -> ResponseModel:
353
+ """Delete environment
354
+
355
+ Deletes an environment permanently. Provide the environment ID in the path to remove the specified environment.
356
+
357
+ :param id: (required)
358
+ :type id: int
359
+ :param _request_timeout: timeout setting for this request. If one
360
+ number provided, it will be total request
361
+ timeout. It can also be a pair (tuple) of
362
+ (connection, read) timeouts.
363
+ :type _request_timeout: int, tuple(int, int), optional
364
+ :param _request_auth: set to override the auth_settings for an a single
365
+ request; this effectively ignores the
366
+ authentication in the spec for a single request.
367
+ :type _request_auth: dict, optional
368
+ :param _content_type: force content-type for the request.
369
+ :type _content_type: str, Optional
370
+ :param _headers: set to override the headers for a single
371
+ request; this effectively ignores the headers
372
+ in the spec for a single request.
373
+ :type _headers: dict, optional
374
+ :param _host_index: set to override the host_index for a single
375
+ request; this effectively ignores the host_index
376
+ in the spec for a single request.
377
+ :type _host_index: int, optional
378
+ :return: Returns the result object.
379
+ """ # noqa: E501
380
+
381
+ _param = self._delete_environment_serialize(
382
+ id=id,
383
+ _request_auth=_request_auth,
384
+ _content_type=_content_type,
385
+ _headers=_headers,
386
+ _host_index=_host_index
387
+ )
388
+
389
+ _response_types_map: Dict[str, Optional[str]] = {
390
+ '200': "ResponseModel",
391
+ '400': "ErrorResponseModel",
392
+ '401': "ErrorResponseModel",
393
+ '404': "ErrorResponseModel",
394
+ '500': None,
395
+ }
396
+ response_data = self.api_client.call_api(
397
+ *_param,
398
+ _request_timeout=_request_timeout
399
+ )
400
+ response_data.read()
401
+ return self.api_client.response_deserialize(
402
+ response_data=response_data,
403
+ response_types_map=_response_types_map,
404
+ ).data
405
+
406
+
407
+ @validate_call
408
+ def delete_environment_with_http_info(
409
+ self,
410
+ id: StrictInt,
411
+ _request_timeout: Union[
412
+ None,
413
+ Annotated[StrictFloat, Field(gt=0)],
414
+ Tuple[
415
+ Annotated[StrictFloat, Field(gt=0)],
416
+ Annotated[StrictFloat, Field(gt=0)]
417
+ ]
418
+ ] = None,
419
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
420
+ _content_type: Optional[StrictStr] = None,
421
+ _headers: Optional[Dict[StrictStr, Any]] = None,
422
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
423
+ ) -> ApiResponse[ResponseModel]:
424
+ """Delete environment
425
+
426
+ Deletes an environment permanently. Provide the environment ID in the path to remove the specified environment.
427
+
428
+ :param id: (required)
429
+ :type id: int
430
+ :param _request_timeout: timeout setting for this request. If one
431
+ number provided, it will be total request
432
+ timeout. It can also be a pair (tuple) of
433
+ (connection, read) timeouts.
434
+ :type _request_timeout: int, tuple(int, int), optional
435
+ :param _request_auth: set to override the auth_settings for an a single
436
+ request; this effectively ignores the
437
+ authentication in the spec for a single request.
438
+ :type _request_auth: dict, optional
439
+ :param _content_type: force content-type for the request.
440
+ :type _content_type: str, Optional
441
+ :param _headers: set to override the headers for a single
442
+ request; this effectively ignores the headers
443
+ in the spec for a single request.
444
+ :type _headers: dict, optional
445
+ :param _host_index: set to override the host_index for a single
446
+ request; this effectively ignores the host_index
447
+ in the spec for a single request.
448
+ :type _host_index: int, optional
449
+ :return: Returns the result object.
450
+ """ # noqa: E501
451
+
452
+ _param = self._delete_environment_serialize(
453
+ id=id,
454
+ _request_auth=_request_auth,
455
+ _content_type=_content_type,
456
+ _headers=_headers,
457
+ _host_index=_host_index
458
+ )
459
+
460
+ _response_types_map: Dict[str, Optional[str]] = {
461
+ '200': "ResponseModel",
462
+ '400': "ErrorResponseModel",
463
+ '401': "ErrorResponseModel",
464
+ '404': "ErrorResponseModel",
465
+ '500': None,
466
+ }
467
+ response_data = self.api_client.call_api(
468
+ *_param,
469
+ _request_timeout=_request_timeout
470
+ )
471
+ response_data.read()
472
+ return self.api_client.response_deserialize(
473
+ response_data=response_data,
474
+ response_types_map=_response_types_map,
475
+ )
476
+
477
+
478
+ @validate_call
479
+ def delete_environment_without_preload_content(
480
+ self,
481
+ id: StrictInt,
482
+ _request_timeout: Union[
483
+ None,
484
+ Annotated[StrictFloat, Field(gt=0)],
485
+ Tuple[
486
+ Annotated[StrictFloat, Field(gt=0)],
487
+ Annotated[StrictFloat, Field(gt=0)]
488
+ ]
489
+ ] = None,
490
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
491
+ _content_type: Optional[StrictStr] = None,
492
+ _headers: Optional[Dict[StrictStr, Any]] = None,
493
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
494
+ ) -> RESTResponseType:
495
+ """Delete environment
496
+
497
+ Deletes an environment permanently. Provide the environment ID in the path to remove the specified environment.
498
+
499
+ :param id: (required)
500
+ :type id: int
501
+ :param _request_timeout: timeout setting for this request. If one
502
+ number provided, it will be total request
503
+ timeout. It can also be a pair (tuple) of
504
+ (connection, read) timeouts.
505
+ :type _request_timeout: int, tuple(int, int), optional
506
+ :param _request_auth: set to override the auth_settings for an a single
507
+ request; this effectively ignores the
508
+ authentication in the spec for a single request.
509
+ :type _request_auth: dict, optional
510
+ :param _content_type: force content-type for the request.
511
+ :type _content_type: str, Optional
512
+ :param _headers: set to override the headers for a single
513
+ request; this effectively ignores the headers
514
+ in the spec for a single request.
515
+ :type _headers: dict, optional
516
+ :param _host_index: set to override the host_index for a single
517
+ request; this effectively ignores the host_index
518
+ in the spec for a single request.
519
+ :type _host_index: int, optional
520
+ :return: Returns the result object.
521
+ """ # noqa: E501
522
+
523
+ _param = self._delete_environment_serialize(
524
+ id=id,
525
+ _request_auth=_request_auth,
526
+ _content_type=_content_type,
527
+ _headers=_headers,
528
+ _host_index=_host_index
529
+ )
530
+
531
+ _response_types_map: Dict[str, Optional[str]] = {
532
+ '200': "ResponseModel",
533
+ '400': "ErrorResponseModel",
534
+ '401': "ErrorResponseModel",
535
+ '404': "ErrorResponseModel",
536
+ '500': None,
537
+ }
538
+ response_data = self.api_client.call_api(
539
+ *_param,
540
+ _request_timeout=_request_timeout
541
+ )
542
+ return response_data.response
543
+
544
+
545
+ def _delete_environment_serialize(
546
+ self,
547
+ id,
548
+ _request_auth,
549
+ _content_type,
550
+ _headers,
551
+ _host_index,
552
+ ) -> RequestSerialized:
553
+
554
+ _host = None
555
+
556
+ _collection_formats: Dict[str, str] = {
557
+ }
558
+
559
+ _path_params: Dict[str, str] = {}
560
+ _query_params: List[Tuple[str, str]] = []
561
+ _header_params: Dict[str, Optional[str]] = _headers or {}
562
+ _form_params: List[Tuple[str, str]] = []
563
+ _files: Dict[
564
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
565
+ ] = {}
566
+ _body_params: Optional[bytes] = None
567
+
568
+ # process the path parameters
569
+ if id is not None:
570
+ _path_params['id'] = id
571
+ # process the query parameters
572
+ # process the header parameters
573
+ # process the form parameters
574
+ # process the body parameter
575
+
576
+
577
+ # set the HTTP header `Accept`
578
+ if 'Accept' not in _header_params:
579
+ _header_params['Accept'] = self.api_client.select_header_accept(
580
+ [
581
+ 'application/json'
582
+ ]
583
+ )
584
+
585
+
586
+ # authentication setting
587
+ _auth_settings: List[str] = [
588
+ 'apiKey',
589
+ 'accessToken'
590
+ ]
591
+
592
+ return self.api_client.param_serialize(
593
+ method='DELETE',
594
+ resource_path='/core/environments/{id}',
595
+ path_params=_path_params,
596
+ query_params=_query_params,
597
+ header_params=_header_params,
598
+ body=_body_params,
599
+ post_params=_form_params,
600
+ files=_files,
601
+ auth_settings=_auth_settings,
602
+ collection_formats=_collection_formats,
603
+ _host=_host,
604
+ _request_auth=_request_auth
605
+ )
606
+
607
+
608
+
609
+
610
+ @validate_call
611
+ def list_environments(
612
+ self,
613
+ page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
614
+ page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
615
+ search: Annotated[Optional[StrictStr], Field(description="Search By ID or Name or Region")] = None,
616
+ _request_timeout: Union[
617
+ None,
618
+ Annotated[StrictFloat, Field(gt=0)],
619
+ Tuple[
620
+ Annotated[StrictFloat, Field(gt=0)],
621
+ Annotated[StrictFloat, Field(gt=0)]
622
+ ]
623
+ ] = None,
624
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
625
+ _content_type: Optional[StrictStr] = None,
626
+ _headers: Optional[Dict[StrictStr, Any]] = None,
627
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
628
+ ) -> Environments:
629
+ """List environments
630
+
631
+ Returns a list of your existing environments, providing the following details for each; environment ID, name, [**region**](https://infrahub-doc.nexgencloud.com/docs/features/regions), and the date and time of creation. For more information on environments, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/environments-available-features).
632
+
633
+ :param page: Page Number
634
+ :type page: str
635
+ :param page_size: Data Per Page
636
+ :type page_size: str
637
+ :param search: Search By ID or Name or Region
638
+ :type search: str
639
+ :param _request_timeout: timeout setting for this request. If one
640
+ number provided, it will be total request
641
+ timeout. It can also be a pair (tuple) of
642
+ (connection, read) timeouts.
643
+ :type _request_timeout: int, tuple(int, int), optional
644
+ :param _request_auth: set to override the auth_settings for an a single
645
+ request; this effectively ignores the
646
+ authentication in the spec for a single request.
647
+ :type _request_auth: dict, optional
648
+ :param _content_type: force content-type for the request.
649
+ :type _content_type: str, Optional
650
+ :param _headers: set to override the headers for a single
651
+ request; this effectively ignores the headers
652
+ in the spec for a single request.
653
+ :type _headers: dict, optional
654
+ :param _host_index: set to override the host_index for a single
655
+ request; this effectively ignores the host_index
656
+ in the spec for a single request.
657
+ :type _host_index: int, optional
658
+ :return: Returns the result object.
659
+ """ # noqa: E501
660
+
661
+ _param = self._list_environments_serialize(
662
+ page=page,
663
+ page_size=page_size,
664
+ search=search,
665
+ _request_auth=_request_auth,
666
+ _content_type=_content_type,
667
+ _headers=_headers,
668
+ _host_index=_host_index
669
+ )
670
+
671
+ _response_types_map: Dict[str, Optional[str]] = {
672
+ '200': "Environments",
673
+ '400': "ErrorResponseModel",
674
+ '401': "ErrorResponseModel",
675
+ '500': None,
676
+ }
677
+ response_data = self.api_client.call_api(
678
+ *_param,
679
+ _request_timeout=_request_timeout
680
+ )
681
+ response_data.read()
682
+ return self.api_client.response_deserialize(
683
+ response_data=response_data,
684
+ response_types_map=_response_types_map,
685
+ ).data
686
+
687
+
688
+ @validate_call
689
+ def list_environments_with_http_info(
690
+ self,
691
+ page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
692
+ page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
693
+ search: Annotated[Optional[StrictStr], Field(description="Search By ID or Name or Region")] = None,
694
+ _request_timeout: Union[
695
+ None,
696
+ Annotated[StrictFloat, Field(gt=0)],
697
+ Tuple[
698
+ Annotated[StrictFloat, Field(gt=0)],
699
+ Annotated[StrictFloat, Field(gt=0)]
700
+ ]
701
+ ] = None,
702
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
703
+ _content_type: Optional[StrictStr] = None,
704
+ _headers: Optional[Dict[StrictStr, Any]] = None,
705
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
706
+ ) -> ApiResponse[Environments]:
707
+ """List environments
708
+
709
+ Returns a list of your existing environments, providing the following details for each; environment ID, name, [**region**](https://infrahub-doc.nexgencloud.com/docs/features/regions), and the date and time of creation. For more information on environments, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/environments-available-features).
710
+
711
+ :param page: Page Number
712
+ :type page: str
713
+ :param page_size: Data Per Page
714
+ :type page_size: str
715
+ :param search: Search By ID or Name or Region
716
+ :type search: str
717
+ :param _request_timeout: timeout setting for this request. If one
718
+ number provided, it will be total request
719
+ timeout. It can also be a pair (tuple) of
720
+ (connection, read) timeouts.
721
+ :type _request_timeout: int, tuple(int, int), optional
722
+ :param _request_auth: set to override the auth_settings for an a single
723
+ request; this effectively ignores the
724
+ authentication in the spec for a single request.
725
+ :type _request_auth: dict, optional
726
+ :param _content_type: force content-type for the request.
727
+ :type _content_type: str, Optional
728
+ :param _headers: set to override the headers for a single
729
+ request; this effectively ignores the headers
730
+ in the spec for a single request.
731
+ :type _headers: dict, optional
732
+ :param _host_index: set to override the host_index for a single
733
+ request; this effectively ignores the host_index
734
+ in the spec for a single request.
735
+ :type _host_index: int, optional
736
+ :return: Returns the result object.
737
+ """ # noqa: E501
738
+
739
+ _param = self._list_environments_serialize(
740
+ page=page,
741
+ page_size=page_size,
742
+ search=search,
743
+ _request_auth=_request_auth,
744
+ _content_type=_content_type,
745
+ _headers=_headers,
746
+ _host_index=_host_index
747
+ )
748
+
749
+ _response_types_map: Dict[str, Optional[str]] = {
750
+ '200': "Environments",
751
+ '400': "ErrorResponseModel",
752
+ '401': "ErrorResponseModel",
753
+ '500': None,
754
+ }
755
+ response_data = self.api_client.call_api(
756
+ *_param,
757
+ _request_timeout=_request_timeout
758
+ )
759
+ response_data.read()
760
+ return self.api_client.response_deserialize(
761
+ response_data=response_data,
762
+ response_types_map=_response_types_map,
763
+ )
764
+
765
+
766
+ @validate_call
767
+ def list_environments_without_preload_content(
768
+ self,
769
+ page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
770
+ page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
771
+ search: Annotated[Optional[StrictStr], Field(description="Search By ID or Name or Region")] = None,
772
+ _request_timeout: Union[
773
+ None,
774
+ Annotated[StrictFloat, Field(gt=0)],
775
+ Tuple[
776
+ Annotated[StrictFloat, Field(gt=0)],
777
+ Annotated[StrictFloat, Field(gt=0)]
778
+ ]
779
+ ] = None,
780
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
781
+ _content_type: Optional[StrictStr] = None,
782
+ _headers: Optional[Dict[StrictStr, Any]] = None,
783
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
784
+ ) -> RESTResponseType:
785
+ """List environments
786
+
787
+ Returns a list of your existing environments, providing the following details for each; environment ID, name, [**region**](https://infrahub-doc.nexgencloud.com/docs/features/regions), and the date and time of creation. For more information on environments, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/environments-available-features).
788
+
789
+ :param page: Page Number
790
+ :type page: str
791
+ :param page_size: Data Per Page
792
+ :type page_size: str
793
+ :param search: Search By ID or Name or Region
794
+ :type search: str
795
+ :param _request_timeout: timeout setting for this request. If one
796
+ number provided, it will be total request
797
+ timeout. It can also be a pair (tuple) of
798
+ (connection, read) timeouts.
799
+ :type _request_timeout: int, tuple(int, int), optional
800
+ :param _request_auth: set to override the auth_settings for an a single
801
+ request; this effectively ignores the
802
+ authentication in the spec for a single request.
803
+ :type _request_auth: dict, optional
804
+ :param _content_type: force content-type for the request.
805
+ :type _content_type: str, Optional
806
+ :param _headers: set to override the headers for a single
807
+ request; this effectively ignores the headers
808
+ in the spec for a single request.
809
+ :type _headers: dict, optional
810
+ :param _host_index: set to override the host_index for a single
811
+ request; this effectively ignores the host_index
812
+ in the spec for a single request.
813
+ :type _host_index: int, optional
814
+ :return: Returns the result object.
815
+ """ # noqa: E501
816
+
817
+ _param = self._list_environments_serialize(
818
+ page=page,
819
+ page_size=page_size,
820
+ search=search,
821
+ _request_auth=_request_auth,
822
+ _content_type=_content_type,
823
+ _headers=_headers,
824
+ _host_index=_host_index
825
+ )
826
+
827
+ _response_types_map: Dict[str, Optional[str]] = {
828
+ '200': "Environments",
829
+ '400': "ErrorResponseModel",
830
+ '401': "ErrorResponseModel",
831
+ '500': None,
832
+ }
833
+ response_data = self.api_client.call_api(
834
+ *_param,
835
+ _request_timeout=_request_timeout
836
+ )
837
+ return response_data.response
838
+
839
+
840
+ def _list_environments_serialize(
841
+ self,
842
+ page,
843
+ page_size,
844
+ search,
845
+ _request_auth,
846
+ _content_type,
847
+ _headers,
848
+ _host_index,
849
+ ) -> RequestSerialized:
850
+
851
+ _host = None
852
+
853
+ _collection_formats: Dict[str, str] = {
854
+ }
855
+
856
+ _path_params: Dict[str, str] = {}
857
+ _query_params: List[Tuple[str, str]] = []
858
+ _header_params: Dict[str, Optional[str]] = _headers or {}
859
+ _form_params: List[Tuple[str, str]] = []
860
+ _files: Dict[
861
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
862
+ ] = {}
863
+ _body_params: Optional[bytes] = None
864
+
865
+ # process the path parameters
866
+ # process the query parameters
867
+ if page is not None:
868
+
869
+ _query_params.append(('page', page))
870
+
871
+ if page_size is not None:
872
+
873
+ _query_params.append(('pageSize', page_size))
874
+
875
+ if search is not None:
876
+
877
+ _query_params.append(('search', search))
878
+
879
+ # process the header parameters
880
+ # process the form parameters
881
+ # process the body parameter
882
+
883
+
884
+ # set the HTTP header `Accept`
885
+ if 'Accept' not in _header_params:
886
+ _header_params['Accept'] = self.api_client.select_header_accept(
887
+ [
888
+ 'application/json'
889
+ ]
890
+ )
891
+
892
+
893
+ # authentication setting
894
+ _auth_settings: List[str] = [
895
+ 'apiKey',
896
+ 'accessToken'
897
+ ]
898
+
899
+ return self.api_client.param_serialize(
900
+ method='GET',
901
+ resource_path='/core/environments',
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
+ def retrieve_environment(
919
+ self,
920
+ 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
+ ) -> Environment:
934
+ """Retrieve environment
935
+
936
+ Retrieves details about a specific environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment.
937
+
938
+ :param id: (required)
939
+ :type 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._retrieve_environment_serialize(
963
+ id=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': "Environment",
972
+ '400': "ErrorResponseModel",
973
+ '401': "ErrorResponseModel",
974
+ '404': "ErrorResponseModel",
975
+ '500': None,
976
+ }
977
+ response_data = self.api_client.call_api(
978
+ *_param,
979
+ _request_timeout=_request_timeout
980
+ )
981
+ 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
+ def retrieve_environment_with_http_info(
990
+ self,
991
+ 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[Environment]:
1005
+ """Retrieve environment
1006
+
1007
+ Retrieves details about a specific environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment.
1008
+
1009
+ :param id: (required)
1010
+ :type 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._retrieve_environment_serialize(
1034
+ id=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': "Environment",
1043
+ '400': "ErrorResponseModel",
1044
+ '401': "ErrorResponseModel",
1045
+ '404': "ErrorResponseModel",
1046
+ '500': None,
1047
+ }
1048
+ response_data = self.api_client.call_api(
1049
+ *_param,
1050
+ _request_timeout=_request_timeout
1051
+ )
1052
+ 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
+ def retrieve_environment_without_preload_content(
1061
+ self,
1062
+ 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
+ """Retrieve environment
1077
+
1078
+ Retrieves details about a specific environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment.
1079
+
1080
+ :param id: (required)
1081
+ :type 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._retrieve_environment_serialize(
1105
+ id=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': "Environment",
1114
+ '400': "ErrorResponseModel",
1115
+ '401': "ErrorResponseModel",
1116
+ '404': "ErrorResponseModel",
1117
+ '500': None,
1118
+ }
1119
+ response_data = self.api_client.call_api(
1120
+ *_param,
1121
+ _request_timeout=_request_timeout
1122
+ )
1123
+ return response_data.response
1124
+
1125
+
1126
+ def _retrieve_environment_serialize(
1127
+ self,
1128
+ 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 id is not None:
1151
+ _path_params['id'] = 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
+ 'accessToken'
1171
+ ]
1172
+
1173
+ return self.api_client.param_serialize(
1174
+ method='GET',
1175
+ resource_path='/core/environments/{id}',
1176
+ path_params=_path_params,
1177
+ query_params=_query_params,
1178
+ header_params=_header_params,
1179
+ body=_body_params,
1180
+ post_params=_form_params,
1181
+ files=_files,
1182
+ auth_settings=_auth_settings,
1183
+ collection_formats=_collection_formats,
1184
+ _host=_host,
1185
+ _request_auth=_request_auth
1186
+ )
1187
+
1188
+
1189
+
1190
+
1191
+ @validate_call
1192
+ def update_environment(
1193
+ self,
1194
+ id: StrictInt,
1195
+ payload: UpdateEnvironment,
1196
+ _request_timeout: Union[
1197
+ None,
1198
+ Annotated[StrictFloat, Field(gt=0)],
1199
+ Tuple[
1200
+ Annotated[StrictFloat, Field(gt=0)],
1201
+ Annotated[StrictFloat, Field(gt=0)]
1202
+ ]
1203
+ ] = None,
1204
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1205
+ _content_type: Optional[StrictStr] = None,
1206
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1207
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1208
+ ) -> Environment:
1209
+ """Update environment
1210
+
1211
+ Updates the name of an existing environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment.
1212
+
1213
+ :param id: (required)
1214
+ :type id: int
1215
+ :param payload: (required)
1216
+ :type payload: UpdateEnvironment
1217
+ :param _request_timeout: timeout setting for this request. If one
1218
+ number provided, it will be total request
1219
+ timeout. It can also be a pair (tuple) of
1220
+ (connection, read) timeouts.
1221
+ :type _request_timeout: int, tuple(int, int), optional
1222
+ :param _request_auth: set to override the auth_settings for an a single
1223
+ request; this effectively ignores the
1224
+ authentication in the spec for a single request.
1225
+ :type _request_auth: dict, optional
1226
+ :param _content_type: force content-type for the request.
1227
+ :type _content_type: str, Optional
1228
+ :param _headers: set to override the headers for a single
1229
+ request; this effectively ignores the headers
1230
+ in the spec for a single request.
1231
+ :type _headers: dict, optional
1232
+ :param _host_index: set to override the host_index for a single
1233
+ request; this effectively ignores the host_index
1234
+ in the spec for a single request.
1235
+ :type _host_index: int, optional
1236
+ :return: Returns the result object.
1237
+ """ # noqa: E501
1238
+
1239
+ _param = self._update_environment_serialize(
1240
+ id=id,
1241
+ payload=payload,
1242
+ _request_auth=_request_auth,
1243
+ _content_type=_content_type,
1244
+ _headers=_headers,
1245
+ _host_index=_host_index
1246
+ )
1247
+
1248
+ _response_types_map: Dict[str, Optional[str]] = {
1249
+ '200': "Environment",
1250
+ '400': "ErrorResponseModel",
1251
+ '401': "ErrorResponseModel",
1252
+ '404': "ErrorResponseModel",
1253
+ '500': None,
1254
+ }
1255
+ response_data = self.api_client.call_api(
1256
+ *_param,
1257
+ _request_timeout=_request_timeout
1258
+ )
1259
+ response_data.read()
1260
+ return self.api_client.response_deserialize(
1261
+ response_data=response_data,
1262
+ response_types_map=_response_types_map,
1263
+ ).data
1264
+
1265
+
1266
+ @validate_call
1267
+ def update_environment_with_http_info(
1268
+ self,
1269
+ id: StrictInt,
1270
+ payload: UpdateEnvironment,
1271
+ _request_timeout: Union[
1272
+ None,
1273
+ Annotated[StrictFloat, Field(gt=0)],
1274
+ Tuple[
1275
+ Annotated[StrictFloat, Field(gt=0)],
1276
+ Annotated[StrictFloat, Field(gt=0)]
1277
+ ]
1278
+ ] = None,
1279
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1280
+ _content_type: Optional[StrictStr] = None,
1281
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1282
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1283
+ ) -> ApiResponse[Environment]:
1284
+ """Update environment
1285
+
1286
+ Updates the name of an existing environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment.
1287
+
1288
+ :param id: (required)
1289
+ :type id: int
1290
+ :param payload: (required)
1291
+ :type payload: UpdateEnvironment
1292
+ :param _request_timeout: timeout setting for this request. If one
1293
+ number provided, it will be total request
1294
+ timeout. It can also be a pair (tuple) of
1295
+ (connection, read) timeouts.
1296
+ :type _request_timeout: int, tuple(int, int), optional
1297
+ :param _request_auth: set to override the auth_settings for an a single
1298
+ request; this effectively ignores the
1299
+ authentication in the spec for a single request.
1300
+ :type _request_auth: dict, optional
1301
+ :param _content_type: force content-type for the request.
1302
+ :type _content_type: str, Optional
1303
+ :param _headers: set to override the headers for a single
1304
+ request; this effectively ignores the headers
1305
+ in the spec for a single request.
1306
+ :type _headers: dict, optional
1307
+ :param _host_index: set to override the host_index for a single
1308
+ request; this effectively ignores the host_index
1309
+ in the spec for a single request.
1310
+ :type _host_index: int, optional
1311
+ :return: Returns the result object.
1312
+ """ # noqa: E501
1313
+
1314
+ _param = self._update_environment_serialize(
1315
+ id=id,
1316
+ payload=payload,
1317
+ _request_auth=_request_auth,
1318
+ _content_type=_content_type,
1319
+ _headers=_headers,
1320
+ _host_index=_host_index
1321
+ )
1322
+
1323
+ _response_types_map: Dict[str, Optional[str]] = {
1324
+ '200': "Environment",
1325
+ '400': "ErrorResponseModel",
1326
+ '401': "ErrorResponseModel",
1327
+ '404': "ErrorResponseModel",
1328
+ '500': None,
1329
+ }
1330
+ response_data = self.api_client.call_api(
1331
+ *_param,
1332
+ _request_timeout=_request_timeout
1333
+ )
1334
+ response_data.read()
1335
+ return self.api_client.response_deserialize(
1336
+ response_data=response_data,
1337
+ response_types_map=_response_types_map,
1338
+ )
1339
+
1340
+
1341
+ @validate_call
1342
+ def update_environment_without_preload_content(
1343
+ self,
1344
+ id: StrictInt,
1345
+ payload: UpdateEnvironment,
1346
+ _request_timeout: Union[
1347
+ None,
1348
+ Annotated[StrictFloat, Field(gt=0)],
1349
+ Tuple[
1350
+ Annotated[StrictFloat, Field(gt=0)],
1351
+ Annotated[StrictFloat, Field(gt=0)]
1352
+ ]
1353
+ ] = None,
1354
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1355
+ _content_type: Optional[StrictStr] = None,
1356
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1357
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1358
+ ) -> RESTResponseType:
1359
+ """Update environment
1360
+
1361
+ Updates the name of an existing environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment.
1362
+
1363
+ :param id: (required)
1364
+ :type id: int
1365
+ :param payload: (required)
1366
+ :type payload: UpdateEnvironment
1367
+ :param _request_timeout: timeout setting for this request. If one
1368
+ number provided, it will be total request
1369
+ timeout. It can also be a pair (tuple) of
1370
+ (connection, read) timeouts.
1371
+ :type _request_timeout: int, tuple(int, int), optional
1372
+ :param _request_auth: set to override the auth_settings for an a single
1373
+ request; this effectively ignores the
1374
+ authentication in the spec for a single request.
1375
+ :type _request_auth: dict, optional
1376
+ :param _content_type: force content-type for the request.
1377
+ :type _content_type: str, Optional
1378
+ :param _headers: set to override the headers for a single
1379
+ request; this effectively ignores the headers
1380
+ in the spec for a single request.
1381
+ :type _headers: dict, optional
1382
+ :param _host_index: set to override the host_index for a single
1383
+ request; this effectively ignores the host_index
1384
+ in the spec for a single request.
1385
+ :type _host_index: int, optional
1386
+ :return: Returns the result object.
1387
+ """ # noqa: E501
1388
+
1389
+ _param = self._update_environment_serialize(
1390
+ id=id,
1391
+ payload=payload,
1392
+ _request_auth=_request_auth,
1393
+ _content_type=_content_type,
1394
+ _headers=_headers,
1395
+ _host_index=_host_index
1396
+ )
1397
+
1398
+ _response_types_map: Dict[str, Optional[str]] = {
1399
+ '200': "Environment",
1400
+ '400': "ErrorResponseModel",
1401
+ '401': "ErrorResponseModel",
1402
+ '404': "ErrorResponseModel",
1403
+ '500': None,
1404
+ }
1405
+ response_data = self.api_client.call_api(
1406
+ *_param,
1407
+ _request_timeout=_request_timeout
1408
+ )
1409
+ return response_data.response
1410
+
1411
+
1412
+ def _update_environment_serialize(
1413
+ self,
1414
+ id,
1415
+ payload,
1416
+ _request_auth,
1417
+ _content_type,
1418
+ _headers,
1419
+ _host_index,
1420
+ ) -> RequestSerialized:
1421
+
1422
+ _host = None
1423
+
1424
+ _collection_formats: Dict[str, str] = {
1425
+ }
1426
+
1427
+ _path_params: Dict[str, str] = {}
1428
+ _query_params: List[Tuple[str, str]] = []
1429
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1430
+ _form_params: List[Tuple[str, str]] = []
1431
+ _files: Dict[
1432
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1433
+ ] = {}
1434
+ _body_params: Optional[bytes] = None
1435
+
1436
+ # process the path parameters
1437
+ if id is not None:
1438
+ _path_params['id'] = id
1439
+ # process the query parameters
1440
+ # process the header parameters
1441
+ # process the form parameters
1442
+ # process the body parameter
1443
+ if payload is not None:
1444
+ _body_params = payload
1445
+
1446
+
1447
+ # set the HTTP header `Accept`
1448
+ if 'Accept' not in _header_params:
1449
+ _header_params['Accept'] = self.api_client.select_header_accept(
1450
+ [
1451
+ 'application/json'
1452
+ ]
1453
+ )
1454
+
1455
+ # set the HTTP header `Content-Type`
1456
+ if _content_type:
1457
+ _header_params['Content-Type'] = _content_type
1458
+ else:
1459
+ _default_content_type = (
1460
+ self.api_client.select_header_content_type(
1461
+ [
1462
+ 'application/json'
1463
+ ]
1464
+ )
1465
+ )
1466
+ if _default_content_type is not None:
1467
+ _header_params['Content-Type'] = _default_content_type
1468
+
1469
+ # authentication setting
1470
+ _auth_settings: List[str] = [
1471
+ 'apiKey',
1472
+ 'accessToken'
1473
+ ]
1474
+
1475
+ return self.api_client.param_serialize(
1476
+ method='PUT',
1477
+ resource_path='/core/environments/{id}',
1478
+ path_params=_path_params,
1479
+ query_params=_query_params,
1480
+ header_params=_header_params,
1481
+ body=_body_params,
1482
+ post_params=_form_params,
1483
+ files=_files,
1484
+ auth_settings=_auth_settings,
1485
+ collection_formats=_collection_formats,
1486
+ _host=_host,
1487
+ _request_auth=_request_auth
1488
+ )
1489
+
1490
+