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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class ResendContact(UniversalBaseModel):
    """
    Resend Contact object - standalone, independent of segments
    """

    id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Contact ID (read-only, set by Resend)
    """

    email: str = pydantic.Field()
    """
    The email address of the contact.
    """

    first_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Contact first name
    """

    last_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Contact last name
    """

    unsubscribed: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether contact is unsubscribed from all Broadcasts
    """

    created_at: typing.Optional[str] = pydantic.Field(default=None)
    """
    Creation timestamp
    """

    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
