platform-api-python-client 4.25.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 (41) hide show
  1. platform_api_python_client/__init__.py +11 -1
  2. platform_api_python_client/api/external_api.py +1786 -481
  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 +10 -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 -8
  8. platform_api_python_client/models/create_compute_deployment_request.py +18 -1
  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 -8
  12. platform_api_python_client/models/create_job_deployment_request.py +18 -1
  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 -8
  23. platform_api_python_client/models/get_compute_deployment_response.py +25 -1
  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 +23 -6
  28. platform_api_python_client/models/get_job_deployment_response.py +25 -1
  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/hardware_preset_response.py +96 -0
  32. platform_api_python_client/models/list_hardware_preset_response.py +95 -0
  33. platform_api_python_client/models/list_organization_gpu_quota_response.py +95 -0
  34. platform_api_python_client/models/organization_gpu_quota_request.py +88 -0
  35. platform_api_python_client/models/organization_gpu_quota_response.py +91 -0
  36. platform_api_python_client/models/validation_error.py +12 -3
  37. platform_api_python_client/models/volume_mount.py +92 -0
  38. {platform_api_python_client-4.25.0.dist-info → platform_api_python_client-4.31.0.dist-info}/METADATA +1 -1
  39. {platform_api_python_client-4.25.0.dist-info → platform_api_python_client-4.31.0.dist-info}/RECORD +41 -31
  40. {platform_api_python_client-4.25.0.dist-info → platform_api_python_client-4.31.0.dist-info}/WHEEL +0 -0
  41. {platform_api_python_client-4.25.0.dist-info → platform_api_python_client-4.31.0.dist-info}/top_level.txt +0 -0
@@ -23,11 +23,12 @@ from platform_api_python_client.models.get_c_serve_v3_deployment_response import
23
23
  from platform_api_python_client.models.get_compute_deployment_response import GetComputeDeploymentResponse
24
24
  from platform_api_python_client.models.get_dynamo_deployment_response import GetDynamoDeploymentResponse
25
25
  from platform_api_python_client.models.get_inference_v3_deployment_response import GetInferenceV3DeploymentResponse
26
+ from platform_api_python_client.models.get_job_deployment_response import GetJobDeploymentResponse
26
27
  from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
27
28
  from typing_extensions import Literal, Self
28
29
  from pydantic import Field
29
30
 
30
- DEPLOYMENTRESPONSE_ANY_OF_SCHEMAS = ["GetCServeV3DeploymentResponse", "GetComputeDeploymentResponse", "GetDynamoDeploymentResponse", "GetInferenceV3DeploymentResponse"]
31
+ DEPLOYMENTRESPONSE_ANY_OF_SCHEMAS = ["GetCServeV3DeploymentResponse", "GetComputeDeploymentResponse", "GetDynamoDeploymentResponse", "GetInferenceV3DeploymentResponse", "GetJobDeploymentResponse"]
31
32
 
32
33
  class DeploymentResponse(BaseModel):
