# this file is @generated
import typing as t
from datetime import datetime

from .common import BaseModel
from .message_status import MessageStatus
from .message_status_text import MessageStatusText


class EndpointMessageOut(BaseModel):
    """A model containing information on a given message plus additional fields on the last attempt for that message."""

    status: MessageStatus

    status_text: MessageStatusText

    next_attempt: t.Optional[datetime] = None

    event_id: t.Optional[str] = None
    """Optional unique identifier for the message"""

    event_type: str
    """The event type's name"""

    payload: t.Dict[str, t.Any]

    channels: t.Optional[t.List[str]] = None
    """List of free-form identifiers that endpoints can filter by"""

    id: str
    """The Message's ID."""

    timestamp: datetime

    tags: t.Optional[t.List[str]] = None

    deliver_at: t.Optional[datetime] = None
