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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. platform_api_python_client/__init__.py +410 -148
  2. platform_api_python_client/api/external_api.py +6466 -1215
  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 +90 -35
  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 +117 -0
  10. platform_api_python_client/models/{create_c_serve_v2_deployment_response.py → ccl_main_pools.py} +16 -16
  11. platform_api_python_client/models/ccluster_catalogs_cluster_base_argo_rollouts_chart_values.py +121 -0
  12. platform_api_python_client/models/{c_serve_v2_recipe.py → ccluster_catalogs_cluster_base_argo_rollouts_controller.py} +15 -18
  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/cdi.py +113 -0
  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 +6 -5
  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 +35 -9
  39. platform_api_python_client/models/create_compute_deployment_response.py +4 -3
  40. platform_api_python_client/models/create_dynamo_deployment_request.py +67 -20
  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 -20
  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 +52 -10
  46. platform_api_python_client/models/create_job_deployment_request.py +35 -9
  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 -22
  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_response.py +12 -27
  61. platform_api_python_client/models/deployment_status_request.py +4 -3
  62. platform_api_python_client/models/deployment_status_response.py +4 -3
  63. platform_api_python_client/models/deployment_status_v3_response.py +5 -5
  64. platform_api_python_client/models/deployment_type.py +14 -0
  65. platform_api_python_client/models/deployment_usage.py +5 -5
  66. platform_api_python_client/models/deployment_usage_value.py +4 -3
  67. platform_api_python_client/models/dynamo_communications_input.py +4 -16
  68. platform_api_python_client/models/dynamo_frontend_config.py +105 -0
  69. platform_api_python_client/models/dynamo_frontend_config_response.py +105 -0
  70. platform_api_python_client/models/dynamo_image.py +106 -0
  71. platform_api_python_client/models/dynamo_kv_transfer_configuration.py +4 -16
  72. platform_api_python_client/models/{external_dns.py → dynamo_weight_transfer_configuration.py} +13 -13
  73. platform_api_python_client/models/dynamo_weight_transfer_policy.py +36 -0
  74. platform_api_python_client/models/dynamo_worker_pool_config.py +6 -18
  75. platform_api_python_client/models/dynamo_worker_pools.py +4 -16
  76. platform_api_python_client/models/{keda.py → env.py} +14 -13
  77. platform_api_python_client/models/generate_service_account_secret_response.py +4 -3
  78. platform_api_python_client/models/get_cluster_response.py +8 -5
  79. platform_api_python_client/models/get_compute_deployment_response.py +35 -8
  80. platform_api_python_client/models/get_deployment_log_response.py +4 -3
  81. platform_api_python_client/models/get_deployment_log_v4_response.py +5 -5
  82. platform_api_python_client/models/get_deployment_pods_response.py +4 -3
  83. platform_api_python_client/models/get_deployment_response.py +7 -7
  84. platform_api_python_client/models/get_deployment_revision_response.py +4 -3
  85. platform_api_python_client/models/get_deployment_usage_response.py +24 -9
  86. platform_api_python_client/models/get_dynamo_deployment_response.py +63 -15
  87. platform_api_python_client/models/get_filesystem_volume_response.py +4 -3
  88. platform_api_python_client/models/get_inference_deployment_response.py +7 -7
  89. platform_api_python_client/models/get_inference_v3_deployment_response.py +51 -8
  90. platform_api_python_client/models/get_job_deployment_response.py +35 -8
  91. platform_api_python_client/models/get_object_volume_response.py +4 -3
  92. platform_api_python_client/models/gpu_type_capacity.py +4 -3
  93. platform_api_python_client/models/hardware_instance_response.py +10 -5
  94. platform_api_python_client/models/hardware_preset_response.py +4 -3
  95. platform_api_python_client/models/http_validation_error.py +5 -5
  96. platform_api_python_client/models/image.py +113 -0
  97. platform_api_python_client/models/image_pull_secret_credentials.py +4 -3
  98. platform_api_python_client/models/{istio_cni_subchart_overrides.py → ingress.py} +26 -18
  99. platform_api_python_client/models/{c_serve_recipe_response.py → insight_list_item_response.py} +33 -27
  100. platform_api_python_client/models/{create_c_serve_v3_deployment_response.py → insight_resource.py} +20 -14
  101. platform_api_python_client/models/insight_resource_type.py +37 -0
  102. platform_api_python_client/models/insight_response.py +133 -0
  103. platform_api_python_client/models/insight_severity.py +40 -0
  104. platform_api_python_client/models/insight_status.py +39 -0
  105. platform_api_python_client/models/insight_status_change_response.py +108 -0
  106. platform_api_python_client/models/invite_user_request.py +4 -3
  107. platform_api_python_client/models/istio_base.py +106 -0
  108. platform_api_python_client/models/istio_cni.py +124 -0
  109. platform_api_python_client/models/{ingress_nginx.py → istio_gateway.py} +29 -12
  110. platform_api_python_client/models/{dynamo_communications_output.py → istiod.py} +21 -15
  111. platform_api_python_client/models/list_cluster_capacity_response.py +5 -5
  112. platform_api_python_client/models/list_daily_bill_response.py +5 -5
  113. platform_api_python_client/models/list_deployment_revisions_response.py +5 -5
  114. platform_api_python_client/models/list_get_cluster_response.py +5 -5
  115. platform_api_python_client/models/list_get_deployment_response.py +5 -5
  116. platform_api_python_client/models/list_hardware_instance_response.py +5 -5
  117. platform_api_python_client/models/list_hardware_preset_response.py +5 -5
  118. platform_api_python_client/models/{istio_overrides.py → list_insights_response.py} +19 -20
  119. platform_api_python_client/models/list_organization_gpu_quota_response.py +5 -5
  120. platform_api_python_client/models/list_prebuilt_image_response.py +5 -5
  121. platform_api_python_client/models/list_service_accounts_response.py +5 -5
  122. platform_api_python_client/models/list_user_vault_items_response.py +5 -5
  123. platform_api_python_client/models/list_volumes_response.py +5 -5
  124. platform_api_python_client/models/{validation_error_loc_inner.py → location_inner.py} +6 -6
  125. platform_api_python_client/models/metric.py +13 -0
  126. platform_api_python_client/models/metrics.py +117 -0
  127. platform_api_python_client/models/metrics_config.py +6 -5
  128. platform_api_python_client/models/mig.py +106 -0
  129. platform_api_python_client/models/operator.py +117 -0
  130. platform_api_python_client/models/organization_gpu_quota_request.py +4 -3
  131. platform_api_python_client/models/organization_gpu_quota_response.py +4 -3
  132. platform_api_python_client/models/pilot.py +106 -0
  133. platform_api_python_client/models/pod_details.py +4 -3
  134. platform_api_python_client/models/pool.py +117 -0
  135. platform_api_python_client/models/prebuilt_image_response.py +4 -3
  136. platform_api_python_client/models/prometheus.py +110 -0
  137. platform_api_python_client/models/prometheus_rules.py +120 -0
  138. platform_api_python_client/models/prometheus_spec.py +113 -0
  139. platform_api_python_client/models/prometheus_values.py +117 -0
  140. platform_api_python_client/models/quota.py +106 -0
  141. platform_api_python_client/models/replicas.py +106 -0
  142. platform_api_python_client/models/resource_list.py +113 -0
  143. platform_api_python_client/models/resource_requirements.py +120 -0
  144. platform_api_python_client/models/revision_pod_details.py +5 -5
  145. platform_api_python_client/models/rollout_strategy_params.py +4 -3
  146. platform_api_python_client/models/scheduler.py +117 -0
  147. platform_api_python_client/models/service_account_response.py +4 -3
  148. platform_api_python_client/models/{istio.py → toggle.py} +27 -19
  149. platform_api_python_client/models/toleration.py +134 -0
  150. platform_api_python_client/models/unified_get_compute_deployment_response.py +177 -0
  151. platform_api_python_client/models/{c_serve_recipe_perf.py → unified_get_deployment_logs_response.py} +19 -22
  152. platform_api_python_client/models/{longhorn.py → unified_get_deployment_pods_response.py} +13 -14
  153. platform_api_python_client/models/unified_get_deployment_response.py +164 -0
  154. platform_api_python_client/models/unified_get_deployment_revision_response.py +110 -0
  155. platform_api_python_client/models/{argo_rollouts.py → unified_get_deployment_rollout_response.py} +15 -13
  156. platform_api_python_client/models/unified_get_deployment_usage_response.py +110 -0
  157. platform_api_python_client/models/unified_get_dynamo_deployment_response.py +218 -0
  158. platform_api_python_client/models/unified_get_inference_v3_deployment_response.py +228 -0
  159. platform_api_python_client/models/unified_get_job_deployment_response.py +204 -0
  160. platform_api_python_client/models/{list_c_serve_recipe_response.py → unified_list_deployment_revisions_response.py} +12 -12
  161. platform_api_python_client/models/{spire.py → unified_update_deployment_rollout_request.py} +12 -13
  162. platform_api_python_client/models/unified_write_compute_deployment_request.py +154 -0
  163. platform_api_python_client/models/unified_write_deployment_request.py +164 -0
  164. platform_api_python_client/models/unified_write_deployment_response.py +110 -0
  165. platform_api_python_client/models/unified_write_dynamo_deployment_request.py +197 -0
  166. platform_api_python_client/models/{create_c_serve_v3_deployment_request.py → unified_write_inference_v3_deployment_request.py} +86 -78
  167. platform_api_python_client/models/unified_write_job_deployment_request.py +183 -0
  168. platform_api_python_client/models/update_cluster_metadata_request.py +4 -3
  169. platform_api_python_client/models/{cluster_config.py → update_cluster_request.py} +11 -10
  170. platform_api_python_client/models/update_deployment_response.py +4 -3
  171. platform_api_python_client/models/update_deployment_status_v3_request.py +4 -3
  172. platform_api_python_client/models/update_insight_status_request.py +107 -0
  173. platform_api_python_client/models/update_service_account_request.py +4 -3
  174. platform_api_python_client/models/upsert_user_vault_item_request.py +5 -4
  175. platform_api_python_client/models/usage_availability.py +40 -0
  176. platform_api_python_client/models/usage_component.py +39 -0
  177. platform_api_python_client/models/user_vault_item.py +4 -3
  178. platform_api_python_client/models/validation_error.py +8 -8
  179. platform_api_python_client/models/volume_mount.py +4 -3
  180. platform_api_python_client/models/volume_status_response.py +4 -3
  181. platform_api_python_client/models/workload.py +110 -0
  182. platform_api_python_client/rest.py +87 -10
  183. platform_api_python_client-4.41.0.dist-info/METADATA +418 -0
  184. platform_api_python_client-4.41.0.dist-info/RECORD +206 -0
  185. {platform_api_python_client-4.31.0.dist-info → platform_api_python_client-4.41.0.dist-info}/WHEEL +1 -1
  186. platform_api_python_client/models/cert_manager.py +0 -89
  187. platform_api_python_client/models/cluster_components.py +0 -193
  188. platform_api_python_client/models/final_stack.py +0 -89
  189. platform_api_python_client/models/get_c_serve_v2_deployment_response.py +0 -193
  190. platform_api_python_client/models/get_c_serve_v3_deployment_response.py +0 -194
  191. platform_api_python_client/models/gpu_operator.py +0 -89
  192. platform_api_python_client/models/kube_prometheus_stack.py +0 -89
  193. platform_api_python_client/models/metrics_server.py +0 -89
  194. platform_api_python_client/models/network_operator.py +0 -89
  195. platform_api_python_client/models/opentelemetry_collector.py +0 -89
  196. platform_api_python_client/models/spire_crds.py +0 -89
  197. platform_api_python_client/models/teleport_kube_agent.py +0 -89
  198. platform_api_python_client-4.31.0.dist-info/METADATA +0 -23
  199. platform_api_python_client-4.31.0.dist-info/RECORD +0 -151
  200. {platform_api_python_client-4.31.0.dist-info → platform_api_python_client-4.41.0.dist-info}/top_level.txt +0 -0
