platform-api-python-client 4.28.0__py3-none-any.whl → 4.31.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.
Files changed (36) hide show
  1. platform_api_python_client/__init__.py +5 -1
  2. platform_api_python_client/api/external_api.py +15 -288
  3. platform_api_python_client/api_client.py +1 -1
  4. platform_api_python_client/configuration.py +1 -1
  5. platform_api_python_client/models/__init__.py +4 -0
  6. platform_api_python_client/models/cloud_provider.py +5 -0
  7. platform_api_python_client/models/create_c_serve_v3_deployment_request.py +18 -1
  8. platform_api_python_client/models/create_compute_deployment_request.py +14 -7
  9. platform_api_python_client/models/create_dynamo_deployment_request.py +56 -6
  10. platform_api_python_client/models/create_filesystem_volume_request.py +13 -0
  11. platform_api_python_client/models/create_inference_v3_deployment_request.py +18 -1
  12. platform_api_python_client/models/create_job_deployment_request.py +17 -10
  13. platform_api_python_client/models/create_object_volume_request.py +32 -19
  14. platform_api_python_client/models/deployment_response.py +21 -6
  15. platform_api_python_client/models/dynamo_communications_input.py +104 -0
  16. platform_api_python_client/models/dynamo_communications_output.py +104 -0
  17. platform_api_python_client/models/dynamo_kv_transfer_configuration.py +101 -0
  18. platform_api_python_client/models/dynamo_kv_transfer_policy.py +37 -0
  19. platform_api_python_client/models/dynamo_worker_pool_config.py +38 -5
  20. platform_api_python_client/models/dynamo_worker_pools.py +24 -4
  21. platform_api_python_client/models/get_c_serve_v2_deployment_response.py +25 -1
  22. platform_api_python_client/models/get_c_serve_v3_deployment_response.py +25 -1
  23. platform_api_python_client/models/get_compute_deployment_response.py +17 -3
  24. platform_api_python_client/models/get_deployment_response.py +26 -2
  25. platform_api_python_client/models/get_dynamo_deployment_response.py +47 -5
  26. platform_api_python_client/models/get_inference_deployment_response.py +25 -1
  27. platform_api_python_client/models/get_inference_v3_deployment_response.py +25 -1
  28. platform_api_python_client/models/get_job_deployment_response.py +24 -10
  29. platform_api_python_client/models/get_object_volume_response.py +2 -16
  30. platform_api_python_client/models/hardware_instance_response.py +1 -3
  31. platform_api_python_client/models/validation_error.py +12 -3
  32. platform_api_python_client/models/volume_mount.py +1 -1
  33. {platform_api_python_client-4.28.0.dist-info → platform_api_python_client-4.31.0.dist-info}/METADATA +1 -1
  34. {platform_api_python_client-4.28.0.dist-info → platform_api_python_client-4.31.0.dist-info}/RECORD +36 -32
  35. {platform_api_python_client-4.28.0.dist-info → platform_api_python_client-4.31.0.dist-info}/WHEEL +0 -0
  36. {platform_api_python_client-4.28.0.dist-info → platform_api_python_client-4.31.0.dist-info}/top_level.txt +0 -0
@@ -18,19 +18,21 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
  from datetime import datetime
21
- from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
22
22
  from typing import Any, ClassVar, Dict, List, Optional
23
23
  from platform_api_python_client.models.backend_protocol import BackendProtocol
24
24
  from platform_api_python_client.models.deployment_status import DeploymentStatus
25
25
  from platform_api_python_client.models.deployment_type import DeploymentType
26
+ from platform_api_python_client.models.dynamo_communications_output import DynamoCommunicationsOutput
26
27
  from platform_api_python_client.models.dynamo_serving_mode import DynamoServingMode
27
28
  from platform_api_python_client.models.dynamo_worker_pools import DynamoWorkerPools
29
+ from platform_api_python_client.models.volume_mount import VolumeMount
28
30
  from typing import Optional, Set
29
31
  from typing_extensions import Self
30
32
 
31
33
  class GetDynamoDeploymentResponse(BaseModel):
32
34
  """
33
- GetDynamoDeploymentResponse
35
+ Dynamo deployment read model. ``worker_pools`` is the authoritative hardware/scaling view for both serving modes. The inherited ``hardware_instance_id`` is the single-hardware projection (worker for aggregated, decode for disaggregated) and the top-level scaling fields mirror ``worker_pools.worker``; both remain for consumers that predate ``worker_pools``.
34
36
  """ # noqa: E501
