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
@@ -0,0 +1,197 @@
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, StrictBool, StrictInt, StrictStr, field_validator
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing_extensions import Annotated
23
+ from platform_api_python_client.models.ccl_dynamo_pools import CclDynamoPools
24
+ from platform_api_python_client.models.dynamo_communications_input import DynamoCommunicationsInput
25
+ from platform_api_python_client.models.dynamo_image import DynamoImage
26
+ from platform_api_python_client.models.dynamo_serving_mode import DynamoServingMode
27
+ from platform_api_python_client.models.env import Env
28
+ from platform_api_python_client.models.ingress import Ingress
29
+ from platform_api_python_client.models.volume_mount import VolumeMount
30
+ from typing import Optional, Set
31
+ from typing_extensions import Self
32
+ from pydantic_core import to_jsonable_python
33
+
34
+ class UnifiedWriteDynamoDeploymentRequest(BaseModel):
35
+ """
36
+ UnifiedWriteDynamoDeploymentRequest
37
+ """ # noqa: E501
38
+ type: StrictStr
39
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=20)]
40
+ cluster_id: StrictInt
41
+ user_annotations: Optional[Dict[str, StrictStr]] = None
42
+ chart_revision: Optional[StrictStr] = None
43
+ volume_mounts: Optional[Annotated[List[VolumeMount], Field(max_length=10)]] = None
44
+ priority: Optional[Annotated[str, Field(strict=True, max_length=253)]] = Field(default=None, description="Kubernetes PriorityClass name on the pod spec. Omit to leave unset.")
45
+ pools: CclDynamoPools
46
+ env: Optional[Env] = None
47
+ image: Optional[DynamoImage] = None
48
+ ingress: Ingress
49
+ serving_mode: Optional[DynamoServingMode] = None
50
+ communications: Optional[DynamoCommunicationsInput] = Field(default=None, description="Platform-managed worker communications. Only disaggregated KV transfer is supported. Omit or set null to preserve the legacy connector configuration.")
51
+ model: StrictStr
52
+ served_model_name: Optional[StrictStr] = None
53
+ extra_args: Optional[StrictStr] = Field(default=None, description="Extra worker CLI arguments as a single shell-style string, split into argv with POSIX shell quoting (shlex). Backslash is an escape character, so `\\` is consumed unless quoted: e.g. `--regex \\d+` reaches the worker as `d+`. Wrap literal backslashes in single quotes (`--regex '\\d+'`). Unbalanced quotes or a trailing backslash are rejected.")
54
+ hf_token_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Access-token vault item ID for HF_TOKEN.")
55
+ enable_logging: Optional[StrictBool] = True
56
+ enable_node_model_cache: Optional[StrictBool] = False
57
+ __properties: ClassVar[List[str]] = ["type", "name", "cluster_id", "user_annotations", "chart_revision", "volume_mounts", "priority", "pools", "env", "image", "ingress", "serving_mode", "communications", "model", "served_model_name", "extra_args", "hf_token_ref", "enable_logging", "enable_node_model_cache"]
58
+
59
+ @field_validator('type')
60
+ def type_validate_enum(cls, value):
61
+ """Validates the enum"""
62
+ if value not in set(['ccl_dynamo']):
63
+ raise ValueError("must be one of enum values ('ccl_dynamo')")
64
+ return value
65
+
66
+ @field_validator('name', mode="before")
67
+ def name_validate_regular_expression(cls, value):
68
+ """Validates the regular expression"""
69
+ if isinstance(value, str) and not re.match(r"^[a-z][a-z0-9-]*$", value):
70
+ raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9-]*$/")
71
+ return value
72
+
73
+ model_config = ConfigDict(
74
+ validate_by_name=True,
75
+ validate_by_alias=True,
76
+ validate_assignment=True,
77
+ protected_namespaces=(),
78
+ )
79
+
80
+
81
+ def to_str(self) -> str:
82
+ """Returns the string representation of the model using alias"""
83
+ return pprint.pformat(self.model_dump(by_alias=True))
84
+
85
+ def to_json(self) -> str:
86
+ """Returns the JSON representation of the model using alias"""
87
+ return json.dumps(to_jsonable_python(self.to_dict()))
88
+
89
+ @classmethod
90
+ def from_json(cls, json_str: str) -> Optional[Self]:
91
+ """Create an instance of UnifiedWriteDynamoDeploymentRequest from a JSON string"""
92
+ return cls.from_dict(json.loads(json_str))
93
+
94
+ def to_dict(self) -> Dict[str, Any]:
95
+ """Return the dictionary representation of the model using alias.
96
+
97
+ This has the following differences from calling pydantic's
98
+ `self.model_dump(by_alias=True)`:
99
+
100
+ * `None` is only added to the output dict for nullable fields that
101
+ were set at model initialization. Other fields with value `None`
102
+ are ignored.
103
+ """
104
+ excluded_fields: Set[str] = set([
105
+ ])
106
+
107
+ _dict = self.model_dump(
108
+ by_alias=True,
109
+ exclude=excluded_fields,
110
+ exclude_none=True,
111
+ )
112
+ # override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
113
+ _items = []
114
+ if self.volume_mounts:
115
+ for _item_volume_mounts in self.volume_mounts:
116
+ _items.append(_item_volume_mounts.to_dict() if _item_volume_mounts is not None else None)
117
+ _dict['volume_mounts'] = _items
118
+ # override the default output from pydantic by calling `to_dict()` of pools
119
+ if self.pools:
120
+ _dict['pools'] = self.pools.to_dict()
121
+ # override the default output from pydantic by calling `to_dict()` of env
122
+ if self.env:
123
+ _dict['env'] = self.env.to_dict()
124
+ # override the default output from pydantic by calling `to_dict()` of image
125
+ if self.image:
126
+ _dict['image'] = self.image.to_dict()
127
+ # override the default output from pydantic by calling `to_dict()` of ingress
128
+ if self.ingress:
129
+ _dict['ingress'] = self.ingress.to_dict()
130
+ # override the default output from pydantic by calling `to_dict()` of communications
131
+ if self.communications:
132
+ _dict['communications'] = self.communications.to_dict()
133
+ # set to None if user_annotations (nullable) is None
134
+ # and model_fields_set contains the field
135
+ if self.user_annotations is None and "user_annotations" in self.model_fields_set:
136
+ _dict['user_annotations'] = None
137
+
138
+ # set to None if priority (nullable) is None
139
+ # and model_fields_set contains the field
140
+ if self.priority is None and "priority" in self.model_fields_set:
141
+ _dict['priority'] = None
142
+
143
+ # set to None if communications (nullable) is None
144
+ # and model_fields_set contains the field
145
+ if self.communications is None and "communications" in self.model_fields_set:
146
+ _dict['communications'] = None
147
+
148
+ # set to None if served_model_name (nullable) is None
149
+ # and model_fields_set contains the field
150
+ if self.served_model_name is None and "served_model_name" in self.model_fields_set:
151
+ _dict['served_model_name'] = None
152
+
153
+ # set to None if extra_args (nullable) is None
154
+ # and model_fields_set contains the field
155
+ if self.extra_args is None and "extra_args" in self.model_fields_set:
156
+ _dict['extra_args'] = None
157
+
158
+ # set to None if hf_token_ref (nullable) is None
159
+ # and model_fields_set contains the field
160
+ if self.hf_token_ref is None and "hf_token_ref" in self.model_fields_set:
161
+ _dict['hf_token_ref'] = None
162
+
163
+ return _dict
164
+
165
+ @classmethod
166
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
167
+ """Create an instance of UnifiedWriteDynamoDeploymentRequest from a dict"""
168
+ if obj is None:
169
+ return None
170
+
171
+ if not isinstance(obj, dict):
172
+ return cls.model_validate(obj)
173
+
174
+ _obj = cls.model_validate({
175
+ "type": obj.get("type"),
176
+ "name": obj.get("name"),
177
+ "cluster_id": obj.get("cluster_id"),
178
+ "user_annotations": obj.get("user_annotations"),
179
+ "chart_revision": obj.get("chart_revision"),
180
+ "volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
181
+ "priority": obj.get("priority"),
182
+ "pools": CclDynamoPools.from_dict(obj["pools"]) if obj.get("pools") is not None else None,
183
+ "env": Env.from_dict(obj["env"]) if obj.get("env") is not None else None,
184
+ "image": DynamoImage.from_dict(obj["image"]) if obj.get("image") is not None else None,
185
+ "ingress": Ingress.from_dict(obj["ingress"]) if obj.get("ingress") is not None else None,
186
+ "serving_mode": obj.get("serving_mode"),
187
+ "communications": DynamoCommunicationsInput.from_dict(obj["communications"]) if obj.get("communications") is not None else None,
188
+ "model": obj.get("model"),
189
+ "served_model_name": obj.get("served_model_name"),
190
+ "extra_args": obj.get("extra_args"),
191
+ "hf_token_ref": obj.get("hf_token_ref"),
192
+ "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True,
193
+ "enable_node_model_cache": obj.get("enable_node_model_cache") if obj.get("enable_node_model_cache") is not None else False
194
+ })
195
+ return _obj
196
+
197
+
@@ -20,48 +20,60 @@ import json
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
22
  from typing_extensions import Annotated
