platform-api-python-client 4.37.1__py3-none-any.whl → 4.41.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. platform_api_python_client/__init__.py +410 -177
  2. platform_api_python_client/api/external_api.py +41 -47
  3. platform_api_python_client/api_client.py +81 -36
  4. platform_api_python_client/configuration.py +262 -66
  5. platform_api_python_client/exceptions.py +24 -5
  6. platform_api_python_client/models/__init__.py +52 -26
  7. platform_api_python_client/models/admission.py +106 -0
  8. platform_api_python_client/models/autoscaling.py +120 -0
  9. platform_api_python_client/models/ccl_dynamo_pools.py +4 -3
  10. platform_api_python_client/models/ccl_main_pools.py +4 -3
  11. platform_api_python_client/models/ccluster_catalogs_cluster_base_argo_rollouts_chart_values.py +121 -0
  12. platform_api_python_client/models/ccluster_catalogs_cluster_base_argo_rollouts_controller.py +106 -0
  13. platform_api_python_client/models/ccluster_catalogs_cluster_base_argo_rollouts_values.py +110 -0
  14. platform_api_python_client/models/ccluster_catalogs_cluster_base_cert_manager_chart_values.py +117 -0
  15. platform_api_python_client/models/ccluster_catalogs_cluster_base_cert_manager_values.py +110 -0
  16. platform_api_python_client/models/ccluster_catalogs_cluster_base_gpu_operator_chart_values.py +152 -0
  17. platform_api_python_client/models/ccluster_catalogs_cluster_base_gpu_operator_values.py +121 -0
  18. platform_api_python_client/models/ccluster_catalogs_cluster_base_ingress_nginx_chart_values.py +110 -0
  19. platform_api_python_client/models/ccluster_catalogs_cluster_base_ingress_nginx_controller.py +121 -0
  20. platform_api_python_client/models/ccluster_catalogs_cluster_base_ingress_nginx_values.py +110 -0
  21. platform_api_python_client/models/ccluster_catalogs_cluster_base_istio_values.py +143 -0
  22. platform_api_python_client/models/ccluster_catalogs_cluster_base_kai_scheduler_chart_values.py +154 -0
  23. platform_api_python_client/models/ccluster_catalogs_cluster_base_kai_scheduler_values.py +121 -0
  24. platform_api_python_client/models/ccluster_catalogs_cluster_base_keda_chart_values.py +131 -0
  25. platform_api_python_client/models/ccluster_catalogs_cluster_base_keda_values.py +110 -0
  26. platform_api_python_client/models/ccluster_catalogs_cluster_base_kube_prometheus_stack_chart_values.py +121 -0
  27. platform_api_python_client/models/ccluster_catalogs_cluster_base_kube_prometheus_stack_values.py +121 -0
  28. platform_api_python_client/models/ccluster_catalogs_cluster_base_metrics_server_chart_values.py +106 -0
  29. platform_api_python_client/models/ccluster_catalogs_cluster_base_metrics_server_values.py +110 -0
  30. platform_api_python_client/models/{spire_crds.py → cdi.py} +36 -12
  31. platform_api_python_client/models/cluster_base_components.py +187 -0
  32. platform_api_python_client/models/cluster_capacity_response.py +5 -5
  33. platform_api_python_client/models/cluster_credential.py +4 -3
  34. platform_api_python_client/models/cluster_registration_request.py +4 -3
  35. platform_api_python_client/models/cluster_registration_response.py +4 -3
  36. platform_api_python_client/models/{istio_cni_overrides.py → cni.py} +29 -15
  37. platform_api_python_client/models/config_file_mount.py +6 -5
  38. platform_api_python_client/models/create_compute_deployment_request.py +10 -10
  39. platform_api_python_client/models/create_compute_deployment_response.py +4 -3
  40. platform_api_python_client/models/create_dynamo_deployment_request.py +29 -23
  41. platform_api_python_client/models/create_dynamo_deployment_response.py +4 -3
  42. platform_api_python_client/models/create_filesystem_volume_request.py +8 -7
  43. platform_api_python_client/models/create_hardware_instance_request.py +4 -3
  44. platform_api_python_client/models/create_inference_deployment_response.py +4 -3
  45. platform_api_python_client/models/create_inference_v3_deployment_request.py +14 -12
  46. platform_api_python_client/models/create_job_deployment_request.py +10 -10
  47. platform_api_python_client/models/create_job_deployment_response.py +4 -3
  48. platform_api_python_client/models/create_object_volume_request.py +10 -9
  49. platform_api_python_client/models/create_organization_request.py +4 -3
  50. platform_api_python_client/models/create_organization_response.py +4 -3
  51. platform_api_python_client/models/create_service_account_request.py +4 -3
  52. platform_api_python_client/models/create_service_account_response.py +4 -3
  53. platform_api_python_client/models/credits_response.py +4 -3
  54. platform_api_python_client/models/daily_bill_response.py +4 -3
  55. platform_api_python_client/models/{fluent_bit.py → dashboard.py} +29 -12
  56. platform_api_python_client/models/{prometheus_adapter.py → default_priorities.py} +29 -12
  57. platform_api_python_client/models/default_queue.py +106 -0
  58. platform_api_python_client/models/delete_user_vault_item_request.py +4 -3
  59. platform_api_python_client/models/deployment_log_event_v4.py +4 -3
  60. platform_api_python_client/models/deployment_status_request.py +4 -3
  61. platform_api_python_client/models/deployment_status_response.py +4 -3
  62. platform_api_python_client/models/deployment_status_v3_response.py +5 -5
  63. platform_api_python_client/models/deployment_usage.py +5 -5
  64. platform_api_python_client/models/deployment_usage_value.py +4 -3
  65. platform_api_python_client/models/dynamo_communications_input.py +4 -3
  66. platform_api_python_client/models/dynamo_frontend_config.py +105 -0
  67. platform_api_python_client/models/dynamo_frontend_config_response.py +105 -0
  68. platform_api_python_client/models/dynamo_image.py +6 -5
  69. platform_api_python_client/models/dynamo_kv_transfer_configuration.py +4 -3
  70. platform_api_python_client/models/dynamo_weight_transfer_configuration.py +4 -3
  71. platform_api_python_client/models/dynamo_worker_pool_config.py +5 -4
  72. platform_api_python_client/models/dynamo_worker_pools.py +4 -3
  73. platform_api_python_client/models/env.py +4 -3
  74. platform_api_python_client/models/generate_service_account_secret_response.py +4 -3
  75. platform_api_python_client/models/get_cluster_response.py +4 -3
  76. platform_api_python_client/models/get_compute_deployment_response.py +8 -8
  77. platform_api_python_client/models/get_deployment_log_response.py +4 -3
  78. platform_api_python_client/models/get_deployment_log_v4_response.py +5 -5
  79. platform_api_python_client/models/get_deployment_pods_response.py +4 -3
  80. platform_api_python_client/models/get_deployment_response.py +7 -7
  81. platform_api_python_client/models/get_deployment_revision_response.py +4 -3
  82. platform_api_python_client/models/get_deployment_usage_response.py +5 -5
  83. platform_api_python_client/models/get_dynamo_deployment_response.py +23 -17
  84. platform_api_python_client/models/get_filesystem_volume_response.py +4 -3
  85. platform_api_python_client/models/get_inference_deployment_response.py +7 -7
  86. platform_api_python_client/models/get_inference_v3_deployment_response.py +11 -9
  87. platform_api_python_client/models/get_job_deployment_response.py +8 -8
  88. platform_api_python_client/models/get_object_volume_response.py +4 -3
  89. platform_api_python_client/models/gpu_type_capacity.py +4 -3
  90. platform_api_python_client/models/hardware_instance_response.py +4 -3
  91. platform_api_python_client/models/hardware_preset_response.py +4 -3
  92. platform_api_python_client/models/http_validation_error.py +5 -5
  93. platform_api_python_client/models/image.py +6 -5
  94. platform_api_python_client/models/image_pull_secret_credentials.py +4 -3
  95. platform_api_python_client/models/ingress.py +4 -3
  96. platform_api_python_client/models/insight_list_item_response.py +4 -3
  97. platform_api_python_client/models/insight_resource.py +4 -3
  98. platform_api_python_client/models/insight_response.py +5 -5
  99. platform_api_python_client/models/insight_status_change_response.py +4 -3
  100. platform_api_python_client/models/invite_user_request.py +4 -3
  101. platform_api_python_client/models/istio_base.py +106 -0
  102. platform_api_python_client/models/istio_cni.py +124 -0
  103. platform_api_python_client/models/{argo_rollouts.py → istio_gateway.py} +29 -12
  104. platform_api_python_client/models/{istio_cni_subchart_overrides.py → istiod.py} +31 -17
  105. platform_api_python_client/models/list_cluster_capacity_response.py +5 -5
  106. platform_api_python_client/models/list_daily_bill_response.py +5 -5
  107. platform_api_python_client/models/list_deployment_revisions_response.py +5 -5
  108. platform_api_python_client/models/list_get_cluster_response.py +5 -5
  109. platform_api_python_client/models/list_get_deployment_response.py +5 -5
  110. platform_api_python_client/models/list_hardware_instance_response.py +5 -5
  111. platform_api_python_client/models/list_hardware_preset_response.py +5 -5
  112. platform_api_python_client/models/list_insights_response.py +5 -5
  113. platform_api_python_client/models/list_organization_gpu_quota_response.py +5 -5
  114. platform_api_python_client/models/list_prebuilt_image_response.py +5 -5
  115. platform_api_python_client/models/list_service_accounts_response.py +5 -5
  116. platform_api_python_client/models/list_user_vault_items_response.py +5 -5
  117. platform_api_python_client/models/list_volumes_response.py +5 -5
  118. platform_api_python_client/models/{validation_error_loc_inner.py → location_inner.py} +6 -6
  119. platform_api_python_client/models/metrics.py +117 -0
  120. platform_api_python_client/models/metrics_config.py +6 -5
  121. platform_api_python_client/models/{istio_overrides.py → mig.py} +28 -18
  122. platform_api_python_client/models/operator.py +117 -0
  123. platform_api_python_client/models/organization_gpu_quota_request.py +4 -3
  124. platform_api_python_client/models/organization_gpu_quota_response.py +4 -3
  125. platform_api_python_client/models/pilot.py +106 -0
  126. platform_api_python_client/models/pod_details.py +4 -3
  127. platform_api_python_client/models/pool.py +4 -3
  128. platform_api_python_client/models/prebuilt_image_response.py +4 -3
  129. platform_api_python_client/models/prometheus.py +110 -0
  130. platform_api_python_client/models/prometheus_rules.py +120 -0
  131. platform_api_python_client/models/prometheus_spec.py +113 -0
  132. platform_api_python_client/models/prometheus_values.py +117 -0
  133. platform_api_python_client/models/quota.py +106 -0
  134. platform_api_python_client/models/replicas.py +106 -0
  135. platform_api_python_client/models/resource_list.py +113 -0
  136. platform_api_python_client/models/resource_requirements.py +120 -0
  137. platform_api_python_client/models/revision_pod_details.py +5 -5
  138. platform_api_python_client/models/rollout_strategy_params.py +4 -3
  139. platform_api_python_client/models/scheduler.py +117 -0
  140. platform_api_python_client/models/service_account_response.py +4 -3
  141. platform_api_python_client/models/{istio.py → toggle.py} +27 -19
  142. platform_api_python_client/models/toleration.py +134 -0
  143. platform_api_python_client/models/unified_get_compute_deployment_response.py +8 -8
  144. platform_api_python_client/models/unified_get_deployment_logs_response.py +5 -5
  145. platform_api_python_client/models/unified_get_deployment_pods_response.py +4 -3
  146. platform_api_python_client/models/unified_get_deployment_revision_response.py +4 -3
  147. platform_api_python_client/models/unified_get_deployment_rollout_response.py +4 -3
  148. platform_api_python_client/models/unified_get_deployment_usage_response.py +5 -5
  149. platform_api_python_client/models/unified_get_dynamo_deployment_response.py +13 -13
  150. platform_api_python_client/models/unified_get_inference_v3_deployment_response.py +9 -9
  151. platform_api_python_client/models/unified_get_job_deployment_response.py +8 -8
  152. platform_api_python_client/models/unified_list_deployment_revisions_response.py +5 -5
  153. platform_api_python_client/models/unified_update_deployment_rollout_request.py +4 -3
  154. platform_api_python_client/models/unified_write_compute_deployment_request.py +8 -8
  155. platform_api_python_client/models/unified_write_deployment_response.py +4 -3
  156. platform_api_python_client/models/unified_write_dynamo_deployment_request.py +11 -11
  157. platform_api_python_client/models/unified_write_inference_v3_deployment_request.py +9 -9
  158. platform_api_python_client/models/unified_write_job_deployment_request.py +8 -8
  159. platform_api_python_client/models/update_cluster_metadata_request.py +4 -3
  160. platform_api_python_client/models/{cluster_config.py → update_cluster_request.py} +11 -10
  161. platform_api_python_client/models/update_deployment_response.py +4 -3
  162. platform_api_python_client/models/update_deployment_status_v3_request.py +4 -3
  163. platform_api_python_client/models/update_insight_status_request.py +7 -6
  164. platform_api_python_client/models/update_service_account_request.py +4 -3
  165. platform_api_python_client/models/upsert_user_vault_item_request.py +4 -3
  166. platform_api_python_client/models/user_vault_item.py +4 -3
  167. platform_api_python_client/models/validation_error.py +8 -8
  168. platform_api_python_client/models/volume_mount.py +4 -3
  169. platform_api_python_client/models/volume_status_response.py +4 -3
  170. platform_api_python_client/models/{dynamo_communications_output.py → workload.py} +34 -15
  171. platform_api_python_client/rest.py +87 -10
  172. platform_api_python_client-4.41.0.dist-info/METADATA +418 -0
  173. platform_api_python_client-4.41.0.dist-info/RECORD +206 -0
  174. platform_api_python_client/models/cert_manager.py +0 -89
  175. platform_api_python_client/models/cluster_components.py +0 -193
  176. platform_api_python_client/models/external_dns.py +0 -89
  177. platform_api_python_client/models/final_stack.py +0 -89
  178. platform_api_python_client/models/gpu_operator.py +0 -89
  179. platform_api_python_client/models/ingress_nginx.py +0 -89
  180. platform_api_python_client/models/keda.py +0 -89
  181. platform_api_python_client/models/kube_prometheus_stack.py +0 -89
  182. platform_api_python_client/models/longhorn.py +0 -89
  183. platform_api_python_client/models/metrics_server.py +0 -89
  184. platform_api_python_client/models/network_operator.py +0 -89
  185. platform_api_python_client/models/opentelemetry_collector.py +0 -89
  186. platform_api_python_client/models/spire.py +0 -89
  187. platform_api_python_client/models/teleport_kube_agent.py +0 -89
  188. platform_api_python_client-4.37.1.dist-info/METADATA +0 -23
  189. platform_api_python_client-4.37.1.dist-info/RECORD +0 -180
  190. {platform_api_python_client-4.37.1.dist-info → platform_api_python_client-4.41.0.dist-info}/WHEEL +0 -0
  191. {platform_api_python_client-4.37.1.dist-info → platform_api_python_client-4.41.0.dist-info}/top_level.txt +0 -0
