platform-api-python-client 4.31.0__py3-none-any.whl → 4.41.0__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.
- platform_api_python_client/__init__.py +410 -148
- platform_api_python_client/api/external_api.py +6466 -1215
- platform_api_python_client/api_client.py +81 -36
- platform_api_python_client/configuration.py +262 -66
- platform_api_python_client/exceptions.py +24 -5
- platform_api_python_client/models/__init__.py +90 -35
- platform_api_python_client/models/admission.py +106 -0
- platform_api_python_client/models/autoscaling.py +120 -0
- platform_api_python_client/models/ccl_dynamo_pools.py +117 -0
- platform_api_python_client/models/{create_c_serve_v2_deployment_response.py → ccl_main_pools.py} +16 -16
- platform_api_python_client/models/ccluster_catalogs_cluster_base_argo_rollouts_chart_values.py +121 -0
- platform_api_python_client/models/{c_serve_v2_recipe.py → ccluster_catalogs_cluster_base_argo_rollouts_controller.py} +15 -18
- platform_api_python_client/models/ccluster_catalogs_cluster_base_argo_rollouts_values.py +110 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_cert_manager_chart_values.py +117 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_cert_manager_values.py +110 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_gpu_operator_chart_values.py +152 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_gpu_operator_values.py +121 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_ingress_nginx_chart_values.py +110 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_ingress_nginx_controller.py +121 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_ingress_nginx_values.py +110 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_istio_values.py +143 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_kai_scheduler_chart_values.py +154 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_kai_scheduler_values.py +121 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_keda_chart_values.py +131 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_keda_values.py +110 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_kube_prometheus_stack_chart_values.py +121 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_kube_prometheus_stack_values.py +121 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_metrics_server_chart_values.py +106 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_metrics_server_values.py +110 -0
- platform_api_python_client/models/cdi.py +113 -0
- platform_api_python_client/models/cluster_base_components.py +187 -0
- platform_api_python_client/models/cluster_capacity_response.py +5 -5
- platform_api_python_client/models/cluster_credential.py +6 -5
- platform_api_python_client/models/cluster_registration_request.py +4 -3
- platform_api_python_client/models/cluster_registration_response.py +4 -3
- platform_api_python_client/models/{istio_cni_overrides.py → cni.py} +29 -15
- platform_api_python_client/models/config_file_mount.py +6 -5
- platform_api_python_client/models/create_compute_deployment_request.py +35 -9
- platform_api_python_client/models/create_compute_deployment_response.py +4 -3
- platform_api_python_client/models/create_dynamo_deployment_request.py +67 -20
- platform_api_python_client/models/create_dynamo_deployment_response.py +4 -3
- platform_api_python_client/models/create_filesystem_volume_request.py +8 -20
- platform_api_python_client/models/create_hardware_instance_request.py +4 -3
- platform_api_python_client/models/create_inference_deployment_response.py +4 -3
- platform_api_python_client/models/create_inference_v3_deployment_request.py +52 -10
- platform_api_python_client/models/create_job_deployment_request.py +35 -9
- platform_api_python_client/models/create_job_deployment_response.py +4 -3
- platform_api_python_client/models/create_object_volume_request.py +10 -22
- platform_api_python_client/models/create_organization_request.py +4 -3
- platform_api_python_client/models/create_organization_response.py +4 -3
- platform_api_python_client/models/create_service_account_request.py +4 -3
- platform_api_python_client/models/create_service_account_response.py +4 -3
- platform_api_python_client/models/credits_response.py +4 -3
- platform_api_python_client/models/daily_bill_response.py +4 -3
- platform_api_python_client/models/{fluent_bit.py → dashboard.py} +29 -12
- platform_api_python_client/models/{prometheus_adapter.py → default_priorities.py} +29 -12
- platform_api_python_client/models/default_queue.py +106 -0
- platform_api_python_client/models/delete_user_vault_item_request.py +4 -3
- platform_api_python_client/models/deployment_log_event_v4.py +4 -3
- platform_api_python_client/models/deployment_response.py +12 -27
- platform_api_python_client/models/deployment_status_request.py +4 -3
- platform_api_python_client/models/deployment_status_response.py +4 -3
- platform_api_python_client/models/deployment_status_v3_response.py +5 -5
- platform_api_python_client/models/deployment_type.py +14 -0
- platform_api_python_client/models/deployment_usage.py +5 -5
- platform_api_python_client/models/deployment_usage_value.py +4 -3
- platform_api_python_client/models/dynamo_communications_input.py +4 -16
- platform_api_python_client/models/dynamo_frontend_config.py +105 -0
- platform_api_python_client/models/dynamo_frontend_config_response.py +105 -0
- platform_api_python_client/models/dynamo_image.py +106 -0
- platform_api_python_client/models/dynamo_kv_transfer_configuration.py +4 -16
- platform_api_python_client/models/{external_dns.py → dynamo_weight_transfer_configuration.py} +13 -13
- platform_api_python_client/models/dynamo_weight_transfer_policy.py +36 -0
- platform_api_python_client/models/dynamo_worker_pool_config.py +6 -18
- platform_api_python_client/models/dynamo_worker_pools.py +4 -16
- platform_api_python_client/models/{keda.py → env.py} +14 -13
- platform_api_python_client/models/generate_service_account_secret_response.py +4 -3
- platform_api_python_client/models/get_cluster_response.py +8 -5
- platform_api_python_client/models/get_compute_deployment_response.py +35 -8
- platform_api_python_client/models/get_deployment_log_response.py +4 -3
- platform_api_python_client/models/get_deployment_log_v4_response.py +5 -5
- platform_api_python_client/models/get_deployment_pods_response.py +4 -3
- platform_api_python_client/models/get_deployment_response.py +7 -7
- platform_api_python_client/models/get_deployment_revision_response.py +4 -3
- platform_api_python_client/models/get_deployment_usage_response.py +24 -9
- platform_api_python_client/models/get_dynamo_deployment_response.py +63 -15
- platform_api_python_client/models/get_filesystem_volume_response.py +4 -3
- platform_api_python_client/models/get_inference_deployment_response.py +7 -7
- platform_api_python_client/models/get_inference_v3_deployment_response.py +51 -8
- platform_api_python_client/models/get_job_deployment_response.py +35 -8
- platform_api_python_client/models/get_object_volume_response.py +4 -3
- platform_api_python_client/models/gpu_type_capacity.py +4 -3
- platform_api_python_client/models/hardware_instance_response.py +10 -5
- platform_api_python_client/models/hardware_preset_response.py +4 -3
- platform_api_python_client/models/http_validation_error.py +5 -5
- platform_api_python_client/models/image.py +113 -0
- platform_api_python_client/models/image_pull_secret_credentials.py +4 -3
- platform_api_python_client/models/{istio_cni_subchart_overrides.py → ingress.py} +26 -18
- platform_api_python_client/models/{c_serve_recipe_response.py → insight_list_item_response.py} +33 -27
- platform_api_python_client/models/{create_c_serve_v3_deployment_response.py → insight_resource.py} +20 -14
- platform_api_python_client/models/insight_resource_type.py +37 -0
- platform_api_python_client/models/insight_response.py +133 -0
- platform_api_python_client/models/insight_severity.py +40 -0
- platform_api_python_client/models/insight_status.py +39 -0
- platform_api_python_client/models/insight_status_change_response.py +108 -0
- platform_api_python_client/models/invite_user_request.py +4 -3
- platform_api_python_client/models/istio_base.py +106 -0
- platform_api_python_client/models/istio_cni.py +124 -0
- platform_api_python_client/models/{ingress_nginx.py → istio_gateway.py} +29 -12
- platform_api_python_client/models/{dynamo_communications_output.py → istiod.py} +21 -15
- platform_api_python_client/models/list_cluster_capacity_response.py +5 -5
- platform_api_python_client/models/list_daily_bill_response.py +5 -5
- platform_api_python_client/models/list_deployment_revisions_response.py +5 -5
- platform_api_python_client/models/list_get_cluster_response.py +5 -5
- platform_api_python_client/models/list_get_deployment_response.py +5 -5
- platform_api_python_client/models/list_hardware_instance_response.py +5 -5
- platform_api_python_client/models/list_hardware_preset_response.py +5 -5
- platform_api_python_client/models/{istio_overrides.py → list_insights_response.py} +19 -20
- platform_api_python_client/models/list_organization_gpu_quota_response.py +5 -5
- platform_api_python_client/models/list_prebuilt_image_response.py +5 -5
- platform_api_python_client/models/list_service_accounts_response.py +5 -5
- platform_api_python_client/models/list_user_vault_items_response.py +5 -5
- platform_api_python_client/models/list_volumes_response.py +5 -5
- platform_api_python_client/models/{validation_error_loc_inner.py → location_inner.py} +6 -6
- platform_api_python_client/models/metric.py +13 -0
- platform_api_python_client/models/metrics.py +117 -0
- platform_api_python_client/models/metrics_config.py +6 -5
- platform_api_python_client/models/mig.py +106 -0
- platform_api_python_client/models/operator.py +117 -0
- platform_api_python_client/models/organization_gpu_quota_request.py +4 -3
- platform_api_python_client/models/organization_gpu_quota_response.py +4 -3
- platform_api_python_client/models/pilot.py +106 -0
- platform_api_python_client/models/pod_details.py +4 -3
- platform_api_python_client/models/pool.py +117 -0
- platform_api_python_client/models/prebuilt_image_response.py +4 -3
- platform_api_python_client/models/prometheus.py +110 -0
- platform_api_python_client/models/prometheus_rules.py +120 -0
- platform_api_python_client/models/prometheus_spec.py +113 -0
- platform_api_python_client/models/prometheus_values.py +117 -0
- platform_api_python_client/models/quota.py +106 -0
- platform_api_python_client/models/replicas.py +106 -0
- platform_api_python_client/models/resource_list.py +113 -0
- platform_api_python_client/models/resource_requirements.py +120 -0
- platform_api_python_client/models/revision_pod_details.py +5 -5
- platform_api_python_client/models/rollout_strategy_params.py +4 -3
- platform_api_python_client/models/scheduler.py +117 -0
- platform_api_python_client/models/service_account_response.py +4 -3
- platform_api_python_client/models/{istio.py → toggle.py} +27 -19
- platform_api_python_client/models/toleration.py +134 -0
- platform_api_python_client/models/unified_get_compute_deployment_response.py +177 -0
- platform_api_python_client/models/{c_serve_recipe_perf.py → unified_get_deployment_logs_response.py} +19 -22
- platform_api_python_client/models/{longhorn.py → unified_get_deployment_pods_response.py} +13 -14
- platform_api_python_client/models/unified_get_deployment_response.py +164 -0
- platform_api_python_client/models/unified_get_deployment_revision_response.py +110 -0
- platform_api_python_client/models/{argo_rollouts.py → unified_get_deployment_rollout_response.py} +15 -13
- platform_api_python_client/models/unified_get_deployment_usage_response.py +110 -0
- platform_api_python_client/models/unified_get_dynamo_deployment_response.py +218 -0
- platform_api_python_client/models/unified_get_inference_v3_deployment_response.py +228 -0
- platform_api_python_client/models/unified_get_job_deployment_response.py +204 -0
- platform_api_python_client/models/{list_c_serve_recipe_response.py → unified_list_deployment_revisions_response.py} +12 -12
- platform_api_python_client/models/{spire.py → unified_update_deployment_rollout_request.py} +12 -13
- platform_api_python_client/models/unified_write_compute_deployment_request.py +154 -0
- platform_api_python_client/models/unified_write_deployment_request.py +164 -0
- platform_api_python_client/models/unified_write_deployment_response.py +110 -0
- platform_api_python_client/models/unified_write_dynamo_deployment_request.py +197 -0
- platform_api_python_client/models/{create_c_serve_v3_deployment_request.py → unified_write_inference_v3_deployment_request.py} +86 -78
- platform_api_python_client/models/unified_write_job_deployment_request.py +183 -0
- platform_api_python_client/models/update_cluster_metadata_request.py +4 -3
- platform_api_python_client/models/{cluster_config.py → update_cluster_request.py} +11 -10
- platform_api_python_client/models/update_deployment_response.py +4 -3
- platform_api_python_client/models/update_deployment_status_v3_request.py +4 -3
- platform_api_python_client/models/update_insight_status_request.py +107 -0
- platform_api_python_client/models/update_service_account_request.py +4 -3
- platform_api_python_client/models/upsert_user_vault_item_request.py +5 -4
- platform_api_python_client/models/usage_availability.py +40 -0
- platform_api_python_client/models/usage_component.py +39 -0
- platform_api_python_client/models/user_vault_item.py +4 -3
- platform_api_python_client/models/validation_error.py +8 -8
- platform_api_python_client/models/volume_mount.py +4 -3
- platform_api_python_client/models/volume_status_response.py +4 -3
- platform_api_python_client/models/workload.py +110 -0
- platform_api_python_client/rest.py +87 -10
- platform_api_python_client-4.41.0.dist-info/METADATA +418 -0
- platform_api_python_client-4.41.0.dist-info/RECORD +206 -0
- {platform_api_python_client-4.31.0.dist-info → platform_api_python_client-4.41.0.dist-info}/WHEEL +1 -1
- platform_api_python_client/models/cert_manager.py +0 -89
- platform_api_python_client/models/cluster_components.py +0 -193
- platform_api_python_client/models/final_stack.py +0 -89
- platform_api_python_client/models/get_c_serve_v2_deployment_response.py +0 -193
- platform_api_python_client/models/get_c_serve_v3_deployment_response.py +0 -194
- platform_api_python_client/models/gpu_operator.py +0 -89
- platform_api_python_client/models/kube_prometheus_stack.py +0 -89
- platform_api_python_client/models/metrics_server.py +0 -89
- platform_api_python_client/models/network_operator.py +0 -89
- platform_api_python_client/models/opentelemetry_collector.py +0 -89
- platform_api_python_client/models/spire_crds.py +0 -89
- platform_api_python_client/models/teleport_kube_agent.py +0 -89
- platform_api_python_client-4.31.0.dist-info/METADATA +0 -23
- platform_api_python_client-4.31.0.dist-info/RECORD +0 -151
- {platform_api_python_client-4.31.0.dist-info → platform_api_python_client-4.41.0.dist-info}/top_level.txt +0 -0
platform_api_python_client/models/{c_serve_recipe_response.py → insight_list_item_response.py}
RENAMED
|
@@ -17,24 +17,33 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
22
|
from typing import Any, ClassVar, Dict, List
|
|
22
|
-
from platform_api_python_client.models.
|
|
23
|
+
from platform_api_python_client.models.insight_resource import InsightResource
|
|
24
|
+
from platform_api_python_client.models.insight_severity import InsightSeverity
|
|
25
|
+
from platform_api_python_client.models.insight_status import InsightStatus
|
|
23
26
|
from typing import Optional, Set
|
|
24
27
|
from typing_extensions import Self
|
|
28
|
+
from pydantic_core import to_jsonable_python
|
|
25
29
|
|
|
26
|
-
class
|
|
30
|
+
class InsightListItemResponse(BaseModel):
|
|
27
31
|
"""
|
|
28
|
-
|
|
32
|
+
InsightListItemResponse
|
|
29
33
|
""" # noqa: E501
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
id: StrictInt
|
|
35
|
+
identity: StrictStr = Field(description="Human-readable identifier, e.g. INSIGHT-42")
|
|
36
|
+
severity: InsightSeverity
|
|
37
|
+
status: InsightStatus
|
|
38
|
+
title: StrictStr
|
|
39
|
+
observed_at: datetime
|
|
40
|
+
created_at: datetime
|
|
41
|
+
resource: InsightResource
|
|
42
|
+
__properties: ClassVar[List[str]] = ["id", "identity", "severity", "status", "title", "observed_at", "created_at", "resource"]
|
|
35
43
|
|
|
36
44
|
model_config = ConfigDict(
|
|
37
|
-
|
|
45
|
+
validate_by_name=True,
|
|
46
|
+
validate_by_alias=True,
|
|
38
47
|
validate_assignment=True,
|
|
39
48
|
protected_namespaces=(),
|
|
40
49
|
)
|
|
@@ -46,12 +55,11 @@ class CServeRecipeResponse(BaseModel):
|
|
|
46
55
|
|
|
47
56
|
def to_json(self) -> str:
|
|
48
57
|
"""Returns the JSON representation of the model using alias"""
|
|
49
|
-
|
|
50
|
-
return json.dumps(self.to_dict())
|
|
58
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
51
59
|
|
|
52
60
|
@classmethod
|
|
53
61
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
-
"""Create an instance of
|
|
62
|
+
"""Create an instance of InsightListItemResponse from a JSON string"""
|
|
55
63
|
return cls.from_dict(json.loads(json_str))
|
|
56
64
|
|
|
57
65
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -72,20 +80,14 @@ class CServeRecipeResponse(BaseModel):
|
|
|
72
80
|
exclude=excluded_fields,
|
|
73
81
|
exclude_none=True,
|
|
74
82
|
)
|
|
75
|
-
# override the default output from pydantic by calling `to_dict()` of
|
|
76
|
-
if self.
|
|
77
|
-
_dict['
|
|
78
|
-
# override the default output from pydantic by calling `to_dict()` of cheapest
|
|
79
|
-
if self.cheapest:
|
|
80
|
-
_dict['cheapest'] = self.cheapest.to_dict()
|
|
81
|
-
# override the default output from pydantic by calling `to_dict()` of best_value
|
|
82
|
-
if self.best_value:
|
|
83
|
-
_dict['best_value'] = self.best_value.to_dict()
|
|
83
|
+
# override the default output from pydantic by calling `to_dict()` of resource
|
|
84
|
+
if self.resource:
|
|
85
|
+
_dict['resource'] = self.resource.to_dict()
|
|
84
86
|
return _dict
|
|
85
87
|
|
|
86
88
|
@classmethod
|
|
87
89
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
88
|
-
"""Create an instance of
|
|
90
|
+
"""Create an instance of InsightListItemResponse from a dict"""
|
|
89
91
|
if obj is None:
|
|
90
92
|
return None
|
|
91
93
|
|
|
@@ -93,10 +95,14 @@ class CServeRecipeResponse(BaseModel):
|
|
|
93
95
|
return cls.model_validate(obj)
|
|
94
96
|
|
|
95
97
|
_obj = cls.model_validate({
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
98
|
+
"id": obj.get("id"),
|
|
99
|
+
"identity": obj.get("identity"),
|
|
100
|
+
"severity": obj.get("severity"),
|
|
101
|
+
"status": obj.get("status"),
|
|
102
|
+
"title": obj.get("title"),
|
|
103
|
+
"observed_at": obj.get("observed_at"),
|
|
104
|
+
"created_at": obj.get("created_at"),
|
|
105
|
+
"resource": InsightResource.from_dict(obj["resource"]) if obj.get("resource") is not None else None
|
|
100
106
|
})
|
|
101
107
|
return _obj
|
|
102
108
|
|
platform_api_python_client/models/{create_c_serve_v3_deployment_response.py → insight_resource.py}
RENAMED
|
@@ -17,23 +17,25 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from datetime import datetime
|
|
21
20
|
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from platform_api_python_client.models.insight_resource_type import InsightResourceType
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
|
+
from pydantic_core import to_jsonable_python
|
|
25
26
|
|
|
26
|
-
class
|
|
27
|
+
class InsightResource(BaseModel):
|
|
27
28
|
"""
|
|
28
|
-
|
|
29
|
+
InsightResource
|
|
29
30
|
""" # noqa: E501
|
|
31
|
+
type: InsightResourceType
|
|
30
32
|
id: StrictInt
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
__properties: ClassVar[List[str]] = ["id", "created_at", "endpoint_url"]
|
|
33
|
+
name: Optional[StrictStr] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["type", "id", "name"]
|
|
34
35
|
|
|
35
36
|
model_config = ConfigDict(
|
|
36
|
-
|
|
37
|
+
validate_by_name=True,
|
|
38
|
+
validate_by_alias=True,
|
|
37
39
|
validate_assignment=True,
|
|
38
40
|
protected_namespaces=(),
|
|
39
41
|
)
|
|
@@ -45,12 +47,11 @@ class CreateCServeV3DeploymentResponse(BaseModel):
|
|
|
45
47
|
|
|
46
48
|
def to_json(self) -> str:
|
|
47
49
|
"""Returns the JSON representation of the model using alias"""
|
|
48
|
-
|
|
49
|
-
return json.dumps(self.to_dict())
|
|
50
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
50
51
|
|
|
51
52
|
@classmethod
|
|
52
53
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
-
"""Create an instance of
|
|
54
|
+
"""Create an instance of InsightResource from a JSON string"""
|
|
54
55
|
return cls.from_dict(json.loads(json_str))
|
|
55
56
|
|
|
56
57
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -71,11 +72,16 @@ class CreateCServeV3DeploymentResponse(BaseModel):
|
|
|
71
72
|
exclude=excluded_fields,
|
|
72
73
|
exclude_none=True,
|
|
73
74
|
)
|
|
75
|
+
# set to None if name (nullable) is None
|
|
76
|
+
# and model_fields_set contains the field
|
|
77
|
+
if self.name is None and "name" in self.model_fields_set:
|
|
78
|
+
_dict['name'] = None
|
|
79
|
+
|
|
74
80
|
return _dict
|
|
75
81
|
|
|
76
82
|
@classmethod
|
|
77
83
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
78
|
-
"""Create an instance of
|
|
84
|
+
"""Create an instance of InsightResource from a dict"""
|
|
79
85
|
if obj is None:
|
|
80
86
|
return None
|
|
81
87
|
|
|
@@ -83,9 +89,9 @@ class CreateCServeV3DeploymentResponse(BaseModel):
|
|
|
83
89
|
return cls.model_validate(obj)
|
|
84
90
|
|
|
85
91
|
_obj = cls.model_validate({
|
|
92
|
+
"type": obj.get("type"),
|
|
86
93
|
"id": obj.get("id"),
|
|
87
|
-
"
|
|
88
|
-
"endpoint_url": obj.get("endpoint_url")
|
|
94
|
+
"name": obj.get("name")
|
|
89
95
|
})
|
|
90
96
|
return _obj
|
|
91
97
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Platform External API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.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 json
|
|
17
|
+
from enum import Enum
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class InsightResourceType(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
InsightResourceType
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
CLUSTER = 'cluster'
|
|
30
|
+
DEPLOYMENT = 'deployment'
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def from_json(cls, json_str: str) -> Self:
|
|
34
|
+
"""Create an instance of InsightResourceType from a JSON string"""
|
|
35
|
+
return cls(json.loads(json_str))
|
|
36
|
+
|
|
37
|
+
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Platform External API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.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 datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from platform_api_python_client.models.insight_resource import InsightResource
|
|
24
|
+
from platform_api_python_client.models.insight_severity import InsightSeverity
|
|
25
|
+
from platform_api_python_client.models.insight_status import InsightStatus
|
|
26
|
+
from platform_api_python_client.models.insight_status_change_response import InsightStatusChangeResponse
|
|
27
|
+
from typing import Optional, Set
|
|
28
|
+
from typing_extensions import Self
|
|
29
|
+
from pydantic_core import to_jsonable_python
|
|
30
|
+
|
|
31
|
+
class InsightResponse(BaseModel):
|
|
32
|
+
"""
|
|
33
|
+
InsightResponse
|
|
34
|
+
""" # noqa: E501
|
|
35
|
+
id: StrictInt
|
|
36
|
+
identity: StrictStr = Field(description="Human-readable identifier, e.g. INSIGHT-42")
|
|
37
|
+
severity: InsightSeverity
|
|
38
|
+
status: InsightStatus
|
|
39
|
+
title: StrictStr
|
|
40
|
+
observed_at: datetime
|
|
41
|
+
created_at: datetime
|
|
42
|
+
resource: InsightResource
|
|
43
|
+
observed_summary: StrictStr
|
|
44
|
+
recommended_steps: StrictStr
|
|
45
|
+
content: Optional[StrictStr] = None
|
|
46
|
+
reported_by: StrictStr = Field(description="Name of the user that reported it; a service account shows its creator")
|
|
47
|
+
updated_at: datetime
|
|
48
|
+
history: List[InsightStatusChangeResponse] = Field(description="Status changes, newest first")
|
|
49
|
+
__properties: ClassVar[List[str]] = ["id", "identity", "severity", "status", "title", "observed_at", "created_at", "resource", "observed_summary", "recommended_steps", "content", "reported_by", "updated_at", "history"]
|
|
50
|
+
|
|
51
|
+
model_config = ConfigDict(
|
|
52
|
+
validate_by_name=True,
|
|
53
|
+
validate_by_alias=True,
|
|
54
|
+
validate_assignment=True,
|
|
55
|
+
protected_namespaces=(),
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def to_str(self) -> str:
|
|
60
|
+
"""Returns the string representation of the model using alias"""
|
|
61
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
62
|
+
|
|
63
|
+
def to_json(self) -> str:
|
|
64
|
+
"""Returns the JSON representation of the model using alias"""
|
|
65
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
66
|
+
|
|
67
|
+
@classmethod
|
|
68
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
69
|
+
"""Create an instance of InsightResponse from a JSON string"""
|
|
70
|
+
return cls.from_dict(json.loads(json_str))
|
|
71
|
+
|
|
72
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
73
|
+
"""Return the dictionary representation of the model using alias.
|
|
74
|
+
|
|
75
|
+
This has the following differences from calling pydantic's
|
|
76
|
+
`self.model_dump(by_alias=True)`:
|
|
77
|
+
|
|
78
|
+
* `None` is only added to the output dict for nullable fields that
|
|
79
|
+
were set at model initialization. Other fields with value `None`
|
|
80
|
+
are ignored.
|
|
81
|
+
"""
|
|
82
|
+
excluded_fields: Set[str] = set([
|
|
83
|
+
])
|
|
84
|
+
|
|
85
|
+
_dict = self.model_dump(
|
|
86
|
+
by_alias=True,
|
|
87
|
+
exclude=excluded_fields,
|
|
88
|
+
exclude_none=True,
|
|
89
|
+
)
|
|
90
|
+
# override the default output from pydantic by calling `to_dict()` of resource
|
|
91
|
+
if self.resource:
|
|
92
|
+
_dict['resource'] = self.resource.to_dict()
|
|
93
|
+
# override the default output from pydantic by calling `to_dict()` of each item in history (list)
|
|
94
|
+
_items = []
|
|
95
|
+
if self.history:
|
|
96
|
+
for _item_history in self.history:
|
|
97
|
+
_items.append(_item_history.to_dict() if _item_history is not None else None)
|
|
98
|
+
_dict['history'] = _items
|
|
99
|
+
# set to None if content (nullable) is None
|
|
100
|
+
# and model_fields_set contains the field
|
|
101
|
+
if self.content is None and "content" in self.model_fields_set:
|
|
102
|
+
_dict['content'] = None
|
|
103
|
+
|
|
104
|
+
return _dict
|
|
105
|
+
|
|
106
|
+
@classmethod
|
|
107
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
108
|
+
"""Create an instance of InsightResponse from a dict"""
|
|
109
|
+
if obj is None:
|
|
110
|
+
return None
|
|
111
|
+
|
|
112
|
+
if not isinstance(obj, dict):
|
|
113
|
+
return cls.model_validate(obj)
|
|
114
|
+
|
|
115
|
+
_obj = cls.model_validate({
|
|
116
|
+
"id": obj.get("id"),
|
|
117
|
+
"identity": obj.get("identity"),
|
|
118
|
+
"severity": obj.get("severity"),
|
|
119
|
+
"status": obj.get("status"),
|
|
120
|
+
"title": obj.get("title"),
|
|
121
|
+
"observed_at": obj.get("observed_at"),
|
|
122
|
+
"created_at": obj.get("created_at"),
|
|
123
|
+
"resource": InsightResource.from_dict(obj["resource"]) if obj.get("resource") is not None else None,
|
|
124
|
+
"observed_summary": obj.get("observed_summary"),
|
|
125
|
+
"recommended_steps": obj.get("recommended_steps"),
|
|
126
|
+
"content": obj.get("content"),
|
|
127
|
+
"reported_by": obj.get("reported_by"),
|
|
128
|
+
"updated_at": obj.get("updated_at"),
|
|
129
|
+
"history": [InsightStatusChangeResponse.from_dict(_item) for _item in obj["history"]] if obj.get("history") is not None else None
|
|
130
|
+
})
|
|
131
|
+
return _obj
|
|
132
|
+
|
|
133
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Platform External API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.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 json
|
|
17
|
+
from enum import Enum
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class InsightSeverity(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
InsightSeverity
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
CRITICAL = 'critical'
|
|
30
|
+
HIGH = 'high'
|
|
31
|
+
MEDIUM = 'medium'
|
|
32
|
+
LOW = 'low'
|
|
33
|
+
INFO = 'info'
|
|
34
|
+
|
|
35
|
+
@classmethod
|
|
36
|
+
def from_json(cls, json_str: str) -> Self:
|
|
37
|
+
"""Create an instance of InsightSeverity from a JSON string"""
|
|
38
|
+
return cls(json.loads(json_str))
|
|
39
|
+
|
|
40
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Platform External API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.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 json
|
|
17
|
+
from enum import Enum
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class InsightStatus(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
InsightStatus
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
NEW = 'new'
|
|
30
|
+
ACKNOWLEDGED = 'acknowledged'
|
|
31
|
+
RESOLVED = 'resolved'
|
|
32
|
+
NOT_RELEVANT = 'not_relevant'
|
|
33
|
+
|
|
34
|
+
@classmethod
|
|
35
|
+
def from_json(cls, json_str: str) -> Self:
|
|
36
|
+
"""Create an instance of InsightStatus from a JSON string"""
|
|
37
|
+
return cls(json.loads(json_str))
|
|
38
|
+
|
|
39
|
+
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Platform External API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.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 datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from platform_api_python_client.models.insight_status import InsightStatus
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
from pydantic_core import to_jsonable_python
|
|
27
|
+
|
|
28
|
+
class InsightStatusChangeResponse(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
InsightStatusChangeResponse
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
from_status: InsightStatus
|
|
33
|
+
to_status: InsightStatus
|
|
34
|
+
actor_name: Optional[StrictStr] = None
|
|
35
|
+
created_at: datetime
|
|
36
|
+
comment: Optional[StrictStr] = None
|
|
37
|
+
__properties: ClassVar[List[str]] = ["from_status", "to_status", "actor_name", "created_at", "comment"]
|
|
38
|
+
|
|
39
|
+
model_config = ConfigDict(
|
|
40
|
+
validate_by_name=True,
|
|
41
|
+
validate_by_alias=True,
|
|
42
|
+
validate_assignment=True,
|
|
43
|
+
protected_namespaces=(),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def to_str(self) -> str:
|
|
48
|
+
"""Returns the string representation of the model using alias"""
|
|
49
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
50
|
+
|
|
51
|
+
def to_json(self) -> str:
|
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
|
53
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
57
|
+
"""Create an instance of InsightStatusChangeResponse from a JSON string"""
|
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
|
59
|
+
|
|
60
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
61
|
+
"""Return the dictionary representation of the model using alias.
|
|
62
|
+
|
|
63
|
+
This has the following differences from calling pydantic's
|
|
64
|
+
`self.model_dump(by_alias=True)`:
|
|
65
|
+
|
|
66
|
+
* `None` is only added to the output dict for nullable fields that
|
|
67
|
+
were set at model initialization. Other fields with value `None`
|
|
68
|
+
are ignored.
|
|
69
|
+
"""
|
|
70
|
+
excluded_fields: Set[str] = set([
|
|
71
|
+
])
|
|
72
|
+
|
|
73
|
+
_dict = self.model_dump(
|
|
74
|
+
by_alias=True,
|
|
75
|
+
exclude=excluded_fields,
|
|
76
|
+
exclude_none=True,
|
|
77
|
+
)
|
|
78
|
+
# set to None if actor_name (nullable) is None
|
|
79
|
+
# and model_fields_set contains the field
|
|
80
|
+
if self.actor_name is None and "actor_name" in self.model_fields_set:
|
|
81
|
+
_dict['actor_name'] = None
|
|
82
|
+
|
|
83
|
+
# set to None if comment (nullable) is None
|
|
84
|
+
# and model_fields_set contains the field
|
|
85
|
+
if self.comment is None and "comment" in self.model_fields_set:
|
|
86
|
+
_dict['comment'] = None
|
|
87
|
+
|
|
88
|
+
return _dict
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
92
|
+
"""Create an instance of InsightStatusChangeResponse from a dict"""
|
|
93
|
+
if obj is None:
|
|
94
|
+
return None
|
|
95
|
+
|
|
96
|
+
if not isinstance(obj, dict):
|
|
97
|
+
return cls.model_validate(obj)
|
|
98
|
+
|
|
99
|
+
_obj = cls.model_validate({
|
|
100
|
+
"from_status": obj.get("from_status"),
|
|
101
|
+
"to_status": obj.get("to_status"),
|
|
102
|
+
"actor_name": obj.get("actor_name"),
|
|
103
|
+
"created_at": obj.get("created_at"),
|
|
104
|
+
"comment": obj.get("comment")
|
|
105
|
+
})
|
|
106
|
+
return _obj
|
|
107
|
+
|
|
108
|
+
|
|
@@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, StrictStr
|
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
|
+
from pydantic_core import to_jsonable_python
|
|
24
25
|
|
|
25
26
|
class InviteUserRequest(BaseModel):
|
|
26
27
|
"""
|
|
@@ -30,7 +31,8 @@ class InviteUserRequest(BaseModel):
|
|
|
30
31
|
__properties: ClassVar[List[str]] = ["email"]
|
|
31
32
|
|
|
32
33
|
model_config = ConfigDict(
|
|
33
|
-
|
|
34
|
+
validate_by_name=True,
|
|
35
|
+
validate_by_alias=True,
|
|
34
36
|
validate_assignment=True,
|
|
35
37
|
protected_namespaces=(),
|
|
36
38
|
)
|
|
@@ -42,8 +44,7 @@ class InviteUserRequest(BaseModel):
|
|
|
42
44
|
|
|
43
45
|
def to_json(self) -> str:
|
|
44
46
|
"""Returns the JSON representation of the model using alias"""
|
|
45
|
-
|
|
46
|
-
return json.dumps(self.to_dict())
|
|
47
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
47
48
|
|
|
48
49
|
@classmethod
|
|
49
50
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Platform External API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.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, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
from pydantic_core import to_jsonable_python
|
|
25
|
+
|
|
26
|
+
class IstioBase(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
IstioBase configures the istio-base subchart.
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
default_revision: Optional[StrictStr] = Field(default=None, alias="defaultRevision")
|
|
31
|
+
additional_properties: Dict[str, Any] = {}
|
|
32
|
+
__properties: ClassVar[List[str]] = ["defaultRevision"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
validate_by_name=True,
|
|
36
|
+
validate_by_alias=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
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of IstioBase 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
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
"additional_properties",
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# puts key-value pairs in additional_properties in the top level
|
|
76
|
+
if self.additional_properties is not None:
|
|
77
|
+
for _key, _value in self.additional_properties.items():
|
|
78
|
+
_dict[_key] = _value
|
|
79
|
+
|
|
80
|
+
# set to None if default_revision (nullable) is None
|
|
81
|
+
# and model_fields_set contains the field
|
|
82
|
+
if self.default_revision is None and "default_revision" in self.model_fields_set:
|
|
83
|
+
_dict['defaultRevision'] = None
|
|
84
|
+
|
|
85
|
+
return _dict
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
89
|
+
"""Create an instance of IstioBase from a dict"""
|
|
90
|
+
if obj is None:
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
if not isinstance(obj, dict):
|
|
94
|
+
return cls.model_validate(obj)
|
|
95
|
+
|
|
96
|
+
_obj = cls.model_validate({
|
|
97
|
+
"defaultRevision": obj.get("defaultRevision")
|
|
98
|
+
})
|
|
99
|
+
# store additional fields in additional_properties
|
|
100
|
+
for _key in obj.keys():
|
|
101
|
+
if _key not in cls.__properties:
|
|
102
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
103
|
+
|
|
104
|
+
return _obj
|
|
105
|
+
|
|
106
|
+
|