2024-07-28 15:21:51 -07:00
|
|
|
from typing import Union
|
2024-04-12 12:03:34 -07:00
|
|
|
|
2024-07-28 15:21:51 -07:00
|
|
|
from pydantic import BaseModel, ConfigDict, RootModel
|
2024-04-12 12:03:34 -07:00
|
|
|
|
|
|
|
|
2024-09-10 15:24:19 -07:00
|
|
|
class Response(BaseModel):
|
2024-04-12 12:03:34 -07:00
|
|
|
"""Response to the modeling command."""
|
|
|
|
|
|
|
|
model_config = ConfigDict(protected_namespaces=())
|
|
|
|
|
|
|
|
|
2024-09-10 15:24:19 -07:00
|
|
|
class Errors(BaseModel):
|
2024-04-12 12:03:34 -07:00
|
|
|
"""Errors that occurred during the modeling command."""
|
|
|
|
|
|
|
|
model_config = ConfigDict(protected_namespaces=())
|
|
|
|
|
|
|
|
|
|
|
|
BatchResponse = RootModel[
|
|
|
|
Union[
|
2024-09-10 15:24:19 -07:00
|
|
|
Response,
|
|
|
|
Errors,
|
2024-04-12 12:03:34 -07:00
|
|
|
]
|
|
|
|
]
|