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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
from .user_simple import UserSimple
import datetime as dt
import pydantic
from .export_snapshot_status import ExportSnapshotStatus
from .converted_format import ConvertedFormat
from .task_filter_options import TaskFilterOptions
from .annotation_filter_options import AnnotationFilterOptions
from .serialization_options import SerializationOptions
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class ExportSnapshot(UniversalBaseModel):
    title: typing.Optional[str] = None
    id: typing.Optional[int] = None
    created_by: typing.Optional[UserSimple] = None
    created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Creation time
    """

    finished_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Complete or fail time
    """

    status: typing.Optional[ExportSnapshotStatus] = None
    md5: typing.Optional[str] = None
    counters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
    converted_formats: typing.Optional[typing.List[ConvertedFormat]] = None
    task_filter_options: typing.Optional[TaskFilterOptions] = None
    annotation_filter_options: typing.Optional[AnnotationFilterOptions] = None
    serialization_options: typing.Optional[SerializationOptions] = 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
