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

from ..core.pydantic_utilities import UniversalBaseModel
import pydantic
import typing
from .action import Action
from .card_style import CardStyle
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class Card(UniversalBaseModel):
    title: str = pydantic.Field()
    """
    The title of the card
    """

    subtitle: typing.Optional[str] = pydantic.Field(default=None)
    """
    The subtitle of the card
    """

    image_url: str = pydantic.Field()
    """
    The URL of the image to be displayed on the card
    """

    buttons: typing.Optional[typing.List[Action]] = pydantic.Field(default=None)
    """
    Array of buttons attached to the card. Maximum of 4 buttons.
    """

    card_style: typing.Optional[CardStyle] = pydantic.Field(default=None)
    """
    The style of 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