@@ -22,13 +22,14 @@ 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
+ from pydantic_core import to_jsonable_python
25
26
 
26
27
  class DynamoWorkerPoolConfig(BaseModel):
27
28
  """
28
29
  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
30
  """ # noqa: E501
30
31
  hardware_instance_id: StrictInt
31
- replicas: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
32
+ replicas: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Deprecated fixed pool size, equivalent to min_replicas == max_replicas.")
32
33
  min_replicas: Optional[Annotated[int, Field(strict=True, ge=0)]] = None
33
34
  max_replicas: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
34
35
  concurrency: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
@@ -36,7 +37,8 @@ class DynamoWorkerPoolConfig(BaseModel):
36
37
  __properties: ClassVar[List[str]] = ["hardware_instance_id", "replicas", "min_replicas", "max_replicas", "concurrency", "cooldown_period"]
37
38
 
38
39
  model_config = ConfigDict(
39
- populate_by_name=True,
40
+ validate_by_name=True,
41
+ validate_by_alias=True,
40
42
  validate_assignment=True,
41
43
  protected_namespaces=(),
42
44
  )
@@ -48,8 +50,7 @@ class DynamoWorkerPoolConfig(BaseModel):
48
50
 
49
51
  def to_json(self) -> str:
50
52
  """Returns the JSON representation of the model using alias"""
