hyperstack 1.25.0a0__py3-none-any.whl → 1.41.2a0__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 +80 -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 +2816 -199
  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 +77 -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/{verify_api_key_response_model.py → manual_reconciliation_model.py} +13 -13
  112. hyperstack/models/{creditrequestresponse.py → master_flavors_response.py} +14 -14
  113. hyperstack/models/{customer_payload.py → mfa_status_fields.py} +8 -10
  114. hyperstack/models/{gpu.py → mfa_status_response.py} +11 -11
  115. hyperstack/models/model_evaluation_billing_history_details_response_schema.py +95 -0
  116. hyperstack/models/{organization_thresholdfields.py → organization_threshold_fields.py} +4 -4
  117. hyperstack/models/{organizationthresholdupdateresponse.py → organization_threshold_update_response.py} +7 -7
  118. hyperstack/models/{organizationthresholdsresponse.py → organization_thresholds_response.py} +7 -7
  119. hyperstack/models/{logo_get_response.py → pagination.py} +12 -12
  120. hyperstack/models/{billing_response.py → partner_config.py} +31 -20
  121. hyperstack/models/payment_details_fields.py +5 -1
  122. hyperstack/models/{logout_payload.py → primary_color.py} +10 -8
  123. hyperstack/models/region_fields.py +16 -2
  124. hyperstack/models/{vm_usage_request_payload.py → request_instance_logs_payload.py} +8 -8
  125. hyperstack/models/{stock_visibility_user_payload.py → request_instance_logs_response.py} +8 -8
  126. hyperstack/models/{contract_billing_history.py → resource_level_billing_bucket_details_resources.py} +10 -10
  127. hyperstack/models/{node_response_model.py → resource_level_billing_history_resources_cluster.py} +21 -11
  128. hyperstack/models/resource_level_billing_history_response_attributes.py +3 -1
  129. hyperstack/models/{get_all_contracts_response_model.py → resource_level_bucket_billing_details_response_model.py} +11 -15
  130. hyperstack/models/{contract_billing_history_response_model.py → resource_level_bucket_billing_history_response_model.py} +11 -11
  131. hyperstack/models/resource_level_cluster_billing_details_response_model.py +95 -0
  132. hyperstack/models/resource_level_cluster_billing_history_response_model.py +95 -0
  133. hyperstack/models/{get_discount_detail_response.py → resource_level_cluster_graph_billing_details_response_model.py} +11 -11
  134. hyperstack/models/{organization_object_response.py → resource_level_graph_billing_details_bucket.py} +18 -14
  135. hyperstack/models/{update_discounts_status_payload.py → secondary_color.py} +10 -8
  136. hyperstack/models/{security_rules_fieldsfor_instance.py → security_rules_fields_for_instance.py} +4 -4
  137. hyperstack/models/serverless_inferenced_billing_history_details_response_schema.py +95 -0
  138. hyperstack/models/snapshot_fields.py +6 -1
  139. hyperstack/models/snapshot_retrieve_fields.py +29 -2
  140. hyperstack/models/start_deployment.py +3 -3
  141. hyperstack/models/{subscribeorunsubscribeupdatepayload.py → subscribe_or_unsubscribe_update_payload.py} +4 -4
  142. hyperstack/models/token_based_billing_history_response.py +95 -0
  143. hyperstack/models/{update_keypairnameresponse.py → update_keypair_name_response.py} +4 -4
  144. hyperstack/models/update_volume_attachment_payload.py +87 -0
  145. hyperstack/models/{verify_api_key_payload.py → update_volume_payload.py} +7 -7
  146. hyperstack/models/{stock_visibility_user_list_response.py → update_volume_response.py} +14 -16
  147. hyperstack/models/{auth_request_login_fields.py → uris.py} +19 -9
  148. hyperstack/models/{userinfopostpayload.py → user_info_post_payload.py} +4 -4
  149. hyperstack/models/{node_stock_response_model.py → user_organizations_response.py} +14 -14
  150. hyperstack/models/users_info_fields.py +3 -1
  151. hyperstack/models/volume_attachment_fields.py +9 -5
  152. hyperstack/models/volume_fields.py +14 -4
  153. hyperstack/models/{volume_fieldsfor_instance.py → volume_fields_for_instance.py} +4 -4
  154. hyperstack/models/volumes.py +17 -11
  155. hyperstack/models/{instances_summary_fields.py → volumes_fields.py} +33 -29
  156. hyperstack/models/workload_billing_history_response.py +95 -0
  157. {hyperstack-1.25.0a0.dist-info → hyperstack-1.41.2a0.dist-info}/METADATA +2 -2
  158. hyperstack-1.41.2a0.dist-info/RECORD +350 -0
  159. {hyperstack-1.25.0a0.dist-info → hyperstack-1.41.2a0.dist-info}/WHEEL +1 -1
  160. hyperstack/models/api_key_verify_fields.py +0 -93
  161. hyperstack/models/billing_immune_resources_response.py +0 -95
  162. hyperstack/models/contract_billing_history_response_attributes.py +0 -99
  163. hyperstack/models/contract_change_payload.py +0 -101
  164. hyperstack/models/contract_eligible_instances_response.py +0 -101
  165. hyperstack/models/contract_event_create_model.py +0 -91
  166. hyperstack/models/contract_resource_payload.py +0 -95
  167. hyperstack/models/contractl_billing_history_response_metrics.py +0 -87
  168. hyperstack/models/create_contract_fields.py +0 -110
  169. hyperstack/models/create_contract_payload.py +0 -106
  170. hyperstack/models/create_discounts_payload.py +0 -112
  171. hyperstack/models/create_update_permission_payload.py +0 -93
  172. hyperstack/models/create_update_policy_payload.py +0 -93
  173. hyperstack/models/creditrechargelimitfield.py +0 -93
  174. hyperstack/models/creditrechargelimitresponse.py +0 -99
  175. hyperstack/models/creditrequests.py +0 -96
  176. hyperstack/models/data.py +0 -91
  177. hyperstack/models/discount_entity_model.py +0 -97
  178. hyperstack/models/discount_fields.py +0 -100
  179. hyperstack/models/discount_plan_fields.py +0 -108
  180. hyperstack/models/discount_resource_fields.py +0 -93
  181. hyperstack/models/discount_resource_payload.py +0 -93
  182. hyperstack/models/exclude_billing_post_payload.py +0 -91
  183. hyperstack/models/field_change.py +0 -91
  184. hyperstack/models/flavor_payload.py +0 -101
  185. hyperstack/models/flavor_vms_response.py +0 -99
  186. hyperstack/models/future_node_stock_model.py +0 -93
  187. hyperstack/models/future_node_update_model.py +0 -98
  188. hyperstack/models/get_all_contract_fields.py +0 -100
  189. hyperstack/models/get_discount_response.py +0 -99
  190. hyperstack/models/get_entity_discount_detail_response.py +0 -108
  191. hyperstack/models/get_token_payload.py +0 -89
  192. hyperstack/models/get_version_response.py +0 -91
  193. hyperstack/models/historical_instance.py +0 -101
  194. hyperstack/models/infrahub_resource_object_response.py +0 -119
  195. hyperstack/models/insert_discount_plan_fields.py +0 -112
  196. hyperstack/models/internal_instance_fields.py +0 -156
  197. hyperstack/models/internal_instance_image_fields.py +0 -95
  198. hyperstack/models/internal_instances_response.py +0 -99
  199. hyperstack/models/internal_security_rules_fields_for_instance.py +0 -104
  200. hyperstack/models/internal_volume_attachment_fields.py +0 -98
  201. hyperstack/models/internal_volume_fields.py +0 -95
  202. hyperstack/models/internal_volumes_response.py +0 -99
  203. hyperstack/models/new_stock_update_response_model.py +0 -89
  204. hyperstack/models/node_model.py +0 -114
  205. hyperstack/models/node_payload_model.py +0 -97
  206. hyperstack/models/node_power_usage_model.py +0 -120
  207. hyperstack/models/node_stock_payload_model.py +0 -95
  208. hyperstack/models/organizationcreditrechargelimitresponse.py +0 -95
  209. hyperstack/models/power_usage_model.py +0 -89
  210. hyperstack/models/pricebook_resource_object_response.py +0 -107
  211. hyperstack/models/refresh_token_payload.py +0 -89
  212. hyperstack/models/region_response.py +0 -95
  213. hyperstack/models/set_defaults_payload.py +0 -89
  214. hyperstack/models/single_visibility_user_response.py +0 -91
  215. hyperstack/models/success_response_model.py +0 -89
  216. hyperstack/models/token_fields.py +0 -91
  217. hyperstack/models/update_contract_payload.py +0 -104
  218. hyperstack/models/update_discounts_payload.py +0 -102
  219. hyperstack/models/user_transfer_payload.py +0 -89
  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.2a0.dist-info}/top_level.txt +0 -0
