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

import datetime as dt
import typing

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


class ChargebackMessage(UniversalBaseModel):
    id: typing_extensions.Annotated[int, FieldMetadata(alias="Id")] = pydantic.Field()
    """
    Message identifier.
    """

    room_id: typing_extensions.Annotated[int, FieldMetadata(alias="RoomId")] = pydantic.Field()
    """
    Room identifier for the message.
    """

    user_id: typing_extensions.Annotated[int, FieldMetadata(alias="UserId")] = pydantic.Field()
    """
    User identifier who sent the message.
    """

    user_name: typing_extensions.Annotated[str, FieldMetadata(alias="UserName")] = pydantic.Field()
    """
    Name of the user who sent the message.
    """

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

    created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="CreatedAt")] = pydantic.Field()
    """
    Timestamp when the message was created.
    """

    message_type: typing_extensions.Annotated[int, FieldMetadata(alias="MessageType")] = pydantic.Field()
    """
    Type of message.
    """

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