51
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
- return json.dumps(self.to_dict())
53
+ return json.dumps(to_jsonable_python(self.to_dict()))
53
54
 
54
55
  @classmethod
55
56
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -22,6 +22,7 @@ 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
25
+ from pydantic_core import to_jsonable_python
25
26
 
26
27
  class DynamoWorkerPools(BaseModel):
27
28
  """
@@ -33,7 +34,8 @@ class DynamoWorkerPools(BaseModel):
33
34
  __properties: ClassVar[List[str]] = ["worker", "prefill", "decode"]
34
35
 
35
36
  model_config = ConfigDict(
36
- populate_by_name=True,
37
+ validate_by_name=True,
38
+ validate_by_alias=True,
37
39
  validate_assignment=True,
38
40
  protected_namespaces=(),
39
41
  )
@@ -45,8 +47,7 @@ class DynamoWorkerPools(BaseModel):
45
47
 
46
48
  def to_json(self) -> str:
47
49
  """Returns the JSON representation of the model using alias"""
48
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
- return json.dumps(self.to_dict())
50
+ return json.dumps(to_jsonable_python(self.to_dict()))
50
51
 
51
52
  @classmethod
52
53
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
24
+ from pydantic_core import to_jsonable_python
24
25
 
25
26
  class Env(BaseModel):
26
27
  """
