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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
from .card_style_image_alignment import CardStyleImageAlignment
import pydantic
from .card_style_media_height import CardStyleMediaHeight
from .card_style_width import CardStyleWidth
from .card_style_orientation import CardStyleOrientation
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class CardStyle(UniversalBaseModel):
    image_alignment: typing.Optional[CardStyleImageAlignment] = pydantic.Field(default=None)
    """
    Alignment of the image in the card. Only available for horizontal cards.
    """

    media_height: typing.Optional[CardStyleMediaHeight] = pydantic.Field(default=None)
    """
    Height of the media in the card. Only available for vertical cards.
    """

    thumbnail_url: typing.Optional[str] = pydantic.Field(default=None)
    """
    URL of the thumbnail image
    """

    width: typing.Optional[CardStyleWidth] = pydantic.Field(default=None)
    """
    Width of the card
    """

    orientation: typing.Optional[CardStyleOrientation] = pydantic.Field(default=None)
    """
    Orientation 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
