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

import datetime as dt
import typing

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


class CameraDetailsResponseResponseBody(UniversalBaseModel):
    """
    Camera-specific health metadata details.
    """

    gateway_last_connected_time: typing_extensions.Annotated[
        typing.Optional[dt.datetime],
        FieldMetadata(alias="gatewayLastConnectedTime"),
        pydantic.Field(
            alias="gatewayLastConnectedTime",
            description="The timestamp when the gateway was last connected to the vehicle, in RFC 3339 format.",
        ),
    ] = None
    last_fifty_hours_uptime_percentage: typing_extensions.Annotated[
        typing.Optional[float],
        FieldMetadata(alias="lastFiftyHoursUptimePercentage"),
        pydantic.Field(
            alias="lastFiftyHoursUptimePercentage",
            description="The percentage of successful recording time during the time when the vehicle is on an active trip over the past 50 hours, in percentage points.",
        ),
    ] = None
    vehicle_gateway_serial: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="vehicleGatewaySerial"),
        pydantic.Field(
            alias="vehicleGatewaySerial",
            description="The serial number of the vehicle gateway that the camera is connected to.",
        ),
    ] = 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