@@ -31,7 +32,8 @@ class Env(BaseModel):
31
32
  __properties: ClassVar[List[str]] = ["vars", "refs"]
32
33
 
33
34
  model_config = ConfigDict(
34
- populate_by_name=True,
35
+ validate_by_name=True,
36
+ validate_by_alias=True,
35
37
  validate_assignment=True,
36
38
  protected_namespaces=(),
37
39
  )
@@ -43,8 +45,7 @@ class Env(BaseModel):
43
45
 
44
46
  def to_json(self) -> str:
45
47
  """Returns the JSON representation of the model using alias"""
46
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
- return json.dumps(self.to_dict())
48
+ return json.dumps(to_jsonable_python(self.to_dict()))
48
49
 
49
50
  @classmethod
50
51
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
24
+ from pydantic_core import to_jsonable_python
24
25
 
25
26
  class GenerateServiceAccountSecretResponse(BaseModel):
26
27
  """
@@ -30,7 +31,8 @@ class GenerateServiceAccountSecretResponse(BaseModel):
30
31
  __properties: ClassVar[List[str]] = ["client_secret"]
31
32
 
32
33
  model_config = ConfigDict(
33
- populate_by_name=True,
34
+ validate_by_name=True,
35
+ validate_by_alias=True,
34
36
  validate_assignment=True,
35
37
  protected_namespaces=(),
36
38
  )
@@ -42,8 +44,7 @@ class GenerateServiceAccountSecretResponse(BaseModel):
42
44
 
43
45
  def to_json(self) -> str:
44
46
  """Returns the JSON representation of the model using alias"""
45
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
46
- return json.dumps(self.to_dict())
47
+ return json.dumps(to_jsonable_python(self.to_dict()))
47
48
 
48
49
  @classmethod
49
50
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
24
+ from pydantic_core import to_jsonable_python
24
25
 
25
26
  class GetClusterResponse(BaseModel):
26
27
  """
@@ -35,7 +36,8 @@ class GetClusterResponse(BaseModel):
35
36
  __properties: ClassVar[List[str]] = ["id", "cluster_name", "display_name", "region", "deployment_creation_disabled", "managed_by_ccluster"]
36
37
 
37
38
  model_config = ConfigDict(
38
- populate_by_name=True,
39
+ validate_by_name=True,
40
+ validate_by_alias=True,
39
41
  validate_assignment=True,
40
42
  protected_namespaces=(),
41
43
  )
@@ -47,8 +49,7 @@ class GetClusterResponse(BaseModel):
47
49
 
48
50
  def to_json(self) -> str:
49
51
  """Returns the JSON representation of the model using alias"""
50
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
51
- return json.dumps(self.to_dict())
52
+ return json.dumps(to_jsonable_python(self.to_dict()))
52
53
 
53
54
  @classmethod
54
55
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -27,6 +27,7 @@ from platform_api_python_client.models.image_pull_secret_credentials import Imag
27
27
  from platform_api_python_client.models.volume_mount import VolumeMount
28
28
  from typing import Optional, Set
29
29
  from typing_extensions import Self
30
+ from pydantic_core import to_jsonable_python
30
31
 
31
32
  class GetComputeDeploymentResponse(BaseModel):
