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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
import pydantic
from .lat_lng import LatLng
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class ViewLocation(UniversalBaseModel):
    title: typing.Optional[str] = pydantic.Field(default=None)
    """
    The title for the view location action. Maximum length is 25 characters.
    """

    action_type: typing.Literal["view_location"] = pydantic.Field(default="view_location")
    """
    The type of action being sent
    """

    lat_lng: LatLng
    label: str = pydantic.Field()
    """
    The name of the location
    """

    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
