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

import typing

import pydantic
import typing_extensions
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ...core.serialization import FieldMetadata
from .transfer_out_message_properties import TransferOutMessageProperties


class TransferOutMessage(UniversalBaseModel):
    """
    A message associated with an outbound transfer.
    """

    id: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="Id")] = pydantic.Field(default=None)
    """
    Unique identifier for the message.
    """

    room_id: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="RoomId")] = pydantic.Field(
        default=None
    )
    """
    The ID of the room where the message was sent.
    """

    user_id: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="UserId")] = pydantic.Field(
        default=None
    )
    """
    The ID of the user who sent the message.
    """

    user_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="UserName")] = pydantic.Field(
        default=None
    )
    """
    The name of the user who sent the message.
    """

    content: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="Content")] = pydantic.Field(
        default=None
    )
    """
    The content of the message.
    """

    created_at: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="CreatedAt")] = pydantic.Field(
        default=None
    )
    """
    The time the message was created.
    """

    message_type: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="MessageType")] = (
        pydantic.Field(default=None)
    )
    """
    The type of message.
    """

    message_properties: typing_extensions.Annotated[
        typing.Optional[TransferOutMessageProperties], FieldMetadata(alias="MessageProperties")
    ] = pydantic.Field(default=None)
    """
    Additional properties for 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