@@ -19,7 +19,6 @@ import pprint
19
19
  import re # noqa: F401
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
21
21
  from typing import Optional
22
- from platform_api_python_client.models.get_c_serve_v3_deployment_response import GetCServeV3DeploymentResponse
23
22
  from platform_api_python_client.models.get_compute_deployment_response import GetComputeDeploymentResponse
24
23
  from platform_api_python_client.models.get_dynamo_deployment_response import GetDynamoDeploymentResponse
25
24
  from platform_api_python_client.models.get_inference_v3_deployment_response import GetInferenceV3DeploymentResponse
@@ -28,7 +27,7 @@ from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
28
27
  from typing_extensions import Literal, Self
29
28
  from pydantic import Field
30
29
 
31
- DEPLOYMENTRESPONSE_ANY_OF_SCHEMAS = ["GetCServeV3DeploymentResponse", "GetComputeDeploymentResponse", "GetDynamoDeploymentResponse", "GetInferenceV3DeploymentResponse", "GetJobDeploymentResponse"]
30
+ DEPLOYMENTRESPONSE_ANY_OF_SCHEMAS = ["GetComputeDeploymentResponse", "GetDynamoDeploymentResponse", "GetInferenceV3DeploymentResponse", "GetJobDeploymentResponse"]
32
31
 
