# 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 .uploaded_media_object_response_body_camera_role import UploadedMediaObjectResponseBodyCameraRole
from .uploaded_media_object_response_body_input import UploadedMediaObjectResponseBodyInput
from .uploaded_media_object_response_body_media_type import UploadedMediaObjectResponseBodyMediaType
from .uploaded_media_object_response_body_trigger_reason import UploadedMediaObjectResponseBodyTriggerReason
from .url_info_object_response_body import UrlInfoObjectResponseBody


class UploadedMediaObjectResponseBody(UniversalBaseModel):
    available_at_time: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="availableAtTime"),
        pydantic.Field(
            alias="availableAtTime",
            description="Timestamp, in RFC 3339 format, at which the media item was made available. Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00",
        ),
    ]
    camera_role: typing_extensions.Annotated[
        typing.Optional[UploadedMediaObjectResponseBodyCameraRole],
        FieldMetadata(alias="cameraRole"),
        pydantic.Field(
            alias="cameraRole",
            description="Camera role for this media.  Valid values: `leftMirrorMount`, `leftSide`, `rightMirrorMount`, `rightSide`, `rearHigh`, `rearBumper`, `inCab`, `front`, `hopper`, `other1`, `other2`, `other3`, `other4`, `leftBev`, `rightBev`, `rearBev`, `frontBev`, `otherBev`, `bevNotUsed`",
        ),
    ] = None
    end_time: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="endTime"),
        pydantic.Field(
            alias="endTime",
            description=" An end time in RFC 3339 format. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).",
        ),
    ]
    input: UploadedMediaObjectResponseBodyInput = pydantic.Field()
    """
    Input type for this media.  Valid values: `dashcamForwardFacing`, `dashcamInwardFacing`, `analog1`, `analog2`, `analog3`, `analog4`
    """

    media_type: typing_extensions.Annotated[
        UploadedMediaObjectResponseBodyMediaType,
        FieldMetadata(alias="mediaType"),
        pydantic.Field(
            alias="mediaType",
            description="Type of media.  Valid values: `image`, `videoHighRes`, `videoLowRes`, `hyperlapse`",
        ),
    ]
    start_time: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="startTime"),
        pydantic.Field(
            alias="startTime",
            description=" A start time in RFC 3339 format. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).",
        ),
    ]
    trigger_reason: typing_extensions.Annotated[
        UploadedMediaObjectResponseBodyTriggerReason,
        FieldMetadata(alias="triggerReason"),
        pydantic.Field(
            alias="triggerReason",
            description="Trigger reason for this media capture.  Valid values: `api`, `panicButton`, `periodicStill`, `rfidEvent`, `safetyEvent`, `tripEndStill`, `tripStartStill`, `videoRetrieval`",
        ),
    ]
    url_info: typing_extensions.Annotated[
        typing.Optional[UrlInfoObjectResponseBody], FieldMetadata(alias="urlInfo"), pydantic.Field(alias="urlInfo")
    ] = None
    vehicle_id: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="vehicleId"),
        pydantic.Field(alias="vehicleId", description="Vehicle ID for which this media was captured. Examples: 1234"),
    ]

    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