23
- from platform_api_python_client.models.c_serve_v2_recipe import CServeV2Recipe
23
+ from platform_api_python_client.models.ccl_main_pools import CclMainPools
24
+ from platform_api_python_client.models.config_file_mount import ConfigFileMount
25
+ from platform_api_python_client.models.env import Env
26
+ from platform_api_python_client.models.image import Image
27
+ from platform_api_python_client.models.ingress import Ingress
28
+ from platform_api_python_client.models.metrics_config import MetricsConfig
24
29
  from platform_api_python_client.models.volume_mount import VolumeMount
25
30
  from typing import Optional, Set
26
31
  from typing_extensions import Self
32
+ from pydantic_core import to_jsonable_python
27
33
 
28
- class CreateCServeV3DeploymentRequest(BaseModel):
34
+ class UnifiedWriteInferenceV3DeploymentRequest(BaseModel):
29
35
  """
30
- CreateCServeV3DeploymentRequest
36
+ UnifiedWriteInferenceV3DeploymentRequest
31
37
  """ # noqa: E501
32
- max_surge: Optional[StrictInt] = None
33
- max_unavailable: Optional[StrictInt] = None
38
+ type: StrictStr
34
39
  name: Annotated[str, Field(min_length=1, strict=True, max_length=20)]
35
40
  cluster_id: StrictInt