33
32
  class DeploymentResponse(BaseModel):
34
33
  """
@@ -37,19 +36,17 @@ class DeploymentResponse(BaseModel):
37
36
 
38
37
  # data type: GetDynamoDeploymentResponse
39
38
  anyof_schema_1_validator: Optional[GetDynamoDeploymentResponse] = None
40
- # data type: GetCServeV3DeploymentResponse
41
- anyof_schema_2_validator: Optional[GetCServeV3DeploymentResponse] = None
42
39
  # data type: GetInferenceV3DeploymentResponse
43
- anyof_schema_3_validator: Optional[GetInferenceV3DeploymentResponse] = None
40
+ anyof_schema_2_validator: Optional[GetInferenceV3DeploymentResponse] = None
44
41
  # data type: GetComputeDeploymentResponse
45
- anyof_schema_4_validator: Optional[GetComputeDeploymentResponse] = None
42
+ anyof_schema_3_validator: Optional[GetComputeDeploymentResponse] = None
46
43
  # data type: GetJobDeploymentResponse
47
- anyof_schema_5_validator: Optional[GetJobDeploymentResponse] = None
44
+ anyof_schema_4_validator: Optional[GetJobDeploymentResponse] = None
48
45
  if TYPE_CHECKING:
49
- actual_instance: Optional[Union[GetCServeV3DeploymentResponse, GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse, GetJobDeploymentResponse]] = None
46
+ actual_instance: Optional[Union[GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse, GetJobDeploymentResponse]] = None
50
47
  else:
51
48
  actual_instance: Any = None
52
- any_of_schemas: Set[str] = { "GetCServeV3DeploymentResponse", "GetComputeDeploymentResponse", "GetDynamoDeploymentResponse", "GetInferenceV3DeploymentResponse", "GetJobDeploymentResponse" }
49
+ any_of_schemas: Set[str] = { "GetComputeDeploymentResponse", "GetDynamoDeploymentResponse", "GetInferenceV3DeploymentResponse", "GetJobDeploymentResponse" }
53
50
 
54
51
  model_config = {
55
52
  "validate_assignment": True,
@@ -76,12 +73,6 @@ class DeploymentResponse(BaseModel):
76
73
  else:
77
74
  return v
78
75
 
79
- # validate data type: GetCServeV3DeploymentResponse
80
- if not isinstance(v, GetCServeV3DeploymentResponse):
81
- error_messages.append(f"Error! Input type `{type(v)}` is not `GetCServeV3DeploymentResponse`")
82
- else:
83
- return v
84
-
85
76
  # validate data type: GetInferenceV3DeploymentResponse
86
77
  if not isinstance(v, GetInferenceV3DeploymentResponse):
87
78
  error_messages.append(f"Error! Input type `{type(v)}` is not `GetInferenceV3DeploymentResponse`")
@@ -102,7 +93,7 @@ class DeploymentResponse(BaseModel):
102
93
 
103
94
  if error_messages:
104
95
  # no match
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))
96
+ raise ValueError("No match found when setting the actual_instance in DeploymentResponse with anyOf schemas: GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse, GetJobDeploymentResponse. Details: " + ", ".join(error_messages))
106
97
  else:
107
98
  return v
108
99
 
@@ -121,25 +112,19 @@ class DeploymentResponse(BaseModel):
121
112
  return instance
122
113
  except (ValidationError, ValueError) as e:
123
114
  error_messages.append(str(e))
124
- # anyof_schema_2_validator: Optional[GetCServeV3DeploymentResponse] = None
125
- try:
126
- instance.actual_instance = GetCServeV3DeploymentResponse.from_json(json_str)
127
- return instance
128
- except (ValidationError, ValueError) as e:
129
- error_messages.append(str(e))
130
- # anyof_schema_3_validator: Optional[GetInferenceV3DeploymentResponse] = None
115
+ # anyof_schema_2_validator: Optional[GetInferenceV3DeploymentResponse] = None
131
116
  try:
132
117
  instance.actual_instance = GetInferenceV3DeploymentResponse.from_json(json_str)
133
118
  return instance
134
119
  except (ValidationError, ValueError) as e:
135
120
  error_messages.append(str(e))
136
- # anyof_schema_4_validator: Optional[GetComputeDeploymentResponse] = None
121
+ # anyof_schema_3_validator: Optional[GetComputeDeploymentResponse] = None
137
122
  try:
138
123
  instance.actual_instance = GetComputeDeploymentResponse.from_json(json_str)
139
124
  return instance
140
125
  except (ValidationError, ValueError) as e:
141
126
  error_messages.append(str(e))
142
- # anyof_schema_5_validator: Optional[GetJobDeploymentResponse] = None
127
+ # anyof_schema_4_validator: Optional[GetJobDeploymentResponse] = None
143
128
  try:
144
129
  instance.actual_instance = GetJobDeploymentResponse.from_json(json_str)
145
130
  return instance
@@ -148,7 +133,7 @@ class DeploymentResponse(BaseModel):
148
133
 
149
134
  if error_messages:
150
135
  # no match
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))
136
+ raise ValueError("No match found when deserializing the JSON string into DeploymentResponse with anyOf schemas: GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse, GetJobDeploymentResponse. Details: " + ", ".join(error_messages))
152
137
  else:
153
138
  return instance
154
139
 
@@ -162,7 +147,7 @@ class DeploymentResponse(BaseModel):
162
147
  else:
163
148
  return json.dumps(self.actual_instance)
164
149
 
165
- def to_dict(self) -> Optional[Union[Dict[str, Any], GetCServeV3DeploymentResponse, GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse, GetJobDeploymentResponse]]:
150
+ def to_dict(self) -> Optional[Union[Dict[str, Any], GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse, GetJobDeploymentResponse]]:
166
151
  """Returns the dict representation of the actual instance"""
167
152
  if self.actual_instance is None:
168
153
  return None
@@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List
22
22
  from platform_api_python_client.models.deployment_status import DeploymentStatus
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 DeploymentStatusRequest(BaseModel):
27
28
  """