32
33
  """
@@ -43,7 +44,7 @@ class GetComputeDeploymentResponse(BaseModel):
43
44
  created_at: datetime
44
45
  hardware_instance_id: StrictInt
45
46
  revision_number: StrictInt
46
- chart_revision: Optional[StrictStr] = None
47
+ chart_revision: Optional[StrictStr] = Field(default=None, description="Saved catalog Git reference for this revision; null if not recorded. Informational: omit chart_revision from edit or clone requests to use the current platform default.")
47
48
  user_annotations: Optional[Dict[str, StrictStr]] = None
48
49
  priority: Optional[StrictStr] = None
49
50
  volume_mounts: Optional[List[VolumeMount]] = None
@@ -58,18 +59,19 @@ class GetComputeDeploymentResponse(BaseModel):
58
59
  enable_logging: Optional[StrictBool] = True
59
60
  __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", "exposed_port", "ssh_public_key", "ssh_password", "env_vars", "image_pull_secret_credentials", "env_vars_refs", "image_pull_ref", "image_pull_secret_name", "enable_logging"]
60
61
 
61
- @field_validator('image_pull_secret_name')
62
+ @field_validator('image_pull_secret_name', mode="before")
62
63
  def image_pull_secret_name_validate_regular_expression(cls, value):
63
64
  """Validates the regular expression"""
64
65
  if value is None:
65
66
  return value
66
67
 
67
- if not re.match(r"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$", value):
68
+ if isinstance(value, str) and not re.match(r"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$", value):
68
69
  raise ValueError(r"must validate the regular expression /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/")
69
70
  return value
70
71
 
71
72
  model_config = ConfigDict(
72
- populate_by_name=True,
73
+ validate_by_name=True,
74
+ validate_by_alias=True,
73
75
  validate_assignment=True,
74
76
  protected_namespaces=(),
75
77
  )
@@ -81,8 +83,7 @@ class GetComputeDeploymentResponse(BaseModel):
81
83
 
82
84
  def to_json(self) -> str:
83
85
  """Returns the JSON representation of the model using alias"""
84
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
85
- return json.dumps(self.to_dict())
86
+ return json.dumps(to_jsonable_python(self.to_dict()))
86
87
 
87
88
  @classmethod
88
89
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -111,8 +112,7 @@ class GetComputeDeploymentResponse(BaseModel):
111
112
  _items = []
112
113
  if self.volume_mounts:
113
114
  for _item_volume_mounts in self.volume_mounts:
114
- if _item_volume_mounts:
115
- _items.append(_item_volume_mounts.to_dict())
115
+ _items.append(_item_volume_mounts.to_dict() if _item_volume_mounts is not None else None)
116
116
  _dict['volume_mounts'] = _items
117
117
  # override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
118
118
  if self.image_pull_secret_credentials:
@@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
24
+ from pydantic_core import to_jsonable_python
24
25
 
25
26
  class GetDeploymentLogResponse(BaseModel):
26
27
  """
@@ -31,7 +32,8 @@ class GetDeploymentLogResponse(BaseModel):
31
32
  __properties: ClassVar[List[str]] = ["events", "next_page_token"]
32
33
 
33
34
  model_config = ConfigDict(
34
- populate_by_name=True,
35
+ validate_by_name=True,
36
+ validate_by_alias=True,
35
37
  validate_assignment=True,
36
38
  protected_namespaces=(),
37
39
  )
@@ -43,8 +45,7 @@ class GetDeploymentLogResponse(BaseModel):
43
45
 
44
46
  def to_json(self) -> str:
45
47
  """Returns the JSON representation of the model using alias"""
46
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
- return json.dumps(self.to_dict())
48
+ return json.dumps(to_jsonable_python(self.to_dict()))
48
49
 
49
50
  @classmethod
50
51
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List
22
22
  from platform_api_python_client.models.deployment_log_event_v4 import DeploymentLogEventV4
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
+ from pydantic_core import to_jsonable_python
25
26
 
26
27
  class GetDeploymentLogV4Response(BaseModel):
27
28
  """
@@ -31,7 +32,8 @@ class GetDeploymentLogV4Response(BaseModel):
31
32
  __properties: ClassVar[List[str]] = ["events"]
32
33
 
33
34
  model_config = ConfigDict(
34
- populate_by_name=True,
35
+ validate_by_name=True,
36
+ validate_by_alias=True,
35
37
  validate_assignment=True,
36
38
  protected_namespaces=(),
37
39
  )
@@ -43,8 +45,7 @@ class GetDeploymentLogV4Response(BaseModel):
43
45
 
44
46
  def to_json(self) -> str:
45
47
  """Returns the JSON representation of the model using alias"""
46
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
- return json.dumps(self.to_dict())
48
+ return json.dumps(to_jsonable_python(self.to_dict()))
48
49
 
49
50
  @classmethod
50
51
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -73,8 +74,7 @@ class GetDeploymentLogV4Response(BaseModel):
73
74
  _items = []
74
75
  if self.events:
75
76
  for _item_events in self.events:
76
- if _item_events:
77
- _items.append(_item_events.to_dict())
77
+ _items.append(_item_events.to_dict() if _item_events is not None else None)
78
78
  _dict['events'] = _items
79
79
  return _dict
80
80
 
@@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
24
+ from pydantic_core import to_jsonable_python
24
25
 
25
26
  class GetDeploymentPodsResponse(BaseModel):
26
27
  """
@@ -30,7 +31,8 @@ class GetDeploymentPodsResponse(BaseModel):
30
31
  __properties: ClassVar[List[str]] = ["pods"]
31
32
 
32
33
  model_config = ConfigDict(
33
- populate_by_name=True,
34
+ validate_by_name=True,
35
+ validate_by_alias=True,
34
36
  validate_assignment=True,
35
37
  protected_namespaces=(),
36
38
  )
@@ -42,8 +44,7 @@ class GetDeploymentPodsResponse(BaseModel):
42
44
 
43
45
  def to_json(self) -> str:
44
46
  """Returns the JSON representation of the model using alias"""
45
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
46
- return json.dumps(self.to_dict())
47
+ return json.dumps(to_jsonable_python(self.to_dict()))
47
48
 
48
49
  @classmethod
49
50
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -18,13 +18,14 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
  from datetime import datetime
21
- from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
21
+ from pydantic import BaseModel, ConfigDict, Field, 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
25
  from platform_api_python_client.models.volume_mount import VolumeMount
26
26
  from typing import Optional, Set
27
27
  from typing_extensions import Self
28
+ from pydantic_core import to_jsonable_python
28
29
 
29
30
  class GetDeploymentResponse(BaseModel):