35
37
  creator_email: StrictStr
36
38
  cluster_id: StrictInt
@@ -43,13 +45,18 @@ class GetDynamoDeploymentResponse(BaseModel):
43
45
  created_at: datetime
44
46
  hardware_instance_id: StrictInt
45
47
  revision_number: StrictInt
48
+ chart_revision: Optional[StrictStr] = None
46
49
  user_annotations: Optional[Dict[str, StrictStr]] = None
50
+ priority: Optional[StrictStr] = None
51
+ volume_mounts: Optional[List[VolumeMount]] = None
47
52
  serving_mode: Optional[DynamoServingMode] = None
48
53
  worker_pools: Optional[DynamoWorkerPools] = None
54
+ communications: Optional[DynamoCommunicationsOutput] = None
49
55
  model: StrictStr
50
56
  served_model_name: Optional[StrictStr] = None
51
- min_replicas: StrictInt
52
- max_replicas: StrictInt
57
+ runtime_version: Optional[StrictStr] = None
58
+ min_replicas: StrictInt = Field(description="Deprecated aggregated-only spelling; set this under worker_pools.worker instead. Accepted alongside worker_pools when the values agree.")
59
+ max_replicas: StrictInt = Field(description="Deprecated aggregated-only spelling; set this under worker_pools.worker instead. Accepted alongside worker_pools when the values agree.")
53
60
  concurrency: Optional[StrictInt] = None
54
61
  cooldown_period: Optional[StrictInt] = None
55
62
  extra_args: Optional[StrictStr] = None
@@ -59,7 +66,7 @@ class GetDynamoDeploymentResponse(BaseModel):
59
66
  enable_logging: Optional[StrictBool] = True
60
67
  enable_node_model_cache: Optional[StrictBool] = False
61
68
  backend_protocol: Optional[BackendProtocol] = None
62
- __properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "user_annotations", "serving_mode", "worker_pools", "model", "served_model_name", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "extra_args", "env_vars", "endpoint_certificate_authority", "endpoint_bearer_token", "enable_logging", "enable_node_model_cache", "backend_protocol"]
69
+ __properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "chart_revision", "user_annotations", "priority", "volume_mounts", "serving_mode", "worker_pools", "communications", "model", "served_model_name", "runtime_version", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "extra_args", "env_vars", "endpoint_certificate_authority", "endpoint_bearer_token", "enable_logging", "enable_node_model_cache", "backend_protocol"]
63
70
 
64
71
  model_config = ConfigDict(
65
72
  populate_by_name=True,
@@ -100,29 +107,59 @@ class GetDynamoDeploymentResponse(BaseModel):
100
107
  exclude=excluded_fields,
101
108
  exclude_none=True,
102
109
  )
110
+ # override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
111
+ _items = []
112
+ if self.volume_mounts:
113
+ for _item_volume_mounts in self.volume_mounts:
114
+ if _item_volume_mounts:
115
+ _items.append(_item_volume_mounts.to_dict())
116
+ _dict['volume_mounts'] = _items
103
117
  # override the default output from pydantic by calling `to_dict()` of worker_pools
104
118
  if self.worker_pools:
105
119
  _dict['worker_pools'] = self.worker_pools.to_dict()
120
+ # override the default output from pydantic by calling `to_dict()` of communications
121
+ if self.communications:
122
+ _dict['communications'] = self.communications.to_dict()
106
123
  # set to None if image_url (nullable) is None
107
124
  # and model_fields_set contains the field
108
125
  if self.image_url is None and "image_url" in self.model_fields_set:
109
126
  _dict['image_url'] = None
110
127
 
128
+ # set to None if chart_revision (nullable) is None
129
+ # and model_fields_set contains the field
130
+ if self.chart_revision is None and "chart_revision" in self.model_fields_set:
131
+ _dict['chart_revision'] = None
132
+
111
133
  # set to None if user_annotations (nullable) is None
112
134
  # and model_fields_set contains the field
113
135
  if self.user_annotations is None and "user_annotations" in self.model_fields_set:
114
136
  _dict['user_annotations'] = None
115
137
 
138
+ # set to None if priority (nullable) is None
139
+ # and model_fields_set contains the field
140
+ if self.priority is None and "priority" in self.model_fields_set:
141
+ _dict['priority'] = None
142
+
116
143
  # set to None if worker_pools (nullable) is None
