# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .message_author import MessageAuthor
from .message_style import MessageStyle


class DataContent(UniversalBaseModel):
    author: MessageAuthor = pydantic.Field()
    """
    The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`.
    """

    data: typing.Dict[str, typing.Any] = pydantic.Field()
    """
    The contents of the data message.
    """

    style: typing.Optional[MessageStyle] = pydantic.Field(default=None)
    """
    The style of the message. This is used by the client to determine how to display the message.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