30
31
  """
@@ -41,14 +42,15 @@ class GetDeploymentResponse(BaseModel):
41
42
  created_at: datetime
42
43
  hardware_instance_id: StrictInt
43
44
  revision_number: StrictInt
44
- chart_revision: Optional[StrictStr] = None
45
+ chart_revision: Optional[StrictStr] = Field(default=None, description="Saved catalog Git reference for this revision; null if not recorded. Informational: omit chart_revision from edit or clone requests to use the current platform default.")
45
46
  user_annotations: Optional[Dict[str, StrictStr]] = None
46
47
  priority: Optional[StrictStr] = None
47
48
  volume_mounts: Optional[List[VolumeMount]] = None
48
49
  __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"]
49
50
 
50
51
  model_config = ConfigDict(
51
- populate_by_name=True,
52
+ validate_by_name=True,
53
+ validate_by_alias=True,
52
54
  validate_assignment=True,
53
55
  protected_namespaces=(),
54
56
  )
@@ -60,8 +62,7 @@ class GetDeploymentResponse(BaseModel):
60
62
 
61
63
  def to_json(self) -> str:
62
64
  """Returns the JSON representation of the model using alias"""
63
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
64
- return json.dumps(self.to_dict())
65
+ return json.dumps(to_jsonable_python(self.to_dict()))
65
66
 
66
67
  @classmethod
67
68
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -90,8 +91,7 @@ class GetDeploymentResponse(BaseModel):
90
91
  _items = []
91
92
  if self.volume_mounts:
92
93
  for _item_volume_mounts in self.volume_mounts:
93
- if _item_volume_mounts:
94
- _items.append(_item_volume_mounts.to_dict())
94
+ _items.append(_item_volume_mounts.to_dict() if _item_volume_mounts is not None else None)
95
95
  _dict['volume_mounts'] = _items
96
96
  # set to None if image_url (nullable) is None
97
97
  # and model_fields_set contains the field
@@ -23,6 +23,7 @@ from typing import Any, ClassVar, Dict, List, Optional
23
23
  from platform_api_python_client.models.deployment_response import DeploymentResponse
24
24
  from typing import Optional, Set
25
25
  from typing_extensions import Self
26
+ from pydantic_core import to_jsonable_python
26
27
 
27
28
  class GetDeploymentRevisionResponse(BaseModel):
28
29
  """
@@ -38,7 +39,8 @@ class GetDeploymentRevisionResponse(BaseModel):
38
39
  __properties: ClassVar[List[str]] = ["id", "revision_number", "deployment_id", "deployment_response", "notes", "created_at", "updated_at"]
39
40
 
40
41
  model_config = ConfigDict(
41
- populate_by_name=True,
42
+ validate_by_name=True,
43
+ validate_by_alias=True,
42
44
  validate_assignment=True,
43
45
  protected_namespaces=(),
44
46
  )
@@ -50,8 +52,7 @@ class GetDeploymentRevisionResponse(BaseModel):
50
52
 
51
53
  def to_json(self) -> str:
52
54
  """Returns the JSON representation of the model using alias"""
53
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
54
- return json.dumps(self.to_dict())
55
+ return json.dumps(to_jsonable_python(self.to_dict()))
55
56
 
56
57
  @classmethod
57
58
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -23,6 +23,7 @@ from platform_api_python_client.models.deployment_usage import DeploymentUsage
23
23
  from platform_api_python_client.models.usage_availability import UsageAvailability
24
24
  from typing import Optional, Set
25
25
  from typing_extensions import Self
26
+ from pydantic_core import to_jsonable_python
26
27
 
27
28
  class GetDeploymentUsageResponse(BaseModel):
28
29
  """
@@ -34,7 +35,8 @@ class GetDeploymentUsageResponse(BaseModel):
34
35
  __properties: ClassVar[List[str]] = ["values", "availability", "last_sample_at"]
35
36
 
36
37
  model_config = ConfigDict(
37
- populate_by_name=True,
38
+ validate_by_name=True,
39
+ validate_by_alias=True,
38
40
  validate_assignment=True,
39
41
  protected_namespaces=(),
40
42
  )
@@ -46,8 +48,7 @@ class GetDeploymentUsageResponse(BaseModel):
46
48
 
47
49
  def to_json(self) -> str:
48
50
  """Returns the JSON representation of the model using alias"""
49
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
- return json.dumps(self.to_dict())
51
+ return json.dumps(to_jsonable_python(self.to_dict()))
51
52
 
52
53
  @classmethod
53
54
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -76,8 +77,7 @@ class GetDeploymentUsageResponse(BaseModel):
76
77
  _items = []
77
78
  if self.values:
78
79
  for _item_values in self.values:
79
- if _item_values:
80
- _items.append(_item_values.to_dict())
80
+ _items.append(_item_values.to_dict() if _item_values is not None else None)
81
81
  _dict['values'] = _items
82
82
  # set to None if availability (nullable) is None
83
83
  # and model_fields_set contains the field
@@ -24,13 +24,15 @@ from typing_extensions import Annotated
24
24
  from platform_api_python_client.models.backend_protocol import BackendProtocol
25
25
  from platform_api_python_client.models.deployment_status import DeploymentStatus
26
26
  from platform_api_python_client.models.deployment_type import DeploymentType
27
- from platform_api_python_client.models.dynamo_communications_output import DynamoCommunicationsOutput
27
+ from platform_api_python_client.models.dynamo_communications_input import DynamoCommunicationsInput
28
+ from platform_api_python_client.models.dynamo_frontend_config_response import DynamoFrontendConfigResponse
28
29
  from platform_api_python_client.models.dynamo_serving_mode import DynamoServingMode
29
30
  from platform_api_python_client.models.dynamo_weight_transfer_configuration import DynamoWeightTransferConfiguration
30
31
  from platform_api_python_client.models.dynamo_worker_pools import DynamoWorkerPools
31
32
  from platform_api_python_client.models.volume_mount import VolumeMount
32
33
  from typing import Optional, Set
33
34
  from typing_extensions import Self
35
+ from pydantic_core import to_jsonable_python
34
36
 
35
37
  class GetDynamoDeploymentResponse(BaseModel):
36
38
  """