33
34
  """
@@ -42,11 +43,13 @@ class DeploymentResponse(BaseModel):
42
43
  anyof_schema_3_validator: Optional[GetInferenceV3DeploymentResponse] = None
43
44
  # data type: GetComputeDeploymentResponse
44
45
  anyof_schema_4_validator: Optional[GetComputeDeploymentResponse] = None
46
+ # data type: GetJobDeploymentResponse
47
+ anyof_schema_5_validator: Optional[GetJobDeploymentResponse] = None
45
48
  if TYPE_CHECKING:
46
- actual_instance: Optional[Union[GetCServeV3DeploymentResponse, GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse]] = None
49
+ actual_instance: Optional[Union[GetCServeV3DeploymentResponse, GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse, GetJobDeploymentResponse]] = None
47
50
  else:
48
51
  actual_instance: Any = None
49
- any_of_schemas: Set[str] = { "GetCServeV3DeploymentResponse", "GetComputeDeploymentResponse", "GetDynamoDeploymentResponse", "GetInferenceV3DeploymentResponse" }
52
+ any_of_schemas: Set[str] = { "GetCServeV3DeploymentResponse", "GetComputeDeploymentResponse", "GetDynamoDeploymentResponse", "GetInferenceV3DeploymentResponse", "GetJobDeploymentResponse" }
50
53
 
51
54
  model_config = {
52
55
  "validate_assignment": True,
@@ -91,9 +94,15 @@ class DeploymentResponse(BaseModel):
91
94
  else:
92
95
  return v
93
96
 
97
+ # validate data type: GetJobDeploymentResponse
98
+ if not isinstance(v, GetJobDeploymentResponse):
99
+ error_messages.append(f"Error! Input type `{type(v)}` is not `GetJobDeploymentResponse`")
100
+ else:
101
+ return v
102
+
94
103
  if error_messages:
95
104
  # no match
96
- raise ValueError("No match found when setting the actual_instance in DeploymentResponse with anyOf schemas: GetCServeV3DeploymentResponse, GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse. Details: " + ", ".join(error_messages))
105
+ raise ValueError("No match found when setting the actual_instance in DeploymentResponse with anyOf schemas: GetCServeV3DeploymentResponse, GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse, GetJobDeploymentResponse. Details: " + ", ".join(error_messages))
97
106
  else:
98
107
  return v
99
108
 
@@ -130,10 +139,16 @@ class DeploymentResponse(BaseModel):
130
139
  return instance
131
140
  except (ValidationError, ValueError) as e:
132
141
  error_messages.append(str(e))
142
+ # anyof_schema_5_validator: Optional[GetJobDeploymentResponse] = None
143
+ try:
144
+ instance.actual_instance = GetJobDeploymentResponse.from_json(json_str)
145
+ return instance
146
+ except (ValidationError, ValueError) as e:
147
+ error_messages.append(str(e))
133
148
 
134
149
  if error_messages:
135
150
  # no match
136
- raise ValueError("No match found when deserializing the JSON string into DeploymentResponse with anyOf schemas: GetCServeV3DeploymentResponse, GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse. Details: " + ", ".join(error_messages))
151
+ raise ValueError("No match found when deserializing the JSON string into DeploymentResponse with anyOf schemas: GetCServeV3DeploymentResponse, GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse, GetJobDeploymentResponse. Details: " + ", ".join(error_messages))
137
152
  else:
138
153
  return instance
139
154
 
@@ -147,7 +162,7 @@ class DeploymentResponse(BaseModel):
147
162
  else:
148
163
  return json.dumps(self.actual_instance)
149
164
 
150
- def to_dict(self) -> Optional[Union[Dict[str, Any], GetCServeV3DeploymentResponse, GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse]]:
165
+ def to_dict(self) -> Optional[Union[Dict[str, Any], GetCServeV3DeploymentResponse, GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse, GetJobDeploymentResponse]]:
151
166
  """Returns the dict representation of the actual instance"""
152
167
  if self.actual_instance is None:
153
168
  return None
@@ -0,0 +1,104 @@
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
21
+ from typing import Any, ClassVar, Dict, List
22
+ from platform_api_python_client.models.dynamo_kv_transfer_configuration import DynamoKvTransferConfiguration
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class DynamoCommunicationsInput(BaseModel):
27
+ """
28
+ DynamoCommunicationsInput
29
+ """ # noqa: E501
30
+ kv_transfer: DynamoKvTransferConfiguration
31
+ additional_properties: Dict[str, Any] = {}
32
+ __properties: ClassVar[List[str]] = ["kv_transfer"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
+
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.model_dump(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of DynamoCommunicationsInput 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
+ # override the default output from pydantic by calling `to_dict()` of kv_transfer
76
+ if self.kv_transfer:
77
+ _dict['kv_transfer'] = self.kv_transfer.to_dict()
78
+ # puts key-value pairs in additional_properties in the top level
79
+ if self.additional_properties is not None:
80
+ for _key, _value in self.additional_properties.items():
81
+ _dict[_key] = _value
82
+
83
+ return _dict
84
+
85
+ @classmethod
86
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
87
+ """Create an instance of DynamoCommunicationsInput from a dict"""
88
+ if obj is None:
89
+ return None
90
+
91
+ if not isinstance(obj, dict):
92
+ return cls.model_validate(obj)
93
+
94
+ _obj = cls.model_validate({
95
+ "kv_transfer": DynamoKvTransferConfiguration.from_dict(obj["kv_transfer"]) if obj.get("kv_transfer") is not None else None
96
+ })
97
+ # store additional fields in additional_properties
98
+ for _key in obj.keys():
99
+ if _key not in cls.__properties:
100
+ _obj.additional_properties[_key] = obj.get(_key)
101
+
102
+ return _obj
103
+
104
+
@@ -0,0 +1,104 @@
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
21
+ from typing import Any, ClassVar, Dict, List
22
+ from platform_api_python_client.models.dynamo_kv_transfer_configuration import DynamoKvTransferConfiguration
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class DynamoCommunicationsOutput(BaseModel):
27
+ """
28
+ DynamoCommunicationsOutput
29
+ """ # noqa: E501
30
+ kv_transfer: DynamoKvTransferConfiguration
31
+ additional_properties: Dict[str, Any] = {}
32
+ __properties: ClassVar[List[str]] = ["kv_transfer"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
+
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.model_dump(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of DynamoCommunicationsOutput 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
+ # override the default output from pydantic by calling `to_dict()` of kv_transfer
76
+ if self.kv_transfer:
77
+ _dict['kv_transfer'] = self.kv_transfer.to_dict()
78
+ # puts key-value pairs in additional_properties in the top level
79
+ if self.additional_properties is not None:
80
+ for _key, _value in self.additional_properties.items():
81
+ _dict[_key] = _value
82
+
83
+ return _dict
84
+
85
+ @classmethod
86
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
87
+ """Create an instance of DynamoCommunicationsOutput from a dict"""
88
+ if obj is None:
89
+ return None
90
+
91
+ if not isinstance(obj, dict):
92
+ return cls.model_validate(obj)
93
+
94
+ _obj = cls.model_validate({
95
+ "kv_transfer": DynamoKvTransferConfiguration.from_dict(obj["kv_transfer"]) if obj.get("kv_transfer") is not None else None
96
+ })
97
+ # store additional fields in additional_properties
98
+ for _key in obj.keys():
99
+ if _key not in cls.__properties:
100
+ _obj.additional_properties[_key] = obj.get(_key)
101
+
102
+ return _obj
103
+
104
+
@@ -0,0 +1,101 @@
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
21
+ from typing import Any, ClassVar, Dict, List
22
+ from platform_api_python_client.models.dynamo_kv_transfer_policy import DynamoKvTransferPolicy
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class DynamoKvTransferConfiguration(BaseModel):
27
+ """
28
+ DynamoKvTransferConfiguration
29
+ """ # noqa: E501
30
+ policy: DynamoKvTransferPolicy = Field(description="allow_tcp uses platform-managed NIXL/UCX and permits TCP; it does not force TCP or guarantee RDMA. require_gpu_direct_rdma selects EKS EFA device requirements and GPU-buffer transfer over LIBFABRIC without TCP fallback. A compatible EFA chart and runtime image are prerequisites; the API does not validate their capabilities. Device availability is resolved during scheduling.")
31
+ additional_properties: Dict[str, Any] = {}
32
+ __properties: ClassVar[List[str]] = ["policy"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
+
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.model_dump(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of DynamoKvTransferConfiguration 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
+ return _dict
81
+
82
+ @classmethod
83
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84
+ """Create an instance of DynamoKvTransferConfiguration from a dict"""
85
+ if obj is None:
86
+ return None
87
+
88
+ if not isinstance(obj, dict):
89
+ return cls.model_validate(obj)
90
+
91
+ _obj = cls.model_validate({
92
+ "policy": obj.get("policy")
93
+ })
94
+ # store additional fields in additional_properties
95
+ for _key in obj.keys():
96
+ if _key not in cls.__properties:
97
+ _obj.additional_properties[_key] = obj.get(_key)
98
+
99
+ return _obj
100
+
101
+
@@ -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 DynamoKvTransferPolicy(str, Enum):
22
+ """
23
+ DynamoKvTransferPolicy
24
+ """
25
+
26
+ """
27
+ allowed enum values
28
+ """
29
+ ALLOW_TCP = 'allow_tcp'
30
+ REQUIRE_GPU_DIRECT_RDMA = 'require_gpu_direct_rdma'
31
+
32
+ @classmethod
33
+ def from_json(cls, json_str: str) -> Self:
34
+ """Create an instance of DynamoKvTransferPolicy from a JSON string"""
35
+ return cls(json.loads(json_str))
36
+
37
+
@@ -18,19 +18,23 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictInt
21
- from typing import Any, ClassVar, Dict, List
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
22
  from typing_extensions import Annotated
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
26
26
  class DynamoWorkerPoolConfig(BaseModel):
27
27
  """
