# 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 .safety_event_v_2_media_response_body_camera_role import SafetyEventV2MediaResponseBodyCameraRole
from .safety_event_v_2_media_response_body_input import SafetyEventV2MediaResponseBodyInput


class SafetyEventV2MediaResponseBody(UniversalBaseModel):
    """
    Media asset available for the safety event.
    """

    auxcam_serial: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="auxcamSerial"),
        pydantic.Field(alias="auxcamSerial", description="The serial number of the auxiliary camera device."),
    ] = None
    camera_role: typing_extensions.Annotated[
        typing.Optional[SafetyEventV2MediaResponseBodyCameraRole],
        FieldMetadata(alias="cameraRole"),
        pydantic.Field(
            alias="cameraRole",
            description="The currently assigned role name of the camera. May change if camera role settings are updated.  Valid values: `leftMirrorMount`, `leftSide`, `rightMirrorMount`, `rightSide`, `rearHigh`, `rearBumper`, `inCab`, `front`, `hopper`, `other1`, `other2`, `other3`, `other4`, `leftBev`, `rightBev`, `rearBev`, `frontBev`, `otherBev`, `bevNotUsed`",
        ),
    ] = None
    input: SafetyEventV2MediaResponseBodyInput = pydantic.Field()
    """
    The media input type of the camera.  Valid values: `dashcamRoadFacing`, `dashcamDriverFacing`, `analog1`, `analog2`, `analog3`, `analog4`
    """

    url: str = pydantic.Field()
    """
    URL to download the media asset.
    """

    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
