# 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 .rich_button import RichButton


class RichCard(UniversalBaseModel):
    """
    Individual card containing title, optional media, and action buttons.
    """

    buttons: typing.List[RichButton] = pydantic.Field()
    """
    While buttons resemble quick replies, they remain on screen after being clicked and are card-specific. <br><br>
    **Limit:** 4 max
    """

    media: typing.Optional[str] = pydantic.Field(default=None)
    """
    Media file URLs to send.
    """

    subtitle: typing.Optional[str] = pydantic.Field(default=None)
    """
    Secondary text displayed below the title for additional context.
    """

    title: str = pydantic.Field()
    """
    Title displayed on the card.
    """

    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