@@ -47,23 +49,23 @@ class GetDynamoDeploymentResponse(BaseModel):
47
49
  created_at: datetime
48
50
  hardware_instance_id: StrictInt
49
51
  revision_number: StrictInt
50
- chart_revision: Optional[StrictStr] = None
52
+ chart_revision: Optional[StrictStr] = Field(default=None, description="Saved catalog Git reference for this revision; null if not recorded. Informational: omit chart_revision from edit or clone requests to use the current platform default.")
51
53
  user_annotations: Optional[Dict[str, StrictStr]] = None
52
54
  priority: Optional[StrictStr] = None
53
55
  volume_mounts: Optional[List[VolumeMount]] = None
54
56
  hf_token_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
55
57
  serving_mode: Optional[DynamoServingMode] = None
56
- worker_pools: Optional[DynamoWorkerPools] = None
57
- communications: Optional[DynamoCommunicationsOutput] = None
58
- weight_transfer: Optional[DynamoWeightTransferConfiguration] = None
58
+ worker_pools: Optional[DynamoWorkerPools] = Field(default=None, description="Hardware and scaling per worker role. Aggregated mode uses exactly `worker`; disaggregated mode uses exactly `prefill` and `decode`. Unused roles are null.")
59
+ communications: Optional[DynamoCommunicationsInput] = Field(default=None, description="Requested communication policy; null for revisions using the legacy configuration.")
60
+ weight_transfer: Optional[DynamoWeightTransferConfiguration] = Field(default=None, description="Requested weight transfer policy; null when the workers use the native loader.")
59
61
  model: StrictStr
60
- model_revision: Optional[StrictStr] = None
62
+ model_revision: Optional[StrictStr] = Field(default=None, description="Commit SHA of `model` this revision loads; null when the workers load the default branch.")
61
63
  served_model_name: Optional[StrictStr] = None
62
- runtime_version: Optional[StrictStr] = None
64
+ runtime_version: Optional[StrictStr] = Field(default=None, description="Dynamo runtime version tag this revision renders with.")
63
65
  min_replicas: StrictInt = Field(description="Deprecated aggregated-only spelling; set this under worker_pools.worker instead. Accepted alongside worker_pools when the values agree.")
64
66
  max_replicas: StrictInt = Field(description="Deprecated aggregated-only spelling; set this under worker_pools.worker instead. Accepted alongside worker_pools when the values agree.")
65
- concurrency: Optional[StrictInt] = None
66
- cooldown_period: Optional[StrictInt] = None
67
+ concurrency: Optional[StrictInt] = Field(default=None, description="Deprecated aggregated-only spelling; set this under worker_pools.worker instead. Accepted alongside worker_pools when the values agree.")
68
+ cooldown_period: Optional[StrictInt] = Field(default=None, description="Deprecated aggregated-only spelling; set this under worker_pools.worker instead. Accepted alongside worker_pools when the values agree.")
67
69
  extra_args: Optional[StrictStr] = None
68
70
  env_vars: Optional[Dict[str, StrictStr]] = None
69
71
  env_vars_refs: Optional[Dict[str, Any]] = None
@@ -74,10 +76,12 @@ class GetDynamoDeploymentResponse(BaseModel):
74
76
  enable_logging: Optional[StrictBool] = True
75
77
  enable_node_model_cache: Optional[StrictBool] = False
76
78
  backend_protocol: Optional[BackendProtocol] = None
77
- __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", "hf_token_ref", "serving_mode", "worker_pools", "communications", "weight_transfer", "model", "model_revision", "served_model_name", "runtime_version", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "extra_args", "env_vars", "env_vars_refs", "endpoint_certificate_authority", "endpoint_bearer_token", "bearer_token_ref", "image_pull_ref", "enable_logging", "enable_node_model_cache", "backend_protocol"]
79
+ frontend: Optional[DynamoFrontendConfigResponse] = Field(default=None, description="Frontend replica bounds and size this revision requests; the defaults for revisions created before these fields.")
80
+ __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", "hf_token_ref", "serving_mode", "worker_pools", "communications", "weight_transfer", "model", "model_revision", "served_model_name", "runtime_version", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "extra_args", "env_vars", "env_vars_refs", "endpoint_certificate_authority", "endpoint_bearer_token", "bearer_token_ref", "image_pull_ref", "enable_logging", "enable_node_model_cache", "backend_protocol", "frontend"]
78
81
 
79
82
  model_config = ConfigDict(
80
- populate_by_name=True,
83
+ validate_by_name=True,
84
+ validate_by_alias=True,
81
85
  validate_assignment=True,
82
86
  protected_namespaces=(),
83
87
  )
@@ -89,8 +93,7 @@ class GetDynamoDeploymentResponse(BaseModel):
89
93
 
90
94
  def to_json(self) -> str:
91
95
  """Returns the JSON representation of the model using alias"""
92
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
93
- return json.dumps(self.to_dict())
96
+ return json.dumps(to_jsonable_python(self.to_dict()))
94
97
 
95
98
  @classmethod
96
99
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -119,8 +122,7 @@ class GetDynamoDeploymentResponse(BaseModel):
119
122
  _items = []
120
123
  if self.volume_mounts:
121
124
  for _item_volume_mounts in self.volume_mounts:
122
- if _item_volume_mounts:
123
- _items.append(_item_volume_mounts.to_dict())
125
+ _items.append(_item_volume_mounts.to_dict() if _item_volume_mounts is not None else None)
124
126
  _dict['volume_mounts'] = _items
125
127
  # override the default output from pydantic by calling `to_dict()` of worker_pools
126
128
  if self.worker_pools:
@@ -131,6 +133,9 @@ class GetDynamoDeploymentResponse(BaseModel):
131
133
  # override the default output from pydantic by calling `to_dict()` of weight_transfer
