hyperstack 1.25.0a0__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 +1 -11
  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 +7 -7
  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 +8 -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-1.25.0a0.dist-info → hyperstack-1.41.0a0.dist-info}/METADATA +2 -2
  157. hyperstack-1.41.0a0.dist-info/RECORD +349 -0
  158. {hyperstack-1.25.0a0.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-1.25.0a0.dist-info/RECORD +0 -401
  225. {hyperstack-1.25.0a0.dist-info → hyperstack-1.41.0a0.dist-info}/top_level.txt +0 -0
@@ -19,7 +19,7 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
- from ..models.token_fields import TokenFields
22
+ from ..models.access_token_field import AccessTokenField
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
@@ -27,11 +27,10 @@ class AuthGetTokenResponseModel(BaseModel):
27
27
  """
28
28
  AuthGetTokenResponseModel
29
29
  """ # noqa: E501
30
- first_login: Optional[StrictBool] = None
31
30
  message: Optional[StrictStr] = None
32
31
  status: Optional[StrictBool] = None
33
- token: Optional[TokenFields] = None
34
- __properties: ClassVar[List[str]] = ["first_login", "message", "status", "token"]
32
+ token: Optional[AccessTokenField] = None
33
+ __properties: ClassVar[List[str]] = ["message", "status", "token"]
35
34
 
36
35
  model_config = ConfigDict(
37
36
  populate_by_name=True,
@@ -87,10 +86,9 @@ class AuthGetTokenResponseModel(BaseModel):
87
86
  return cls.model_validate(obj)
88
87
 
89
88
  _obj = cls.model_validate({
90
- "first_login": obj.get("first_login"),
91
89
  "message": obj.get("message"),
92
90
  "status": obj.get("status"),
93
- "token": TokenFields.from_dict(obj["token"]) if obj.get("token") is not None else None
91
+ "token": AccessTokenField.from_dict(obj["token"]) if obj.get("token") is not None else None
94
92
  })
95
93
  return _obj
96
94
 
@@ -18,22 +18,32 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
  from datetime import datetime
21
- from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
22
22
  from typing import Any, ClassVar, Dict, List, Optional
23
- from ..models.future_node_stock_model import FutureNodeStockModel
24
23
  from typing import Optional, Set
25
24
  from typing_extensions import Self
26
25
 
27
- class FutureNodeModel(BaseModel):
26
+ class BetaAccessRequestFields(BaseModel):
28
27
  """
29
- FutureNodeModel
28
+ BetaAccessRequestFields
30
29
  """ # noqa: E501
31
- expected_provision_date: datetime = Field(description="Date and time in the format YYYY-MM-DD HH:mm:ss")
32
- id: Optional[StrictInt] = None
33
- nexgen_name: Optional[StrictStr] = None
34
- openstack_name: Optional[StrictStr] = None
35
- stocks: Optional[List[FutureNodeStockModel]] = None
36
- __properties: ClassVar[List[str]] = ["expected_provision_date", "id", "nexgen_name", "openstack_name", "stocks"]
30
+ created_at: Optional[datetime] = Field(default=None, description="When the request was made")
31
+ id: Optional[StrictInt] = Field(default=None, description="Unique identifier for the request")
32
+ program_id: Optional[StrictInt] = Field(default=None, description="ID of the beta program")
33
+ program_name: Optional[StrictStr] = Field(default=None, description="Name of the beta program")
34
+ status: Optional[StrictStr] = Field(default=None, description="Status of the request")
35
+ user_id: Optional[StrictInt] = Field(default=None, description="ID of the user who made the request")
36
+ __properties: ClassVar[List[str]] = ["created_at", "id", "program_id", "program_name", "status", "user_id"]
37
+
38
+ @field_validator('status')
39
+ def status_validate_enum(cls, value):
40
+ """Validates the enum"""
41
+ if value is None:
42
+ return value
43
+
44
+ if value not in set(['requested', 'approved', 'denied', 'revoked']):
45
+ raise ValueError("must be one of enum values ('requested', 'approved', 'denied', 'revoked')")
46
+ return value
37
47
 
38
48
  model_config = ConfigDict(
39
49
  populate_by_name=True,
@@ -53,7 +63,7 @@ class FutureNodeModel(BaseModel):
53
63
 
54
64
  @classmethod
55
65
  def from_json(cls, json_str: str) -> Optional[Self]:
56
- """Create an instance of FutureNodeModel from a JSON string"""
66
+ """Create an instance of BetaAccessRequestFields from a JSON string"""
57
67
  return cls.from_dict(json.loads(json_str))
58
68
 
59
69
  def to_dict(self) -> Dict[str, Any]:
@@ -65,10 +75,8 @@ class FutureNodeModel(BaseModel):
65
75
  * `None` is only added to the output dict for nullable fields that
66
76
  were set at model initialization. Other fields with value `None`
67
77
  are ignored.
68
- * OpenAPI `readOnly` fields are excluded.
69
78
  """
70
79
  excluded_fields: Set[str] = set([
71
- "id",
72
80
  ])
73
81
 
74
82
  _dict = self.model_dump(
@@ -76,18 +84,11 @@ class FutureNodeModel(BaseModel):
76
84
  exclude=excluded_fields,
77
85
  exclude_none=True,
78
86
  )
79
- # override the default output from pydantic by calling `to_dict()` of each item in stocks (list)
80
- _items = []
81
- if self.stocks:
82
- for _item_stocks in self.stocks:
83
- if _item_stocks:
84
- _items.append(_item_stocks.to_dict())
85
- _dict['stocks'] = _items
86
87
  return _dict
87
88
 
88
89
  @classmethod
89
90
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
90
- """Create an instance of FutureNodeModel from a dict"""
91
+ """Create an instance of BetaAccessRequestFields from a dict"""
91
92
  if obj is None:
92
93
  return None
93
94
 
@@ -95,11 +96,12 @@ class FutureNodeModel(BaseModel):
95
96
  return cls.model_validate(obj)
96
97
 
97
98
  _obj = cls.model_validate({
98
- "expected_provision_date": obj.get("expected_provision_date"),
99
+ "created_at": obj.get("created_at"),
99
100
  "id": obj.get("id"),
100
- "nexgen_name": obj.get("nexgen_name"),
101
- "openstack_name": obj.get("openstack_name"),
102
- "stocks": [FutureNodeStockModel.from_dict(_item) for _item in obj["stocks"]] if obj.get("stocks") is not None else None
101
+ "program_id": obj.get("program_id"),
102
+ "program_name": obj.get("program_name"),
103
+ "status": obj.get("status"),
104
+ "user_id": obj.get("user_id")
103
105
  })
104
106
  return _obj
105
107
 
@@ -22,14 +22,13 @@ from typing import Any, ClassVar, Dict, List, Optional
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
24
24
 
25
- class CreateGPU(BaseModel):
25
+ class BetaAccessRequestPayload(BaseModel):
26
26
  """
27
- CreateGPU
27
+ BetaAccessRequestPayload
28
28
  """ # noqa: E501
29
- example_metadata: Optional[StrictStr] = Field(default=None, description="A valid JSON string.")
30
- name: StrictStr
31
- regions: Optional[List[StrictStr]] = None
32
- __properties: ClassVar[List[str]] = ["example_metadata", "name", "regions"]
29
+ metadata: Optional[Dict[str, Any]] = Field(default=None, description="Optional metadata for the request")
30
+ program: StrictStr = Field(description="Name of the beta program")
31
+ __properties: ClassVar[List[str]] = ["metadata", "program"]
33
32
 
34
33
  model_config = ConfigDict(
35
34
  populate_by_name=True,
@@ -49,7 +48,7 @@ class CreateGPU(BaseModel):
49
48
 
50
49
  @classmethod
51
50
  def from_json(cls, json_str: str) -> Optional[Self]:
52
- """Create an instance of CreateGPU from a JSON string"""
51
+ """Create an instance of BetaAccessRequestPayload from a JSON string"""
53
52
  return cls.from_dict(json.loads(json_str))
54
53
 
55
54
  def to_dict(self) -> Dict[str, Any]:
@@ -74,7 +73,7 @@ class CreateGPU(BaseModel):
74
73
 
75
74
  @classmethod
76
75
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
- """Create an instance of CreateGPU from a dict"""
76
+ """Create an instance of BetaAccessRequestPayload from a dict"""
78
77
  if obj is None:
79
78
  return None
80
79
 
@@ -82,9 +81,8 @@ class CreateGPU(BaseModel):
82
81
  return cls.model_validate(obj)
83
82
 
84
83
  _obj = cls.model_validate({
85
- "example_metadata": obj.get("example_metadata"),
86
- "name": obj.get("name"),
87
- "regions": obj.get("regions")
84
+ "metadata": obj.get("metadata"),
85
+ "program": obj.get("program")
88
86
  })
89
87
  return _obj
90
88
 
@@ -19,18 +19,18 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
- from ..models.insert_discount_plan_fields import InsertDiscountPlanFields
22
+ from ..models.beta_access_request_fields import BetaAccessRequestFields
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
26
- class CreateDiscountResponse(BaseModel):
26
+ class BetaAccessRequestResponseModel(BaseModel):
27
27
  """
28
- CreateDiscountResponse
28
+ BetaAccessRequestResponseModel
29
29
  """ # noqa: E501
30
- discount_plan: Optional[InsertDiscountPlanFields] = None
30
+ beta_access_request: Optional[BetaAccessRequestFields] = None
31
31
  message: Optional[StrictStr] = None
32
32
  status: Optional[StrictBool] = None
33
- __properties: ClassVar[List[str]] = ["discount_plan", "message", "status"]
33
+ __properties: ClassVar[List[str]] = ["beta_access_request", "message", "status"]
34
34
 
35
35
  model_config = ConfigDict(
36
36
  populate_by_name=True,
@@ -50,7 +50,7 @@ class CreateDiscountResponse(BaseModel):
50
50
 
51
51
  @classmethod
52
52
  def from_json(cls, json_str: str) -> Optional[Self]:
53
- """Create an instance of CreateDiscountResponse from a JSON string"""
53
+ """Create an instance of BetaAccessRequestResponseModel from a JSON string"""
54
54
  return cls.from_dict(json.loads(json_str))
55
55
 
56
56
  def to_dict(self) -> Dict[str, Any]:
@@ -71,14 +71,14 @@ class CreateDiscountResponse(BaseModel):
71
71
  exclude=excluded_fields,
72
72
  exclude_none=True,
73
73
  )
74
- # override the default output from pydantic by calling `to_dict()` of discount_plan
75
- if self.discount_plan:
76
- _dict['discount_plan'] = self.discount_plan.to_dict()
74
+ # override the default output from pydantic by calling `to_dict()` of beta_access_request
75
+ if self.beta_access_request:
76
+ _dict['beta_access_request'] = self.beta_access_request.to_dict()
77
77
  return _dict
78
78
 
79
79
  @classmethod
80
80
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
- """Create an instance of CreateDiscountResponse from a dict"""
81
+ """Create an instance of BetaAccessRequestResponseModel from a dict"""
82
82
  if obj is None:
83
83
  return None
84
84
 
@@ -86,7 +86,7 @@ class CreateDiscountResponse(BaseModel):
86
86
  return cls.model_validate(obj)
87
87
 
88
88
  _obj = cls.model_validate({
89
- "discount_plan": InsertDiscountPlanFields.from_dict(obj["discount_plan"]) if obj.get("discount_plan") is not None else None,
89
+ "beta_access_request": BetaAccessRequestFields.from_dict(obj["beta_access_request"]) if obj.get("beta_access_request") is not None else None,
90
90
  "message": obj.get("message"),
91
91
  "status": obj.get("status")
92
92
  })
@@ -18,28 +18,28 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
  from datetime import datetime
21
- from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
22
22
  from typing import Any, ClassVar, Dict, List, Optional
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
26
- class ExportBillingDataRequest(BaseModel):
26
+ class BetaAccessStatusItem(BaseModel):
27
27
  """
28
- ExportBillingDataRequest
28
+ BetaAccessStatusItem
29
29
  """ # noqa: E501
30
- end_date: datetime
31
- org_id: Optional[StrictInt] = None
32
- required_attributes: List[StrictStr]
33
- required_metrics: List[StrictStr]
34
- resource_type: StrictStr
35
- start_date: datetime
36
- __properties: ClassVar[List[str]] = ["end_date", "org_id", "required_attributes", "required_metrics", "resource_type", "start_date"]
37
-
38
- @field_validator('resource_type')
39
- def resource_type_validate_enum(cls, value):
30
+ program_name: Optional[StrictStr] = Field(default=None, description="Name of the beta program")
31
+ request_date: Optional[datetime] = Field(default=None, description="When the request was made")
32
+ status: Optional[StrictStr] = Field(default=None, description="Status of the request (requested, approved, denied, revoked)")
33
+ __properties: ClassVar[List[str]] = ["program_name", "request_date", "status"]
34
+
35
+ @field_validator('status')
36
+ def status_validate_enum(cls, value):
40
37
  """Validates the enum"""
41
- if value not in set(['virtual_machine', 'volume']):
42
- raise ValueError("must be one of enum values ('virtual_machine', 'volume')")
38
+ if value is None:
39
+ return value
40
+
41
+ if value not in set(['requested', 'approved', 'denied', 'revoked']):
42
+ raise ValueError("must be one of enum values ('requested', 'approved', 'denied', 'revoked')")
43
43
  return value
44
44
 
45
45
  model_config = ConfigDict(
@@ -60,7 +60,7 @@ class ExportBillingDataRequest(BaseModel):
60
60
 
61
61
  @classmethod
62
62
  def from_json(cls, json_str: str) -> Optional[Self]:
63
- """Create an instance of ExportBillingDataRequest from a JSON string"""
63
+ """Create an instance of BetaAccessStatusItem from a JSON string"""
64
64
  return cls.from_dict(json.loads(json_str))
65
65
 
66
66
  def to_dict(self) -> Dict[str, Any]:
@@ -85,7 +85,7 @@ class ExportBillingDataRequest(BaseModel):
85
85
 
86
86
  @classmethod
87
87
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
88
- """Create an instance of ExportBillingDataRequest from a dict"""
88
+ """Create an instance of BetaAccessStatusItem from a dict"""
89
89
  if obj is None:
90
90
  return None
91
91
 
@@ -93,12 +93,9 @@ class ExportBillingDataRequest(BaseModel):
93
93
  return cls.model_validate(obj)
94
94
 
95
95
  _obj = cls.model_validate({
96
- "end_date": obj.get("end_date"),
97
- "org_id": obj.get("org_id"),
98
- "required_attributes": obj.get("required_attributes"),
99
- "required_metrics": obj.get("required_metrics"),
100
- "resource_type": obj.get("resource_type"),
101
- "start_date": obj.get("start_date")
96
+ "program_name": obj.get("program_name"),
97
+ "request_date": obj.get("request_date"),
98
+ "status": obj.get("status")
102
99
  })
103
100
  return _obj
104
101
 
@@ -17,20 +17,20 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
- from ..models.get_all_discounts_fields import GetAllDiscountsFields
22
+ from ..models.beta_access_status_item import BetaAccessStatusItem
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
26
- class GetAllDiscountForAllOrganizationResponse(BaseModel):
26
+ class BetaAccessStatusResponseModel(BaseModel):
27
27
  """
28
- GetAllDiscountForAllOrganizationResponse
28
+ BetaAccessStatusResponseModel
29
29
  """ # noqa: E501
30
- discount_plans: Optional[List[GetAllDiscountsFields]] = None
30
+ beta_access_requests: Optional[List[BetaAccessStatusItem]] = Field(default=None, description="List of beta access requests")
31
31
  message: Optional[StrictStr] = None
32
32
  status: Optional[StrictBool] = None
33
- __properties: ClassVar[List[str]] = ["discount_plans", "message", "status"]
33
+ __properties: ClassVar[List[str]] = ["beta_access_requests", "message", "status"]
34
34
 
35
35
  model_config = ConfigDict(
36
36
  populate_by_name=True,
@@ -50,7 +50,7 @@ class GetAllDiscountForAllOrganizationResponse(BaseModel):
50
50
 
51
51
  @classmethod
52
52
  def from_json(cls, json_str: str) -> Optional[Self]:
53
- """Create an instance of GetAllDiscountForAllOrganizationResponse from a JSON string"""
53
+ """Create an instance of BetaAccessStatusResponseModel from a JSON string"""
54
54
  return cls.from_dict(json.loads(json_str))
55
55
 
56
56
  def to_dict(self) -> Dict[str, Any]:
@@ -71,18 +71,18 @@ class GetAllDiscountForAllOrganizationResponse(BaseModel):
71
71
  exclude=excluded_fields,
72
72
  exclude_none=True,
73
73
  )
74
- # override the default output from pydantic by calling `to_dict()` of each item in discount_plans (list)
74
+ # override the default output from pydantic by calling `to_dict()` of each item in beta_access_requests (list)
75
75
  _items = []
76
- if self.discount_plans:
77
- for _item_discount_plans in self.discount_plans:
78
- if _item_discount_plans:
79
- _items.append(_item_discount_plans.to_dict())
80
- _dict['discount_plans'] = _items
76
+ if self.beta_access_requests:
77
+ for _item_beta_access_requests in self.beta_access_requests:
78
+ if _item_beta_access_requests:
79
+ _items.append(_item_beta_access_requests.to_dict())
80
+ _dict['beta_access_requests'] = _items
81
81
  return _dict
82
82
 
83
83
  @classmethod
84
84
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
85
- """Create an instance of GetAllDiscountForAllOrganizationResponse from a dict"""
85
+ """Create an instance of BetaAccessStatusResponseModel from a dict"""
86
86
  if obj is None:
87
87
  return None
88
88
 
@@ -90,7 +90,7 @@ class GetAllDiscountForAllOrganizationResponse(BaseModel):
90
90
  return cls.model_validate(obj)
91
91
 
92
92
  _obj = cls.model_validate({
93
- "discount_plans": [GetAllDiscountsFields.from_dict(_item) for _item in obj["discount_plans"]] if obj.get("discount_plans") is not None else None,
93
+ "beta_access_requests": [BetaAccessStatusItem.from_dict(_item) for _item in obj["beta_access_requests"]] if obj.get("beta_access_requests") is not None else None,
94
94
  "message": obj.get("message"),
95
95
  "status": obj.get("status")
96
96
  })
@@ -19,16 +19,17 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
- from ..models.data import Data
22
+ from ..models.attributes import Attributes
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
26
- class ExcludeBillingPostResponse(BaseModel):
26
+ class BillingHistory(BaseModel):
27
27
  """
28
- ExcludeBillingPostResponse
28
+ BillingHistory
29
29
  """ # noqa: E501
30
- data: Optional[Data] = None
31
- __properties: ClassVar[List[str]] = ["data"]
30
+ attributes: Optional[Attributes] = None
31
+ metrics: Optional[Dict[str, Any]] = None
32
+ __properties: ClassVar[List[str]] = ["attributes", "metrics"]
32
33
 
33
34
  model_config = ConfigDict(
34
35
  populate_by_name=True,
@@ -48,7 +49,7 @@ class ExcludeBillingPostResponse(BaseModel):
48
49
 
49
50
  @classmethod
50
51
  def from_json(cls, json_str: str) -> Optional[Self]:
51
- """Create an instance of ExcludeBillingPostResponse from a JSON string"""
52
+ """Create an instance of BillingHistory from a JSON string"""
52
53
  return cls.from_dict(json.loads(json_str))
53
54
 
54
55
  def to_dict(self) -> Dict[str, Any]:
@@ -69,14 +70,14 @@ class ExcludeBillingPostResponse(BaseModel):
69
70
  exclude=excluded_fields,
70
71
  exclude_none=True,
71
72
  )
72
- # override the default output from pydantic by calling `to_dict()` of data
73
- if self.data:
74
- _dict['data'] = self.data.to_dict()
73
+ # override the default output from pydantic by calling `to_dict()` of attributes
74
+ if self.attributes:
75
+ _dict['attributes'] = self.attributes.to_dict()
75
76
  return _dict
76
77
 
77
78
  @classmethod
78
79
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
79
- """Create an instance of ExcludeBillingPostResponse from a dict"""
80
+ """Create an instance of BillingHistory from a dict"""
80
81
  if obj is None:
81
82
  return None
82
83
 
@@ -84,7 +85,8 @@ class ExcludeBillingPostResponse(BaseModel):
84
85
  return cls.model_validate(obj)
85
86
 
86
87
  _obj = cls.model_validate({
87
- "data": Data.from_dict(obj["data"]) if obj.get("data") is not None else None
88
+ "attributes": Attributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None,
89
+ "metrics": obj.get("metrics")
88
90
  })
89
91
  return _obj
90
92
 
@@ -0,0 +1,105 @@
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
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictInt
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from ..models.billing_history import BillingHistory
23
+ from ..models.pagination import Pagination
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class BillingHistoryDataSynthesisDetails(BaseModel):
28
+ """
29
+ BillingHistoryDataSynthesisDetails
30
+ """ # noqa: E501
31
+ billing_history: Optional[List[BillingHistory]] = None
32
+ org_id: Optional[StrictInt] = None
33
+ pagination: Optional[Pagination] = None
34
+ total_count: Optional[StrictInt] = None
35
+ __properties: ClassVar[List[str]] = ["billing_history", "org_id", "pagination", "total_count"]
36
+
37
+ model_config = ConfigDict(
38
+ populate_by_name=True,
39
+ validate_assignment=True,
40
+ protected_namespaces=(),
41
+ )
42
+
43
+
44
+ def to_str(self) -> str:
45
+ """Returns the string representation of the model using alias"""
46
+ return pprint.pformat(self.model_dump(by_alias=True))
47
+
48
+ def to_json(self) -> str:
49
+ """Returns the JSON representation of the model using alias"""
50
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
51
+ return json.dumps(self.to_dict())
52
+
53
+ @classmethod
54
+ def from_json(cls, json_str: str) -> Optional[Self]:
55
+ """Create an instance of BillingHistoryDataSynthesisDetails from a JSON string"""
56
+ return cls.from_dict(json.loads(json_str))
57
+
58
+ def to_dict(self) -> Dict[str, Any]:
59
+ """Return the dictionary representation of the model using alias.
60
+
61
+ This has the following differences from calling pydantic's
62
+ `self.model_dump(by_alias=True)`:
63
+
64
+ * `None` is only added to the output dict for nullable fields that
65
+ were set at model initialization. Other fields with value `None`
66
+ are ignored.
67
+ """
68
+ excluded_fields: Set[str] = set([
69
+ ])
70
+
71
+ _dict = self.model_dump(
72
+ by_alias=True,
73
+ exclude=excluded_fields,
74
+ exclude_none=True,
75
+ )
76
+ # override the default output from pydantic by calling `to_dict()` of each item in billing_history (list)
77
+ _items = []
78
+ if self.billing_history:
79
+ for _item_billing_history in self.billing_history:
80
+ if _item_billing_history:
81
+ _items.append(_item_billing_history.to_dict())
82
+ _dict['billing_history'] = _items
83
+ # override the default output from pydantic by calling `to_dict()` of pagination
84
+ if self.pagination:
85
+ _dict['pagination'] = self.pagination.to_dict()
86
+ return _dict
87
+
88
+ @classmethod
89
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
90
+ """Create an instance of BillingHistoryDataSynthesisDetails from a dict"""
91
+ if obj is None:
92
+ return None
93
+
94
+ if not isinstance(obj, dict):
95
+ return cls.model_validate(obj)
96
+
97
+ _obj = cls.model_validate({
98
+ "billing_history": [BillingHistory.from_dict(_item) for _item in obj["billing_history"]] if obj.get("billing_history") is not None else None,
99
+ "org_id": obj.get("org_id"),
100
+ "pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None,
101
+ "total_count": obj.get("total_count")
102
+ })
103
+ return _obj
104
+
105
+
@@ -17,21 +17,22 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
20
+ from pydantic import BaseModel, ConfigDict, StrictInt
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
- from ..models.virtual_machine_usage import VirtualMachineUsage
22
+ from ..models.billing_history import BillingHistory
23
+ from ..models.pagination import Pagination
23
24
  from typing import Optional, Set
24
25
  from typing_extensions import Self
25
26
 
26
- class VMUsageResponse(BaseModel):
27
+ class BillingHistoryFineTuning(BaseModel):
27
28
  """
28
- VMUsageResponse
29
+ BillingHistoryFineTuning
29
30
  """ # noqa: E501
30
- message: Optional[StrictStr] = None
31
+ billing_history: Optional[List[BillingHistory]] = None
31
32
  org_id: Optional[StrictInt] = None
32
- status: Optional[StrictBool] = None
33
- virtual_machines: Optional[List[VirtualMachineUsage]] = None
34
- __properties: ClassVar[List[str]] = ["message", "org_id", "status", "virtual_machines"]
33
+ pagination: Optional[Pagination] = None
34
+ total_count: Optional[StrictInt] = None
35
+ __properties: ClassVar[List[str]] = ["billing_history", "org_id", "pagination", "total_count"]
35
36
 
36
37
  model_config = ConfigDict(
37
38
  populate_by_name=True,
@@ -51,7 +52,7 @@ class VMUsageResponse(BaseModel):
51
52
 
52
53
  @classmethod
53
54
  def from_json(cls, json_str: str) -> Optional[Self]:
54
- """Create an instance of VMUsageResponse from a JSON string"""
55
+ """Create an instance of BillingHistoryFineTuning from a JSON string"""
55
56
  return cls.from_dict(json.loads(json_str))
56
57
 
57
58
  def to_dict(self) -> Dict[str, Any]:
@@ -72,18 +73,21 @@ class VMUsageResponse(BaseModel):
72
73
  exclude=excluded_fields,
73
74
  exclude_none=True,
74
75
  )
75
- # override the default output from pydantic by calling `to_dict()` of each item in virtual_machines (list)
76
+ # override the default output from pydantic by calling `to_dict()` of each item in billing_history (list)
76
77
  _items = []
77
- if self.virtual_machines:
78
- for _item_virtual_machines in self.virtual_machines:
79
- if _item_virtual_machines:
80
- _items.append(_item_virtual_machines.to_dict())
81
- _dict['virtual_machines'] = _items
78
+ if self.billing_history:
79
+ for _item_billing_history in self.billing_history:
80
+ if _item_billing_history:
81
+ _items.append(_item_billing_history.to_dict())
82
+ _dict['billing_history'] = _items
83
+ # override the default output from pydantic by calling `to_dict()` of pagination
84
+ if self.pagination:
85
+ _dict['pagination'] = self.pagination.to_dict()
82
86
  return _dict
83
87
 
84
88
  @classmethod
85
89
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
- """Create an instance of VMUsageResponse from a dict"""
90
+ """Create an instance of BillingHistoryFineTuning from a dict"""
87
91
  if obj is None:
88
92
  return None
89
93
 
@@ -91,10 +95,10 @@ class VMUsageResponse(BaseModel):
91
95
  return cls.model_validate(obj)
92
96
 
93
97
  _obj = cls.model_validate({
94
- "message": obj.get("message"),
98
+ "billing_history": [BillingHistory.from_dict(_item) for _item in obj["billing_history"]] if obj.get("billing_history") is not None else None,
95
99
  "org_id": obj.get("org_id"),
96
- "status": obj.get("status"),
97
- "virtual_machines": [VirtualMachineUsage.from_dict(_item) for _item in obj["virtual_machines"]] if obj.get("virtual_machines") is not None else None
100
+ "pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None,
101
+ "total_count": obj.get("total_count")
98
102
  })
99
103
  return _obj
100
104