117
144
  # and model_fields_set contains the field
118
145
  if self.worker_pools is None and "worker_pools" in self.model_fields_set:
119
146
  _dict['worker_pools'] = None
120
147
 
148
+ # set to None if communications (nullable) is None
149
+ # and model_fields_set contains the field
150
+ if self.communications is None and "communications" in self.model_fields_set:
151
+ _dict['communications'] = None
152
+
121
153
  # set to None if served_model_name (nullable) is None
122
154
  # and model_fields_set contains the field
123
155
  if self.served_model_name is None and "served_model_name" in self.model_fields_set:
124
156
  _dict['served_model_name'] = None
125
157
 
158
+ # set to None if runtime_version (nullable) is None
159
+ # and model_fields_set contains the field
160
+ if self.runtime_version is None and "runtime_version" in self.model_fields_set:
161
+ _dict['runtime_version'] = None
162
+
126
163
  # set to None if concurrency (nullable) is None
127
164
  # and model_fields_set contains the field
128
165
  if self.concurrency is None and "concurrency" in self.model_fields_set:
@@ -171,11 +208,16 @@ class GetDynamoDeploymentResponse(BaseModel):
171
208
  "created_at": obj.get("created_at"),
172
209
  "hardware_instance_id": obj.get("hardware_instance_id"),
173
210
  "revision_number": obj.get("revision_number"),
211
+ "chart_revision": obj.get("chart_revision"),
174
212
  "user_annotations": obj.get("user_annotations"),
213
+ "priority": obj.get("priority"),
214
+ "volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
175
215
  "serving_mode": obj.get("serving_mode"),
176
216
  "worker_pools": DynamoWorkerPools.from_dict(obj["worker_pools"]) if obj.get("worker_pools") is not None else None,
217
+ "communications": DynamoCommunicationsOutput.from_dict(obj["communications"]) if obj.get("communications") is not None else None,
177
218
  "model": obj.get("model"),
178
219
  "served_model_name": obj.get("served_model_name"),
220
+ "runtime_version": obj.get("runtime_version"),
179
221
  "min_replicas": obj.get("min_replicas"),
180
222
  "max_replicas": obj.get("max_replicas"),
181
223
  "concurrency": obj.get("concurrency"),
@@ -22,6 +22,7 @@ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
22
22
  from typing import Any, ClassVar, Dict, List, Optional
23
23
  from platform_api_python_client.models.deployment_status import DeploymentStatus
24
24
  from platform_api_python_client.models.deployment_type import DeploymentType
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
 
@@ -40,7 +41,10 @@ class GetInferenceDeploymentResponse(BaseModel):
40
41
  created_at: datetime
41
42
  hardware_instance_id: StrictInt
42
43
  revision_number: StrictInt
44
+ chart_revision: Optional[StrictStr] = None
43
45
  user_annotations: Optional[Dict[str, StrictStr]] = None
46
+ priority: Optional[StrictStr] = None
47
+ volume_mounts: Optional[List[VolumeMount]] = None
44
48
  container_port: StrictInt
45
49
  min_scale: StrictInt
46
50
  max_scale: StrictInt
@@ -52,7 +56,7 @@ class GetInferenceDeploymentResponse(BaseModel):
52
56
  env_vars: Optional[Dict[str, StrictStr]] = None
53
57
  command: Optional[List[StrictStr]] = None
54
58
  command_args: Optional[List[StrictStr]] = None
55
- __properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "user_annotations", "container_port", "min_scale", "max_scale", "initial_scale", "concurrency", "healthcheck", "endpoint_certificate_authority", "endpoint_bearer_token", "env_vars", "command", "command_args"]
59
+ __properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "chart_revision", "user_annotations", "priority", "volume_mounts", "container_port", "min_scale", "max_scale", "initial_scale", "concurrency", "healthcheck", "endpoint_certificate_authority", "endpoint_bearer_token", "env_vars", "command", "command_args"]
56
60
 
57
61
  model_config = ConfigDict(
58
62
  populate_by_name=True,
@@ -93,16 +97,33 @@ class GetInferenceDeploymentResponse(BaseModel):
93
97
  exclude=excluded_fields,
94
98
  exclude_none=True,
95
99
  )