36
- hardware_instance_id: StrictInt
37
41
  user_annotations: Optional[Dict[str, StrictStr]] = None
38
42
  chart_revision: Optional[StrictStr] = None
39
43
  volume_mounts: Optional[Annotated[List[VolumeMount], Field(max_length=10)]] = None
40
- priority: Optional[Annotated[str, Field(strict=True, max_length=253)]] = None
41
- recipe: CServeV2Recipe
42
- cserve_version: Optional[StrictStr] = None
43
- hf_token: Optional[StrictStr] = None
44
- endpoint_bearer_token: Optional[StrictStr] = None
45
- endpoint_certificate_authority: Optional[StrictStr] = None
46
- min_replicas: StrictInt
47
- max_replicas: StrictInt
48
- concurrency: Optional[StrictInt] = None
49
- cooldown_period: Optional[StrictInt] = None
50
- env_vars: Optional[Dict[str, StrictStr]] = None
51
- enable_logging: Optional[StrictBool] = True
52
- enable_node_model_cache: Optional[StrictBool] = False
44
+ priority: Optional[Annotated[str, Field(strict=True, max_length=253)]] = Field(default=None, description="Kubernetes PriorityClass name on the pod spec. Omit to leave unset.")
45
+ pools: CclMainPools
46
+ env: Optional[Env] = None
47
+ image: Image
48
+ ingress: Ingress
49
+ port: Annotated[int, Field(le=65535, strict=True, ge=1)]
50
+ healthcheck: Optional[StrictStr] = None
51
+ command: Optional[StrictStr] = None
52
+ config_file: Optional[ConfigFileMount] = None
53
+ hf_token_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Access-token vault item ID for HF_TOKEN.")
53
54
  session_affinity: Optional[StrictBool] = Field(default=False, description="Enable best-effort sticky routing via the `X-Session-Id` request header. Requests carrying the same header value land on the same pod, improving KV cache reuse for agentic workloads. Requests without the header are routed at random. Affinity is NOT durable: scaling, rollouts, restarts, or readiness-probe transitions will remap sessions to different pods. Do not use for irreplaceable in-pod state.")