28
- DynamoWorkerPoolConfig
28
+ Hardware and scaling for one Dynamo worker role. ``min_replicas``/``max_replicas`` are the canonical size. ``replicas`` is the deprecated fixed-size alias (``min == max``) still accepted on disaggregated pools. ``parse_dynamo_topology`` owns the cross-field rules (bounds ordering, autoscaling target, which roles may autoscale).
29
29
  """ # noqa: E501
30
30
  hardware_instance_id: StrictInt
31
- replicas: Annotated[int, Field(strict=True, ge=1)]
31
+ replicas: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
32
+ min_replicas: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
33
+ max_replicas: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
34
+ concurrency: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
35
+ cooldown_period: Optional[Annotated[int, Field(le=3600, strict=True, ge=0)]] = None
32
36
  additional_properties: Dict[str, Any] = {}
33
- __properties: ClassVar[List[str]] = ["hardware_instance_id", "replicas"]
37
+ __properties: ClassVar[List[str]] = ["hardware_instance_id", "replicas", "min_replicas", "max_replicas", "concurrency", "cooldown_period"]
34
38
 
35
39
  model_config = ConfigDict(
36
40
  populate_by_name=True,
@@ -78,6 +82,31 @@ class DynamoWorkerPoolConfig(BaseModel):
78
82
  for _key, _value in self.additional_properties.items():
79
83
  _dict[_key] = _value
80
84
 
85
+ # set to None if replicas (nullable) is None
86
+ # and model_fields_set contains the field
87
+ if self.replicas is None and "replicas" in self.model_fields_set:
88
+ _dict['replicas'] = None
89
+
90
+ # set to None if min_replicas (nullable) is None
91
+ # and model_fields_set contains the field
92
+ if self.min_replicas is None and "min_replicas" in self.model_fields_set:
93
+ _dict['min_replicas'] = None
94
+
95
+ # set to None if max_replicas (nullable) is None
96
+ # and model_fields_set contains the field
97
+ if self.max_replicas is None and "max_replicas" in self.model_fields_set:
98
+ _dict['max_replicas'] = None
99
+
100
+ # set to None if concurrency (nullable) is None
101
+ # and model_fields_set contains the field
102
+ if self.concurrency is None and "concurrency" in self.model_fields_set:
103
+ _dict['concurrency'] = None
104
+
105
+ # set to None if cooldown_period (nullable) is None
106
+ # and model_fields_set contains the field
107
+ if self.cooldown_period is None and "cooldown_period" in self.model_fields_set:
108
+ _dict['cooldown_period'] = None
109
+
81
110
  return _dict
82
111
 
83
112
  @classmethod
@@ -91,7 +120,11 @@ class DynamoWorkerPoolConfig(BaseModel):
91
120
 
92
121
  _obj = cls.model_validate({
93
122
  "hardware_instance_id": obj.get("hardware_instance_id"),
94
- "replicas": obj.get("replicas")
123
+ "replicas": obj.get("replicas"),
124
+ "min_replicas": obj.get("min_replicas"),
125
+ "max_replicas": obj.get("max_replicas"),
126
+ "concurrency": obj.get("concurrency"),
127
+ "cooldown_period": obj.get("cooldown_period")
95
128
  })
96
129
  # store additional fields in additional_properties
97
130
  for _key in obj.keys():
@@ -18,7 +18,7 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict
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.dynamo_worker_pool_config import DynamoWorkerPoolConfig
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
@@ -27,10 +27,11 @@ class DynamoWorkerPools(BaseModel):
27
27
  """