@@ -31,7 +32,8 @@ class DeploymentStatusRequest(BaseModel):
31
32
  __properties: ClassVar[List[str]] = ["status"]
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 DeploymentStatusRequest(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]:
@@ -25,6 +25,7 @@ from platform_api_python_client.models.deployment_type import DeploymentType
25
25
  from platform_api_python_client.models.service_status import ServiceStatus
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 DeploymentStatusResponse(BaseModel):
30
31
  """
@@ -40,7 +41,8 @@ class DeploymentStatusResponse(BaseModel):
40
41
  __properties: ClassVar[List[str]] = ["id", "type", "status", "service_status", "error_message", "endpoint_url", "pod_status"]
41
42
 
42
43
  model_config = ConfigDict(
43
- populate_by_name=True,
44
+ validate_by_name=True,
45
+ validate_by_alias=True,
44
46
  validate_assignment=True,
45
47
  protected_namespaces=(),
46
48
  )
@@ -52,8 +54,7 @@ class DeploymentStatusResponse(BaseModel):
52
54
 
53
55
  def to_json(self) -> str:
54
56
  """Returns the JSON representation of the model using alias"""
55
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
56
- return json.dumps(self.to_dict())
57
+ return json.dumps(to_jsonable_python(self.to_dict()))
57
58
 
58
59
  @classmethod
59
60
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -25,6 +25,7 @@ from platform_api_python_client.models.revision_pod_details import RevisionPodDe
25
25
  from platform_api_python_client.models.rollout_status import RolloutStatus
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 DeploymentStatusV3Response(BaseModel):
30
31
  """