100
+ # override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
101
+ _items = []
102
+ if self.volume_mounts:
103
+ for _item_volume_mounts in self.volume_mounts:
104
+ if _item_volume_mounts:
105
+ _items.append(_item_volume_mounts.to_dict())
106
+ _dict['volume_mounts'] = _items
96
107
  # set to None if image_url (nullable) is None
97
108
  # and model_fields_set contains the field
98
109
  if self.image_url is None and "image_url" in self.model_fields_set:
99
110
  _dict['image_url'] = None
100
111
 
112
+ # set to None if chart_revision (nullable) is None
113
+ # and model_fields_set contains the field
114
+ if self.chart_revision is None and "chart_revision" in self.model_fields_set:
115
+ _dict['chart_revision'] = None
116
+
101
117
  # set to None if user_annotations (nullable) is None
102
118
  # and model_fields_set contains the field
103
119
  if self.user_annotations is None and "user_annotations" in self.model_fields_set:
104
120
  _dict['user_annotations'] = None
105
121
 
122
+ # set to None if priority (nullable) is None
123
+ # and model_fields_set contains the field
124
+ if self.priority is None and "priority" in self.model_fields_set:
125
+ _dict['priority'] = None
126
+
106
127
  # set to None if initial_scale (nullable) is None
107
128
  # and model_fields_set contains the field
108
129
  if self.initial_scale is None and "initial_scale" in self.model_fields_set:
@@ -166,7 +187,10 @@ class GetInferenceDeploymentResponse(BaseModel):
166
187
  "created_at": obj.get("created_at"),
167
188
  "hardware_instance_id": obj.get("hardware_instance_id"),
168
189
  "revision_number": obj.get("revision_number"),
190
+ "chart_revision": obj.get("chart_revision"),
169
191
  "user_annotations": obj.get("user_annotations"),
192
+ "priority": obj.get("priority"),
193
+ "volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
170
194
  "container_port": obj.get("container_port"),
171
195
  "min_scale": obj.get("min_scale"),
172
196
  "max_scale": obj.get("max_scale"),
@@ -26,6 +26,7 @@ from platform_api_python_client.models.deployment_status import DeploymentStatus
26
26
  from platform_api_python_client.models.deployment_type import DeploymentType
27
27
  from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials
28
28
  from platform_api_python_client.models.metrics_config import MetricsConfig
29
+ from platform_api_python_client.models.volume_mount import VolumeMount
29
30
  from typing import Optional, Set
30
31
  from typing_extensions import Self
31
32
 
@@ -44,7 +45,10 @@ class GetInferenceV3DeploymentResponse(BaseModel):
44
45
  created_at: datetime
45
46
  hardware_instance_id: StrictInt
46
47
  revision_number: StrictInt
48
+ chart_revision: Optional[StrictStr] = None
47
49
  user_annotations: Optional[Dict[str, StrictStr]] = None
50
+ priority: Optional[StrictStr] = None
51
+ volume_mounts: Optional[List[VolumeMount]] = None
48
52
  container_port: StrictInt
49
53
  min_replicas: StrictInt
50
54
  max_replicas: StrictInt
@@ -64,7 +68,7 @@ class GetInferenceV3DeploymentResponse(BaseModel):
64
68
  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.")
65
69
  config_file: Optional[ConfigFileMount] = None
66
70
  metrics: Optional[MetricsConfig] = None
67
- __properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "user_annotations", "container_port", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "healthcheck", "endpoint_certificate_authority", "endpoint_bearer_token", "env_vars", "command", "command_args", "original_command", "image_pull_secret_credentials", "backend_protocol", "enable_logging", "enable_node_model_cache", "session_affinity", "config_file", "metrics"]
71
+ __properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "chart_revision", "user_annotations", "priority", "volume_mounts", "container_port", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "healthcheck", "endpoint_certificate_authority", "endpoint_bearer_token", "env_vars", "command", "command_args", "original_command", "image_pull_secret_credentials", "backend_protocol", "enable_logging", "enable_node_model_cache", "session_affinity", "config_file", "metrics"]
68
72
 
69
73
  model_config = ConfigDict(
70
74
  populate_by_name=True,
@@ -105,6 +109,13 @@ class GetInferenceV3DeploymentResponse(BaseModel):
105
109
  exclude=excluded_fields,
106
110
  exclude_none=True,
107
111
  )
