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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata


class RoutesSingleUseAddressObjectResponseBody(UniversalBaseModel):
    """
    This field is used to indicate stops along the route for which an address has not been persisted. This field is mutually exclusive with addressId.
    """

    address: typing.Optional[str] = pydantic.Field(default=None)
    """
    Address of the stop.
    """

    latitude: float = pydantic.Field()
    """
    The latitude of the location
    """

    longitude: float = pydantic.Field()
    """
    The longitude of the location
    """

    radius_meters: typing_extensions.Annotated[
        typing.Optional[float],
        FieldMetadata(alias="radiusMeters"),
        pydantic.Field(
            alias="radiusMeters",
            description="The radius in meters for the geofence around this location. Must be a positive value.",
        ),
    ] = None

    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
