# 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 .v_1_vision_run_by_camera_response_inspection_results import V1VisionRunByCameraResponseInspectionResults
from .v_1_vision_run_by_camera_response_run_summary import V1VisionRunByCameraResponseRunSummary


class V1VisionRunsByCameraAndProgramResponse(UniversalBaseModel):
    device_id: typing_extensions.Annotated[
        typing.Optional[int], FieldMetadata(alias="deviceId"), pydantic.Field(alias="deviceId")
    ] = None
    ended_at_ms: typing_extensions.Annotated[
        typing.Optional[int], FieldMetadata(alias="endedAtMs"), pydantic.Field(alias="endedAtMs")
    ] = None
    program_id: typing_extensions.Annotated[
        typing.Optional[int], FieldMetadata(alias="programId"), pydantic.Field(alias="programId")
    ] = None
    report_metadata: typing_extensions.Annotated[
        typing.Optional[V1VisionRunByCameraResponseRunSummary],
        FieldMetadata(alias="reportMetadata"),
        pydantic.Field(alias="reportMetadata"),
    ] = None
    results: typing.Optional[typing.List[V1VisionRunByCameraResponseInspectionResults]] = None
    started_at_ms: typing_extensions.Annotated[
        typing.Optional[int], FieldMetadata(alias="startedAtMs"), pydantic.Field(alias="startedAtMs")
    ] = 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
