hyperstack 0.1.23__py3-none-any.whl → 1.41.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 (225) hide show
  1. hyperstack/__init__.py +79 -131
  2. hyperstack/api/__init__.py +2 -0
  3. hyperstack/api/alive_api.py +240 -0
  4. hyperstack/api/api_key_api.py +16 -20
  5. hyperstack/api/assigning_member_role_api.py +15 -17
  6. hyperstack/api/auth_api.py +1050 -5
  7. hyperstack/api/beta_access_api.py +856 -0
  8. hyperstack/api/billing_api.py +6461 -673
  9. hyperstack/api/calculate_api.py +8 -9
  10. hyperstack/api/callbacks_api.py +120 -126
  11. hyperstack/api/cluster_events_api.py +1 -2
  12. hyperstack/api/clusters_api.py +2492 -146
  13. hyperstack/api/compliance_api.py +14 -18
  14. hyperstack/api/credit_api.py +17 -15
  15. hyperstack/api/customer_contract_api.py +30 -33
  16. hyperstack/api/dashboard_api.py +4 -5
  17. hyperstack/api/deployment_api.py +4 -8
  18. hyperstack/api/environment_api.py +285 -16
  19. hyperstack/api/firewall_attachment_api.py +11 -9
  20. hyperstack/api/firewalls_api.py +341 -347
  21. hyperstack/api/flavor_api.py +4 -5
  22. hyperstack/api/floating_ip_api.py +50 -49
  23. hyperstack/api/gpu_api.py +1 -2
  24. hyperstack/api/image_api.py +35 -39
  25. hyperstack/api/invite_api.py +288 -18
  26. hyperstack/api/keypair_api.py +22 -26
  27. hyperstack/api/organization_api.py +12 -15
  28. hyperstack/api/partner_config_api.py +564 -0
  29. hyperstack/api/payment_api.py +299 -18
  30. hyperstack/api/permission_api.py +4 -5
  31. hyperstack/api/policy_api.py +4 -5
  32. hyperstack/api/pricebook_api.py +14 -12
  33. hyperstack/api/profile_api.py +13 -17
  34. hyperstack/api/rbac_role_api.py +20 -25
  35. hyperstack/api/region_api.py +7 -8
  36. hyperstack/api/security_rules_api.py +1 -2
  37. hyperstack/api/snapshot_events_api.py +1 -2
  38. hyperstack/api/snapshots_api.py +166 -172
  39. hyperstack/api/stock_api.py +4 -5
  40. hyperstack/api/template_api.py +14 -19
  41. hyperstack/api/user_api.py +55 -49
  42. hyperstack/api/user_detail_choice_api.py +1 -2
  43. hyperstack/api/user_permission_api.py +8 -10
  44. hyperstack/api/virtual_machine_api.py +1529 -929
  45. hyperstack/api/virtual_machine_events_api.py +21 -22
  46. hyperstack/api/vnc_url_api.py +54 -50
  47. hyperstack/api/volume_api.py +340 -40
  48. hyperstack/api/volume_attachment_api.py +342 -42
  49. hyperstack/api_client.py +1 -1
  50. hyperstack/configuration.py +154 -47
  51. hyperstack/models/__init__.py +76 -130
  52. hyperstack/models/{environment_fieldsfor_volume.py → access_token_field.py} +7 -7
  53. hyperstack/models/attach_volume_fields.py +6 -2
  54. hyperstack/models/attach_volumes_payload.py +4 -2
  55. hyperstack/models/{virtual_machine_usage.py → attachments_fields_for_volume.py} +13 -11
  56. hyperstack/models/{flavor_vm_fields.py → attributes.py} +15 -18
  57. hyperstack/models/auth_get_token_response_model.py +4 -6
  58. hyperstack/models/{future_node_model.py → beta_access_request_fields.py} +27 -25
  59. hyperstack/models/{create_gpu.py → beta_access_request_payload.py} +9 -11
  60. hyperstack/models/{create_discount_response.py → beta_access_request_response_model.py} +11 -11
  61. hyperstack/models/{export_billing_data_request.py → beta_access_status_item.py} +20 -23
  62. hyperstack/models/{get_all_discount_for_all_organization_response.py → beta_access_status_response_model.py} +15 -15
  63. hyperstack/models/{exclude_billing_post_response.py → billing_history.py} +13 -11
  64. hyperstack/models/billing_history_data_synthesis_details.py +105 -0
  65. hyperstack/models/{vm_usage_response.py → billing_history_fine_tuning.py} +23 -19
  66. hyperstack/models/billing_history_model_evalutation_details.py +105 -0
  67. hyperstack/models/{get_all_discounts_fields.py → billing_history_serverless_inference.py} +23 -24
  68. hyperstack/models/billing_history_serverless_inference_details.py +105 -0
  69. hyperstack/models/{billingmetricesfields.py → billing_metrices_fields.py} +4 -4
  70. hyperstack/models/{billingmetricesresponse.py → billing_metrices_response.py} +7 -7
  71. hyperstack/models/cluster_fields.py +27 -9
  72. hyperstack/models/{add_update_flavor_organization_payload.py → cluster_flavor_fields.py} +28 -26
  73. hyperstack/models/{historical_instances_fields.py → cluster_node_fields.py} +24 -22
  74. hyperstack/models/{internal_instance_flavor_fields.py → cluster_node_group_fields.py} +17 -17
  75. hyperstack/models/{create_update_policy_response_model.py → cluster_node_groups_create_response.py} +21 -11
  76. hyperstack/models/{create_update_permission_response_model.py → cluster_node_groups_get_response.py} +11 -11
  77. hyperstack/models/{auth_request_login_response_model.py → cluster_node_groups_list_response.py} +15 -11
  78. hyperstack/models/{contract_eligible_instance_fields.py → cluster_node_instance_fields.py} +13 -11
  79. hyperstack/models/{image_logos.py → cluster_nodes_list_response.py} +14 -14
  80. hyperstack/models/{internal_environment_fields.py → cluster_version.py} +13 -9
  81. hyperstack/models/cluster_versions.py +10 -2
  82. hyperstack/models/{future_nodes_stock_model.py → colors.py} +17 -15
  83. hyperstack/models/contract_discount_plan_fields.py +3 -1
  84. hyperstack/models/contract_instance_fields.py +7 -1
  85. hyperstack/models/{future_node_response_model.py → create_cluster_node_fields.py} +23 -18
  86. hyperstack/models/{update_gpu.py → create_cluster_node_group_payload.py} +12 -11
  87. hyperstack/models/create_cluster_payload.py +31 -8
  88. hyperstack/models/create_environment.py +1 -1
  89. hyperstack/models/create_instances_payload.py +10 -8
  90. hyperstack/models/create_profile_payload.py +1 -1
  91. hyperstack/models/create_snapshot_payload.py +2 -4
  92. hyperstack/models/create_volume_payload.py +1 -1
  93. hyperstack/models/data_synthesis_billing_history_details_response_schema.py +95 -0
  94. hyperstack/models/{deployment_fieldsforstartdeployments.py → deployment_fields_for_start_deployments.py} +4 -4
  95. hyperstack/models/{editlabelofanexisting_vm_payload.py → edit_label_of_an_existing_vm_payload.py} +4 -4
  96. hyperstack/models/environment_features.py +14 -2
  97. hyperstack/models/{node_stocks_payload.py → environment_fields_for_volume.py} +10 -12
  98. hyperstack/models/flavor_fields.py +3 -1
  99. hyperstack/models/{customer_fields.py → flavor_label_fields.py} +7 -7
  100. hyperstack/models/{getcreditandthresholdinfo.py → get_credit_and_threshold_info.py} +4 -4
  101. hyperstack/models/{getcreditandthresholdinfoinresponse.py → get_credit_and_threshold_info_in_response.py} +7 -7
  102. hyperstack/models/{region_payload.py → get_instance_logs_response.py} +7 -9
  103. hyperstack/models/instance_fields.py +14 -4
  104. hyperstack/models/instance_flavor_fields.py +13 -1
  105. hyperstack/models/{flavor_response.py → keypair_environment_features.py} +20 -16
  106. hyperstack/models/{internal_instance_keypair_fields.py → keypair_environment_fields.py} +13 -11
  107. hyperstack/models/keypair_fields.py +6 -2
  108. hyperstack/models/{lastdaycostfields.py → last_day_cost_fields.py} +4 -4
  109. hyperstack/models/{lastdaycostresponse.py → last_day_cost_response.py} +7 -7
  110. hyperstack/models/{export_billing_data_response.py → logos.py} +13 -9
  111. hyperstack/models/{creditrequestresponse.py → master_flavors_response.py} +14 -14
  112. hyperstack/models/{customer_payload.py → mfa_status_fields.py} +8 -10
  113. hyperstack/models/{gpu.py → mfa_status_response.py} +11 -11
  114. hyperstack/models/model_evaluation_billing_history_details_response_schema.py +95 -0
  115. hyperstack/models/{organization_thresholdfields.py → organization_threshold_fields.py} +4 -4
  116. hyperstack/models/{organizationthresholdupdateresponse.py → organization_threshold_update_response.py} +7 -7
  117. hyperstack/models/{organizationthresholdsresponse.py → organization_thresholds_response.py} +7 -7
  118. hyperstack/models/{logo_get_response.py → pagination.py} +12 -12
  119. hyperstack/models/{billing_response.py → partner_config.py} +31 -20
  120. hyperstack/models/payment_details_fields.py +5 -1
  121. hyperstack/models/{logout_payload.py → primary_color.py} +10 -8
  122. hyperstack/models/region_fields.py +16 -2
  123. hyperstack/models/{vm_usage_request_payload.py → request_instance_logs_payload.py} +8 -8
  124. hyperstack/models/{stock_visibility_user_payload.py → request_instance_logs_response.py} +8 -8
  125. hyperstack/models/{contract_billing_history.py → resource_level_billing_bucket_details_resources.py} +10 -10
  126. hyperstack/models/{node_response_model.py → resource_level_billing_history_resources_cluster.py} +21 -11
  127. hyperstack/models/resource_level_billing_history_response_attributes.py +3 -1
  128. hyperstack/models/{get_all_contracts_response_model.py → resource_level_bucket_billing_details_response_model.py} +11 -15
  129. hyperstack/models/{contract_billing_history_response_model.py → resource_level_bucket_billing_history_response_model.py} +11 -11
  130. hyperstack/models/resource_level_cluster_billing_details_response_model.py +95 -0
  131. hyperstack/models/resource_level_cluster_billing_history_response_model.py +95 -0
  132. hyperstack/models/{get_discount_detail_response.py → resource_level_cluster_graph_billing_details_response_model.py} +11 -11
  133. hyperstack/models/{organization_object_response.py → resource_level_graph_billing_details_bucket.py} +18 -14
  134. hyperstack/models/{update_discounts_status_payload.py → secondary_color.py} +10 -8
  135. hyperstack/models/{security_rules_fieldsfor_instance.py → security_rules_fields_for_instance.py} +4 -4
  136. hyperstack/models/serverless_inferenced_billing_history_details_response_schema.py +95 -0
  137. hyperstack/models/snapshot_fields.py +6 -1
  138. hyperstack/models/snapshot_retrieve_fields.py +29 -2
  139. hyperstack/models/start_deployment.py +3 -3
  140. hyperstack/models/{subscribeorunsubscribeupdatepayload.py → subscribe_or_unsubscribe_update_payload.py} +4 -4
  141. hyperstack/models/token_based_billing_history_response.py +95 -0
  142. hyperstack/models/{update_keypairnameresponse.py → update_keypair_name_response.py} +4 -4
  143. hyperstack/models/update_volume_attachment_payload.py +87 -0
  144. hyperstack/models/{verify_api_key_payload.py → update_volume_payload.py} +7 -7
  145. hyperstack/models/{stock_visibility_user_list_response.py → update_volume_response.py} +14 -16
  146. hyperstack/models/{auth_request_login_fields.py → uris.py} +19 -9
  147. hyperstack/models/{userinfopostpayload.py → user_info_post_payload.py} +4 -4
  148. hyperstack/models/{node_stock_response_model.py → user_organizations_response.py} +14 -14
  149. hyperstack/models/users_info_fields.py +3 -1
  150. hyperstack/models/volume_attachment_fields.py +9 -5
  151. hyperstack/models/volume_fields.py +14 -4
  152. hyperstack/models/{volume_fieldsfor_instance.py → volume_fields_for_instance.py} +4 -4
  153. hyperstack/models/volumes.py +17 -11
  154. hyperstack/models/{instances_summary_fields.py → volumes_fields.py} +33 -29
  155. hyperstack/models/workload_billing_history_response.py +95 -0
  156. {hyperstack-0.1.23.dist-info → hyperstack-1.41.0a0.dist-info}/METADATA +9 -2
  157. hyperstack-1.41.0a0.dist-info/RECORD +349 -0
  158. {hyperstack-0.1.23.dist-info → hyperstack-1.41.0a0.dist-info}/WHEEL +1 -1
  159. hyperstack/models/api_key_verify_fields.py +0 -93
  160. hyperstack/models/billing_immune_resources_response.py +0 -95
  161. hyperstack/models/contract_billing_history_response_attributes.py +0 -99
  162. hyperstack/models/contract_change_payload.py +0 -101
  163. hyperstack/models/contract_eligible_instances_response.py +0 -101
  164. hyperstack/models/contract_event_create_model.py +0 -91
  165. hyperstack/models/contract_resource_payload.py +0 -95
  166. hyperstack/models/contractl_billing_history_response_metrics.py +0 -87
  167. hyperstack/models/create_contract_fields.py +0 -110
  168. hyperstack/models/create_contract_payload.py +0 -106
  169. hyperstack/models/create_discounts_payload.py +0 -112
  170. hyperstack/models/create_update_permission_payload.py +0 -93
  171. hyperstack/models/create_update_policy_payload.py +0 -93
  172. hyperstack/models/creditrechargelimitfield.py +0 -93
  173. hyperstack/models/creditrechargelimitresponse.py +0 -99
  174. hyperstack/models/creditrequests.py +0 -96
  175. hyperstack/models/data.py +0 -91
  176. hyperstack/models/discount_entity_model.py +0 -97
  177. hyperstack/models/discount_fields.py +0 -100
  178. hyperstack/models/discount_plan_fields.py +0 -108
  179. hyperstack/models/discount_resource_fields.py +0 -93
  180. hyperstack/models/discount_resource_payload.py +0 -93
  181. hyperstack/models/exclude_billing_post_payload.py +0 -91
  182. hyperstack/models/field_change.py +0 -91
  183. hyperstack/models/flavor_payload.py +0 -101
  184. hyperstack/models/flavor_vms_response.py +0 -99
  185. hyperstack/models/future_node_stock_model.py +0 -93
  186. hyperstack/models/future_node_update_model.py +0 -98
  187. hyperstack/models/get_all_contract_fields.py +0 -100
  188. hyperstack/models/get_discount_response.py +0 -99
  189. hyperstack/models/get_entity_discount_detail_response.py +0 -108
  190. hyperstack/models/get_token_payload.py +0 -89
  191. hyperstack/models/get_version_response.py +0 -91
  192. hyperstack/models/historical_instance.py +0 -101
  193. hyperstack/models/infrahub_resource_object_response.py +0 -119
  194. hyperstack/models/insert_discount_plan_fields.py +0 -112
  195. hyperstack/models/internal_instance_fields.py +0 -156
  196. hyperstack/models/internal_instance_image_fields.py +0 -95
  197. hyperstack/models/internal_instances_response.py +0 -99
  198. hyperstack/models/internal_security_rules_fields_for_instance.py +0 -104
  199. hyperstack/models/internal_volume_attachment_fields.py +0 -98
  200. hyperstack/models/internal_volume_fields.py +0 -95
  201. hyperstack/models/internal_volumes_response.py +0 -99
  202. hyperstack/models/new_stock_update_response_model.py +0 -89
  203. hyperstack/models/node_model.py +0 -114
  204. hyperstack/models/node_payload_model.py +0 -97
  205. hyperstack/models/node_power_usage_model.py +0 -120
  206. hyperstack/models/node_stock_payload_model.py +0 -95
  207. hyperstack/models/organizationcreditrechargelimitresponse.py +0 -95
  208. hyperstack/models/power_usage_model.py +0 -89
  209. hyperstack/models/pricebook_resource_object_response.py +0 -107
  210. hyperstack/models/refresh_token_payload.py +0 -89
  211. hyperstack/models/region_response.py +0 -95
  212. hyperstack/models/set_defaults_payload.py +0 -89
  213. hyperstack/models/single_visibility_user_response.py +0 -91
  214. hyperstack/models/success_response_model.py +0 -89
  215. hyperstack/models/token_fields.py +0 -91
  216. hyperstack/models/update_contract_payload.py +0 -104
  217. hyperstack/models/update_discounts_payload.py +0 -102
  218. hyperstack/models/user_transfer_payload.py +0 -89
  219. hyperstack/models/verify_api_key_response_model.py +0 -95
  220. hyperstack/models/volume_status_change_fields.py +0 -96
  221. hyperstack/models/volumes_last_status_change_response.py +0 -99
  222. hyperstack/models/warning_mail_log_fields.py +0 -99
  223. hyperstack/models/warning_mail_log_response.py +0 -101
  224. hyperstack-0.1.23.dist-info/RECORD +0 -401
  225. {hyperstack-0.1.23.dist-info → hyperstack-1.41.0a0.dist-info}/top_level.txt +0 -0
