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