112
+ # override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
113
+ _items = []
114
+ if self.volume_mounts:
115
+ for _item_volume_mounts in self.volume_mounts:
116
+ if _item_volume_mounts:
117
+ _items.append(_item_volume_mounts.to_dict())
118
+ _dict['volume_mounts'] = _items
108
119
  # override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
109
120
  if self.image_pull_secret_credentials:
110
121
  _dict['image_pull_secret_credentials'] = self.image_pull_secret_credentials.to_dict()
@@ -119,11 +130,21 @@ class GetInferenceV3DeploymentResponse(BaseModel):
119
130
  if self.image_url is None and "image_url" in self.model_fields_set:
120
131
  _dict['image_url'] = None
121
132
 
133
+ # set to None if chart_revision (nullable) is None
134
+ # and model_fields_set contains the field
135
+ if self.chart_revision is None and "chart_revision" in self.model_fields_set:
136
+ _dict['chart_revision'] = None
137
+
122
138
  # set to None if user_annotations (nullable) is None
123
139
  # and model_fields_set contains the field
124
140
  if self.user_annotations is None and "user_annotations" in self.model_fields_set:
125
141
  _dict['user_annotations'] = None
126
142
 
143
+ # set to None if priority (nullable) is None
144
+ # and model_fields_set contains the field
145
+ if self.priority is None and "priority" in self.model_fields_set:
146
+ _dict['priority'] = None
147
+
127
148
  # set to None if concurrency (nullable) is None
128
149
  # and model_fields_set contains the field
129
150
  if self.concurrency is None and "concurrency" in self.model_fields_set:
@@ -202,7 +223,10 @@ class GetInferenceV3DeploymentResponse(BaseModel):
202
223
  "created_at": obj.get("created_at"),
203
224
  "hardware_instance_id": obj.get("hardware_instance_id"),
204
225
  "revision_number": obj.get("revision_number"),
226
+ "chart_revision": obj.get("chart_revision"),
205
227
  "user_annotations": obj.get("user_annotations"),
228
+ "priority": obj.get("priority"),
229
+ "volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
206
230
  "container_port": obj.get("container_port"),
207
231
  "min_replicas": obj.get("min_replicas"),
208
232
  "max_replicas": obj.get("max_replicas"),
@@ -43,7 +43,10 @@ class GetJobDeploymentResponse(BaseModel):
43
43
  created_at: datetime
44
44
  hardware_instance_id: StrictInt
45
45
  revision_number: StrictInt
46
+ chart_revision: Optional[StrictStr] = None
46
47
  user_annotations: Optional[Dict[str, StrictStr]] = None
48
+ priority: Optional[StrictStr] = None
49
+ volume_mounts: Optional[List[VolumeMount]] = None
47
50
  env_vars: Optional[Dict[str, StrictStr]] = None
48
51
  command: Optional[List[StrictStr]] = None
49
52
  args: Optional[List[StrictStr]] = None
@@ -55,8 +58,7 @@ class GetJobDeploymentResponse(BaseModel):
55
58
  image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
56
59
  enable_logging: Optional[StrictBool] = True
57
60
  config_file: Optional[ConfigFileMount] = None
58
- volume_mounts: Optional[List[VolumeMount]] = None
59
- __properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "user_annotations", "env_vars", "command", "args", "original_command", "completions", "parallelism", "backoff_limit", "active_deadline_seconds", "image_pull_secret_credentials", "enable_logging", "config_file", "volume_mounts"]
61
+ __properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "chart_revision", "user_annotations", "priority", "volume_mounts", "env_vars", "command", "args", "original_command", "completions", "parallelism", "backoff_limit", "active_deadline_seconds", "image_pull_secret_credentials", "enable_logging", "config_file"]
60
62
 
61
63
  model_config = ConfigDict(
62
64
  populate_by_name=True,
@@ -97,12 +99,6 @@ class GetJobDeploymentResponse(BaseModel):
97
99
  exclude=excluded_fields,
98
100
  exclude_none=True,
99
101
  )
100
- # override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
101
- if self.image_pull_secret_credentials:
102
- _dict['image_pull_secret_credentials'] = self.image_pull_secret_credentials.to_dict()
103
- # override the default output from pydantic by calling `to_dict()` of config_file
104
- if self.config_file:
105
- _dict['config_file'] = self.config_file.to_dict()
106
102
  # override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
107
103
  _items = []
108
104
  if self.volume_mounts:
@@ -110,16 +106,32 @@ class GetJobDeploymentResponse(BaseModel):
110
106
  if _item_volume_mounts:
