# 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
from .idling_event_address_object_response_body_address_types_item import (
    IdlingEventAddressObjectResponseBodyAddressTypesItem,
)


class IdlingEventAddressObjectResponseBody(UniversalBaseModel):
    """
    The geofence address associated with the idling event, if applicable.
    """

    address_types: typing_extensions.Annotated[
        typing.Optional[typing.List[IdlingEventAddressObjectResponseBodyAddressTypesItem]],
        FieldMetadata(alias="addressTypes"),
        pydantic.Field(
            alias="addressTypes",
            description="The types of the geofence address of the idling location. An address can have multiple types.",
        ),
    ] = None
    external_ids: typing_extensions.Annotated[
        typing.Optional[typing.Dict[str, str]],
        FieldMetadata(alias="externalIds"),
        pydantic.Field(alias="externalIds", description="A map of external ids for the address."),
    ] = None
    id: str = pydantic.Field()
    """
    The ID of the geofence address of the idling location. It will be the address at the time of idling.
    """

    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
