# 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 .resend_contact import ResendContact
from .resend_email import ResendEmail
from .resend_segment import ResendSegment


class ResendDataInput(UniversalBaseModel):
    """
    Complete Resend sandbox data structure.

    Mixed structure:
    - Segments contain nested Broadcasts (broadcasts MUST have a segment)
    - Emails are standalone (transactional)
    - Contacts are standalone (can be optionally linked to segments)
    """

    emails: typing.Optional[typing.List[ResendEmail]] = pydantic.Field(default=None)
    """
    List of standalone transactional emails
    """

    contacts: typing.Optional[typing.List[ResendContact]] = pydantic.Field(default=None)
    """
    List of standalone contacts
    """

    segments: typing.Optional[typing.List[ResendSegment]] = pydantic.Field(default=None)
    """
    List of segments with nested broadcasts
    """

    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