54
- __properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "volume_mounts", "priority", "recipe", "cserve_version", "hf_token", "endpoint_bearer_token", "endpoint_certificate_authority", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "env_vars", "enable_logging", "enable_node_model_cache", "session_affinity"]
55
+ metrics: Optional[MetricsConfig] = None
56
+ enable_logging: Optional[StrictBool] = False
57
+ enable_node_model_cache: Optional[StrictBool] = False
58
+ __properties: ClassVar[List[str]] = ["type", "name", "cluster_id", "user_annotations", "chart_revision", "volume_mounts", "priority", "pools", "env", "image", "ingress", "port", "healthcheck", "command", "config_file", "hf_token_ref", "session_affinity", "metrics", "enable_logging", "enable_node_model_cache"]
55
59
 
56
- @field_validator('name')
60
+ @field_validator('type')
61
+ def type_validate_enum(cls, value):
62
+ """Validates the enum"""
63
+ if value not in set(['ccl_inference']):
64
+ raise ValueError("must be one of enum values ('ccl_inference')")
65
+ return value
66
+
67
+ @field_validator('name', mode="before")
57
68
  def name_validate_regular_expression(cls, value):
58
69
  """Validates the regular expression"""
59
- if not re.match(r"^[a-z][a-z0-9-]*$", value):
70
+ if isinstance(value, str) and not re.match(r"^[a-z][a-z0-9-]*$", value):
60
71
  raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9-]*$/")
61
72
  return value
62
73
 
63
74
  model_config = ConfigDict(
64
- populate_by_name=True,
75
+ validate_by_name=True,
76
+ validate_by_alias=True,
65
77
  validate_assignment=True,
66
78
  protected_namespaces=(),
67
79
  )
@@ -73,12 +85,11 @@ class CreateCServeV3DeploymentRequest(BaseModel):
73
85
 
74
86
  def to_json(self) -> str:
75
87
  """Returns the JSON representation of the model using alias"""
76
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
77
- return json.dumps(self.to_dict())
88
+ return json.dumps(to_jsonable_python(self.to_dict()))
78
89
 
79
90
  @classmethod
80
91
  def from_json(cls, json_str: str) -> Optional[Self]:
81
- """Create an instance of CreateCServeV3DeploymentRequest from a JSON string"""
92
+ """Create an instance of UnifiedWriteInferenceV3DeploymentRequest from a JSON string"""
82
93
  return cls.from_dict(json.loads(json_str))
83
94
 
84
95
  def to_dict(self) -> Dict[str, Any]:
@@ -103,22 +114,26 @@ class CreateCServeV3DeploymentRequest(BaseModel):
103
114
  _items = []
104
115
  if self.volume_mounts:
105
116
  for _item_volume_mounts in self.volume_mounts:
106
- if _item_volume_mounts:
107
- _items.append(_item_volume_mounts.to_dict())
117
+ _items.append(_item_volume_mounts.to_dict() if _item_volume_mounts is not None else None)
108
118
  _dict['volume_mounts'] = _items
109
- # override the default output from pydantic by calling `to_dict()` of recipe
110
- if self.recipe:
111
- _dict['recipe'] = self.recipe.to_dict()
112
- # set to None if max_surge (nullable) is None
113
- # and model_fields_set contains the field
114
- if self.max_surge is None and "max_surge" in self.model_fields_set:
115
- _dict['max_surge'] = None
116
-
117
- # set to None if max_unavailable (nullable) is None
118
- # and model_fields_set contains the field
119
- if self.max_unavailable is None and "max_unavailable" in self.model_fields_set:
120
- _dict['max_unavailable'] = None
121
-
119
+ # override the default output from pydantic by calling `to_dict()` of pools
120
+ if self.pools:
121
+ _dict['pools'] = self.pools.to_dict()
122
+ # override the default output from pydantic by calling `to_dict()` of env
123
+ if self.env:
124
+ _dict['env'] = self.env.to_dict()
125
+ # override the default output from pydantic by calling `to_dict()` of image
126
+ if self.image:
127
+ _dict['image'] = self.image.to_dict()
128
+ # override the default output from pydantic by calling `to_dict()` of ingress
129
+ if self.ingress:
130
+ _dict['ingress'] = self.ingress.to_dict()
131
+ # override the default output from pydantic by calling `to_dict()` of config_file
132
+ if self.config_file:
133
+ _dict['config_file'] = self.config_file.to_dict()
134
+ # override the default output from pydantic by calling `to_dict()` of metrics
135
+ if self.metrics:
136
+ _dict['metrics'] = self.metrics.to_dict()
122
137
  # set to None if user_annotations (nullable) is None
123
138
  # and model_fields_set contains the field
124
139
  if self.user_annotations is None and "user_annotations" in self.model_fields_set:
@@ -129,41 +144,36 @@ class CreateCServeV3DeploymentRequest(BaseModel):
129
144
  if self.priority is None and "priority" in self.model_fields_set:
130
145
  _dict['priority'] = None
131
146
 
132
- # set to None if cserve_version (nullable) is None
133
- # and model_fields_set contains the field
134
- if self.cserve_version is None and "cserve_version" in self.model_fields_set:
135
- _dict['cserve_version'] = None
136
-
137
- # set to None if hf_token (nullable) is None
147
+ # set to None if healthcheck (nullable) is None
138
148
  # and model_fields_set contains the field
139
- if self.hf_token is None and "hf_token" in self.model_fields_set:
140
- _dict['hf_token'] = None
149
+ if self.healthcheck is None and "healthcheck" in self.model_fields_set:
150
+ _dict['healthcheck'] = None
141
151
 
142
- # set to None if endpoint_bearer_token (nullable) is None
152
+ # set to None if command (nullable) is None
143
153
  # and model_fields_set contains the field
144
- if self.endpoint_bearer_token is None and "endpoint_bearer_token" in self.model_fields_set:
145
- _dict['endpoint_bearer_token'] = None
154
+ if self.command is None and "command" in self.model_fields_set:
155
+ _dict['command'] = None
146
156
 
147
- # set to None if endpoint_certificate_authority (nullable) is None
157
+ # set to None if config_file (nullable) is None
148
158
  # and model_fields_set contains the field
149
- if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set:
150
- _dict['endpoint_certificate_authority'] = None
159
+ if self.config_file is None and "config_file" in self.model_fields_set:
160
+ _dict['config_file'] = None
151
161
 
152
- # set to None if concurrency (nullable) is None
162
+ # set to None if hf_token_ref (nullable) is None
153
163
  # and model_fields_set contains the field
154
- if self.concurrency is None and "concurrency" in self.model_fields_set:
155
- _dict['concurrency'] = None
164
+ if self.hf_token_ref is None and "hf_token_ref" in self.model_fields_set:
165
+ _dict['hf_token_ref'] = None
156
166
 
