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.
- hyperstack/__init__.py +79 -131
- hyperstack/api/__init__.py +2 -0
- hyperstack/api/alive_api.py +240 -0
- hyperstack/api/api_key_api.py +16 -20
- hyperstack/api/assigning_member_role_api.py +15 -17
- hyperstack/api/auth_api.py +1050 -5
- hyperstack/api/beta_access_api.py +856 -0
- hyperstack/api/billing_api.py +6461 -673
- hyperstack/api/calculate_api.py +8 -9
- hyperstack/api/callbacks_api.py +120 -126
- hyperstack/api/cluster_events_api.py +1 -2
- hyperstack/api/clusters_api.py +2492 -146
- hyperstack/api/compliance_api.py +14 -18
- hyperstack/api/credit_api.py +17 -15
- hyperstack/api/customer_contract_api.py +30 -33
- hyperstack/api/dashboard_api.py +4 -5
- hyperstack/api/deployment_api.py +4 -8
- hyperstack/api/environment_api.py +285 -16
- hyperstack/api/firewall_attachment_api.py +11 -9
- hyperstack/api/firewalls_api.py +341 -347
- hyperstack/api/flavor_api.py +4 -5
- hyperstack/api/floating_ip_api.py +50 -49
- hyperstack/api/gpu_api.py +1 -2
- hyperstack/api/image_api.py +35 -39
- hyperstack/api/invite_api.py +288 -18
- hyperstack/api/keypair_api.py +22 -26
- hyperstack/api/organization_api.py +12 -15
- hyperstack/api/partner_config_api.py +564 -0
- hyperstack/api/payment_api.py +299 -18
- hyperstack/api/permission_api.py +4 -5
- hyperstack/api/policy_api.py +4 -5
- hyperstack/api/pricebook_api.py +14 -12
- hyperstack/api/profile_api.py +13 -17
- hyperstack/api/rbac_role_api.py +20 -25
- hyperstack/api/region_api.py +7 -8
- hyperstack/api/security_rules_api.py +1 -2
- hyperstack/api/snapshot_events_api.py +1 -2
- hyperstack/api/snapshots_api.py +166 -172
- hyperstack/api/stock_api.py +4 -5
- hyperstack/api/template_api.py +14 -19
- hyperstack/api/user_api.py +55 -49
- hyperstack/api/user_detail_choice_api.py +1 -2
- hyperstack/api/user_permission_api.py +8 -10
- hyperstack/api/virtual_machine_api.py +1529 -929
- hyperstack/api/virtual_machine_events_api.py +21 -22
- hyperstack/api/vnc_url_api.py +54 -50
- hyperstack/api/volume_api.py +340 -40
- hyperstack/api/volume_attachment_api.py +342 -42
- hyperstack/api_client.py +1 -1
- hyperstack/configuration.py +154 -47
- hyperstack/models/__init__.py +76 -130
- hyperstack/models/{environment_fieldsfor_volume.py → access_token_field.py} +7 -7
- hyperstack/models/attach_volume_fields.py +6 -2
- hyperstack/models/attach_volumes_payload.py +4 -2
- hyperstack/models/{virtual_machine_usage.py → attachments_fields_for_volume.py} +13 -11
- hyperstack/models/{flavor_vm_fields.py → attributes.py} +15 -18
- hyperstack/models/auth_get_token_response_model.py +4 -6
- hyperstack/models/{future_node_model.py → beta_access_request_fields.py} +27 -25
- hyperstack/models/{create_gpu.py → beta_access_request_payload.py} +9 -11
- hyperstack/models/{create_discount_response.py → beta_access_request_response_model.py} +11 -11
- hyperstack/models/{export_billing_data_request.py → beta_access_status_item.py} +20 -23
- hyperstack/models/{get_all_discount_for_all_organization_response.py → beta_access_status_response_model.py} +15 -15
- hyperstack/models/{exclude_billing_post_response.py → billing_history.py} +13 -11
- hyperstack/models/billing_history_data_synthesis_details.py +105 -0
- hyperstack/models/{vm_usage_response.py → billing_history_fine_tuning.py} +23 -19
- hyperstack/models/billing_history_model_evalutation_details.py +105 -0
- hyperstack/models/{get_all_discounts_fields.py → billing_history_serverless_inference.py} +23 -24
- hyperstack/models/billing_history_serverless_inference_details.py +105 -0
- hyperstack/models/{billingmetricesfields.py → billing_metrices_fields.py} +4 -4
- hyperstack/models/{billingmetricesresponse.py → billing_metrices_response.py} +7 -7
- hyperstack/models/cluster_fields.py +27 -9
- hyperstack/models/{add_update_flavor_organization_payload.py → cluster_flavor_fields.py} +28 -26
- hyperstack/models/{historical_instances_fields.py → cluster_node_fields.py} +24 -22
- hyperstack/models/{internal_instance_flavor_fields.py → cluster_node_group_fields.py} +17 -17
- hyperstack/models/{create_update_policy_response_model.py → cluster_node_groups_create_response.py} +21 -11
- hyperstack/models/{create_update_permission_response_model.py → cluster_node_groups_get_response.py} +11 -11
- hyperstack/models/{auth_request_login_response_model.py → cluster_node_groups_list_response.py} +15 -11
- hyperstack/models/{contract_eligible_instance_fields.py → cluster_node_instance_fields.py} +13 -11
- hyperstack/models/{image_logos.py → cluster_nodes_list_response.py} +14 -14
- hyperstack/models/{internal_environment_fields.py → cluster_version.py} +13 -9
- hyperstack/models/cluster_versions.py +10 -2
- hyperstack/models/{future_nodes_stock_model.py → colors.py} +17 -15
- hyperstack/models/contract_discount_plan_fields.py +3 -1
- hyperstack/models/contract_instance_fields.py +7 -1
- hyperstack/models/{future_node_response_model.py → create_cluster_node_fields.py} +23 -18
- hyperstack/models/{update_gpu.py → create_cluster_node_group_payload.py} +12 -11
- hyperstack/models/create_cluster_payload.py +31 -8
- hyperstack/models/create_environment.py +1 -1
- hyperstack/models/create_instances_payload.py +10 -8
- hyperstack/models/create_profile_payload.py +1 -1
- hyperstack/models/create_snapshot_payload.py +2 -4
- hyperstack/models/create_volume_payload.py +1 -1
- hyperstack/models/data_synthesis_billing_history_details_response_schema.py +95 -0
- hyperstack/models/{deployment_fieldsforstartdeployments.py → deployment_fields_for_start_deployments.py} +4 -4
- hyperstack/models/{editlabelofanexisting_vm_payload.py → edit_label_of_an_existing_vm_payload.py} +4 -4
- hyperstack/models/environment_features.py +14 -2
- hyperstack/models/{node_stocks_payload.py → environment_fields_for_volume.py} +10 -12
- hyperstack/models/flavor_fields.py +3 -1
- hyperstack/models/{customer_fields.py → flavor_label_fields.py} +7 -7
- hyperstack/models/{getcreditandthresholdinfo.py → get_credit_and_threshold_info.py} +4 -4
- hyperstack/models/{getcreditandthresholdinfoinresponse.py → get_credit_and_threshold_info_in_response.py} +7 -7
- hyperstack/models/{region_payload.py → get_instance_logs_response.py} +7 -9
- hyperstack/models/instance_fields.py +14 -4
- hyperstack/models/instance_flavor_fields.py +13 -1
- hyperstack/models/{flavor_response.py → keypair_environment_features.py} +20 -16
- hyperstack/models/{internal_instance_keypair_fields.py → keypair_environment_fields.py} +13 -11
- hyperstack/models/keypair_fields.py +6 -2
- hyperstack/models/{lastdaycostfields.py → last_day_cost_fields.py} +4 -4
- hyperstack/models/{lastdaycostresponse.py → last_day_cost_response.py} +7 -7
- hyperstack/models/{export_billing_data_response.py → logos.py} +13 -9
- hyperstack/models/{creditrequestresponse.py → master_flavors_response.py} +14 -14
- hyperstack/models/{customer_payload.py → mfa_status_fields.py} +8 -10
- hyperstack/models/{gpu.py → mfa_status_response.py} +11 -11
- hyperstack/models/model_evaluation_billing_history_details_response_schema.py +95 -0
- hyperstack/models/{organization_thresholdfields.py → organization_threshold_fields.py} +4 -4
- hyperstack/models/{organizationthresholdupdateresponse.py → organization_threshold_update_response.py} +7 -7
- hyperstack/models/{organizationthresholdsresponse.py → organization_thresholds_response.py} +7 -7
- hyperstack/models/{logo_get_response.py → pagination.py} +12 -12
- hyperstack/models/{billing_response.py → partner_config.py} +31 -20
- hyperstack/models/payment_details_fields.py +5 -1
- hyperstack/models/{logout_payload.py → primary_color.py} +10 -8
- hyperstack/models/region_fields.py +16 -2
- hyperstack/models/{vm_usage_request_payload.py → request_instance_logs_payload.py} +8 -8
- hyperstack/models/{stock_visibility_user_payload.py → request_instance_logs_response.py} +8 -8
- hyperstack/models/{contract_billing_history.py → resource_level_billing_bucket_details_resources.py} +10 -10
- hyperstack/models/{node_response_model.py → resource_level_billing_history_resources_cluster.py} +21 -11
- hyperstack/models/resource_level_billing_history_response_attributes.py +3 -1
- hyperstack/models/{get_all_contracts_response_model.py → resource_level_bucket_billing_details_response_model.py} +11 -15
- hyperstack/models/{contract_billing_history_response_model.py → resource_level_bucket_billing_history_response_model.py} +11 -11
- hyperstack/models/resource_level_cluster_billing_details_response_model.py +95 -0
- hyperstack/models/resource_level_cluster_billing_history_response_model.py +95 -0
- hyperstack/models/{get_discount_detail_response.py → resource_level_cluster_graph_billing_details_response_model.py} +11 -11
- hyperstack/models/{organization_object_response.py → resource_level_graph_billing_details_bucket.py} +18 -14
- hyperstack/models/{update_discounts_status_payload.py → secondary_color.py} +10 -8
- hyperstack/models/{security_rules_fieldsfor_instance.py → security_rules_fields_for_instance.py} +4 -4
- hyperstack/models/serverless_inferenced_billing_history_details_response_schema.py +95 -0
- hyperstack/models/snapshot_fields.py +6 -1
- hyperstack/models/snapshot_retrieve_fields.py +29 -2
- hyperstack/models/start_deployment.py +3 -3
- hyperstack/models/{subscribeorunsubscribeupdatepayload.py → subscribe_or_unsubscribe_update_payload.py} +4 -4
- hyperstack/models/token_based_billing_history_response.py +95 -0
- hyperstack/models/{update_keypairnameresponse.py → update_keypair_name_response.py} +4 -4
- hyperstack/models/update_volume_attachment_payload.py +87 -0
- hyperstack/models/{verify_api_key_payload.py → update_volume_payload.py} +7 -7
- hyperstack/models/{stock_visibility_user_list_response.py → update_volume_response.py} +14 -16
- hyperstack/models/{auth_request_login_fields.py → uris.py} +19 -9
- hyperstack/models/{userinfopostpayload.py → user_info_post_payload.py} +4 -4
- hyperstack/models/{node_stock_response_model.py → user_organizations_response.py} +14 -14
- hyperstack/models/users_info_fields.py +3 -1
- hyperstack/models/volume_attachment_fields.py +9 -5
- hyperstack/models/volume_fields.py +14 -4
- hyperstack/models/{volume_fieldsfor_instance.py → volume_fields_for_instance.py} +4 -4
- hyperstack/models/volumes.py +17 -11
- hyperstack/models/{instances_summary_fields.py → volumes_fields.py} +33 -29
- hyperstack/models/workload_billing_history_response.py +95 -0
- {hyperstack-0.1.23.dist-info → hyperstack-1.41.0a0.dist-info}/METADATA +9 -2
- hyperstack-1.41.0a0.dist-info/RECORD +349 -0
- {hyperstack-0.1.23.dist-info → hyperstack-1.41.0a0.dist-info}/WHEEL +1 -1
- hyperstack/models/api_key_verify_fields.py +0 -93
- hyperstack/models/billing_immune_resources_response.py +0 -95
- hyperstack/models/contract_billing_history_response_attributes.py +0 -99
- hyperstack/models/contract_change_payload.py +0 -101
- hyperstack/models/contract_eligible_instances_response.py +0 -101
- hyperstack/models/contract_event_create_model.py +0 -91
- hyperstack/models/contract_resource_payload.py +0 -95
- hyperstack/models/contractl_billing_history_response_metrics.py +0 -87
- hyperstack/models/create_contract_fields.py +0 -110
- hyperstack/models/create_contract_payload.py +0 -106
- hyperstack/models/create_discounts_payload.py +0 -112
- hyperstack/models/create_update_permission_payload.py +0 -93
- hyperstack/models/create_update_policy_payload.py +0 -93
- hyperstack/models/creditrechargelimitfield.py +0 -93
- hyperstack/models/creditrechargelimitresponse.py +0 -99
- hyperstack/models/creditrequests.py +0 -96
- hyperstack/models/data.py +0 -91
- hyperstack/models/discount_entity_model.py +0 -97
- hyperstack/models/discount_fields.py +0 -100
- hyperstack/models/discount_plan_fields.py +0 -108
- hyperstack/models/discount_resource_fields.py +0 -93
- hyperstack/models/discount_resource_payload.py +0 -93
- hyperstack/models/exclude_billing_post_payload.py +0 -91
- hyperstack/models/field_change.py +0 -91
- hyperstack/models/flavor_payload.py +0 -101
- hyperstack/models/flavor_vms_response.py +0 -99
- hyperstack/models/future_node_stock_model.py +0 -93
- hyperstack/models/future_node_update_model.py +0 -98
- hyperstack/models/get_all_contract_fields.py +0 -100
- hyperstack/models/get_discount_response.py +0 -99
- hyperstack/models/get_entity_discount_detail_response.py +0 -108
- hyperstack/models/get_token_payload.py +0 -89
- hyperstack/models/get_version_response.py +0 -91
- hyperstack/models/historical_instance.py +0 -101
- hyperstack/models/infrahub_resource_object_response.py +0 -119
- hyperstack/models/insert_discount_plan_fields.py +0 -112
- hyperstack/models/internal_instance_fields.py +0 -156
- hyperstack/models/internal_instance_image_fields.py +0 -95
- hyperstack/models/internal_instances_response.py +0 -99
- hyperstack/models/internal_security_rules_fields_for_instance.py +0 -104
- hyperstack/models/internal_volume_attachment_fields.py +0 -98
- hyperstack/models/internal_volume_fields.py +0 -95
- hyperstack/models/internal_volumes_response.py +0 -99
- hyperstack/models/new_stock_update_response_model.py +0 -89
- hyperstack/models/node_model.py +0 -114
- hyperstack/models/node_payload_model.py +0 -97
- hyperstack/models/node_power_usage_model.py +0 -120
- hyperstack/models/node_stock_payload_model.py +0 -95
- hyperstack/models/organizationcreditrechargelimitresponse.py +0 -95
- hyperstack/models/power_usage_model.py +0 -89
- hyperstack/models/pricebook_resource_object_response.py +0 -107
- hyperstack/models/refresh_token_payload.py +0 -89
- hyperstack/models/region_response.py +0 -95
- hyperstack/models/set_defaults_payload.py +0 -89
- hyperstack/models/single_visibility_user_response.py +0 -91
- hyperstack/models/success_response_model.py +0 -89
- hyperstack/models/token_fields.py +0 -91
- hyperstack/models/update_contract_payload.py +0 -104
- hyperstack/models/update_discounts_payload.py +0 -102
- hyperstack/models/user_transfer_payload.py +0 -89
- hyperstack/models/verify_api_key_response_model.py +0 -95
- hyperstack/models/volume_status_change_fields.py +0 -96
- hyperstack/models/volumes_last_status_change_response.py +0 -99
- hyperstack/models/warning_mail_log_fields.py +0 -99
- hyperstack/models/warning_mail_log_response.py +0 -101
- hyperstack-0.1.23.dist-info/RECORD +0 -401
- {hyperstack-0.1.23.dist-info → hyperstack-1.41.0a0.dist-info}/top_level.txt +0 -0
|
@@ -22,9 +22,9 @@ from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
|
-
class
|
|
25
|
+
class GetCreditAndThresholdInfo(BaseModel):
|
|
26
26
|
"""
|
|
27
|
-
|
|
27
|
+
GetCreditAndThresholdInfo
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
can_create_instance: Optional[StrictBool] = None
|
|
30
30
|
credit: Optional[Union[StrictFloat, StrictInt]] = None
|
|
@@ -49,7 +49,7 @@ class Getcreditandthresholdinfo(BaseModel):
|
|
|
49
49
|
|
|
50
50
|
@classmethod
|
|
51
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
-
"""Create an instance of
|
|
52
|
+
"""Create an instance of GetCreditAndThresholdInfo from a JSON string"""
|
|
53
53
|
return cls.from_dict(json.loads(json_str))
|
|
54
54
|
|
|
55
55
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -74,7 +74,7 @@ class Getcreditandthresholdinfo(BaseModel):
|
|
|
74
74
|
|
|
75
75
|
@classmethod
|
|
76
76
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
-
"""Create an instance of
|
|
77
|
+
"""Create an instance of GetCreditAndThresholdInfo from a dict"""
|
|
78
78
|
if obj is None:
|
|
79
79
|
return None
|
|
80
80
|
|
|
@@ -19,15 +19,15 @@ 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.
|
|
22
|
+
from ..models.get_credit_and_threshold_info import GetCreditAndThresholdInfo
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class GetCreditAndThresholdInfoInResponse(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
GetCreditAndThresholdInfoInResponse
|
|
29
29
|
""" # noqa: E501
|
|
30
|
-
data: Optional[
|
|
30
|
+
data: Optional[GetCreditAndThresholdInfo] = None
|
|
31
31
|
message: Optional[StrictStr] = None
|
|
32
32
|
status: Optional[StrictBool] = None
|
|
33
33
|
__properties: ClassVar[List[str]] = ["data", "message", "status"]
|
|
@@ -50,7 +50,7 @@ class Getcreditandthresholdinfoinresponse(BaseModel):
|
|
|
50
50
|
|
|
51
51
|
@classmethod
|
|
52
52
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
-
"""Create an instance of
|
|
53
|
+
"""Create an instance of GetCreditAndThresholdInfoInResponse 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]:
|
|
@@ -78,7 +78,7 @@ class Getcreditandthresholdinfoinresponse(BaseModel):
|
|
|
78
78
|
|
|
79
79
|
@classmethod
|
|
80
80
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
81
|
-
"""Create an instance of
|
|
81
|
+
"""Create an instance of GetCreditAndThresholdInfoInResponse from a dict"""
|
|
82
82
|
if obj is None:
|
|
83
83
|
return None
|
|
84
84
|
|
|
@@ -86,7 +86,7 @@ class Getcreditandthresholdinfoinresponse(BaseModel):
|
|
|
86
86
|
return cls.model_validate(obj)
|
|
87
87
|
|
|
88
88
|
_obj = cls.model_validate({
|
|
89
|
-
"data":
|
|
89
|
+
"data": GetCreditAndThresholdInfo.from_dict(obj["data"]) if obj.get("data") is not None else None,
|
|
90
90
|
"message": obj.get("message"),
|
|
91
91
|
"status": obj.get("status")
|
|
92
92
|
})
|
|
@@ -22,13 +22,12 @@ 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
|
|
25
|
+
class GetInstanceLogsResponse(BaseModel):
|
|
26
26
|
"""
|
|
27
|
-
|
|
27
|
+
GetInstanceLogsResponse
|
|
28
28
|
""" # noqa: E501
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
__properties: ClassVar[List[str]] = ["description", "name"]
|
|
29
|
+
logs: Optional[StrictStr] = None
|
|
30
|
+
__properties: ClassVar[List[str]] = ["logs"]
|
|
32
31
|
|
|
33
32
|
model_config = ConfigDict(
|
|
34
33
|
populate_by_name=True,
|
|
@@ -48,7 +47,7 @@ class RegionPayload(BaseModel):
|
|
|
48
47
|
|
|
49
48
|
@classmethod
|
|
50
49
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
-
"""Create an instance of
|
|
50
|
+
"""Create an instance of GetInstanceLogsResponse from a JSON string"""
|
|
52
51
|
return cls.from_dict(json.loads(json_str))
|
|
53
52
|
|
|
54
53
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -73,7 +72,7 @@ class RegionPayload(BaseModel):
|
|
|
73
72
|
|
|
74
73
|
@classmethod
|
|
75
74
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
-
"""Create an instance of
|
|
75
|
+
"""Create an instance of GetInstanceLogsResponse from a dict"""
|
|
77
76
|
if obj is None:
|
|
78
77
|
return None
|
|
79
78
|
|
|
@@ -81,8 +80,7 @@ class RegionPayload(BaseModel):
|
|
|
81
80
|
return cls.model_validate(obj)
|
|
82
81
|
|
|
83
82
|
_obj = cls.model_validate({
|
|
84
|
-
"
|
|
85
|
-
"name": obj.get("name")
|
|
83
|
+
"logs": obj.get("logs")
|
|
86
84
|
})
|
|
87
85
|
return _obj
|
|
88
86
|
|
|
@@ -24,7 +24,7 @@ from ..models.instance_environment_fields import InstanceEnvironmentFields
|
|
|
24
24
|
from ..models.instance_flavor_fields import InstanceFlavorFields
|
|
25
25
|
from ..models.instance_image_fields import InstanceImageFields
|
|
26
26
|
from ..models.instance_keypair_fields import InstanceKeypairFields
|
|
27
|
-
from ..models.
|
|
27
|
+
from ..models.security_rules_fields_for_instance import SecurityRulesFieldsForInstance
|
|
28
28
|
from ..models.volume_attachment_fields import VolumeAttachmentFields
|
|
29
29
|
from typing import Optional, Set
|
|
30
30
|
from typing_extensions import Self
|
|
@@ -33,9 +33,11 @@ class InstanceFields(BaseModel):
|
|
|
33
33
|
"""
|
|
34
34
|
InstanceFields
|
|
35
35
|
""" # noqa: E501
|
|
36
|
+
callback_url: Optional[StrictStr] = None
|
|
36
37
|
contract_id: Optional[StrictInt] = None
|
|
37
38
|
created_at: Optional[datetime] = None
|
|
38
39
|
environment: Optional[InstanceEnvironmentFields] = None
|
|
40
|
+
features: Optional[Dict[str, Any]] = None
|
|
39
41
|
fixed_ip: Optional[StrictStr] = None
|
|
40
42
|
flavor: Optional[InstanceFlavorFields] = None
|
|
41
43
|
floating_ip: Optional[StrictStr] = None
|
|
@@ -47,12 +49,15 @@ class InstanceFields(BaseModel):
|
|
|
47
49
|
locked: Optional[StrictBool] = None
|
|
48
50
|
name: Optional[StrictStr] = None
|
|
49
51
|
os: Optional[StrictStr] = None
|
|
52
|
+
port_randomization: Optional[StrictBool] = None
|
|
53
|
+
port_randomization_status: Optional[StrictStr] = None
|
|
50
54
|
power_state: Optional[StrictStr] = None
|
|
51
|
-
|
|
55
|
+
requires_public_ip: Optional[StrictBool] = None
|
|
56
|
+
security_rules: Optional[List[SecurityRulesFieldsForInstance]] = None
|
|
52
57
|
status: Optional[StrictStr] = None
|
|
53
58
|
vm_state: Optional[StrictStr] = None
|
|
54
59
|
volume_attachments: Optional[List[VolumeAttachmentFields]] = None
|
|
55
|
-
__properties: ClassVar[List[str]] = ["contract_id", "created_at", "environment", "fixed_ip", "flavor", "floating_ip", "floating_ip_status", "id", "image", "keypair", "labels", "locked", "name", "os", "power_state", "security_rules", "status", "vm_state", "volume_attachments"]
|
|
60
|
+
__properties: ClassVar[List[str]] = ["callback_url", "contract_id", "created_at", "environment", "features", "fixed_ip", "flavor", "floating_ip", "floating_ip_status", "id", "image", "keypair", "labels", "locked", "name", "os", "port_randomization", "port_randomization_status", "power_state", "requires_public_ip", "security_rules", "status", "vm_state", "volume_attachments"]
|
|
56
61
|
|
|
57
62
|
model_config = ConfigDict(
|
|
58
63
|
populate_by_name=True,
|
|
@@ -131,9 +136,11 @@ class InstanceFields(BaseModel):
|
|
|
131
136
|
return cls.model_validate(obj)
|
|
132
137
|
|
|
133
138
|
_obj = cls.model_validate({
|
|
139
|
+
"callback_url": obj.get("callback_url"),
|
|
134
140
|
"contract_id": obj.get("contract_id"),
|
|
135
141
|
"created_at": obj.get("created_at"),
|
|
136
142
|
"environment": InstanceEnvironmentFields.from_dict(obj["environment"]) if obj.get("environment") is not None else None,
|
|
143
|
+
"features": obj.get("features"),
|
|
137
144
|
"fixed_ip": obj.get("fixed_ip"),
|
|
138
145
|
"flavor": InstanceFlavorFields.from_dict(obj["flavor"]) if obj.get("flavor") is not None else None,
|
|
139
146
|
"floating_ip": obj.get("floating_ip"),
|
|
@@ -145,8 +152,11 @@ class InstanceFields(BaseModel):
|
|
|
145
152
|
"locked": obj.get("locked"),
|
|
146
153
|
"name": obj.get("name"),
|
|
147
154
|
"os": obj.get("os"),
|
|
155
|
+
"port_randomization": obj.get("port_randomization"),
|
|
156
|
+
"port_randomization_status": obj.get("port_randomization_status"),
|
|
148
157
|
"power_state": obj.get("power_state"),
|
|
149
|
-
"
|
|
158
|
+
"requires_public_ip": obj.get("requires_public_ip"),
|
|
159
|
+
"security_rules": [SecurityRulesFieldsForInstance.from_dict(_item) for _item in obj["security_rules"]] if obj.get("security_rules") is not None else None,
|
|
150
160
|
"status": obj.get("status"),
|
|
151
161
|
"vm_state": obj.get("vm_state"),
|
|
152
162
|
"volume_attachments": [VolumeAttachmentFields.from_dict(_item) for _item in obj["volume_attachments"]] if obj.get("volume_attachments") is not None else None
|
|
@@ -19,6 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
22
|
+
from ..models.flavor_label_fields import FlavorLabelFields
|
|
22
23
|
from typing import Optional, Set
|
|
23
24
|
from typing_extensions import Self
|
|
24
25
|
|
|
@@ -29,12 +30,14 @@ class InstanceFlavorFields(BaseModel):
|
|
|
29
30
|
cpu: Optional[StrictInt] = None
|
|
30
31
|
disk: Optional[StrictInt] = None
|
|
31
32
|
ephemeral: Optional[StrictInt] = None
|
|
33
|
+
features: Optional[Dict[str, Any]] = None
|
|
32
34
|
gpu: Optional[StrictStr] = None
|
|
33
35
|
gpu_count: Optional[StrictInt] = None
|
|
34
36
|
id: Optional[StrictInt] = None
|
|
37
|
+
labels: Optional[List[FlavorLabelFields]] = None
|
|
35
38
|
name: Optional[StrictStr] = None
|
|
36
39
|
ram: Optional[Union[StrictFloat, StrictInt]] = None
|
|
37
|
-
__properties: ClassVar[List[str]] = ["cpu", "disk", "ephemeral", "gpu", "gpu_count", "id", "name", "ram"]
|
|
40
|
+
__properties: ClassVar[List[str]] = ["cpu", "disk", "ephemeral", "features", "gpu", "gpu_count", "id", "labels", "name", "ram"]
|
|
38
41
|
|
|
39
42
|
model_config = ConfigDict(
|
|
40
43
|
populate_by_name=True,
|
|
@@ -75,6 +78,13 @@ class InstanceFlavorFields(BaseModel):
|
|
|
75
78
|
exclude=excluded_fields,
|
|
76
79
|
exclude_none=True,
|
|
77
80
|
)
|
|
81
|
+
# override the default output from pydantic by calling `to_dict()` of each item in labels (list)
|
|
82
|
+
_items = []
|
|
83
|
+
if self.labels:
|
|
84
|
+
for _item_labels in self.labels:
|
|
85
|
+
if _item_labels:
|
|
86
|
+
_items.append(_item_labels.to_dict())
|
|
87
|
+
_dict['labels'] = _items
|
|
78
88
|
return _dict
|
|
79
89
|
|
|
80
90
|
@classmethod
|
|
@@ -90,9 +100,11 @@ class InstanceFlavorFields(BaseModel):
|
|
|
90
100
|
"cpu": obj.get("cpu"),
|
|
91
101
|
"disk": obj.get("disk"),
|
|
92
102
|
"ephemeral": obj.get("ephemeral"),
|
|
103
|
+
"features": obj.get("features"),
|
|
93
104
|
"gpu": obj.get("gpu"),
|
|
94
105
|
"gpu_count": obj.get("gpu_count"),
|
|
95
106
|
"id": obj.get("id"),
|
|
107
|
+
"labels": [FlavorLabelFields.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None,
|
|
96
108
|
"name": obj.get("name"),
|
|
97
109
|
"ram": obj.get("ram")
|
|
98
110
|
})
|
|
@@ -17,20 +17,28 @@ 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, StrictBool, StrictStr, field_validator
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from ..models.flavor_fields import FlavorFields
|
|
23
22
|
from typing import Optional, Set
|
|
24
23
|
from typing_extensions import Self
|
|
25
24
|
|
|
26
|
-
class
|
|
25
|
+
class KeypairEnvironmentFeatures(BaseModel):
|
|
27
26
|
"""
|
|
28
|
-
|
|
27
|
+
KeypairEnvironmentFeatures
|
|
29
28
|
""" # noqa: E501
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
green_status: Optional[StrictStr] = None
|
|
30
|
+
network_optimised: Optional[StrictBool] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["green_status", "network_optimised"]
|
|
32
|
+
|
|
33
|
+
@field_validator('green_status')
|
|
34
|
+
def green_status_validate_enum(cls, value):
|
|
35
|
+
"""Validates the enum"""
|
|
36
|
+
if value is None:
|
|
37
|
+
return value
|
|
38
|
+
|
|
39
|
+
if value not in set(['GREEN', 'PARTIALLY_GREEN', 'NOT_GREEN']):
|
|
40
|
+
raise ValueError("must be one of enum values ('GREEN', 'PARTIALLY_GREEN', 'NOT_GREEN')")
|
|
41
|
+
return value
|
|
34
42
|
|
|
35
43
|
model_config = ConfigDict(
|
|
36
44
|
populate_by_name=True,
|
|
@@ -50,7 +58,7 @@ class FlavorResponse(BaseModel):
|
|
|
50
58
|
|
|
51
59
|
@classmethod
|
|
52
60
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
-
"""Create an instance of
|
|
61
|
+
"""Create an instance of KeypairEnvironmentFeatures from a JSON string"""
|
|
54
62
|
return cls.from_dict(json.loads(json_str))
|
|
55
63
|
|
|
56
64
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -71,14 +79,11 @@ class FlavorResponse(BaseModel):
|
|
|
71
79
|
exclude=excluded_fields,
|
|
72
80
|
exclude_none=True,
|
|
73
81
|
)
|
|
74
|
-
# override the default output from pydantic by calling `to_dict()` of flavor
|
|
75
|
-
if self.flavor:
|
|
76
|
-
_dict['flavor'] = self.flavor.to_dict()
|
|
77
82
|
return _dict
|
|
78
83
|
|
|
79
84
|
@classmethod
|
|
80
85
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
81
|
-
"""Create an instance of
|
|
86
|
+
"""Create an instance of KeypairEnvironmentFeatures from a dict"""
|
|
82
87
|
if obj is None:
|
|
83
88
|
return None
|
|
84
89
|
|
|
@@ -86,9 +91,8 @@ class FlavorResponse(BaseModel):
|
|
|
86
91
|
return cls.model_validate(obj)
|
|
87
92
|
|
|
88
93
|
_obj = cls.model_validate({
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"status": obj.get("status")
|
|
94
|
+
"green_status": obj.get("green_status"),
|
|
95
|
+
"network_optimised": obj.get("network_optimised")
|
|
92
96
|
})
|
|
93
97
|
return _obj
|
|
94
98
|
|
|
@@ -20,20 +20,20 @@ import json
|
|
|
20
20
|
from datetime import datetime
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from ..models.keypair_environment_features import KeypairEnvironmentFeatures
|
|
23
24
|
from typing import Optional, Set
|
|
24
25
|
from typing_extensions import Self
|
|
25
26
|
|
|
26
|
-
class
|
|
27
|
+
class KeypairEnvironmentFields(BaseModel):
|
|
27
28
|
"""
|
|
28
|
-
|
|
29
|
+
KeypairEnvironmentFields
|
|
29
30
|
""" # noqa: E501
|
|
30
31
|
created_at: Optional[datetime] = None
|
|
31
|
-
|
|
32
|
-
fingerprint: Optional[StrictStr] = None
|
|
32
|
+
features: Optional[KeypairEnvironmentFeatures] = None
|
|
33
33
|
id: Optional[StrictInt] = None
|
|
34
34
|
name: Optional[StrictStr] = None
|
|
35
|
-
|
|
36
|
-
__properties: ClassVar[List[str]] = ["created_at", "
|
|
35
|
+
region: Optional[StrictStr] = None
|
|
36
|
+
__properties: ClassVar[List[str]] = ["created_at", "features", "id", "name", "region"]
|
|
37
37
|
|
|
38
38
|
model_config = ConfigDict(
|
|
39
39
|
populate_by_name=True,
|
|
@@ -53,7 +53,7 @@ class InternalInstanceKeypairFields(BaseModel):
|
|
|
53
53
|
|
|
54
54
|
@classmethod
|
|
55
55
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
-
"""Create an instance of
|
|
56
|
+
"""Create an instance of KeypairEnvironmentFields from a JSON string"""
|
|
57
57
|
return cls.from_dict(json.loads(json_str))
|
|
58
58
|
|
|
59
59
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -74,11 +74,14 @@ class InternalInstanceKeypairFields(BaseModel):
|
|
|
74
74
|
exclude=excluded_fields,
|
|
75
75
|
exclude_none=True,
|
|
76
76
|
)
|
|
77
|
+
# override the default output from pydantic by calling `to_dict()` of features
|
|
78
|
+
if self.features:
|
|
79
|
+
_dict['features'] = self.features.to_dict()
|
|
77
80
|
return _dict
|
|
78
81
|
|
|
79
82
|
@classmethod
|
|
80
83
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
81
|
-
"""Create an instance of
|
|
84
|
+
"""Create an instance of KeypairEnvironmentFields from a dict"""
|
|
82
85
|
if obj is None:
|
|
83
86
|
return None
|
|
84
87
|
|
|
@@ -87,11 +90,10 @@ class InternalInstanceKeypairFields(BaseModel):
|
|
|
87
90
|
|
|
88
91
|
_obj = cls.model_validate({
|
|
89
92
|
"created_at": obj.get("created_at"),
|
|
90
|
-
"
|
|
91
|
-
"fingerprint": obj.get("fingerprint"),
|
|
93
|
+
"features": KeypairEnvironmentFeatures.from_dict(obj["features"]) if obj.get("features") is not None else None,
|
|
92
94
|
"id": obj.get("id"),
|
|
93
95
|
"name": obj.get("name"),
|
|
94
|
-
"
|
|
96
|
+
"region": obj.get("region")
|
|
95
97
|
})
|
|
96
98
|
return _obj
|
|
97
99
|
|
|
@@ -20,6 +20,7 @@ import json
|
|
|
20
20
|
from datetime import datetime
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from ..models.keypair_environment_fields import KeypairEnvironmentFields
|
|
23
24
|
from typing import Optional, Set
|
|
24
25
|
from typing_extensions import Self
|
|
25
26
|
|
|
@@ -28,7 +29,7 @@ class KeypairFields(BaseModel):
|
|
|
28
29
|
KeypairFields
|
|
29
30
|
""" # noqa: E501
|
|
30
31
|
created_at: Optional[datetime] = None
|
|
31
|
-
environment: Optional[
|
|
32
|
+
environment: Optional[KeypairEnvironmentFields] = None
|
|
32
33
|
fingerprint: Optional[StrictStr] = None
|
|
33
34
|
id: Optional[StrictInt] = None
|
|
34
35
|
name: Optional[StrictStr] = None
|
|
@@ -74,6 +75,9 @@ class KeypairFields(BaseModel):
|
|
|
74
75
|
exclude=excluded_fields,
|
|
75
76
|
exclude_none=True,
|
|
76
77
|
)
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of environment
|
|
79
|
+
if self.environment:
|
|
80
|
+
_dict['environment'] = self.environment.to_dict()
|
|
77
81
|
return _dict
|
|
78
82
|
|
|
79
83
|
@classmethod
|
|
@@ -87,7 +91,7 @@ class KeypairFields(BaseModel):
|
|
|
87
91
|
|
|
88
92
|
_obj = cls.model_validate({
|
|
89
93
|
"created_at": obj.get("created_at"),
|
|
90
|
-
"environment": obj.get("environment"),
|
|
94
|
+
"environment": KeypairEnvironmentFields.from_dict(obj["environment"]) if obj.get("environment") is not None else None,
|
|
91
95
|
"fingerprint": obj.get("fingerprint"),
|
|
92
96
|
"id": obj.get("id"),
|
|
93
97
|
"name": obj.get("name"),
|
|
@@ -22,9 +22,9 @@ from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
|
-
class
|
|
25
|
+
class LastDayCostFields(BaseModel):
|
|
26
26
|
"""
|
|
27
|
-
|
|
27
|
+
LastDayCostFields
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
clusters_cost: Optional[Union[StrictFloat, StrictInt]] = None
|
|
30
30
|
instances_cost: Optional[Union[StrictFloat, StrictInt]] = None
|
|
@@ -50,7 +50,7 @@ class Lastdaycostfields(BaseModel):
|
|
|
50
50
|
|
|
51
51
|
@classmethod
|
|
52
52
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
-
"""Create an instance of
|
|
53
|
+
"""Create an instance of LastDayCostFields 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]:
|
|
@@ -75,7 +75,7 @@ class Lastdaycostfields(BaseModel):
|
|
|
75
75
|
|
|
76
76
|
@classmethod
|
|
77
77
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
78
|
-
"""Create an instance of
|
|
78
|
+
"""Create an instance of LastDayCostFields from a dict"""
|
|
79
79
|
if obj is None:
|
|
80
80
|
return None
|
|
81
81
|
|
|
@@ -19,15 +19,15 @@ 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.
|
|
22
|
+
from ..models.last_day_cost_fields import LastDayCostFields
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class LastDayCostResponse(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
LastDayCostResponse
|
|
29
29
|
""" # noqa: E501
|
|
30
|
-
data: Optional[
|
|
30
|
+
data: Optional[LastDayCostFields] = None
|
|
31
31
|
message: Optional[StrictStr] = None
|
|
32
32
|
status: Optional[StrictBool] = None
|
|
33
33
|
__properties: ClassVar[List[str]] = ["data", "message", "status"]
|
|
@@ -50,7 +50,7 @@ class Lastdaycostresponse(BaseModel):
|
|
|
50
50
|
|
|
51
51
|
@classmethod
|
|
52
52
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
-
"""Create an instance of
|
|
53
|
+
"""Create an instance of LastDayCostResponse 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]:
|
|
@@ -78,7 +78,7 @@ class Lastdaycostresponse(BaseModel):
|
|
|
78
78
|
|
|
79
79
|
@classmethod
|
|
80
80
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
81
|
-
"""Create an instance of
|
|
81
|
+
"""Create an instance of LastDayCostResponse from a dict"""
|
|
82
82
|
if obj is None:
|
|
83
83
|
return None
|
|
84
84
|
|
|
@@ -86,7 +86,7 @@ class Lastdaycostresponse(BaseModel):
|
|
|
86
86
|
return cls.model_validate(obj)
|
|
87
87
|
|
|
88
88
|
_obj = cls.model_validate({
|
|
89
|
-
"data":
|
|
89
|
+
"data": LastDayCostFields.from_dict(obj["data"]) if obj.get("data") is not None else None,
|
|
90
90
|
"message": obj.get("message"),
|
|
91
91
|
"status": obj.get("status")
|
|
92
92
|
})
|
|
@@ -22,13 +22,15 @@ 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
|
|
25
|
+
class Logos(BaseModel):
|
|
26
26
|
"""
|
|
27
|
-
|
|
27
|
+
Logos
|
|
28
28
|
""" # noqa: E501
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
dark: Optional[StrictStr] = None
|
|
30
|
+
email: Optional[StrictStr] = None
|
|
31
|
+
favicon: Optional[StrictStr] = None
|
|
32
|
+
light: Optional[StrictStr] = None
|
|
33
|
+
__properties: ClassVar[List[str]] = ["dark", "email", "favicon", "light"]
|
|
32
34
|
|
|
33
35
|
model_config = ConfigDict(
|
|
34
36
|
populate_by_name=True,
|
|
@@ -48,7 +50,7 @@ class ExportBillingDataResponse(BaseModel):
|
|
|
48
50
|
|
|
49
51
|
@classmethod
|
|
50
52
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
-
"""Create an instance of
|
|
53
|
+
"""Create an instance of Logos from a JSON string"""
|
|
52
54
|
return cls.from_dict(json.loads(json_str))
|
|
53
55
|
|
|
54
56
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -73,7 +75,7 @@ class ExportBillingDataResponse(BaseModel):
|
|
|
73
75
|
|
|
74
76
|
@classmethod
|
|
75
77
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
-
"""Create an instance of
|
|
78
|
+
"""Create an instance of Logos from a dict"""
|
|
77
79
|
if obj is None:
|
|
78
80
|
return None
|
|
79
81
|
|
|
@@ -81,8 +83,10 @@ class ExportBillingDataResponse(BaseModel):
|
|
|
81
83
|
return cls.model_validate(obj)
|
|
82
84
|
|
|
83
85
|
_obj = cls.model_validate({
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
+
"dark": obj.get("dark"),
|
|
87
|
+
"email": obj.get("email"),
|
|
88
|
+
"favicon": obj.get("favicon"),
|
|
89
|
+
"light": obj.get("light")
|
|
86
90
|
})
|
|
87
91
|
return _obj
|
|
88
92
|
|
|
@@ -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.
|
|
22
|
+
from ..models.cluster_flavor_fields import ClusterFlavorFields
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class MasterFlavorsResponse(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
MasterFlavorsResponse
|
|
29
29
|
""" # noqa: E501
|
|
30
|
-
|
|
30
|
+
flavors: Optional[List[ClusterFlavorFields]] = None
|
|
31
31
|
message: Optional[StrictStr] = None
|
|
32
32
|
status: Optional[StrictBool] = None
|
|
33
|
-
__properties: ClassVar[List[str]] = ["
|
|
33
|
+
__properties: ClassVar[List[str]] = ["flavors", "message", "status"]
|
|
34
34
|
|
|
35
35
|
model_config = ConfigDict(
|
|
36
36
|
populate_by_name=True,
|
|
@@ -50,7 +50,7 @@ class Creditrequestresponse(BaseModel):
|
|
|
50
50
|
|
|
51
51
|
@classmethod
|
|
52
52
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
-
"""Create an instance of
|
|
53
|
+
"""Create an instance of MasterFlavorsResponse 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 Creditrequestresponse(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
|
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of each item in flavors (list)
|
|
75
75
|
_items = []
|
|
76
|
-
if self.
|
|
77
|
-
for
|
|
78
|
-
if
|
|
79
|
-
_items.append(
|
|
80
|
-
_dict['
|
|
76
|
+
if self.flavors:
|
|
77
|
+
for _item_flavors in self.flavors:
|
|
78
|
+
if _item_flavors:
|
|
79
|
+
_items.append(_item_flavors.to_dict())
|
|
80
|
+
_dict['flavors'] = _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
|
|
85
|
+
"""Create an instance of MasterFlavorsResponse from a dict"""
|
|
86
86
|
if obj is None:
|
|
87
87
|
return None
|
|
88
88
|
|
|
@@ -90,7 +90,7 @@ class Creditrequestresponse(BaseModel):
|
|
|
90
90
|
return cls.model_validate(obj)
|
|
91
91
|
|
|
92
92
|
_obj = cls.model_validate({
|
|
93
|
-
"
|
|
93
|
+
"flavors": [ClusterFlavorFields.from_dict(_item) for _item in obj["flavors"]] if obj.get("flavors") is not None else None,
|
|
94
94
|
"message": obj.get("message"),
|
|
95
95
|
"status": obj.get("status")
|
|
96
96
|
})
|
|
@@ -17,18 +17,17 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict,
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
|
-
class
|
|
25
|
+
class MFAStatusFields(BaseModel):
|
|
26
26
|
"""
|
|
27
|
-
|
|
27
|
+
MFAStatusFields
|
|
28
28
|
""" # noqa: E501
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
__properties: ClassVar[List[str]] = ["id", "plan_type"]
|
|
29
|
+
mfa_enabled: StrictBool = Field(description="Whether MFA is enabled for the user")
|
|
30
|
+
__properties: ClassVar[List[str]] = ["mfa_enabled"]
|
|
32
31
|
|
|
33
32
|
model_config = ConfigDict(
|
|
34
33
|
populate_by_name=True,
|
|
@@ -48,7 +47,7 @@ class CustomerPayload(BaseModel):
|
|
|
48
47
|
|
|
49
48
|
@classmethod
|
|
50
49
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
-
"""Create an instance of
|
|
50
|
+
"""Create an instance of MFAStatusFields from a JSON string"""
|
|
52
51
|
return cls.from_dict(json.loads(json_str))
|
|
53
52
|
|
|
54
53
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -73,7 +72,7 @@ class CustomerPayload(BaseModel):
|
|
|
73
72
|
|
|
74
73
|
@classmethod
|
|
75
74
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
-
"""Create an instance of
|
|
75
|
+
"""Create an instance of MFAStatusFields from a dict"""
|
|
77
76
|
if obj is None:
|
|
78
77
|
return None
|
|
79
78
|
|
|
@@ -81,8 +80,7 @@ class CustomerPayload(BaseModel):
|
|
|
81
80
|
return cls.model_validate(obj)
|
|
82
81
|
|
|
83
82
|
_obj = cls.model_validate({
|
|
84
|
-
"
|
|
85
|
-
"plan_type": obj.get("plan_type")
|
|
83
|
+
"mfa_enabled": obj.get("mfa_enabled")
|
|
86
84
|
})
|
|
87
85
|
return _obj
|
|
88
86
|
|