# 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 .goa_attribute_tiny_response_body import GoaAttributeTinyResponseBody
from .goa_tag_tiny_response_response_body import GoaTagTinyResponseResponseBody


class DetectionLogDriverObjectResponseBody(UniversalBaseModel):
    """
    Driver that is assigned to the safety event. Always returned. Null if driver is not assigned.
    """

    attributes: typing.Optional[typing.List[GoaAttributeTinyResponseBody]] = pydantic.Field(default=None)
    """
    List of attributes associated with the entity
    """

    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 driver assigned to the safety event. Only returned when includeDriver is set to true",
        ),
    ] = None
    id: str = pydantic.Field()
    """
    Unique ID for the driver object that is assigned to the safety event. Always returned when a driver is assigned.
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Name of the driver assigned to the safety event. Only returned when includeDriver is set to true
    """

    tags: typing.Optional[typing.List[GoaTagTinyResponseResponseBody]] = pydantic.Field(default=None)
    """
    Tags for the driver assigned to the safety event. Only returned when includeDriver is set to true
    """

    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