157
- # set to None if cooldown_period (nullable) is None
167
+ # set to None if metrics (nullable) is None
158
168
  # and model_fields_set contains the field
159
- if self.cooldown_period is None and "cooldown_period" in self.model_fields_set:
160
- _dict['cooldown_period'] = None
169
+ if self.metrics is None and "metrics" in self.model_fields_set:
170
+ _dict['metrics'] = None
161
171
 
162
172
  return _dict
163
173
 
164
174
  @classmethod
165
175
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
166
- """Create an instance of CreateCServeV3DeploymentRequest from a dict"""
176
+ """Create an instance of UnifiedWriteInferenceV3DeploymentRequest from a dict"""
167
177
  if obj is None:
168
178
  return None
169
179
 
@@ -171,28 +181,26 @@ class CreateCServeV3DeploymentRequest(BaseModel):
171
181
  return cls.model_validate(obj)
172
182
 
173
183
  _obj = cls.model_validate({
174
- "max_surge": obj.get("max_surge"),
175
- "max_unavailable": obj.get("max_unavailable"),
184
+ "type": obj.get("type"),
176
185
  "name": obj.get("name"),
177
186
  "cluster_id": obj.get("cluster_id"),
178
- "hardware_instance_id": obj.get("hardware_instance_id"),
179
187
  "user_annotations": obj.get("user_annotations"),
180
188
  "chart_revision": obj.get("chart_revision"),
181
189
  "volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
182
190
  "priority": obj.get("priority"),
183
- "recipe": CServeV2Recipe.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None,
184
- "cserve_version": obj.get("cserve_version"),
185
- "hf_token": obj.get("hf_token"),
186
- "endpoint_bearer_token": obj.get("endpoint_bearer_token"),
187
- "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"),
188
- "min_replicas": obj.get("min_replicas"),
189
- "max_replicas": obj.get("max_replicas"),
190
- "concurrency": obj.get("concurrency"),
191
- "cooldown_period": obj.get("cooldown_period"),
192
- "env_vars": obj.get("env_vars"),
193
- "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True,
194
- "enable_node_model_cache": obj.get("enable_node_model_cache") if obj.get("enable_node_model_cache") is not None else False,
195
- "session_affinity": obj.get("session_affinity") if obj.get("session_affinity") is not None else False
191
+ "pools": CclMainPools.from_dict(obj["pools"]) if obj.get("pools") is not None else None,
192
+ "env": Env.from_dict(obj["env"]) if obj.get("env") is not None else None,
193
+ "image": Image.from_dict(obj["image"]) if obj.get("image") is not None else None,
194
+ "ingress": Ingress.from_dict(obj["ingress"]) if obj.get("ingress") is not None else None,
195
+ "port": obj.get("port"),
196
+ "healthcheck": obj.get("healthcheck"),
197
+ "command": obj.get("command"),
198
+ "config_file": ConfigFileMount.from_dict(obj["config_file"]) if obj.get("config_file") is not None else None,
199
+ "hf_token_ref": obj.get("hf_token_ref"),
200
+ "session_affinity": obj.get("session_affinity") if obj.get("session_affinity") is not None else False,
201
+ "metrics": MetricsConfig.from_dict(obj["metrics"]) if obj.get("metrics") is not None else None,
202
+ "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else False,
203
+ "enable_node_model_cache": obj.get("enable_node_model_cache") if obj.get("enable_node_model_cache") is not None else False
196
204
  })
197
205
  return _obj
198
206
 