111
107
  _items.append(_item_volume_mounts.to_dict())
112
108
  _dict['volume_mounts'] = _items
109
+ # override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
110
+ if self.image_pull_secret_credentials:
111
+ _dict['image_pull_secret_credentials'] = self.image_pull_secret_credentials.to_dict()
112
+ # override the default output from pydantic by calling `to_dict()` of config_file
113
+ if self.config_file:
114
+ _dict['config_file'] = self.config_file.to_dict()
113
115
  # set to None if image_url (nullable) is None
114
116
  # and model_fields_set contains the field
115
117
  if self.image_url is None and "image_url" in self.model_fields_set:
116
118
  _dict['image_url'] = None
117
119
 
120
+ # set to None if chart_revision (nullable) is None
121
+ # and model_fields_set contains the field
122
+ if self.chart_revision is None and "chart_revision" in self.model_fields_set:
123
+ _dict['chart_revision'] = None
124
+
118
125
  # set to None if user_annotations (nullable) is None
119
126
  # and model_fields_set contains the field
120
127
  if self.user_annotations is None and "user_annotations" in self.model_fields_set:
121
128
  _dict['user_annotations'] = None
122
129
 
130
+ # set to None if priority (nullable) is None
131
+ # and model_fields_set contains the field
132
+ if self.priority is None and "priority" in self.model_fields_set:
133
+ _dict['priority'] = None
134
+
123
135
  # set to None if env_vars (nullable) is None
124
136
  # and model_fields_set contains the field
125
137
  if self.env_vars is None and "env_vars" in self.model_fields_set:
@@ -178,7 +190,10 @@ class GetJobDeploymentResponse(BaseModel):
178
190
  "created_at": obj.get("created_at"),
179
191
  "hardware_instance_id": obj.get("hardware_instance_id"),
180
192
  "revision_number": obj.get("revision_number"),
193
+ "chart_revision": obj.get("chart_revision"),
181
194
  "user_annotations": obj.get("user_annotations"),
195
+ "priority": obj.get("priority"),
196
+ "volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
182
197
  "env_vars": obj.get("env_vars"),
183
198
  "command": obj.get("command"),
184
199
  "args": obj.get("args"),
@@ -189,8 +204,7 @@ class GetJobDeploymentResponse(BaseModel):
189
204
  "active_deadline_seconds": obj.get("active_deadline_seconds"),
190
205
  "image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
191
206
  "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True,
192
- "config_file": ConfigFileMount.from_dict(obj["config_file"]) if obj.get("config_file") is not None else None,
193
- "volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None
207
+ "config_file": ConfigFileMount.from_dict(obj["config_file"]) if obj.get("config_file") is not None else None
194
208
  })
195
209
  return _obj
196
210
 
@@ -43,9 +43,7 @@ class GetObjectVolumeResponse(BaseModel):
43
43
  region: StrictStr
44
44
  prefix: Optional[StrictStr] = None
45
45
  read_only: StrictBool
46
- volume_attributes: Optional[Dict[str, StrictStr]] = None
47
- mount_options: Optional[List[StrictStr]] = None
48
- __properties: ClassVar[List[str]] = ["id", "name", "cluster_id", "backend", "access_mode", "status", "pvc_name", "created_at", "provider", "bucket", "region", "prefix", "read_only", "volume_attributes", "mount_options"]
46
+ __properties: ClassVar[List[str]] = ["id", "name", "cluster_id", "backend", "access_mode", "status", "pvc_name", "created_at", "provider", "bucket", "region", "prefix", "read_only"]
49
47
 
50
48
  @field_validator('backend')
51
49
  def backend_validate_enum(cls, value):
@@ -98,16 +96,6 @@ class GetObjectVolumeResponse(BaseModel):
98
96
  if self.prefix is None and "prefix" in self.model_fields_set:
99
97
  _dict['prefix'] = None
100
98
 
101
- # set to None if volume_attributes (nullable) is None
102
- # and model_fields_set contains the field
103
- if self.volume_attributes is None and "volume_attributes" in self.model_fields_set:
104
- _dict['volume_attributes'] = None
105
-
106
- # set to None if mount_options (nullable) is None
107
- # and model_fields_set contains the field
108
- if self.mount_options is None and "mount_options" in self.model_fields_set:
109
- _dict['mount_options'] = None
110
-
111
99
  return _dict
112
100
 
113
101
  @classmethod
