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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
from .inference_run_organization import InferenceRunOrganization
from .inference_run_created_by import InferenceRunCreatedBy
from .inference_run_project_subset import InferenceRunProjectSubset
from .inference_run_status import InferenceRunStatus
import datetime as dt
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class InferenceRun(UniversalBaseModel):
    organization: typing.Optional[InferenceRunOrganization] = None
    project: int
    model_version: typing.Optional[int] = None
    created_by: typing.Optional[InferenceRunCreatedBy] = None
    project_subset: InferenceRunProjectSubset
    status: typing.Optional[InferenceRunStatus] = None
    job_id: typing.Optional[str] = None
    created_at: typing.Optional[dt.datetime] = None
    triggered_at: typing.Optional[dt.datetime] = None
    predictions_updated_at: typing.Optional[dt.datetime] = None
    completed_at: typing.Optional[dt.datetime] = 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