@@ -0,0 +1,183 @@
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, StrictBool, StrictInt, StrictStr, field_validator
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing_extensions import Annotated
23
+ from platform_api_python_client.models.ccl_main_pools import CclMainPools
24
+ from platform_api_python_client.models.config_file_mount import ConfigFileMount
25
+ from platform_api_python_client.models.env import Env
26
+ from platform_api_python_client.models.image import Image
27
+ from platform_api_python_client.models.volume_mount import VolumeMount
28
+ from typing import Optional, Set
29
+ from typing_extensions import Self
30
+ from pydantic_core import to_jsonable_python
31
+
32
+ class UnifiedWriteJobDeploymentRequest(BaseModel):
33
+ """
34
+ UnifiedWriteJobDeploymentRequest
35
+ """ # noqa: E501
36
+ type: StrictStr
37
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=20)]
38
+ cluster_id: StrictInt
39
+ user_annotations: Optional[Dict[str, StrictStr]] = None
40
+ chart_revision: Optional[StrictStr] = None
41
+ volume_mounts: Optional[Annotated[List[VolumeMount], Field(max_length=10)]] = None
42
+ priority: Optional[Annotated[str, Field(strict=True, max_length=253)]] = Field(default=None, description="Kubernetes PriorityClass name on the pod spec. Omit to leave unset.")
43
+ pools: CclMainPools
44
+ env: Optional[Env] = None
45
+ image: Image
46
+ command: Optional[StrictStr] = None
47
+ config_file: Optional[ConfigFileMount] = None
48
+ completions: Optional[Annotated[int, Field(strict=True, ge=1)]] = 1
49
+ parallelism: Optional[Annotated[int, Field(strict=True, ge=1)]] = 1
50
+ backoff_limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = 3
51
+ active_deadline_seconds: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
52
+ enable_logging: Optional[StrictBool] = True
53
+ __properties: ClassVar[List[str]] = ["type", "name", "cluster_id", "user_annotations", "chart_revision", "volume_mounts", "priority", "pools", "env", "image", "command", "config_file", "completions", "parallelism", "backoff_limit", "active_deadline_seconds", "enable_logging"]
54
+
55
+ @field_validator('type')
56
+ def type_validate_enum(cls, value):
57
+ """Validates the enum"""
58
+ if value not in set(['ccl_job']):
59
+ raise ValueError("must be one of enum values ('ccl_job')")
60
+ return value
61
+
62
+ @field_validator('name', mode="before")
63
+ def name_validate_regular_expression(cls, value):
64
+ """Validates the regular expression"""
65
+ if isinstance(value, str) and not re.match(r"^[a-z][a-z0-9-]*$", value):
66
+ raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9-]*$/")
67
+ return value
68
+
69
+ model_config = ConfigDict(
70
+ validate_by_name=True,
71
+ validate_by_alias=True,
72
+ validate_assignment=True,
73
+ protected_namespaces=(),
74
+ )
75
+
76
+
77
+ def to_str(self) -> str:
78
+ """Returns the string representation of the model using alias"""
79
+ return pprint.pformat(self.model_dump(by_alias=True))
80
+
81
+ def to_json(self) -> str:
82
+ """Returns the JSON representation of the model using alias"""
83
+ return json.dumps(to_jsonable_python(self.to_dict()))
84
+
85
+ @classmethod
86
+ def from_json(cls, json_str: str) -> Optional[Self]:
87
+ """Create an instance of UnifiedWriteJobDeploymentRequest from a JSON string"""
88
+ return cls.from_dict(json.loads(json_str))
89
+
90
+ def to_dict(self) -> Dict[str, Any]:
91
+ """Return the dictionary representation of the model using alias.
92
+
93
+ This has the following differences from calling pydantic's
94
+ `self.model_dump(by_alias=True)`:
95
+
96
+ * `None` is only added to the output dict for nullable fields that
97
+ were set at model initialization. Other fields with value `None`
98
+ are ignored.
99
+ """
100
+ excluded_fields: Set[str] = set([
101
+ ])
102
+
103
+ _dict = self.model_dump(
104
+ by_alias=True,
105
+ exclude=excluded_fields,
106
+ exclude_none=True,
107
+ )
108
+ # override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
109
+ _items = []
110
+ if self.volume_mounts:
111
+ for _item_volume_mounts in self.volume_mounts:
112
+ _items.append(_item_volume_mounts.to_dict() if _item_volume_mounts is not None else None)
113
+ _dict['volume_mounts'] = _items
114
+ # override the default output from pydantic by calling `to_dict()` of pools
115
+ if self.pools:
116
+ _dict['pools'] = self.pools.to_dict()
117
+ # override the default output from pydantic by calling `to_dict()` of env
118
+ if self.env:
119
+ _dict['env'] = self.env.to_dict()
120
+ # override the default output from pydantic by calling `to_dict()` of image
121
+ if self.image:
122
+ _dict['image'] = self.image.to_dict()
123
+ # override the default output from pydantic by calling `to_dict()` of config_file
124
+ if self.config_file:
125
+ _dict['config_file'] = self.config_file.to_dict()
126
+ # set to None if user_annotations (nullable) is None
127
+ # and model_fields_set contains the field
128
+ if self.user_annotations is None and "user_annotations" in self.model_fields_set:
129
+ _dict['user_annotations'] = None
130
+
131
+ # set to None if priority (nullable) is None
132
+ # and model_fields_set contains the field
133
+ if self.priority is None and "priority" in self.model_fields_set:
134
+ _dict['priority'] = None
135
+
136
+ # set to None if command (nullable) is None
137
+ # and model_fields_set contains the field
138
+ if self.command is None and "command" in self.model_fields_set:
139
+ _dict['command'] = None
140
+
141
+ # set to None if config_file (nullable) is None
142
+ # and model_fields_set contains the field
143
+ if self.config_file is None and "config_file" in self.model_fields_set:
144
+ _dict['config_file'] = None
145
+
146
+ # set to None if active_deadline_seconds (nullable) is None
147
+ # and model_fields_set contains the field
148
+ if self.active_deadline_seconds is None and "active_deadline_seconds" in self.model_fields_set:
149
+ _dict['active_deadline_seconds'] = None
150
+
151
+ return _dict
152
+
153
+ @classmethod
154
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
155
+ """Create an instance of UnifiedWriteJobDeploymentRequest from a dict"""
156
+ if obj is None:
157
+ return None
158
+
159
+ if not isinstance(obj, dict):
160
+ return cls.model_validate(obj)
161
+
162
+ _obj = cls.model_validate({
163
+ "type": obj.get("type"),
164
+ "name": obj.get("name"),
165
+ "cluster_id": obj.get("cluster_id"),
166
+ "user_annotations": obj.get("user_annotations"),
167
+ "chart_revision": obj.get("chart_revision"),
168
+ "volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
169
+ "priority": obj.get("priority"),
170
+ "pools": CclMainPools.from_dict(obj["pools"]) if obj.get("pools") is not None else None,
171
+ "env": Env.from_dict(obj["env"]) if obj.get("env") is not None else None,
172
+ "image": Image.from_dict(obj["image"]) if obj.get("image") is not None else None,
173
+ "command": obj.get("command"),
174
+ "config_file": ConfigFileMount.from_dict(obj["config_file"]) if obj.get("config_file") is not None else None,
175
+ "completions": obj.get("completions") if obj.get("completions") is not None else 1,
176
+ "parallelism": obj.get("parallelism") if obj.get("parallelism") is not None else 1,
177
+ "backoff_limit": obj.get("backoff_limit") if obj.get("backoff_limit") is not None else 3,
178
+ "active_deadline_seconds": obj.get("active_deadline_seconds"),
179
+ "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True
180
+ })
181
+ return _obj
182
+
183
+
@@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, StrictBool
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 UpdateClusterMetadataRequest(BaseModel):
26
27
  """
@@ -30,7 +31,8 @@ class UpdateClusterMetadataRequest(BaseModel):
30
31
  __properties: ClassVar[List[str]] = ["deployment_creation_disabled"]
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 UpdateClusterMetadataRequest(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]: