platform-api-python-client 4.23.1__py3-none-any.whl → 4.28.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 +18 -3
- platform_api_python_client/api/external_api.py +4508 -1469
- platform_api_python_client/api_client.py +1 -1
- platform_api_python_client/configuration.py +1 -1
- platform_api_python_client/models/__init__.py +17 -2
- platform_api_python_client/models/create_c_serve_v3_deployment_request.py +1 -8
- platform_api_python_client/models/create_compute_deployment_request.py +12 -2
- platform_api_python_client/models/create_dynamo_deployment_request.py +22 -3
- platform_api_python_client/models/{create_block_volume_request.py → create_filesystem_volume_request.py} +6 -6
- platform_api_python_client/models/create_inference_v3_deployment_request.py +1 -8
- platform_api_python_client/models/create_job_deployment_request.py +12 -2
- platform_api_python_client/models/create_volume_request.py +16 -16
- platform_api_python_client/models/delete_user_vault_item_request.py +108 -0
- platform_api_python_client/models/deployment_component_type.py +2 -0
- platform_api_python_client/models/deployment_log_event_v4.py +91 -0
- platform_api_python_client/models/deployment_response.py +21 -6
- platform_api_python_client/models/dynamo_serving_mode.py +37 -0
- platform_api_python_client/models/dynamo_worker_pool_config.py +103 -0
- platform_api_python_client/models/dynamo_worker_pools.py +109 -0
- platform_api_python_client/models/get_c_serve_v3_deployment_response.py +1 -8
- platform_api_python_client/models/get_cluster_response.py +5 -3
- platform_api_python_client/models/get_compute_deployment_response.py +11 -1
- platform_api_python_client/models/get_deployment_log_v4_response.py +95 -0
- platform_api_python_client/models/get_deployment_pods_response.py +87 -0
- platform_api_python_client/models/get_dynamo_deployment_response.py +15 -1
- platform_api_python_client/models/{get_block_volume_response.py → get_filesystem_volume_response.py} +6 -6
- platform_api_python_client/models/get_inference_v3_deployment_response.py +1 -8
- platform_api_python_client/models/get_job_deployment_response.py +12 -2
- platform_api_python_client/models/get_volume_response.py +16 -16
- platform_api_python_client/models/hardware_preset_response.py +96 -0
- platform_api_python_client/models/list_hardware_preset_response.py +95 -0
- platform_api_python_client/models/list_organization_gpu_quota_response.py +95 -0
- platform_api_python_client/models/organization_gpu_quota_request.py +88 -0
- platform_api_python_client/models/organization_gpu_quota_response.py +91 -0
- platform_api_python_client/models/update_cluster_metadata_request.py +87 -0
- platform_api_python_client/models/upsert_user_vault_item_request.py +103 -0
- platform_api_python_client/models/user_vault_item.py +6 -3
- platform_api_python_client/models/volume_access_mode.py +0 -1
- platform_api_python_client/models/volume_backend.py +1 -1
- platform_api_python_client/models/volume_mount.py +92 -0
- {platform_api_python_client-4.23.1.dist-info → platform_api_python_client-4.28.0.dist-info}/METADATA +1 -1
- {platform_api_python_client-4.23.1.dist-info → platform_api_python_client-4.28.0.dist-info}/RECORD +44 -29
- {platform_api_python_client-4.23.1.dist-info → platform_api_python_client-4.28.0.dist-info}/WHEEL +1 -1
- {platform_api_python_client-4.23.1.dist-info → platform_api_python_client-4.28.0.dist-info}/top_level.txt +0 -0
|
@@ -90,7 +90,7 @@ class ApiClient:
|
|
|
90
90
|
self.default_headers[header_name] = header_value
|
|
91
91
|
self.cookie = cookie
|
|
92
92
|
# Set default User-Agent.
|
|
93
|
-
self.user_agent = 'OpenAPI-Generator/4.
|
|
93
|
+
self.user_agent = 'OpenAPI-Generator/4.28.0/python'
|
|
94
94
|
self.client_side_validation = configuration.client_side_validation
|
|
95
95
|
|
|
96
96
|
def __enter__(self):
|
|
@@ -392,7 +392,7 @@ class Configuration:
|
|
|
392
392
|
"OS: {env}\n"\
|
|
393
393
|
"Python Version: {pyversion}\n"\
|
|
394
394
|
"Version of the API: 0.1.0\n"\
|
|
395
|
-
"SDK Package Version: 4.
|
|
395
|
+
"SDK Package Version: 4.28.0".\
|
|
396
396
|
format(env=sys.platform, pyversion=sys.version)
|
|
397
397
|
|
|
398
398
|
def get_host_settings(self):
|
|
@@ -28,7 +28,6 @@ from platform_api_python_client.models.cluster_credential import ClusterCredenti
|
|
|
28
28
|
from platform_api_python_client.models.cluster_registration_request import ClusterRegistrationRequest
|
|
29
29
|
from platform_api_python_client.models.cluster_registration_response import ClusterRegistrationResponse
|
|
30
30
|
from platform_api_python_client.models.config_file_mount import ConfigFileMount
|
|
31
|
-
from platform_api_python_client.models.create_block_volume_request import CreateBlockVolumeRequest
|
|
32
31
|
from platform_api_python_client.models.create_c_serve_v2_deployment_response import CreateCServeV2DeploymentResponse
|
|
33
32
|
from platform_api_python_client.models.create_c_serve_v3_deployment_request import CreateCServeV3DeploymentRequest
|
|
34
33
|
from platform_api_python_client.models.create_c_serve_v3_deployment_response import CreateCServeV3DeploymentResponse
|
|
@@ -36,6 +35,7 @@ from platform_api_python_client.models.create_compute_deployment_request import
|
|
|
36
35
|
from platform_api_python_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse
|
|
37
36
|
from platform_api_python_client.models.create_dynamo_deployment_request import CreateDynamoDeploymentRequest
|
|
38
37
|
from platform_api_python_client.models.create_dynamo_deployment_response import CreateDynamoDeploymentResponse
|
|
38
|
+
from platform_api_python_client.models.create_filesystem_volume_request import CreateFilesystemVolumeRequest
|
|
39
39
|
from platform_api_python_client.models.create_hardware_instance_request import CreateHardwareInstanceRequest
|
|
40
40
|
from platform_api_python_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse
|
|
41
41
|
from platform_api_python_client.models.create_inference_v3_deployment_request import CreateInferenceV3DeploymentRequest
|
|
@@ -49,7 +49,9 @@ from platform_api_python_client.models.create_service_account_response import Cr
|
|
|
49
49
|
from platform_api_python_client.models.create_volume_request import CreateVolumeRequest
|
|
50
50
|
from platform_api_python_client.models.credits_response import CreditsResponse
|
|
51
51
|
from platform_api_python_client.models.daily_bill_response import DailyBillResponse
|
|
52
|
+
from platform_api_python_client.models.delete_user_vault_item_request import DeleteUserVaultItemRequest
|
|
52
53
|
from platform_api_python_client.models.deployment_component_type import DeploymentComponentType
|
|
54
|
+
from platform_api_python_client.models.deployment_log_event_v4 import DeploymentLogEventV4
|
|
53
55
|
from platform_api_python_client.models.deployment_response import DeploymentResponse
|
|
54
56
|
from platform_api_python_client.models.deployment_status import DeploymentStatus
|
|
55
57
|
from platform_api_python_client.models.deployment_status_request import DeploymentStatusRequest
|
|
@@ -58,20 +60,25 @@ from platform_api_python_client.models.deployment_status_v3_response import Depl
|
|
|
58
60
|
from platform_api_python_client.models.deployment_type import DeploymentType
|
|
59
61
|
from platform_api_python_client.models.deployment_usage import DeploymentUsage
|
|
60
62
|
from platform_api_python_client.models.deployment_usage_value import DeploymentUsageValue
|
|
63
|
+
from platform_api_python_client.models.dynamo_serving_mode import DynamoServingMode
|
|
64
|
+
from platform_api_python_client.models.dynamo_worker_pool_config import DynamoWorkerPoolConfig
|
|
65
|
+
from platform_api_python_client.models.dynamo_worker_pools import DynamoWorkerPools
|
|
61
66
|
from platform_api_python_client.models.external_dns import ExternalDns
|
|
62
67
|
from platform_api_python_client.models.final_stack import FinalStack
|
|
63
68
|
from platform_api_python_client.models.fluent_bit import FluentBit
|
|
64
69
|
from platform_api_python_client.models.generate_service_account_secret_response import GenerateServiceAccountSecretResponse
|
|
65
|
-
from platform_api_python_client.models.get_block_volume_response import GetBlockVolumeResponse
|
|
66
70
|
from platform_api_python_client.models.get_c_serve_v2_deployment_response import GetCServeV2DeploymentResponse
|
|
67
71
|
from platform_api_python_client.models.get_c_serve_v3_deployment_response import GetCServeV3DeploymentResponse
|
|
68
72
|
from platform_api_python_client.models.get_cluster_response import GetClusterResponse
|
|
69
73
|
from platform_api_python_client.models.get_compute_deployment_response import GetComputeDeploymentResponse
|
|
70
74
|
from platform_api_python_client.models.get_deployment_log_response import GetDeploymentLogResponse
|
|
75
|
+
from platform_api_python_client.models.get_deployment_log_v4_response import GetDeploymentLogV4Response
|
|
76
|
+
from platform_api_python_client.models.get_deployment_pods_response import GetDeploymentPodsResponse
|
|
71
77
|
from platform_api_python_client.models.get_deployment_response import GetDeploymentResponse
|
|
72
78
|
from platform_api_python_client.models.get_deployment_revision_response import GetDeploymentRevisionResponse
|
|
73
79
|
from platform_api_python_client.models.get_deployment_usage_response import GetDeploymentUsageResponse
|
|
74
80
|
from platform_api_python_client.models.get_dynamo_deployment_response import GetDynamoDeploymentResponse
|
|
81
|
+
from platform_api_python_client.models.get_filesystem_volume_response import GetFilesystemVolumeResponse
|
|
75
82
|
from platform_api_python_client.models.get_inference_deployment_response import GetInferenceDeploymentResponse
|
|
76
83
|
from platform_api_python_client.models.get_inference_v3_deployment_response import GetInferenceV3DeploymentResponse
|
|
77
84
|
from platform_api_python_client.models.get_job_deployment_response import GetJobDeploymentResponse
|
|
@@ -81,6 +88,7 @@ from platform_api_python_client.models.gpu_operator import GpuOperator
|
|
|
81
88
|
from platform_api_python_client.models.gpu_type_capacity import GpuTypeCapacity
|
|
82
89
|
from platform_api_python_client.models.http_validation_error import HTTPValidationError
|
|
83
90
|
from platform_api_python_client.models.hardware_instance_response import HardwareInstanceResponse
|
|
91
|
+
from platform_api_python_client.models.hardware_preset_response import HardwarePresetResponse
|
|
84
92
|
from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials
|
|
85
93
|
from platform_api_python_client.models.ingress_nginx import IngressNginx
|
|
86
94
|
from platform_api_python_client.models.invite_user_request import InviteUserRequest
|
|
@@ -97,6 +105,8 @@ from platform_api_python_client.models.list_deployment_revisions_response import
|
|
|
97
105
|
from platform_api_python_client.models.list_get_cluster_response import ListGetClusterResponse
|
|
98
106
|
from platform_api_python_client.models.list_get_deployment_response import ListGetDeploymentResponse
|
|
99
107
|
from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse
|
|
108
|
+
from platform_api_python_client.models.list_hardware_preset_response import ListHardwarePresetResponse
|
|
109
|
+
from platform_api_python_client.models.list_organization_gpu_quota_response import ListOrganizationGpuQuotaResponse
|
|
100
110
|
from platform_api_python_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse
|
|
101
111
|
from platform_api_python_client.models.list_service_accounts_response import ListServiceAccountsResponse
|
|
102
112
|
from platform_api_python_client.models.list_user_vault_items_response import ListUserVaultItemsResponse
|
|
@@ -108,6 +118,8 @@ from platform_api_python_client.models.metrics_server import MetricsServer
|
|
|
108
118
|
from platform_api_python_client.models.network_operator import NetworkOperator
|
|
109
119
|
from platform_api_python_client.models.object_storage_provider import ObjectStorageProvider
|
|
110
120
|
from platform_api_python_client.models.opentelemetry_collector import OpentelemetryCollector
|
|
121
|
+
from platform_api_python_client.models.organization_gpu_quota_request import OrganizationGpuQuotaRequest
|
|
122
|
+
from platform_api_python_client.models.organization_gpu_quota_response import OrganizationGpuQuotaResponse
|
|
111
123
|
from platform_api_python_client.models.pod_details import PodDetails
|
|
112
124
|
from platform_api_python_client.models.pod_status import PodStatus
|
|
113
125
|
from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse
|
|
@@ -120,9 +132,11 @@ from platform_api_python_client.models.service_status import ServiceStatus
|
|
|
120
132
|
from platform_api_python_client.models.spire import Spire
|
|
121
133
|
from platform_api_python_client.models.spire_crds import SpireCrds
|
|
122
134
|
from platform_api_python_client.models.teleport_kube_agent import TeleportKubeAgent
|
|
135
|
+
from platform_api_python_client.models.update_cluster_metadata_request import UpdateClusterMetadataRequest
|
|
123
136
|
from platform_api_python_client.models.update_deployment_response import UpdateDeploymentResponse
|
|
124
137
|
from platform_api_python_client.models.update_deployment_status_v3_request import UpdateDeploymentStatusV3Request
|
|
125
138
|
from platform_api_python_client.models.update_service_account_request import UpdateServiceAccountRequest
|
|
139
|
+
from platform_api_python_client.models.upsert_user_vault_item_request import UpsertUserVaultItemRequest
|
|
126
140
|
from platform_api_python_client.models.user_vault_item import UserVaultItem
|
|
127
141
|
from platform_api_python_client.models.user_vault_type import UserVaultType
|
|
128
142
|
from platform_api_python_client.models.validation_error import ValidationError
|
|
@@ -130,5 +144,6 @@ from platform_api_python_client.models.validation_error_loc_inner import Validat
|
|
|
130
144
|
from platform_api_python_client.models.vault_scope import VaultScope
|
|
131
145
|
from platform_api_python_client.models.volume_access_mode import VolumeAccessMode
|
|
132
146
|
from platform_api_python_client.models.volume_backend import VolumeBackend
|
|
147
|
+
from platform_api_python_client.models.volume_mount import VolumeMount
|
|
133
148
|
from platform_api_python_client.models.volume_status import VolumeStatus
|
|
134
149
|
from platform_api_python_client.models.volume_status_response import VolumeStatusResponse
|
|
@@ -42,14 +42,13 @@ class CreateCServeV3DeploymentRequest(BaseModel):
|
|
|
42
42
|
endpoint_certificate_authority: Optional[StrictStr] = None
|
|
43
43
|
min_replicas: StrictInt
|
|
44
44
|
max_replicas: StrictInt
|
|
45
|
-
initial_replicas: Optional[StrictInt] = None
|
|
46
45
|
concurrency: Optional[StrictInt] = None
|
|
47
46
|
cooldown_period: Optional[StrictInt] = None
|
|
48
47
|
env_vars: Optional[Dict[str, StrictStr]] = None
|
|
49
48
|
enable_logging: Optional[StrictBool] = True
|
|
50
49
|
enable_node_model_cache: Optional[StrictBool] = False
|
|
51
50
|
session_affinity: Optional[StrictBool] = Field(default=False, description="Enable best-effort sticky routing via the `X-Session-Id` request header. Requests carrying the same header value land on the same pod, improving KV cache reuse for agentic workloads. Requests without the header are routed at random. Affinity is NOT durable: scaling, rollouts, restarts, or readiness-probe transitions will remap sessions to different pods. Do not use for irreplaceable in-pod state.")
|
|
52
|
-
__properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "recipe", "cserve_version", "hf_token", "endpoint_bearer_token", "endpoint_certificate_authority", "min_replicas", "max_replicas", "
|
|
51
|
+
__properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "recipe", "cserve_version", "hf_token", "endpoint_bearer_token", "endpoint_certificate_authority", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "env_vars", "enable_logging", "enable_node_model_cache", "session_affinity"]
|
|
53
52
|
|
|
54
53
|
@field_validator('name')
|
|
55
54
|
def name_validate_regular_expression(cls, value):
|
|
@@ -135,11 +134,6 @@ class CreateCServeV3DeploymentRequest(BaseModel):
|
|
|
135
134
|
if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set:
|
|
136
135
|
_dict['endpoint_certificate_authority'] = None
|
|
137
136
|
|
|
138
|
-
# set to None if initial_replicas (nullable) is None
|
|
139
|
-
# and model_fields_set contains the field
|
|
140
|
-
if self.initial_replicas is None and "initial_replicas" in self.model_fields_set:
|
|
141
|
-
_dict['initial_replicas'] = None
|
|
142
|
-
|
|
143
137
|
# set to None if concurrency (nullable) is None
|
|
144
138
|
# and model_fields_set contains the field
|
|
145
139
|
if self.concurrency is None and "concurrency" in self.model_fields_set:
|
|
@@ -176,7 +170,6 @@ class CreateCServeV3DeploymentRequest(BaseModel):
|
|
|
176
170
|
"endpoint_certificate_authority": obj.get("endpoint_certificate_authority"),
|
|
177
171
|
"min_replicas": obj.get("min_replicas"),
|
|
178
172
|
"max_replicas": obj.get("max_replicas"),
|
|
179
|
-
"initial_replicas": obj.get("initial_replicas"),
|
|
180
173
|
"concurrency": obj.get("concurrency"),
|
|
181
174
|
"cooldown_period": obj.get("cooldown_period"),
|
|
182
175
|
"env_vars": obj.get("env_vars"),
|
|
@@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, Strict
|
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from typing_extensions import Annotated
|
|
23
23
|
from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials
|
|
24
|
+
from platform_api_python_client.models.volume_mount import VolumeMount
|
|
24
25
|
from typing import Optional, Set
|
|
25
26
|
from typing_extensions import Self
|
|
26
27
|
|
|
@@ -37,7 +38,8 @@ class CreateComputeDeploymentRequest(BaseModel):
|
|
|
37
38
|
image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
|
|
38
39
|
ssh_public_key: StrictStr
|
|
39
40
|
enable_logging: Optional[StrictBool] = False
|
|
40
|
-
|
|
41
|
+
volume_mounts: Optional[Annotated[List[VolumeMount], Field(max_length=10)]] = None
|
|
42
|
+
__properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "image_url", "image_pull_secret_credentials", "ssh_public_key", "enable_logging", "volume_mounts"]
|
|
41
43
|
|
|
42
44
|
@field_validator('name')
|
|
43
45
|
def name_validate_regular_expression(cls, value):
|
|
@@ -88,6 +90,13 @@ class CreateComputeDeploymentRequest(BaseModel):
|
|
|
88
90
|
# override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
|
|
89
91
|
if self.image_pull_secret_credentials:
|
|
90
92
|
_dict['image_pull_secret_credentials'] = self.image_pull_secret_credentials.to_dict()
|
|
93
|
+
# override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
|
|
94
|
+
_items = []
|
|
95
|
+
if self.volume_mounts:
|
|
96
|
+
for _item_volume_mounts in self.volume_mounts:
|
|
97
|
+
if _item_volume_mounts:
|
|
98
|
+
_items.append(_item_volume_mounts.to_dict())
|
|
99
|
+
_dict['volume_mounts'] = _items
|
|
91
100
|
# set to None if user_annotations (nullable) is None
|
|
92
101
|
# and model_fields_set contains the field
|
|
93
102
|
if self.user_annotations is None and "user_annotations" in self.model_fields_set:
|
|
@@ -118,7 +127,8 @@ class CreateComputeDeploymentRequest(BaseModel):
|
|
|
118
127
|
"image_url": obj.get("image_url"),
|
|
119
128
|
"image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
|
|
120
129
|
"ssh_public_key": obj.get("ssh_public_key"),
|
|
121
|
-
"enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else False
|
|
130
|
+
"enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else False,
|
|
131
|
+
"volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None
|
|
122
132
|
})
|
|
123
133
|
return _obj
|
|
124
134
|
|
|
@@ -21,20 +21,24 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, Strict
|
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from typing_extensions import Annotated
|
|
23
23
|
from platform_api_python_client.models.backend_protocol import BackendProtocol
|
|
24
|
+
from platform_api_python_client.models.dynamo_serving_mode import DynamoServingMode
|
|
25
|
+
from platform_api_python_client.models.dynamo_worker_pools import DynamoWorkerPools
|
|
24
26
|
from typing import Optional, Set
|
|
25
27
|
from typing_extensions import Self
|
|
26
28
|
|
|
27
29
|
class CreateDynamoDeploymentRequest(BaseModel):
|
|
28
30
|
"""
|
|
29
|
-
Create a
|
|
31
|
+
Create a Dynamo deployment. Aggregated mode requires ``hardware_instance_id``; disaggregated mode requires fixed-size ``worker_pools``.
|
|
30
32
|
""" # noqa: E501
|
|
31
33
|
max_surge: Optional[StrictInt] = None
|
|
32
34
|
max_unavailable: Optional[StrictInt] = None
|
|
33
35
|
name: Annotated[str, Field(min_length=1, strict=True, max_length=20)]
|
|
34
36
|
cluster_id: StrictInt
|
|
35
|
-
hardware_instance_id: StrictInt
|
|
37
|
+
hardware_instance_id: Optional[StrictInt] = None
|
|
36
38
|
user_annotations: Optional[Dict[str, StrictStr]] = None
|
|
37
39
|
chart_revision: Optional[StrictStr] = None
|
|
40
|
+
serving_mode: Optional[DynamoServingMode] = None
|
|
41
|
+
worker_pools: Optional[DynamoWorkerPools] = None
|
|
38
42
|
model: StrictStr
|
|
39
43
|
served_model_name: Optional[StrictStr] = None
|
|
40
44
|
min_replicas: Optional[StrictInt] = 1
|
|
@@ -49,7 +53,7 @@ class CreateDynamoDeploymentRequest(BaseModel):
|
|
|
49
53
|
enable_logging: Optional[StrictBool] = True
|
|
50
54
|
enable_node_model_cache: Optional[StrictBool] = False
|
|
51
55
|
backend_protocol: Optional[BackendProtocol] = None
|
|
52
|
-
__properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "model", "served_model_name", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "extra_args", "hf_token", "env_vars", "endpoint_bearer_token", "endpoint_certificate_authority", "enable_logging", "enable_node_model_cache", "backend_protocol"]
|
|
56
|
+
__properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "serving_mode", "worker_pools", "model", "served_model_name", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "extra_args", "hf_token", "env_vars", "endpoint_bearer_token", "endpoint_certificate_authority", "enable_logging", "enable_node_model_cache", "backend_protocol"]
|
|
53
57
|
|
|
54
58
|
@field_validator('name')
|
|
55
59
|
def name_validate_regular_expression(cls, value):
|
|
@@ -97,6 +101,9 @@ class CreateDynamoDeploymentRequest(BaseModel):
|
|
|
97
101
|
exclude=excluded_fields,
|
|
98
102
|
exclude_none=True,
|
|
99
103
|
)
|
|
104
|
+
# override the default output from pydantic by calling `to_dict()` of worker_pools
|
|
105
|
+
if self.worker_pools:
|
|
106
|
+
_dict['worker_pools'] = self.worker_pools.to_dict()
|
|
100
107
|
# set to None if max_surge (nullable) is None
|
|
101
108
|
# and model_fields_set contains the field
|
|
102
109
|
if self.max_surge is None and "max_surge" in self.model_fields_set:
|
|
@@ -107,11 +114,21 @@ class CreateDynamoDeploymentRequest(BaseModel):
|
|
|
107
114
|
if self.max_unavailable is None and "max_unavailable" in self.model_fields_set:
|
|
108
115
|
_dict['max_unavailable'] = None
|
|
109
116
|
|
|
117
|
+
# set to None if hardware_instance_id (nullable) is None
|
|
118
|
+
# and model_fields_set contains the field
|
|
119
|
+
if self.hardware_instance_id is None and "hardware_instance_id" in self.model_fields_set:
|
|
120
|
+
_dict['hardware_instance_id'] = None
|
|
121
|
+
|
|
110
122
|
# set to None if user_annotations (nullable) is None
|
|
111
123
|
# and model_fields_set contains the field
|
|
112
124
|
if self.user_annotations is None and "user_annotations" in self.model_fields_set:
|
|
113
125
|
_dict['user_annotations'] = None
|
|
114
126
|
|
|
127
|
+
# set to None if worker_pools (nullable) is None
|
|
128
|
+
# and model_fields_set contains the field
|
|
129
|
+
if self.worker_pools is None and "worker_pools" in self.model_fields_set:
|
|
130
|
+
_dict['worker_pools'] = None
|
|
131
|
+
|
|
115
132
|
# set to None if served_model_name (nullable) is None
|
|
116
133
|
# and model_fields_set contains the field
|
|
117
134
|
if self.served_model_name is None and "served_model_name" in self.model_fields_set:
|
|
@@ -166,6 +183,8 @@ class CreateDynamoDeploymentRequest(BaseModel):
|
|
|
166
183
|
"hardware_instance_id": obj.get("hardware_instance_id"),
|
|
167
184
|
"user_annotations": obj.get("user_annotations"),
|
|
168
185
|
"chart_revision": obj.get("chart_revision"),
|
|
186
|
+
"serving_mode": obj.get("serving_mode"),
|
|
187
|
+
"worker_pools": DynamoWorkerPools.from_dict(obj["worker_pools"]) if obj.get("worker_pools") is not None else None,
|
|
169
188
|
"model": obj.get("model"),
|
|
170
189
|
"served_model_name": obj.get("served_model_name"),
|
|
171
190
|
"min_replicas": obj.get("min_replicas") if obj.get("min_replicas") is not None else 1,
|
|
@@ -23,9 +23,9 @@ from typing_extensions import Annotated
|
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class CreateFilesystemVolumeRequest(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
CreateFilesystemVolumeRequest
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
name: Annotated[str, Field(min_length=1, strict=True, max_length=20)]
|
|
31
31
|
cluster_id: StrictInt
|
|
@@ -44,8 +44,8 @@ class CreateBlockVolumeRequest(BaseModel):
|
|
|
44
44
|
@field_validator('backend')
|
|
45
45
|
def backend_validate_enum(cls, value):
|
|
46
46
|
"""Validates the enum"""
|
|
47
|
-
if value not in set(['
|
|
48
|
-
raise ValueError("must be one of enum values ('
|
|
47
|
+
if value not in set(['filesystem']):
|
|
48
|
+
raise ValueError("must be one of enum values ('filesystem')")
|
|
49
49
|
return value
|
|
50
50
|
|
|
51
51
|
@field_validator('storage_class')
|
|
@@ -76,7 +76,7 @@ class CreateBlockVolumeRequest(BaseModel):
|
|
|
76
76
|
|
|
77
77
|
@classmethod
|
|
78
78
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
79
|
-
"""Create an instance of
|
|
79
|
+
"""Create an instance of CreateFilesystemVolumeRequest from a JSON string"""
|
|
80
80
|
return cls.from_dict(json.loads(json_str))
|
|
81
81
|
|
|
82
82
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -106,7 +106,7 @@ class CreateBlockVolumeRequest(BaseModel):
|
|
|
106
106
|
|
|
107
107
|
@classmethod
|
|
108
108
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
109
|
-
"""Create an instance of
|
|
109
|
+
"""Create an instance of CreateFilesystemVolumeRequest from a dict"""
|
|
110
110
|
if obj is None:
|
|
111
111
|
return None
|
|
112
112
|
|
|
@@ -43,7 +43,6 @@ class CreateInferenceV3DeploymentRequest(BaseModel):
|
|
|
43
43
|
port: Annotated[int, Field(le=65535, strict=True, ge=1)]
|
|
44
44
|
min_replicas: StrictInt
|
|
45
45
|
max_replicas: StrictInt
|
|
46
|
-
initial_replicas: Optional[StrictInt] = None
|
|
47
46
|
concurrency: Optional[StrictInt] = None
|
|
48
47
|
cooldown_period: Optional[StrictInt] = None
|
|
49
48
|
healthcheck: Optional[StrictStr] = None
|
|
@@ -58,7 +57,7 @@ class CreateInferenceV3DeploymentRequest(BaseModel):
|
|
|
58
57
|
session_affinity: Optional[StrictBool] = Field(default=False, description="Enable best-effort sticky routing via the `X-Session-Id` request header. Requests carrying the same header value land on the same pod, improving KV cache reuse for agentic workloads. Requests without the header are routed at random. Affinity is NOT durable: scaling, rollouts, restarts, or readiness-probe transitions will remap sessions to different pods. Do not use for irreplaceable in-pod state.")
|
|
59
58
|
config_file: Optional[ConfigFileMount] = None
|
|
60
59
|
metrics: Optional[MetricsConfig] = None
|
|
61
|
-
__properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "image_url", "image_pull_secret_credentials", "port", "min_replicas", "max_replicas", "
|
|
60
|
+
__properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "image_url", "image_pull_secret_credentials", "port", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "healthcheck", "env_vars", "command", "endpoint_bearer_token", "endpoint_certificate_authority", "hf_token", "backend_protocol", "enable_logging", "enable_node_model_cache", "session_affinity", "config_file", "metrics"]
|
|
62
61
|
|
|
63
62
|
@field_validator('name')
|
|
64
63
|
def name_validate_regular_expression(cls, value):
|
|
@@ -135,11 +134,6 @@ class CreateInferenceV3DeploymentRequest(BaseModel):
|
|
|
135
134
|
if self.image_pull_secret_credentials is None and "image_pull_secret_credentials" in self.model_fields_set:
|
|
136
135
|
_dict['image_pull_secret_credentials'] = None
|
|
137
136
|
|
|
138
|
-
# set to None if initial_replicas (nullable) is None
|
|
139
|
-
# and model_fields_set contains the field
|
|
140
|
-
if self.initial_replicas is None and "initial_replicas" in self.model_fields_set:
|
|
141
|
-
_dict['initial_replicas'] = None
|
|
142
|
-
|
|
143
137
|
# set to None if concurrency (nullable) is None
|
|
144
138
|
# and model_fields_set contains the field
|
|
145
139
|
if self.concurrency is None and "concurrency" in self.model_fields_set:
|
|
@@ -214,7 +208,6 @@ class CreateInferenceV3DeploymentRequest(BaseModel):
|
|
|
214
208
|
"port": obj.get("port"),
|
|
215
209
|
"min_replicas": obj.get("min_replicas"),
|
|
216
210
|
"max_replicas": obj.get("max_replicas"),
|
|
217
|
-
"initial_replicas": obj.get("initial_replicas"),
|
|
218
211
|
"concurrency": obj.get("concurrency"),
|
|
219
212
|
"cooldown_period": obj.get("cooldown_period"),
|
|
220
213
|
"healthcheck": obj.get("healthcheck"),
|
|
@@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List, Optional
|
|
|
22
22
|
from typing_extensions import Annotated
|
|
23
23
|
from platform_api_python_client.models.config_file_mount import ConfigFileMount
|
|
24
24
|
from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials
|
|
25
|
+
from platform_api_python_client.models.volume_mount import VolumeMount
|
|
25
26
|
from typing import Optional, Set
|
|
26
27
|
from typing_extensions import Self
|
|
27
28
|
|
|
@@ -44,7 +45,8 @@ class CreateJobDeploymentRequest(BaseModel):
|
|
|
44
45
|
active_deadline_seconds: Optional[StrictInt] = None
|
|
45
46
|
enable_logging: Optional[StrictBool] = True
|
|
46
47
|
config_file: Optional[ConfigFileMount] = None
|
|
47
|
-
|
|
48
|
+
volume_mounts: Optional[Annotated[List[VolumeMount], Field(max_length=10)]] = None
|
|
49
|
+
__properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "image_url", "image_pull_secret_credentials", "env_vars", "command", "completions", "parallelism", "backoff_limit", "active_deadline_seconds", "enable_logging", "config_file", "volume_mounts"]
|
|
48
50
|
|
|
49
51
|
@field_validator('name')
|
|
50
52
|
def name_validate_regular_expression(cls, value):
|
|
@@ -98,6 +100,13 @@ class CreateJobDeploymentRequest(BaseModel):
|
|
|
98
100
|
# override the default output from pydantic by calling `to_dict()` of config_file
|
|
99
101
|
if self.config_file:
|
|
100
102
|
_dict['config_file'] = self.config_file.to_dict()
|
|
103
|
+
# override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
|
|
104
|
+
_items = []
|
|
105
|
+
if self.volume_mounts:
|
|
106
|
+
for _item_volume_mounts in self.volume_mounts:
|
|
107
|
+
if _item_volume_mounts:
|
|
108
|
+
_items.append(_item_volume_mounts.to_dict())
|
|
109
|
+
_dict['volume_mounts'] = _items
|
|
101
110
|
# set to None if user_annotations (nullable) is None
|
|
102
111
|
# and model_fields_set contains the field
|
|
103
112
|
if self.user_annotations is None and "user_annotations" in self.model_fields_set:
|
|
@@ -154,7 +163,8 @@ class CreateJobDeploymentRequest(BaseModel):
|
|
|
154
163
|
"backoff_limit": obj.get("backoff_limit") if obj.get("backoff_limit") is not None else 3,
|
|
155
164
|
"active_deadline_seconds": obj.get("active_deadline_seconds"),
|
|
156
165
|
"enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True,
|
|
157
|
-
"config_file": ConfigFileMount.from_dict(obj["config_file"]) if obj.get("config_file") is not None else None
|
|
166
|
+
"config_file": ConfigFileMount.from_dict(obj["config_file"]) if obj.get("config_file") is not None else None,
|
|
167
|
+
"volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None
|
|
158
168
|
})
|
|
159
169
|
return _obj
|
|
160
170
|
|
|
@@ -17,24 +17,24 @@ import json
|
|
|
17
17
|
import pprint
|
|
18
18
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
19
19
|
from typing import Any, List, Optional
|
|
20
|
-
from platform_api_python_client.models.
|
|
20
|
+
from platform_api_python_client.models.create_filesystem_volume_request import CreateFilesystemVolumeRequest
|
|
21
21
|
from platform_api_python_client.models.create_object_volume_request import CreateObjectVolumeRequest
|
|
22
22
|
from pydantic import StrictStr, Field
|
|
23
23
|
from typing import Union, List, Set, Optional, Dict
|
|
24
24
|
from typing_extensions import Literal, Self
|
|
25
25
|
|
|
26
|
-
CREATEVOLUMEREQUEST_ONE_OF_SCHEMAS = ["
|
|
26
|
+
CREATEVOLUMEREQUEST_ONE_OF_SCHEMAS = ["CreateFilesystemVolumeRequest", "CreateObjectVolumeRequest"]
|
|
27
27
|
|
|
28
28
|
class CreateVolumeRequest(BaseModel):
|
|
29
29
|
"""
|
|
30
30
|
CreateVolumeRequest
|
|
31
31
|
"""
|
|
32
|
-
# data type:
|
|
33
|
-
oneof_schema_1_validator: Optional[
|
|
32
|
+
# data type: CreateFilesystemVolumeRequest
|
|
33
|
+
oneof_schema_1_validator: Optional[CreateFilesystemVolumeRequest] = None
|
|
34
34
|
# data type: CreateObjectVolumeRequest
|
|
35
35
|
oneof_schema_2_validator: Optional[CreateObjectVolumeRequest] = None
|
|
36
|
-
actual_instance: Optional[Union[
|
|
37
|
-
one_of_schemas: Set[str] = { "
|
|
36
|
+
actual_instance: Optional[Union[CreateFilesystemVolumeRequest, CreateObjectVolumeRequest]] = None
|
|
37
|
+
one_of_schemas: Set[str] = { "CreateFilesystemVolumeRequest", "CreateObjectVolumeRequest" }
|
|
38
38
|
|
|
39
39
|
model_config = ConfigDict(
|
|
40
40
|
validate_assignment=True,
|
|
@@ -60,9 +60,9 @@ class CreateVolumeRequest(BaseModel):
|
|
|
60
60
|
instance = CreateVolumeRequest.model_construct()
|
|
61
61
|
error_messages = []
|
|
62
62
|
match = 0
|
|
63
|
-
# validate data type:
|
|
64
|
-
if not isinstance(v,
|
|
65
|
-
error_messages.append(f"Error! Input type `{type(v)}` is not `
|
|
63
|
+
# validate data type: CreateFilesystemVolumeRequest
|
|
64
|
+
if not isinstance(v, CreateFilesystemVolumeRequest):
|
|
65
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `CreateFilesystemVolumeRequest`")
|
|
66
66
|
else:
|
|
67
67
|
match += 1
|
|
68
68
|
# validate data type: CreateObjectVolumeRequest
|
|
@@ -72,10 +72,10 @@ class CreateVolumeRequest(BaseModel):
|
|
|
72
72
|
match += 1
|
|
73
73
|
if match > 1:
|
|
74
74
|
# more than 1 match
|
|
75
|
-
raise ValueError("Multiple matches found when setting `actual_instance` in CreateVolumeRequest with oneOf schemas:
|
|
75
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in CreateVolumeRequest with oneOf schemas: CreateFilesystemVolumeRequest, CreateObjectVolumeRequest. Details: " + ", ".join(error_messages))
|
|
76
76
|
elif match == 0:
|
|
77
77
|
# no match
|
|
78
|
-
raise ValueError("No match found when setting `actual_instance` in CreateVolumeRequest with oneOf schemas:
|
|
78
|
+
raise ValueError("No match found when setting `actual_instance` in CreateVolumeRequest with oneOf schemas: CreateFilesystemVolumeRequest, CreateObjectVolumeRequest. Details: " + ", ".join(error_messages))
|
|
79
79
|
else:
|
|
80
80
|
return v
|
|
81
81
|
|
|
@@ -90,9 +90,9 @@ class CreateVolumeRequest(BaseModel):
|
|
|
90
90
|
error_messages = []
|
|
91
91
|
match = 0
|
|
92
92
|
|
|
93
|
-
# deserialize data into
|
|
93
|
+
# deserialize data into CreateFilesystemVolumeRequest
|
|
94
94
|
try:
|
|
95
|
-
instance.actual_instance =
|
|
95
|
+
instance.actual_instance = CreateFilesystemVolumeRequest.from_json(json_str)
|
|
96
96
|
match += 1
|
|
97
97
|
except (ValidationError, ValueError) as e:
|
|
98
98
|
error_messages.append(str(e))
|
|
@@ -105,10 +105,10 @@ class CreateVolumeRequest(BaseModel):
|
|
|
105
105
|
|
|
106
106
|
if match > 1:
|
|
107
107
|
# more than 1 match
|
|
108
|
-
raise ValueError("Multiple matches found when deserializing the JSON string into CreateVolumeRequest with oneOf schemas:
|
|
108
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into CreateVolumeRequest with oneOf schemas: CreateFilesystemVolumeRequest, CreateObjectVolumeRequest. Details: " + ", ".join(error_messages))
|
|
109
109
|
elif match == 0:
|
|
110
110
|
# no match
|
|
111
|
-
raise ValueError("No match found when deserializing the JSON string into CreateVolumeRequest with oneOf schemas:
|
|
111
|
+
raise ValueError("No match found when deserializing the JSON string into CreateVolumeRequest with oneOf schemas: CreateFilesystemVolumeRequest, CreateObjectVolumeRequest. Details: " + ", ".join(error_messages))
|
|
112
112
|
else:
|
|
113
113
|
return instance
|
|
114
114
|
|
|
@@ -122,7 +122,7 @@ class CreateVolumeRequest(BaseModel):
|
|
|
122
122
|
else:
|
|
123
123
|
return json.dumps(self.actual_instance)
|
|
124
124
|
|
|
125
|
-
def to_dict(self) -> Optional[Union[Dict[str, Any],
|
|
125
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], CreateFilesystemVolumeRequest, CreateObjectVolumeRequest]]:
|
|
126
126
|
"""Returns the dict representation of the actual instance"""
|
|
127
127
|
if self.actual_instance is None:
|
|
128
128
|
return None
|
|
@@ -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 pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from platform_api_python_client.models.user_vault_type import UserVaultType
|
|
24
|
+
from platform_api_python_client.models.vault_scope import VaultScope
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class DeleteUserVaultItemRequest(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
Body for the legacy delete, deliberately permissive. Kept separate from UserVaultItem so that model can require `id`. Here `id` stays optional because resolving by (type, key, visibility) is the only way to delete a row for which the client was never handed an id, and `value` is accepted and ignored because old clients send back a whole vault item.
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
id: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
33
|
+
type: UserVaultType
|
|
34
|
+
key: StrictStr
|
|
35
|
+
value: Optional[StrictStr] = None
|
|
36
|
+
visibility: Optional[VaultScope] = None
|
|
37
|
+
__properties: ClassVar[List[str]] = ["id", "type", "key", "value", "visibility"]
|
|
38
|
+
|
|
39
|
+
model_config = ConfigDict(
|
|
40
|
+
populate_by_name=True,
|
|
41
|
+
validate_assignment=True,
|
|
42
|
+
protected_namespaces=(),
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def to_str(self) -> str:
|
|
47
|
+
"""Returns the string representation of the model using alias"""
|
|
48
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
49
|
+
|
|
50
|
+
def to_json(self) -> str:
|
|
51
|
+
"""Returns the JSON representation of the model using alias"""
|
|
52
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
53
|
+
return json.dumps(self.to_dict())
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
57
|
+
"""Create an instance of DeleteUserVaultItemRequest 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 id (nullable) is None
|
|
79
|
+
# and model_fields_set contains the field
|
|
80
|
+
if self.id is None and "id" in self.model_fields_set:
|
|
81
|
+
_dict['id'] = None
|
|
82
|
+
|
|
83
|
+
# set to None if value (nullable) is None
|
|
84
|
+
# and model_fields_set contains the field
|
|
85
|
+
if self.value is None and "value" in self.model_fields_set:
|
|
86
|
+
_dict['value'] = 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 DeleteUserVaultItemRequest 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
|
+
"id": obj.get("id"),
|
|
101
|
+
"type": obj.get("type"),
|
|
102
|
+
"key": obj.get("key"),
|
|
103
|
+
"value": obj.get("value"),
|
|
104
|
+
"visibility": obj.get("visibility")
|
|
105
|
+
})
|
|
106
|
+
return _obj
|
|
107
|
+
|
|
108
|
+
|