@@ -39,7 +40,8 @@ class DeploymentStatusV3Response(BaseModel):
39
40
  __properties: ClassVar[List[str]] = ["id", "type", "status", "rollout_status", "endpoint_url", "revision_pod_details_list"]
40
41
 
41
42
  model_config = ConfigDict(
42
- populate_by_name=True,
43
+ validate_by_name=True,
44
+ validate_by_alias=True,
43
45
  validate_assignment=True,
44
46
  protected_namespaces=(),
45
47
  )
@@ -51,8 +53,7 @@ class DeploymentStatusV3Response(BaseModel):
51
53
 
52
54
  def to_json(self) -> str:
53
55
  """Returns the JSON representation of the model using alias"""
54
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
55
- return json.dumps(self.to_dict())
56
+ return json.dumps(to_jsonable_python(self.to_dict()))
56
57
 
57
58
  @classmethod
58
59
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -81,8 +82,7 @@ class DeploymentStatusV3Response(BaseModel):
81
82
  _items = []
82
83
  if self.revision_pod_details_list:
83
84
  for _item_revision_pod_details_list in self.revision_pod_details_list:
84
- if _item_revision_pod_details_list:
85
- _items.append(_item_revision_pod_details_list.to_dict())
85
+ _items.append(_item_revision_pod_details_list.to_dict() if _item_revision_pod_details_list is not None else None)
86
86
  _dict['revision_pod_details_list'] = _items