@@ -59,7 +59,7 @@ class OrganizationApi:
59
59
  ) -> RemoveMemberFromOrganizationResponseModel:
60
60
  """Remove Organization Member
61
61
 
62
- Removes a member from your organization. For additional information, [click here](https://infrahub-doc.nexgencloud.com/docs/api-reference/auth-resources/organization/remove-member).
62
+ Removes a member from your organization. For additional information, [click here](https://docs...cloud/docs/api-reference/auth-resources/organization/remove-member).
63
63
 
64
64
  :param payload: (required)
65
65
  :type payload: RemoveMemberPayload
@@ -129,7 +129,7 @@ class OrganizationApi:
129
129
  ) -> ApiResponse[RemoveMemberFromOrganizationResponseModel]:
130
130
  """Remove Organization Member
131
131
 
132
- Removes a member from your organization. For additional information, [click here](https://infrahub-doc.nexgencloud.com/docs/api-reference/auth-resources/organization/remove-member).
132
+ Removes a member from your organization. For additional information, [click here](https://docs...cloud/docs/api-reference/auth-resources/organization/remove-member).
133
133
 
134
134
  :param payload: (required)
135
135
  :type payload: RemoveMemberPayload
@@ -199,7 +199,7 @@ class OrganizationApi:
199
199
  ) -> RESTResponseType:
200
200
  """Remove Organization Member
201
201
 
202
- Removes a member from your organization. For additional information, [click here](https://infrahub-doc.nexgencloud.com/docs/api-reference/auth-resources/organization/remove-member).
202
+ Removes a member from your organization. For additional information, [click here](https://docs...cloud/docs/api-reference/auth-resources/organization/remove-member).
203
203
 
204
204
  :param payload: (required)
205
205
  :type payload: RemoveMemberPayload
@@ -302,8 +302,7 @@ class OrganizationApi:
302
302
 
303
303
  # authentication setting
304
304
  _auth_settings: List[str] = [
305
- 'apiKey',
306
- 'accessToken'
305
+ 'apiKey'
307
306
  ]
308
307
 
309
308
  return self.api_client.param_serialize(
@@ -342,7 +341,7 @@ class OrganizationApi:
342
341
  ) -> GetOrganizationResponseModel:
343
342
  """Retrieve Organization Information
344
343
 
345
- Retrieves detailed information about your organization, including current credit, threshold, number of instances, and number of volumes. For additional information on organizations, [click here](https://infrahub-doc.nexgencloud.com/docs/api-reference/auth-resources/organization/retrieve-org-details).
344
+ Retrieves detailed information about your organization, including current credit, threshold, number of instances, and number of volumes. For additional information on organizations, [click here](https://docs...cloud/docs/api-reference/auth-resources/organization/retrieve-org-details).
346
345
 
347
346
  :param _request_timeout: timeout setting for this request. If one
348
347
  number provided, it will be total request
@@ -408,7 +407,7 @@ class OrganizationApi:
408
407
  ) -> ApiResponse[GetOrganizationResponseModel]:
409
408
  """Retrieve Organization Information
410
409
 
411
- Retrieves detailed information about your organization, including current credit, threshold, number of instances, and number of volumes. For additional information on organizations, [click here](https://infrahub-doc.nexgencloud.com/docs/api-reference/auth-resources/organization/retrieve-org-details).
410
+ Retrieves detailed information about your organization, including current credit, threshold, number of instances, and number of volumes. For additional information on organizations, [click here](https://docs...cloud/docs/api-reference/auth-resources/organization/retrieve-org-details).
412
411
 
413
412
  :param _request_timeout: timeout setting for this request. If one
414
413
  number provided, it will be total request
@@ -474,7 +473,7 @@ class OrganizationApi:
474
473
  ) -> RESTResponseType:
475
474
  """Retrieve Organization Information
476
475
 
477
- Retrieves detailed information about your organization, including current credit, threshold, number of instances, and number of volumes. For additional information on organizations, [click here](https://infrahub-doc.nexgencloud.com/docs/api-reference/auth-resources/organization/retrieve-org-details).
476
+ Retrieves detailed information about your organization, including current credit, threshold, number of instances, and number of volumes. For additional information on organizations, [click here](https://docs...cloud/docs/api-reference/auth-resources/organization/retrieve-org-details).
478
477
 
479
478
  :param _request_timeout: timeout setting for this request. If one
480
479
  number provided, it will be total request
@@ -558,8 +557,7 @@ class OrganizationApi:
558
557
 
559
558
  # authentication setting
560
559
  _auth_settings: List[str] = [
561
- 'apiKey',
562
- 'accessToken'
560
+ 'apiKey'
563
561
  ]
564
562
 
565
563
  return self.api_client.param_serialize(
@@ -599,7 +597,7 @@ class OrganizationApi:
599
597
  ) -> UpdateOrganizationResponseModel:
600
598
  """Update Organization Information
601
599
 
602
- Updates the name of the organization. For additional information, [click here](https://infrahub-doc.nexgencloud.com/docs/api-reference/auth-resources/organization/update-org-name).
600
+ Updates the name of the organization. For additional information, [click here](https://docs...cloud/docs/api-reference/auth-resources/organization/update-org-name).
603
601
 
604
602
  :param payload: (required)
605
603
  :type payload: UpdateOrganizationPayload
@@ -669,7 +667,7 @@ class OrganizationApi:
669
667
  ) -> ApiResponse[UpdateOrganizationResponseModel]:
670
668
  """Update Organization Information
671
669
 
672
- Updates the name of the organization. For additional information, [click here](https://infrahub-doc.nexgencloud.com/docs/api-reference/auth-resources/organization/update-org-name).
670
+ Updates the name of the organization. For additional information, [click here](https://docs...cloud/docs/api-reference/auth-resources/organization/update-org-name).
673
671
 
674
672
  :param payload: (required)
675
673
  :type payload: UpdateOrganizationPayload
@@ -739,7 +737,7 @@ class OrganizationApi:
739
737
  ) -> RESTResponseType:
740
738
  """Update Organization Information
741
739
 
742
- Updates the name of the organization. For additional information, [click here](https://infrahub-doc.nexgencloud.com/docs/api-reference/auth-resources/organization/update-org-name).
740
+ Updates the name of the organization. For additional information, [click here](https://docs...cloud/docs/api-reference/auth-resources/organization/update-org-name).
743
741
 
744
742
  :param payload: (required)
745
743
  :type payload: UpdateOrganizationPayload
@@ -842,8 +840,7 @@ class OrganizationApi:
842
840
 
843
841
  # authentication setting
844
842
  _auth_settings: List[str] = [
845
- 'apiKey',
846
- 'accessToken'
843
+ 'apiKey'
847
844
  ]
848
845
 
849
846
  return self.api_client.param_serialize(
@@ -0,0 +1,564 @@
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, StrictStr
20
+ from typing import Optional
21
+ from typing_extensions import Annotated
22
+ from ..models.partner_config import PartnerConfig
23
+
24
+ from ..api_client import ApiClient, RequestSerialized
25
+ from ..api_response import ApiResponse
26
+ from ..rest import RESTResponseType
27
+
28
+
29
+ class PartnerConfigApi:
30
+ """NOTE: This class is auto generated by OpenAPI Generator
31
+ Ref: https://openapi-generator.tech
32
+
33
+ Do not edit the class manually.
34
+ """
35
+
36
+ def __init__(self, api_client=None) -> None:
37
+ if api_client is None:
38
+ api_client = ApiClient.get_default()
39
+ self.api_client = api_client
40
+
41
+
42
+ @validate_call
43
+ def get_partner_config(
44
+ self,
45
+ _request_timeout: Union[
46
+ None,
47
+ Annotated[StrictFloat, Field(gt=0)],
48
+ Tuple[
49
+ Annotated[StrictFloat, Field(gt=0)],
50
+ Annotated[StrictFloat, Field(gt=0)]
51
+ ]
52
+ ] = None,
53
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
54
+ _content_type: Optional[StrictStr] = None,
55
+ _headers: Optional[Dict[StrictStr, Any]] = None,
56
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
57
+ ) -> PartnerConfig:
58
+ """Get partner config
59
+
60
+ Fetch the customised customer configuration for Hyperstack.
61
+
62
+ :param _request_timeout: timeout setting for this request. If one
63
+ number provided, it will be total request
64
+ timeout. It can also be a pair (tuple) of
65
+ (connection, read) timeouts.
66
+ :type _request_timeout: int, tuple(int, int), optional
67
+ :param _request_auth: set to override the auth_settings for an a single
68
+ request; this effectively ignores the
69
+ authentication in the spec for a single request.
70
+ :type _request_auth: dict, optional
71
+ :param _content_type: force content-type for the request.
72
+ :type _content_type: str, Optional
73
+ :param _headers: set to override the headers for a single
74
+ request; this effectively ignores the headers
75
+ in the spec for a single request.
76
+ :type _headers: dict, optional
77
+ :param _host_index: set to override the host_index for a single
78
+ request; this effectively ignores the host_index
79
+ in the spec for a single request.
80
+ :type _host_index: int, optional
81
+ :return: Returns the result object.
82
+ """ # noqa: E501
83
+
84
+ _param = self._get_partner_config_serialize(
85
+ _request_auth=_request_auth,
86
+ _content_type=_content_type,
87
+ _headers=_headers,
88
+ _host_index=_host_index
89
+ )
90
+
91
+ _response_types_map: Dict[str, Optional[str]] = {
92
+ '200': "PartnerConfig",
93
+ '400': "ErrorResponseModel",
94
+ '404': "ErrorResponseModel",
95
+ '500': None,
96
+ }
97
+ response_data = self.api_client.call_api(
98
+ *_param,
99
+ _request_timeout=_request_timeout
100
+ )
101
+ response_data.read()
102
+ return self.api_client.response_deserialize(
103
+ response_data=response_data,
104
+ response_types_map=_response_types_map,
105
+ ).data
106
+
107
+
108
+ @validate_call
109
+ def get_partner_config_with_http_info(
110
+ self,
111
+ _request_timeout: Union[
112
+ None,
113
+ Annotated[StrictFloat, Field(gt=0)],
114
+ Tuple[
115
+ Annotated[StrictFloat, Field(gt=0)],
116
+ Annotated[StrictFloat, Field(gt=0)]
117
+ ]
118
+ ] = None,
119
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
120
+ _content_type: Optional[StrictStr] = None,
121
+ _headers: Optional[Dict[StrictStr, Any]] = None,
122
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
123
+ ) -> ApiResponse[PartnerConfig]:
124
+ """Get partner config
125
+
126
+ Fetch the customised customer configuration for Hyperstack.
127
+
128
+ :param _request_timeout: timeout setting for this request. If one
129
+ number provided, it will be total request
130
+ timeout. It can also be a pair (tuple) of
131
+ (connection, read) timeouts.
132
+ :type _request_timeout: int, tuple(int, int), optional
133
+ :param _request_auth: set to override the auth_settings for an a single
134
+ request; this effectively ignores the
135
+ authentication in the spec for a single request.
136
+ :type _request_auth: dict, optional
137
+ :param _content_type: force content-type for the request.
138
+ :type _content_type: str, Optional
139
+ :param _headers: set to override the headers for a single
140
+ request; this effectively ignores the headers
141
+ in the spec for a single request.
142
+ :type _headers: dict, optional
143
+ :param _host_index: set to override the host_index for a single
144
+ request; this effectively ignores the host_index
145
+ in the spec for a single request.
146
+ :type _host_index: int, optional
147
+ :return: Returns the result object.
148
+ """ # noqa: E501
149
+
150
+ _param = self._get_partner_config_serialize(
151
+ _request_auth=_request_auth,
152
+ _content_type=_content_type,
153
+ _headers=_headers,
154
+ _host_index=_host_index
155
+ )
156
+
157
+ _response_types_map: Dict[str, Optional[str]] = {
158
+ '200': "PartnerConfig",
159
+ '400': "ErrorResponseModel",
160
+ '404': "ErrorResponseModel",
161
+ '500': None,
162
+ }
163
+ response_data = self.api_client.call_api(
164
+ *_param,
165
+ _request_timeout=_request_timeout
166
+ )
167
+ response_data.read()
168
+ return self.api_client.response_deserialize(
169
+ response_data=response_data,
170
+ response_types_map=_response_types_map,
171
+ )
172
+
173
+
174
+ @validate_call
175
+ def get_partner_config_without_preload_content(
176
+ self,
177
+ _request_timeout: Union[
178
+ None,
179
+ Annotated[StrictFloat, Field(gt=0)],
180
+ Tuple[
181
+ Annotated[StrictFloat, Field(gt=0)],
182
+ Annotated[StrictFloat, Field(gt=0)]
183
+ ]
184
+ ] = None,
185
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
186
+ _content_type: Optional[StrictStr] = None,
187
+ _headers: Optional[Dict[StrictStr, Any]] = None,
188
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
189
+ ) -> RESTResponseType:
190
+ """Get partner config
191
+
192
+ Fetch the customised customer configuration for Hyperstack.
193
+
194
+ :param _request_timeout: timeout setting for this request. If one
195
+ number provided, it will be total request
196
+ timeout. It can also be a pair (tuple) of
197
+ (connection, read) timeouts.
198
+ :type _request_timeout: int, tuple(int, int), optional
199
+ :param _request_auth: set to override the auth_settings for an a single
200
+ request; this effectively ignores the
201
+ authentication in the spec for a single request.
202
+ :type _request_auth: dict, optional
203
+ :param _content_type: force content-type for the request.
204
+ :type _content_type: str, Optional
205
+ :param _headers: set to override the headers for a single
206
+ request; this effectively ignores the headers
207
+ in the spec for a single request.
208
+ :type _headers: dict, optional
209
+ :param _host_index: set to override the host_index for a single
210
+ request; this effectively ignores the host_index
211
+ in the spec for a single request.
212
+ :type _host_index: int, optional
213
+ :return: Returns the result object.
214
+ """ # noqa: E501
215
+
216
+ _param = self._get_partner_config_serialize(
217
+ _request_auth=_request_auth,
218
+ _content_type=_content_type,
219
+ _headers=_headers,
220
+ _host_index=_host_index
221
+ )
222
+
223
+ _response_types_map: Dict[str, Optional[str]] = {
224
+ '200': "PartnerConfig",
225
+ '400': "ErrorResponseModel",
226
+ '404': "ErrorResponseModel",
227
+ '500': None,
228
+ }
229
+ response_data = self.api_client.call_api(
230
+ *_param,
231
+ _request_timeout=_request_timeout
232
+ )
233
+ return response_data.response
234
+
235
+
236
+ def _get_partner_config_serialize(
237
+ self,
238
+ _request_auth,
239
+ _content_type,
240
+ _headers,
241
+ _host_index,
242
+ ) -> RequestSerialized:
243
+
244
+ _host = None
245
+
246
+ _collection_formats: Dict[str, str] = {
247
+ }
248
+
249
+ _path_params: Dict[str, str] = {}
250
+ _query_params: List[Tuple[str, str]] = []
251
+ _header_params: Dict[str, Optional[str]] = _headers or {}
252
+ _form_params: List[Tuple[str, str]] = []
253
+ _files: Dict[
254
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
255
+ ] = {}
256
+ _body_params: Optional[bytes] = None
257
+
258
+ # process the path parameters
259
+ # process the query parameters
260
+ # process the header parameters
261
+ # process the form parameters
262
+ # process the body parameter
263
+
264
+
265
+ # set the HTTP header `Accept`
266
+ if 'Accept' not in _header_params:
267
+ _header_params['Accept'] = self.api_client.select_header_accept(
268
+ [
269
+ 'application/json'
270
+ ]
271
+ )
272
+
273
+
274
+ # authentication setting
275
+ _auth_settings: List[str] = [
276
+ ]
277
+
278
+ return self.api_client.param_serialize(
279
+ method='GET',
280
+ resource_path='/auth/partner-config',
281
+ path_params=_path_params,
282
+ query_params=_query_params,
283
+ header_params=_header_params,
284
+ body=_body_params,
285
+ post_params=_form_params,
286
+ files=_files,
287
+ auth_settings=_auth_settings,
288
+ collection_formats=_collection_formats,
289
+ _host=_host,
290
+ _request_auth=_request_auth
291
+ )
292
+
293
+
294
+
295
+
296
+ @validate_call
297
+ def get_partner_config_by_domain(
298
+ self,
299
+ domain: Annotated[Optional[StrictStr], Field(description="The domain to look up the partner config for.")] = None,
300
+ _request_timeout: Union[
301
+ None,
302
+ Annotated[StrictFloat, Field(gt=0)],
303
+ Tuple[
304
+ Annotated[StrictFloat, Field(gt=0)],
305
+ Annotated[StrictFloat, Field(gt=0)]
306
+ ]
307
+ ] = None,
308
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
309
+ _content_type: Optional[StrictStr] = None,
310
+ _headers: Optional[Dict[StrictStr, Any]] = None,
311
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
312
+ ) -> PartnerConfig:
313
+ """get_partner_config_by_domain
314
+
315
+ Fetch the partner config for a given domain.
316
+
317
+ :param domain: The domain to look up the partner config for.
318
+ :type domain: str
319
+ :param _request_timeout: timeout setting for this request. If one
320
+ number provided, it will be total request
321
+ timeout. It can also be a pair (tuple) of
322
+ (connection, read) timeouts.
323
+ :type _request_timeout: int, tuple(int, int), optional
324
+ :param _request_auth: set to override the auth_settings for an a single
325
+ request; this effectively ignores the
326
+ authentication in the spec for a single request.
327
+ :type _request_auth: dict, optional
328
+ :param _content_type: force content-type for the request.
329
+ :type _content_type: str, Optional
330
+ :param _headers: set to override the headers for a single
331
+ request; this effectively ignores the headers
332
+ in the spec for a single request.
333
+ :type _headers: dict, optional
334
+ :param _host_index: set to override the host_index for a single
335
+ request; this effectively ignores the host_index
336
+ in the spec for a single request.
337
+ :type _host_index: int, optional
338
+ :return: Returns the result object.
339
+ """ # noqa: E501
340
+
341
+ _param = self._get_partner_config_by_domain_serialize(
342
+ domain=domain,
343
+ _request_auth=_request_auth,
344
+ _content_type=_content_type,
345
+ _headers=_headers,
346
+ _host_index=_host_index
347
+ )
348
+
349
+ _response_types_map: Dict[str, Optional[str]] = {
350
+ '200': "PartnerConfig",
351
+ '400': "ErrorResponseModel",
352
+ '404': "ErrorResponseModel",
353
+ '500': None,
354
+ }
355
+ response_data = self.api_client.call_api(
356
+ *_param,
357
+ _request_timeout=_request_timeout
358
+ )
359
+ response_data.read()
360
+ return self.api_client.response_deserialize(
361
+ response_data=response_data,
362
+ response_types_map=_response_types_map,
363
+ ).data
364
+
365
+
366
+ @validate_call
367
+ def get_partner_config_by_domain_with_http_info(
368
+ self,
369
+ domain: Annotated[Optional[StrictStr], Field(description="The domain to look up the partner config for.")] = None,
370
+ _request_timeout: Union[
371
+ None,
372
+ Annotated[StrictFloat, Field(gt=0)],
373
+ Tuple[
374
+ Annotated[StrictFloat, Field(gt=0)],
375
+ Annotated[StrictFloat, Field(gt=0)]
376
+ ]
377
+ ] = None,
378
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
379
+ _content_type: Optional[StrictStr] = None,
380
+ _headers: Optional[Dict[StrictStr, Any]] = None,
381
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
382
+ ) -> ApiResponse[PartnerConfig]:
383
+ """get_partner_config_by_domain
384
+
385
+ Fetch the partner config for a given domain.
386
+
387
+ :param domain: The domain to look up the partner config for.
388
+ :type domain: str
389
+ :param _request_timeout: timeout setting for this request. If one
390
+ number provided, it will be total request
391
+ timeout. It can also be a pair (tuple) of
392
+ (connection, read) timeouts.
393
+ :type _request_timeout: int, tuple(int, int), optional
394
+ :param _request_auth: set to override the auth_settings for an a single
395
+ request; this effectively ignores the
396
+ authentication in the spec for a single request.
397
+ :type _request_auth: dict, optional
398
+ :param _content_type: force content-type for the request.
399
+ :type _content_type: str, Optional
400
+ :param _headers: set to override the headers for a single
401
+ request; this effectively ignores the headers
402
+ in the spec for a single request.
403
+ :type _headers: dict, optional
404
+ :param _host_index: set to override the host_index for a single
405
+ request; this effectively ignores the host_index
406
+ in the spec for a single request.
407
+ :type _host_index: int, optional
408
+ :return: Returns the result object.
409
+ """ # noqa: E501
410
+
411
+ _param = self._get_partner_config_by_domain_serialize(
412
+ domain=domain,
413
+ _request_auth=_request_auth,
414
+ _content_type=_content_type,
415
+ _headers=_headers,
416
+ _host_index=_host_index
417
+ )
418
+
419
+ _response_types_map: Dict[str, Optional[str]] = {
420
+ '200': "PartnerConfig",
421
+ '400': "ErrorResponseModel",
422
+ '404': "ErrorResponseModel",
423
+ '500': None,
424
+ }
425
+ response_data = self.api_client.call_api(
426
+ *_param,
427
+ _request_timeout=_request_timeout
428
+ )
429
+ response_data.read()
430
+ return self.api_client.response_deserialize(
431
+ response_data=response_data,
432
+ response_types_map=_response_types_map,
433
+ )
434
+
435
+
436
+ @validate_call
437
+ def get_partner_config_by_domain_without_preload_content(
438
+ self,
439
+ domain: Annotated[Optional[StrictStr], Field(description="The domain to look up the partner config for.")] = None,
440
+ _request_timeout: Union[
441
+ None,
442
+ Annotated[StrictFloat, Field(gt=0)],
443
+ Tuple[
444
+ Annotated[StrictFloat, Field(gt=0)],
445
+ Annotated[StrictFloat, Field(gt=0)]
446
+ ]
447
+ ] = None,
448
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
449
+ _content_type: Optional[StrictStr] = None,
450
+ _headers: Optional[Dict[StrictStr, Any]] = None,
451
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
452
+ ) -> RESTResponseType:
453
+ """get_partner_config_by_domain
454
+
455
+ Fetch the partner config for a given domain.
456
+
457
+ :param domain: The domain to look up the partner config for.
458
+ :type domain: str
459
+ :param _request_timeout: timeout setting for this request. If one
460
+ number provided, it will be total request
461
+ timeout. It can also be a pair (tuple) of
462
+ (connection, read) timeouts.
463
+ :type _request_timeout: int, tuple(int, int), optional
464
+ :param _request_auth: set to override the auth_settings for an a single
465
+ request; this effectively ignores the
466
+ authentication in the spec for a single request.
467
+ :type _request_auth: dict, optional
468
+ :param _content_type: force content-type for the request.
469
+ :type _content_type: str, Optional
470
+ :param _headers: set to override the headers for a single
471
+ request; this effectively ignores the headers
472
+ in the spec for a single request.
473
+ :type _headers: dict, optional
474
+ :param _host_index: set to override the host_index for a single
475
+ request; this effectively ignores the host_index
476
+ in the spec for a single request.
477
+ :type _host_index: int, optional
478
+ :return: Returns the result object.
479
+ """ # noqa: E501
480
+
481
+ _param = self._get_partner_config_by_domain_serialize(
482
+ domain=domain,
483
+ _request_auth=_request_auth,
484
+ _content_type=_content_type,
485
+ _headers=_headers,
486
+ _host_index=_host_index
487
+ )
488
+
489
+ _response_types_map: Dict[str, Optional[str]] = {
490
+ '200': "PartnerConfig",
491
+ '400': "ErrorResponseModel",
492
+ '404': "ErrorResponseModel",
493
+ '500': None,
494
+ }
495
+ response_data = self.api_client.call_api(
496
+ *_param,
497
+ _request_timeout=_request_timeout
498
+ )
499
+ return response_data.response
500
+
501
+
502
+ def _get_partner_config_by_domain_serialize(
503
+ self,
504
+ domain,
505
+ _request_auth,
506
+ _content_type,
507
+ _headers,
508
+ _host_index,
509
+ ) -> RequestSerialized:
510
+
511
+ _host = None
512
+
513
+ _collection_formats: Dict[str, str] = {
514
+ }
515
+
516
+ _path_params: Dict[str, str] = {}
517
+ _query_params: List[Tuple[str, str]] = []
518
+ _header_params: Dict[str, Optional[str]] = _headers or {}
519
+ _form_params: List[Tuple[str, str]] = []
520
+ _files: Dict[
521
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
522
+ ] = {}
523
+ _body_params: Optional[bytes] = None
524
+
525
+ # process the path parameters
526
+ # process the query parameters
527
+ if domain is not None:
528
+
529
+ _query_params.append(('domain', domain))
530
+
531
+ # process the header parameters
532
+ # process the form parameters
533
+ # process the body parameter
534
+
535
+
536
+ # set the HTTP header `Accept`
537
+ if 'Accept' not in _header_params:
538
+ _header_params['Accept'] = self.api_client.select_header_accept(
539
+ [
540
+ 'application/json'
541
+ ]
542
+ )
543
+
544
+
545
+ # authentication setting
546
+ _auth_settings: List[str] = [
547
+ ]
548
+
549
+ return self.api_client.param_serialize(
550
+ method='GET',
551
+ resource_path='/auth/partner-config/docs',
552
+ path_params=_path_params,
553
+ query_params=_query_params,
554
+ header_params=_header_params,
555
+ body=_body_params,
556
+ post_params=_form_params,
557
+ files=_files,
558
+ auth_settings=_auth_settings,
559
+ collection_formats=_collection_formats,
560
+ _host=_host,
561
+ _request_auth=_request_auth
562
+ )
563
+
564
+