132
134
  if self.weight_transfer:
133
135
  _dict['weight_transfer'] = self.weight_transfer.to_dict()
136
+ # override the default output from pydantic by calling `to_dict()` of frontend
137
+ if self.frontend:
138
+ _dict['frontend'] = self.frontend.to_dict()
134
139
  # set to None if image_url (nullable) is None
135
140
  # and model_fields_set contains the field
136
141
  if self.image_url is None and "image_url" in self.model_fields_set:
@@ -251,7 +256,7 @@ class GetDynamoDeploymentResponse(BaseModel):
251
256
  "hf_token_ref": obj.get("hf_token_ref"),
252
257
  "serving_mode": obj.get("serving_mode"),
253
258
  "worker_pools": DynamoWorkerPools.from_dict(obj["worker_pools"]) if obj.get("worker_pools") is not None else None,
254
- "communications": DynamoCommunicationsOutput.from_dict(obj["communications"]) if obj.get("communications") is not None else None,
259
+ "communications": DynamoCommunicationsInput.from_dict(obj["communications"]) if obj.get("communications") is not None else None,
255
260
  "weight_transfer": DynamoWeightTransferConfiguration.from_dict(obj["weight_transfer"]) if obj.get("weight_transfer") is not None else None,
256
261
  "model": obj.get("model"),
257
262
  "model_revision": obj.get("model_revision"),
@@ -270,7 +275,8 @@ class GetDynamoDeploymentResponse(BaseModel):
270
275
  "image_pull_ref": obj.get("image_pull_ref"),
271
276
  "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True,
272
277
  "enable_node_model_cache": obj.get("enable_node_model_cache") if obj.get("enable_node_model_cache") is not None else False,
273
- "backend_protocol": obj.get("backend_protocol")
278
+ "backend_protocol": obj.get("backend_protocol"),
279
+ "frontend": DynamoFrontendConfigResponse.from_dict(obj["frontend"]) if obj.get("frontend") is not None else None
274
280
  })
275
281
  return _obj
276
282
 
@@ -24,6 +24,7 @@ from platform_api_python_client.models.volume_access_mode import VolumeAccessMod
24
24
  from platform_api_python_client.models.volume_status import VolumeStatus
25
25
  from typing import Optional, Set
26
26
  from typing_extensions import Self
27
+ from pydantic_core import to_jsonable_python
27
28
 
28
29
  class GetFilesystemVolumeResponse(BaseModel):
29
30
  """
@@ -49,7 +50,8 @@ class GetFilesystemVolumeResponse(BaseModel):
49
50
  return value
50
51
 
51
52
  model_config = ConfigDict(
52
- populate_by_name=True,
53
+ validate_by_name=True,
54
+ validate_by_alias=True,
53
55
  validate_assignment=True,
54
56
  protected_namespaces=(),
55
57
  )
@@ -61,8 +63,7 @@ class GetFilesystemVolumeResponse(BaseModel):
61
63
 
62
64
  def to_json(self) -> str:
63
65
  """Returns the JSON representation of the model using alias"""
64
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
65
- return json.dumps(self.to_dict())
66
+ return json.dumps(to_jsonable_python(self.to_dict()))
66
67
 
67
68
  @classmethod
68
69
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -18,13 +18,14 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
  from datetime import datetime
21
- from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
21
+ from pydantic import BaseModel, ConfigDict, Field, 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
25
  from platform_api_python_client.models.volume_mount import VolumeMount
26
26
  from typing import Optional, Set
27
27
  from typing_extensions import Self
28
+ from pydantic_core import to_jsonable_python
28
29
 
29
30
  class GetInferenceDeploymentResponse(BaseModel):
30
31
  """
@@ -41,7 +42,7 @@ class GetInferenceDeploymentResponse(BaseModel):
41
42
  created_at: datetime
42
43
  hardware_instance_id: StrictInt
43
44
  revision_number: StrictInt
44
- chart_revision: Optional[StrictStr] = None
45
+ chart_revision: Optional[StrictStr] = Field(default=None, description="Saved catalog Git reference for this revision; null if not recorded. Informational: omit chart_revision from edit or clone requests to use the current platform default.")
45
46
  user_annotations: Optional[Dict[str, StrictStr]] = None
46
47
  priority: Optional[StrictStr] = None
47
48
  volume_mounts: Optional[List[VolumeMount]] = None
@@ -59,7 +60,8 @@ class GetInferenceDeploymentResponse(BaseModel):
59
60
  __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"]
60
61
 
61
62
  model_config = ConfigDict(
62
- populate_by_name=True,
63
+ validate_by_name=True,
64
+ validate_by_alias=True,
63
65
  validate_assignment=True,
64
66
  protected_namespaces=(),
65
67
  )
@@ -71,8 +73,7 @@ class GetInferenceDeploymentResponse(BaseModel):
71
73
 
72
74
  def to_json(self) -> str:
73
75
  """Returns the JSON representation of the model using alias"""
74
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
75
- return json.dumps(self.to_dict())
76
+ return json.dumps(to_jsonable_python(self.to_dict()))
76
77
 
77
78
  @classmethod
78
79
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -101,8 +102,7 @@ class GetInferenceDeploymentResponse(BaseModel):
101
102
  _items = []
102
103
  if self.volume_mounts:
103
104
  for _item_volume_mounts in self.volume_mounts:
104
- if _item_volume_mounts:
105
- _items.append(_item_volume_mounts.to_dict())
105
+ _items.append(_item_volume_mounts.to_dict() if _item_volume_mounts is not None else None)
106
106
  _dict['volume_mounts'] = _items
107
107
  # set to None if image_url (nullable) is None
108
108
  # and model_fields_set contains the field