87
87
  # set to None if rollout_status (nullable) is None
88
88
  # and model_fields_set contains the field
@@ -40,10 +40,24 @@ class DeploymentType(str, Enum):
40
40
  RAG = 'rag'
41
41
  JOB = 'job'
42
42
  DYNAMO = 'dynamo'
43
+ CCL_COMPUTE = 'ccl_compute'
44
+ CCL_INFERENCE = 'ccl_inference'
45
+ CCL_JOB = 'ccl_job'
46
+ CCL_DYNAMO = 'ccl_dynamo'
43
47
 
44
48
  @classmethod
45
49
  def from_json(cls, json_str: str) -> Self:
46
50
  """Create an instance of DeploymentType from a JSON string"""
47
51
  return cls(json.loads(json_str))
48
52
 
53
+ @classmethod
54
+ def _missing_(cls, value):
55
+ """Accept a value the server added after this client was generated; it keeps the raw value."""
56
+ if not isinstance(value, str):
57
+ return None
58
+ member = str.__new__(cls, value)
59
+ member._name_ = None
60
+ member._value_ = value
61
+ return member
62
+
49
63
 
@@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List
22
22
  from platform_api_python_client.models.deployment_usage_value import DeploymentUsageValue
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 DeploymentUsage(BaseModel):
27
28
  """
@@ -32,7 +33,8 @@ class DeploymentUsage(BaseModel):
32
33
  __properties: ClassVar[List[str]] = ["metric", "values"]
33
34
 
34
35
  model_config = ConfigDict(
35
- populate_by_name=True,
36
+ validate_by_name=True,
37
+ validate_by_alias=True,
36
38
  validate_assignment=True,
37
39
  protected_namespaces=(),
38
40
  )
@@ -44,8 +46,7 @@ class DeploymentUsage(BaseModel):
44
46
 
45
47
  def to_json(self) -> str:
46
48
  """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
+ return json.dumps(to_jsonable_python(self.to_dict()))
49
50
 
50
51
  @classmethod
51
52
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -74,8 +75,7 @@ class DeploymentUsage(BaseModel):
74
75
  _items = []
75
76
  if self.values:
76
77
  for _item_values in self.values:
77
- if _item_values:
78
- _items.append(_item_values.to_dict())
78
+ _items.append(_item_values.to_dict() if _item_values is not None else None)
79
79
  _dict['values'] = _items
80
80
  return _dict
81
81
 
@@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt
21
21
  from typing import Any, ClassVar, Dict, List, Union
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 DeploymentUsageValue(BaseModel):
26
27
  """
@@ -31,7 +32,8 @@ class DeploymentUsageValue(BaseModel):
31
32
  __properties: ClassVar[List[str]] = ["timestamp", "value"]
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 DeploymentUsageValue(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,17 +22,18 @@ from typing import Any, ClassVar, Dict, List
22
22
  from platform_api_python_client.models.dynamo_kv_transfer_configuration import DynamoKvTransferConfiguration
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 DynamoCommunicationsInput(BaseModel):
27
28
  """
