# 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 .blast_summary_type import BlastSummaryType


class BlastSummary(UniversalBaseModel):
    id: str = pydantic.Field()
    """
    Unique identifier for the blast.
    """

    audience_id: typing_extensions.Annotated[str, FieldMetadata(alias="audienceId")] = pydantic.Field()
    """
    Audience ID associated with this blast.
    """

    type: BlastSummaryType = pydantic.Field()
    """
    Type of the blast message.
    """

    senders: typing.List[str] = pydantic.Field()
    """
    Sender identifiers (phone numbers or agent IDs) used for the blast.
    """

    content: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field()
    """
    Message content sent in the blast.
    """

    options: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
    """
    Blast options configuration.
    """

    fallback: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
    """
    Fallback message configuration, if any.
    """

    created_at: typing_extensions.Annotated[str, FieldMetadata(alias="createdAt")] = pydantic.Field()
    """
    ISO 8601 timestamp of when the blast was created.
    """

    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