28
28
  DynamoWorkerPools
29
29
  """ # noqa: E501
30
- prefill: DynamoWorkerPoolConfig
31
- decode: DynamoWorkerPoolConfig
30
+ worker: Optional[DynamoWorkerPoolConfig] = None
31
+ prefill: Optional[DynamoWorkerPoolConfig] = None
32
+ decode: Optional[DynamoWorkerPoolConfig] = None
32
33
  additional_properties: Dict[str, Any] = {}
33
- __properties: ClassVar[List[str]] = ["prefill", "decode"]
34
+ __properties: ClassVar[List[str]] = ["worker", "prefill", "decode"]
34
35
 
35
36
  model_config = ConfigDict(
36
37
  populate_by_name=True,
@@ -73,6 +74,9 @@ class DynamoWorkerPools(BaseModel):
73
74
  exclude=excluded_fields,
74
75
  exclude_none=True,
75
76
  )
77
+ # override the default output from pydantic by calling `to_dict()` of worker
78
+ if self.worker:
79
+ _dict['worker'] = self.worker.to_dict()
76
80
  # override the default output from pydantic by calling `to_dict()` of prefill
77
81
  if self.prefill:
78
82
  _dict['prefill'] = self.prefill.to_dict()
@@ -84,6 +88,21 @@ class DynamoWorkerPools(BaseModel):
84
88
  for _key, _value in self.additional_properties.items():
85
89
  _dict[_key] = _value
86
90
 
91
+ # set to None if worker (nullable) is None
92
+ # and model_fields_set contains the field
93
+ if self.worker is None and "worker" in self.model_fields_set:
94
+ _dict['worker'] = None
95
+
96
+ # set to None if prefill (nullable) is None
97
+ # and model_fields_set contains the field
98
+ if self.prefill is None and "prefill" in self.model_fields_set:
99
+ _dict['prefill'] = None
100
+
101
+ # set to None if decode (nullable) is None
102
+ # and model_fields_set contains the field
103
+ if self.decode is None and "decode" in self.model_fields_set:
104
+ _dict['decode'] = None
105
+
87
106
  return _dict
88
107
 
89
108
  @classmethod
@@ -96,6 +115,7 @@ class DynamoWorkerPools(BaseModel):
96
115
  return cls.model_validate(obj)
97
116
 
98
117
  _obj = cls.model_validate({
118
+ "worker": DynamoWorkerPoolConfig.from_dict(obj["worker"]) if obj.get("worker") is not None else None,
99
119
  "prefill": DynamoWorkerPoolConfig.from_dict(obj["prefill"]) if obj.get("prefill") is not None else None,
100
120
  "decode": DynamoWorkerPoolConfig.from_dict(obj["decode"]) if obj.get("decode") is not None else None
101
121
  })
@@ -23,6 +23,7 @@ from typing import Any, ClassVar, Dict, List, Optional
23
23
  from platform_api_python_client.models.c_serve_v2_recipe import CServeV2Recipe
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.volume_mount import VolumeMount
26
27
  from typing import Optional, Set
27
28
  from typing_extensions import Self
28
29
 
@@ -41,7 +42,10 @@ class GetCServeV2DeploymentResponse(BaseModel):
41
42
  created_at: datetime
42
43
  hardware_instance_id: StrictInt
43
44
  revision_number: StrictInt
45
+ chart_revision: Optional[StrictStr] = None
44
46
  user_annotations: Optional[Dict[str, StrictStr]] = None
47
+ priority: Optional[StrictStr] = None
48
+ volume_mounts: Optional[List[VolumeMount]] = None
45
49
  recipe: CServeV2Recipe
46
50
  cserve_version: Optional[StrictStr] = None
47
51
  min_scale: StrictInt
@@ -51,7 +55,7 @@ class GetCServeV2DeploymentResponse(BaseModel):
51
55
  endpoint_bearer_token: Optional[StrictStr] = None
52
56
  concurrency: Optional[StrictInt] = None
53
57
  env_vars: Optional[Dict[str, StrictStr]] = None
54
- __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", "recipe", "cserve_version", "min_scale", "max_scale", "initial_scale", "endpoint_certificate_authority", "endpoint_bearer_token", "concurrency", "env_vars"]
58
+ __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", "recipe", "cserve_version", "min_scale", "max_scale", "initial_scale", "endpoint_certificate_authority", "endpoint_bearer_token", "concurrency", "env_vars"]
55
59
 
56
60
  model_config = ConfigDict(
57
61
  populate_by_name=True,
@@ -92,6 +96,13 @@ class GetCServeV2DeploymentResponse(BaseModel):
92
96
  exclude=excluded_fields,
93
97
  exclude_none=True,
94
98
  )
99
+ # override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
100
+ _items = []
101
+ if self.volume_mounts:
102
+ for _item_volume_mounts in self.volume_mounts:
103
+ if _item_volume_mounts:
104
+ _items.append(_item_volume_mounts.to_dict())
105
+ _dict['volume_mounts'] = _items
95
106
  # override the default output from pydantic by calling `to_dict()` of recipe
96
107
  if self.recipe:
97
108
  _dict['recipe'] = self.recipe.to_dict()
@@ -100,11 +111,21 @@ class GetCServeV2DeploymentResponse(BaseModel):
100
111
  if self.image_url is None and "image_url" in self.model_fields_set:
101
112
  _dict['image_url'] = None
102
113
 
114
+ # set to None if chart_revision (nullable) is None
115
+ # and model_fields_set contains the field
116
+ if self.chart_revision is None and "chart_revision" in self.model_fields_set:
117
+ _dict['chart_revision'] = None
118
+
103
119
  # set to None if user_annotations (nullable) is None
104
120
  # and model_fields_set contains the field
105
121
  if self.user_annotations is None and "user_annotations" in self.model_fields_set:
106
122
  _dict['user_annotations'] = None
107
123
 
124
+ # set to None if priority (nullable) is None
125
+ # and model_fields_set contains the field
126
+ if self.priority is None and "priority" in self.model_fields_set:
127
+ _dict['priority'] = None
128
+
108
129
  # set to None if cserve_version (nullable) is None
109
130
  # and model_fields_set contains the field
110
131
  if self.cserve_version is None and "cserve_version" in self.model_fields_set:
@@ -153,7 +174,10 @@ class GetCServeV2DeploymentResponse(BaseModel):
153
174
  "created_at": obj.get("created_at"),
154
175
  "hardware_instance_id": obj.get("hardware_instance_id"),
155
176
  "revision_number": obj.get("revision_number"),
177
+ "chart_revision": obj.get("chart_revision"),
156
178
  "user_annotations": obj.get("user_annotations"),
179
+ "priority": obj.get("priority"),
180
+ "volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
157
181
  "recipe": CServeV2Recipe.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None,
158
182
  "cserve_version": obj.get("cserve_version"),
159
183
  "min_scale": obj.get("min_scale"),