"""
backend_agent automatically generated by SDKgen please do not edit this file manually
https://sdkgen.app
"""

from pydantic import BaseModel, Field, GetCoreSchemaHandler, Tag
from pydantic_core import CoreSchema, core_schema
from typing import Any, Dict, Generic, List, Optional, TypeVar, Annotated, Union, Literal
import datetime
from .backend_agent_message import BackendAgentMessage
from .backend_agent_message_binary import BackendAgentMessageBinary
from .backend_agent_message_choice import BackendAgentMessageChoice
from .backend_agent_message_object import BackendAgentMessageObject
from .backend_agent_message_text import BackendAgentMessageText
from .backend_agent_message_tool_call import BackendAgentMessageToolCall


# This object represents an agent message
class BackendAgent(BaseModel):
    id: Optional[int] = Field(default=None, alias="id")
    origin: Optional[int] = Field(default=None, alias="origin")
    message: Annotated[Union[BackendAgentMessageBinary, BackendAgentMessageChoice, BackendAgentMessageObject, BackendAgentMessageText, BackendAgentMessageToolCall], Field(discriminator="type")] = Field(alias="message")
    insert_date: Optional[datetime.datetime] = Field(default=None, alias="insertDate")
    pass