@@ -1,93 +0,0 @@
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, StrictStr
21
- from typing import Any, ClassVar, Dict, List, Optional
22
- from typing import Optional, Set
23
- from typing_extensions import Self
24
-
25
- class ApiKeyVerifyFields(BaseModel):
26
- """
27
- ApiKeyVerifyFields
28
- """ # noqa: E501
29
- org_id: Optional[StrictInt] = None
30
- sub: Optional[StrictStr] = None
31
- user_id: Optional[StrictInt] = None
32
- user_role: Optional[StrictStr] = None
33
- __properties: ClassVar[List[str]] = ["org_id", "sub", "user_id", "user_role"]
34
-
35
- model_config = ConfigDict(
36
- populate_by_name=True,
37
- validate_assignment=True,
38
- protected_namespaces=(),
39
- )
40
-
41
-
42
- def to_str(self) -> str:
43
- """Returns the string representation of the model using alias"""
44
- return pprint.pformat(self.model_dump(by_alias=True))
45
-
46
- def to_json(self) -> str:
47
- """Returns the JSON representation of the model using alias"""
48
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
- return json.dumps(self.to_dict())
50
-
51
- @classmethod
52
- def from_json(cls, json_str: str) -> Optional[Self]:
53
- """Create an instance of ApiKeyVerifyFields from a JSON string"""
54
- return cls.from_dict(json.loads(json_str))
55
-
56
- def to_dict(self) -> Dict[str, Any]:
57
- """Return the dictionary representation of the model using alias.
58
-
59
- This has the following differences from calling pydantic's
60
- `self.model_dump(by_alias=True)`:
61
-
62
- * `None` is only added to the output dict for nullable fields that
63
- were set at model initialization. Other fields with value `None`
64
- are ignored.
65
- """
66
- excluded_fields: Set[str] = set([
67
- ])
68
-
69
- _dict = self.model_dump(
70
- by_alias=True,
71
- exclude=excluded_fields,
72
- exclude_none=True,
73
- )
74
- return _dict
75
-
76
- @classmethod
77
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78
- """Create an instance of ApiKeyVerifyFields from a dict"""
79
- if obj is None:
80
- return None
81
-
82
- if not isinstance(obj, dict):
83
- return cls.model_validate(obj)
84
-
85
- _obj = cls.model_validate({
86
- "org_id": obj.get("org_id"),
87
- "sub": obj.get("sub"),
88
- "user_id": obj.get("user_id"),
89
- "user_role": obj.get("user_role")
90
- })
91
- return _obj
92
-
93
-
@@ -1,95 +0,0 @@
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
21
- from typing import Any, ClassVar, Dict, List, Optional
22
- from ..models.data import Data
23
- from typing import Optional, Set
24
- from typing_extensions import Self
25
-
26
- class BillingImmuneResourcesResponse(BaseModel):
27
- """
28
- BillingImmuneResourcesResponse
29
- """ # noqa: E501
30
- data: Optional[List[Data]] = None
31
- __properties: ClassVar[List[str]] = ["data"]
32
-
33
- model_config = ConfigDict(
34
- populate_by_name=True,
35
- validate_assignment=True,
36
- protected_namespaces=(),
37
- )
38
-
39
-
40
- def to_str(self) -> str:
41
- """Returns the string representation of the model using alias"""
42
- return pprint.pformat(self.model_dump(by_alias=True))
43
-
44
- def to_json(self) -> str:
45
- """Returns the JSON representation of the model using alias"""
46
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
- return json.dumps(self.to_dict())
48
-
49
- @classmethod
50
- def from_json(cls, json_str: str) -> Optional[Self]:
51
- """Create an instance of BillingImmuneResourcesResponse from a JSON string"""
52
- return cls.from_dict(json.loads(json_str))
53
-
54
- def to_dict(self) -> Dict[str, Any]:
55
- """Return the dictionary representation of the model using alias.
56
-
57
- This has the following differences from calling pydantic's
58
- `self.model_dump(by_alias=True)`:
59
-
60
- * `None` is only added to the output dict for nullable fields that
61
- were set at model initialization. Other fields with value `None`
62
- are ignored.
63
- """
64
- excluded_fields: Set[str] = set([
65
- ])
66
-
67
- _dict = self.model_dump(
68
- by_alias=True,
69
- exclude=excluded_fields,
70
- exclude_none=True,
71
- )
72
- # override the default output from pydantic by calling `to_dict()` of each item in data (list)
73
- _items = []
74
- if self.data:
75
- for _item_data in self.data:
76
- if _item_data:
77
- _items.append(_item_data.to_dict())
78
- _dict['data'] = _items
79
- return _dict
80
-
81
- @classmethod
82
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
- """Create an instance of BillingImmuneResourcesResponse from a dict"""
84
- if obj is None:
85
- return None
86
-
87
- if not isinstance(obj, dict):
88
- return cls.model_validate(obj)
89
-
90
- _obj = cls.model_validate({
91
- "data": [Data.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None
92
- })
93
- return _obj
94
-
95
-
@@ -1,99 +0,0 @@
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, StrictFloat, StrictInt, StrictStr
21
- from typing import Any, ClassVar, Dict, List, Optional, Union
22
- from typing import Optional, Set
23
- from typing_extensions import Self
24
-
25
- class ContractBillingHistoryResponseAttributes(BaseModel):
26
- """
27
- ContractBillingHistoryResponseAttributes
28
- """ # noqa: E501
29
- description: Optional[StrictStr] = None
30
- end_date: Optional[StrictStr] = None
31
- gpu_count: Optional[StrictInt] = None
32
- gpu_name: Optional[StrictStr] = None
33
- id: Optional[StrictStr] = None
34
- infrahub_id: Optional[StrictInt] = None
35
- price_per_hour: Optional[Union[StrictFloat, StrictInt]] = None
36
- __properties: ClassVar[List[str]] = ["description", "end_date", "gpu_count", "gpu_name", "id", "infrahub_id", "price_per_hour"]
37
-
38
- model_config = ConfigDict(
39
- populate_by_name=True,
40
- validate_assignment=True,
41
- protected_namespaces=(),
42
- )
43
-
44
-
45
- def to_str(self) -> str:
46
- """Returns the string representation of the model using alias"""
47
- return pprint.pformat(self.model_dump(by_alias=True))
48
-
49
- def to_json(self) -> str:
50
- """Returns the JSON representation of the model using alias"""
51
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
- return json.dumps(self.to_dict())
53
-
54
- @classmethod
55
- def from_json(cls, json_str: str) -> Optional[Self]:
56
- """Create an instance of ContractBillingHistoryResponseAttributes from a JSON string"""
57
- return cls.from_dict(json.loads(json_str))
58
-
59
- def to_dict(self) -> Dict[str, Any]:
60
- """Return the dictionary representation of the model using alias.
61
-
62
- This has the following differences from calling pydantic's
63
- `self.model_dump(by_alias=True)`:
64
-
65
- * `None` is only added to the output dict for nullable fields that
66
- were set at model initialization. Other fields with value `None`
67
- are ignored.
68
- """
69
- excluded_fields: Set[str] = set([
70
- ])
71
-
72
- _dict = self.model_dump(
73
- by_alias=True,
74
- exclude=excluded_fields,
75
- exclude_none=True,
76
- )
77
- return _dict
78
-
79
- @classmethod
80
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
- """Create an instance of ContractBillingHistoryResponseAttributes from a dict"""
82
- if obj is None:
83
- return None
84
-
85
- if not isinstance(obj, dict):
86
- return cls.model_validate(obj)
87
-
88
- _obj = cls.model_validate({
89
- "description": obj.get("description"),
90
- "end_date": obj.get("end_date"),
91
- "gpu_count": obj.get("gpu_count"),
92
- "gpu_name": obj.get("gpu_name"),
93
- "id": obj.get("id"),
94
- "infrahub_id": obj.get("infrahub_id"),
95
- "price_per_hour": obj.get("price_per_hour")
96
- })
97
- return _obj
98
-
99
-
@@ -1,101 +0,0 @@
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, Field, StrictInt, StrictStr
21
- from typing import Any, ClassVar, Dict, List, Optional
22
- from ..models.field_change import FieldChange
23
- from typing import Optional, Set
24
- from typing_extensions import Self
25
-
26
- class ContractChangePayload(BaseModel):
27
- """
28
- ContractChangePayload
29
- """ # noqa: E501
30
- changes: Optional[List[FieldChange]] = Field(default=None, description="List of field changes for 'updated' type")
31
- id: StrictInt = Field(description="The ID of the contract")
32
- org_id: StrictInt = Field(description="The ORG ID of the contract")
33
- type: StrictStr = Field(description="Purpose of the change: created, deleted, expired, or updated")
34
- __properties: ClassVar[List[str]] = ["changes", "id", "org_id", "type"]
35
-
36
- model_config = ConfigDict(
37
- populate_by_name=True,
38
- validate_assignment=True,
39
- protected_namespaces=(),
40
- )
41
-
42
-
43
- def to_str(self) -> str:
44
- """Returns the string representation of the model using alias"""
45
- return pprint.pformat(self.model_dump(by_alias=True))
46
-
47
- def to_json(self) -> str:
48
- """Returns the JSON representation of the model using alias"""
49
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
- return json.dumps(self.to_dict())
51
-
52
- @classmethod
53
- def from_json(cls, json_str: str) -> Optional[Self]:
54
- """Create an instance of ContractChangePayload from a JSON string"""
55
- return cls.from_dict(json.loads(json_str))
56
-
57
- def to_dict(self) -> Dict[str, Any]:
58
- """Return the dictionary representation of the model using alias.
59
-
60
- This has the following differences from calling pydantic's
61
- `self.model_dump(by_alias=True)`:
62
-
63
- * `None` is only added to the output dict for nullable fields that
64
- were set at model initialization. Other fields with value `None`
65
- are ignored.
66
- """
67
- excluded_fields: Set[str] = set([
68
- ])
69
-
70
- _dict = self.model_dump(
71
- by_alias=True,
72
- exclude=excluded_fields,
73
- exclude_none=True,
74
- )
75
- # override the default output from pydantic by calling `to_dict()` of each item in changes (list)
76
- _items = []
77
- if self.changes:
78
- for _item_changes in self.changes:
79
- if _item_changes:
80
- _items.append(_item_changes.to_dict())
81
- _dict['changes'] = _items
82
- return _dict
83
-
84
- @classmethod
85
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
- """Create an instance of ContractChangePayload from a dict"""
87
- if obj is None:
88
- return None
89
-
90
- if not isinstance(obj, dict):
91
- return cls.model_validate(obj)
92
-
93
- _obj = cls.model_validate({
94
- "changes": [FieldChange.from_dict(_item) for _item in obj["changes"]] if obj.get("changes") is not None else None,
95
- "id": obj.get("id"),
96
- "org_id": obj.get("org_id"),
97
- "type": obj.get("type")
98
- })
99
- return _obj
100
-
101
-
@@ -1,101 +0,0 @@
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, StrictBool, StrictInt, StrictStr
21
- from typing import Any, ClassVar, Dict, List, Optional
22
- from ..models.contract_eligible_instance_fields import ContractEligibleInstanceFields
23
- from typing import Optional, Set
24
- from typing_extensions import Self
25
-
26
- class ContractEligibleInstancesResponse(BaseModel):
27
- """
28
- ContractEligibleInstancesResponse
29
- """ # noqa: E501
30
- instance_count: Optional[StrictInt] = None
31
- instances: Optional[List[ContractEligibleInstanceFields]] = None
32
- message: Optional[StrictStr] = None
33
- status: Optional[StrictBool] = None
34
- __properties: ClassVar[List[str]] = ["instance_count", "instances", "message", "status"]
35
-
36
- model_config = ConfigDict(
37
- populate_by_name=True,
38
- validate_assignment=True,
39
- protected_namespaces=(),
40
- )
41
-
42
-
43
- def to_str(self) -> str:
44
- """Returns the string representation of the model using alias"""
45
- return pprint.pformat(self.model_dump(by_alias=True))
46
-
47
- def to_json(self) -> str:
48
- """Returns the JSON representation of the model using alias"""
49
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
- return json.dumps(self.to_dict())
51
-
52
- @classmethod
53
- def from_json(cls, json_str: str) -> Optional[Self]:
54
- """Create an instance of ContractEligibleInstancesResponse from a JSON string"""
55
- return cls.from_dict(json.loads(json_str))
56
-
57
- def to_dict(self) -> Dict[str, Any]:
58
- """Return the dictionary representation of the model using alias.
59
-
60
- This has the following differences from calling pydantic's
61
- `self.model_dump(by_alias=True)`:
62
-
63
- * `None` is only added to the output dict for nullable fields that
64
- were set at model initialization. Other fields with value `None`
65
- are ignored.
66
- """
67
- excluded_fields: Set[str] = set([
68
- ])
69
-
70
- _dict = self.model_dump(
71
- by_alias=True,
72
- exclude=excluded_fields,
73
- exclude_none=True,
74
- )
75
- # override the default output from pydantic by calling `to_dict()` of each item in instances (list)
76
- _items = []
77
- if self.instances:
78
- for _item_instances in self.instances:
79
- if _item_instances:
80
- _items.append(_item_instances.to_dict())
81
- _dict['instances'] = _items
82
- return _dict
83
-
84
- @classmethod
85
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
- """Create an instance of ContractEligibleInstancesResponse from a dict"""
87
- if obj is None:
88
- return None
89
-
90
- if not isinstance(obj, dict):
91
- return cls.model_validate(obj)
92
-
93
- _obj = cls.model_validate({
94
- "instance_count": obj.get("instance_count"),
95
- "instances": [ContractEligibleInstanceFields.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None,
96
- "message": obj.get("message"),
97
- "status": obj.get("status")
98
- })
99
- return _obj
100
-
101
-
@@ -1,91 +0,0 @@
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, Field, StrictStr
21
- from typing import Any, ClassVar, Dict, List
22
- from typing import Optional, Set
23
- from typing_extensions import Self
24
-
25
- class ContractEventCreateModel(BaseModel):
26
- """
27
- ContractEventCreateModel
28
- """ # noqa: E501
29
- message: StrictStr = Field(description="Message for the event")
30
- reason: StrictStr = Field(description="Reason for the event")
31
- type: StrictStr = Field(description="Event type")
32
- __properties: ClassVar[List[str]] = ["message", "reason", "type"]
33
-
34
- model_config = ConfigDict(
35
- populate_by_name=True,
36
- validate_assignment=True,
37
- protected_namespaces=(),
38
- )
39
-
40
-
41
- def to_str(self) -> str:
42
- """Returns the string representation of the model using alias"""
43
- return pprint.pformat(self.model_dump(by_alias=True))
44
-
45
- def to_json(self) -> str:
46
- """Returns the JSON representation of the model using alias"""
47
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
- return json.dumps(self.to_dict())
49
-
50
- @classmethod
51
- def from_json(cls, json_str: str) -> Optional[Self]:
52
- """Create an instance of ContractEventCreateModel from a JSON string"""
53
- return cls.from_dict(json.loads(json_str))
54
-
55
- def to_dict(self) -> Dict[str, Any]:
56
- """Return the dictionary representation of the model using alias.
57
-
58
- This has the following differences from calling pydantic's
59
- `self.model_dump(by_alias=True)`:
60
-
61
- * `None` is only added to the output dict for nullable fields that
62
- were set at model initialization. Other fields with value `None`
63
- are ignored.
64
- """
65
- excluded_fields: Set[str] = set([
66
- ])
67
-
68
- _dict = self.model_dump(
69
- by_alias=True,
70
- exclude=excluded_fields,
71
- exclude_none=True,
72
- )
73
- return _dict
74
-
75
- @classmethod
76
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
- """Create an instance of ContractEventCreateModel from a dict"""
78
- if obj is None:
79
- return None
80
-
81
- if not isinstance(obj, dict):
82
- return cls.model_validate(obj)
83
-
84
- _obj = cls.model_validate({
85
- "message": obj.get("message"),
86
- "reason": obj.get("reason"),
87
- "type": obj.get("type")
88
- })
89
- return _obj
90
-
91
-
@@ -1,95 +0,0 @@
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, StrictFloat, StrictInt, StrictStr
21
- from typing import Any, ClassVar, Dict, List, Optional, Union
22
- from typing import Optional, Set
23
- from typing_extensions import Self
24
-
25
- class ContractResourcePayload(BaseModel):
26
- """
27
- ContractResourcePayload
28
- """ # noqa: E501
29
- discount_amount: Optional[Union[StrictFloat, StrictInt]] = None
30
- discount_percent: Optional[Union[StrictFloat, StrictInt]] = None
31
- discount_type: StrictStr
32
- resource_count: Optional[StrictInt] = None
33
- resource_id: StrictInt
34
- __properties: ClassVar[List[str]] = ["discount_amount", "discount_percent", "discount_type", "resource_count", "resource_id"]
35
-
36
- model_config = ConfigDict(
37
- populate_by_name=True,
38
- validate_assignment=True,
39
- protected_namespaces=(),
40
- )
41
-
42
-
43
- def to_str(self) -> str:
44
- """Returns the string representation of the model using alias"""
45
- return pprint.pformat(self.model_dump(by_alias=True))
46
-
47
- def to_json(self) -> str:
48
- """Returns the JSON representation of the model using alias"""
49
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
- return json.dumps(self.to_dict())
51
-
52
- @classmethod
53
- def from_json(cls, json_str: str) -> Optional[Self]:
54
- """Create an instance of ContractResourcePayload from a JSON string"""
55
- return cls.from_dict(json.loads(json_str))
56
-
57
- def to_dict(self) -> Dict[str, Any]:
58
- """Return the dictionary representation of the model using alias.
59
-
60
- This has the following differences from calling pydantic's
61
- `self.model_dump(by_alias=True)`:
62
-
63
- * `None` is only added to the output dict for nullable fields that
64
- were set at model initialization. Other fields with value `None`
65
- are ignored.
66
- """
67
- excluded_fields: Set[str] = set([
68
- ])
69
-
70
- _dict = self.model_dump(
71
- by_alias=True,
72
- exclude=excluded_fields,
73
- exclude_none=True,
74
- )
75
- return _dict
76
-
77
- @classmethod
78
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
79
- """Create an instance of ContractResourcePayload from a dict"""
80
- if obj is None:
81
- return None
82
-
83
- if not isinstance(obj, dict):
84
- return cls.model_validate(obj)
85
-
86
- _obj = cls.model_validate({
87
- "discount_amount": obj.get("discount_amount"),
88
- "discount_percent": obj.get("discount_percent"),
89
- "discount_type": obj.get("discount_type"),
90
- "resource_count": obj.get("resource_count"),
91
- "resource_id": obj.get("resource_id")
92
- })
93
- return _obj
94
-
95
-