@@ -132,9 +120,7 @@ class GetObjectVolumeResponse(BaseModel):
132
120
  "bucket": obj.get("bucket"),
133
121
  "region": obj.get("region"),
134
122
  "prefix": obj.get("prefix"),
135
- "read_only": obj.get("read_only"),
136
- "volume_attributes": obj.get("volume_attributes"),
137
- "mount_options": obj.get("mount_options")
123
+ "read_only": obj.get("read_only")
138
124
  })
139
125
  return _obj
140
126
 
@@ -32,10 +32,9 @@ class HardwareInstanceResponse(BaseModel):
32
32
  num_gpu: StrictInt
33
33
  cpu: StrictInt
34
34
  memory: StrictInt
35
- cost_per_hr: StrictInt
36
35
  cluster_id: StrictInt
37
36
  accelerator_memory: Optional[StrictInt] = None
38
- __properties: ClassVar[List[str]] = ["id", "name", "gpu_type", "num_gpu", "cpu", "memory", "cost_per_hr", "cluster_id", "accelerator_memory"]
37
+ __properties: ClassVar[List[str]] = ["id", "name", "gpu_type", "num_gpu", "cpu", "memory", "cluster_id", "accelerator_memory"]
39
38
 
40
39
  model_config = ConfigDict(
41
40
  populate_by_name=True,
@@ -99,7 +98,6 @@ class HardwareInstanceResponse(BaseModel):
99
98
  "num_gpu": obj.get("num_gpu"),
100
99
  "cpu": obj.get("cpu"),
101
100
  "memory": obj.get("memory"),
102
- "cost_per_hr": obj.get("cost_per_hr"),
103
101
  "cluster_id": obj.get("cluster_id"),
104
102
  "accelerator_memory": obj.get("accelerator_memory")
105
103
  })
@@ -18,7 +18,7 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, StrictStr
21
- from typing import Any, ClassVar, Dict, List
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
22
  from platform_api_python_client.models.validation_error_loc_inner import ValidationErrorLocInner
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
@@ -30,7 +30,9 @@ class ValidationError(BaseModel):
30
30
  loc: List[ValidationErrorLocInner]
31
31
  msg: StrictStr
32
32
  type: StrictStr
33
- __properties: ClassVar[List[str]] = ["loc", "msg", "type"]
33
+ input: Optional[Any] = None
34
+ ctx: Optional[Dict[str, Any]] = None
35
+ __properties: ClassVar[List[str]] = ["loc", "msg", "type", "input", "ctx"]
34
36
 
35
37
  model_config = ConfigDict(
36
38
  populate_by_name=True,
@@ -78,6 +80,11 @@ class ValidationError(BaseModel):
78
80
  if _item_loc:
79
81
  _items.append(_item_loc.to_dict())
80
82
  _dict['loc'] = _items
83
+ # set to None if input (nullable) is None
84
+ # and model_fields_set contains the field
85
+ if self.input is None and "input" in self.model_fields_set:
86
+ _dict['input'] = None
87
+
81
88
  return _dict
82
89
 
83
90
  @classmethod
@@ -92,7 +99,9 @@ class ValidationError(BaseModel):
92
99
  _obj = cls.model_validate({
93
100
  "loc": [ValidationErrorLocInner.from_dict(_item) for _item in obj["loc"]] if obj.get("loc") is not None else None,
94
101
  "msg": obj.get("msg"),
95
- "type": obj.get("type")
102
+ "type": obj.get("type"),
103
+ "input": obj.get("input"),
104
+ "ctx": obj.get("ctx")
96
105
  })
97
106
  return _obj
98
107
 
@@ -29,7 +29,7 @@ class VolumeMount(BaseModel):
29
29
  """ # noqa: E501
30
30
  volume_id: StrictInt
31
31
  mount_path: Annotated[str, Field(min_length=1, strict=True)]
32
- read_only: Optional[StrictBool] = False
32
+ read_only: Optional[StrictBool] = Field(default=False, description="Mount this attachment read-only. False does not override a read-only volume.")
33
33
  __properties: ClassVar[List[str]] = ["volume_id", "mount_path", "read_only"]
34
34
 
35
35
  model_config = ConfigDict(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: platform-api-python-client
3
- Version: 4.28.0
3
+ Version: 4.31.0
4
4
  Summary: Platform External API
5
5
  Home-page:
6
6
  Author: OpenAPI Generator community