28
29
  DynamoCommunicationsInput
29
30
  """ # noqa: E501
30
31
  kv_transfer: DynamoKvTransferConfiguration
31
- additional_properties: Dict[str, Any] = {}
32
32
  __properties: ClassVar[List[str]] = ["kv_transfer"]
33
33
 
34
34
  model_config = ConfigDict(
35
- populate_by_name=True,
35
+ validate_by_name=True,
36
+ validate_by_alias=True,
36
37
  validate_assignment=True,
37
38
  protected_namespaces=(),
38
39
  )
@@ -44,8 +45,7 @@ class DynamoCommunicationsInput(BaseModel):
44
45
 
45
46
  def to_json(self) -> str:
46
47
  """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())
48
+ return json.dumps(to_jsonable_python(self.to_dict()))
49
49
 
50
50
  @classmethod
51
51
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -61,10 +61,8 @@ class DynamoCommunicationsInput(BaseModel):
61
61
  * `None` is only added to the output dict for nullable fields that
62
62
  were set at model initialization. Other fields with value `None`
63
63
  are ignored.
64
- * Fields in `self.additional_properties` are added to the output dict.
65
64
  """
66
65
  excluded_fields: Set[str] = set([
67
- "additional_properties",
68
66
  ])
69
67
 
70
68
  _dict = self.model_dump(
@@ -75,11 +73,6 @@ class DynamoCommunicationsInput(BaseModel):
75
73
  # override the default output from pydantic by calling `to_dict()` of kv_transfer
76
74
  if self.kv_transfer:
77
75
  _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
76
  return _dict
84
77
 
85
78
  @classmethod
@@ -94,11 +87,6 @@ class DynamoCommunicationsInput(BaseModel):
94
87
  _obj = cls.model_validate({
95
88
  "kv_transfer": DynamoKvTransferConfiguration.from_dict(obj["kv_transfer"]) if obj.get("kv_transfer") is not None else None
96
89
  })
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
90
  return _obj
103
91
 
104
92
 
@@ -0,0 +1,105 @@
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, Optional
22
+ from typing_extensions import Annotated
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+ from pydantic_core import to_jsonable_python
26
+
27
+ class DynamoFrontendConfig(BaseModel):
28
+ """
29
+ Replica bounds and pod size for the Dynamo Frontend. A size is requested and limited alike; left unset, the chart's small default applies. The bounds are shaped like a worker pool's so that Frontend autoscaling can arrive without an API change. Until it does, the Frontend runs a fixed count: ``min_replicas`` must equal ``max_replicas``.
30
+ """ # noqa: E501
31
+ min_replicas: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = 3
32
+ max_replicas: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = 3
33
+ cpu: Optional[Annotated[int, Field(le=8000, strict=True, ge=1000)]] = Field(default=None, description="CPU for each Frontend pod, in millicores.")
34
+ memory: Optional[Annotated[int, Field(le=16384, strict=True, ge=1024)]] = Field(default=None, description="Memory for each Frontend pod, in MiB.")
35
+ __properties: ClassVar[List[str]] = ["min_replicas", "max_replicas", "cpu", "memory"]
36
+
37
+ model_config = ConfigDict(
38
+ validate_by_name=True,
39
+ validate_by_alias=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ return json.dumps(to_jsonable_python(self.to_dict()))
52
+
53
+ @classmethod
54
+ def from_json(cls, json_str: str) -> Optional[Self]:
55
+ """Create an instance of DynamoFrontendConfig from a JSON string"""
56
+ return cls.from_dict(json.loads(json_str))
57
+
58
+ def to_dict(self) -> Dict[str, Any]:
59
+ """Return the dictionary representation of the model using alias.
60
+
61
+ This has the following differences from calling pydantic's
62
+ `self.model_dump(by_alias=True)`:
63
+
64
+ * `None` is only added to the output dict for nullable fields that
65
+ were set at model initialization. Other fields with value `None`
66
+ are ignored.
67
+ """
68
+ excluded_fields: Set[str] = set([
69
+ ])
70
+
71
+ _dict = self.model_dump(
72
+ by_alias=True,
73
+ exclude=excluded_fields,
74
+ exclude_none=True,
75
+ )
76
+ # set to None if cpu (nullable) is None
77
+ # and model_fields_set contains the field
78
+ if self.cpu is None and "cpu" in self.model_fields_set:
79
+ _dict['cpu'] = None
80
+
81
+ # set to None if memory (nullable) is None
82
+ # and model_fields_set contains the field
83
+ if self.memory is None and "memory" in self.model_fields_set:
84
+ _dict['memory'] = None
85
+
86
+ return _dict
87
+
88
+ @classmethod
89
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
90
+ """Create an instance of DynamoFrontendConfig from a dict"""
91
+ if obj is None:
92
+ return None
93
+
94
+ if not isinstance(obj, dict):
95
+ return cls.model_validate(obj)
96
+
97
+ _obj = cls.model_validate({
98
+ "min_replicas": obj.get("min_replicas") if obj.get("min_replicas") is not None else 3,
99
+ "max_replicas": obj.get("max_replicas") if obj.get("max_replicas") is not None else 3,
100
+ "cpu": obj.get("cpu"),
101
+ "memory": obj.get("memory")
102
+ })
103
+ return _obj
104
+
105
+
@@ -0,0 +1,105 @@
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, StrictInt
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing_extensions import Annotated
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+ from pydantic_core import to_jsonable_python
26
+
27
+ class DynamoFrontendConfigResponse(BaseModel):
28
+ """
29
+ The Frontend a revision requests, as read back. The size bounds stay on the request: in a response they would make a client generated from an older spec reject deployments sized above its caps once the caps are raised. The replica bounds keep the shape this response already has.
30
+ """ # noqa: E501
31
+ min_replicas: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = 3
32
+ max_replicas: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = 3
33
+ cpu: Optional[StrictInt] = Field(default=None, description="CPU for each Frontend pod, in millicores.")
34
+ memory: Optional[StrictInt] = Field(default=None, description="Memory for each Frontend pod, in MiB.")
35
+ __properties: ClassVar[List[str]] = ["min_replicas", "max_replicas", "cpu", "memory"]
36
+
37
+ model_config = ConfigDict(
38
+ validate_by_name=True,
39
+ validate_by_alias=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ return json.dumps(to_jsonable_python(self.to_dict()))
52
+
53
+ @classmethod
54
+ def from_json(cls, json_str: str) -> Optional[Self]:
55
+ """Create an instance of DynamoFrontendConfigResponse from a JSON string"""
56
+ return cls.from_dict(json.loads(json_str))
57
+
58
+ def to_dict(self) -> Dict[str, Any]:
59
+ """Return the dictionary representation of the model using alias.
60
+
61
+ This has the following differences from calling pydantic's
62
+ `self.model_dump(by_alias=True)`:
63
+
64
+ * `None` is only added to the output dict for nullable fields that
65
+ were set at model initialization. Other fields with value `None`
66
+ are ignored.
67
+ """
68
+ excluded_fields: Set[str] = set([
69
+ ])
70
+
71
+ _dict = self.model_dump(
72
+ by_alias=True,
73
+ exclude=excluded_fields,
74
+ exclude_none=True,
75
+ )
76
+ # set to None if cpu (nullable) is None
77
+ # and model_fields_set contains the field
78
+ if self.cpu is None and "cpu" in self.model_fields_set:
79
+ _dict['cpu'] = None
80
+
81
+ # set to None if memory (nullable) is None
82
+ # and model_fields_set contains the field
83
+ if self.memory is None and "memory" in self.model_fields_set:
84
+ _dict['memory'] = None
85
+
86
+ return _dict
87
+
88
+ @classmethod
89
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
90
+ """Create an instance of DynamoFrontendConfigResponse from a dict"""
91
+ if obj is None:
92
+ return None
93
+
94
+ if not isinstance(obj, dict):
95
+ return cls.model_validate(obj)
96
+
97
+ _obj = cls.model_validate({
98
+ "min_replicas": obj.get("min_replicas") if obj.get("min_replicas") is not None else 3,
99
+ "max_replicas": obj.get("max_replicas") if obj.get("max_replicas") is not None else 3,
100
+ "cpu": obj.get("cpu"),
101
+ "memory": obj.get("memory")
102
+ })
103
+ return _obj
104
+
105
+