# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional
from typing_extensions import Literal

from pydantic import Field as FieldInfo

from .media import Media

__all__ = ["MediaImage"]


class MediaImage(Media):
    anchor_position: Optional[Literal["BOTTOM", "CENTER", "TOP"]] = FieldInfo(alias="anchorPosition", default=None)
    """
    For responsive designs that may crop the image to fit the user's screen
    resolution, we may want the image to describe how it should positioned. For
    example, images where the focal point is at the bottom of the image should
    declare BOTTOM as the anchorPosition. This will crop the top of the image and
    leave the bottom intact.
    """

    dominant_color: Optional[str] = FieldInfo(alias="dominantColor", default=None)
    """Color in hex "FFFFFF" | "FFF" (nullable, valid hex color)"""

    image_url: Optional[str] = FieldInfo(alias="imageUrl", default=None)
    """A link points to an external resource. For images we using IMGX.

    To get the right size see link "https://docs.imgix.com/apis/url/size"
    """
