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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
import datetime as dt
import pydantic
from .lse_task_serializer_for_annotators_drafts_item import LseTaskSerializerForAnnotatorsDraftsItem
from .lse_task_serializer_for_annotators_predictions_item import LseTaskSerializerForAnnotatorsPredictionsItem
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class LseTaskSerializerForAnnotators(UncheckedBaseModel):
    """
    Data Manager Task Serializer with FSM state support.
    """

    annotations: typing.Optional[str] = None
    annotations_results: typing.Optional[str] = None
    cancelled_annotations: typing.Optional[int] = None
    comment_count: typing.Optional[str] = None
    comments: typing.Optional[str] = None
    created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Time a task was created
    """

    data: typing.Optional[typing.Any] = None
    draft_exists: typing.Optional[bool] = None
    drafts: typing.Optional[typing.List[LseTaskSerializerForAnnotatorsDraftsItem]] = pydantic.Field(default=None)
    """
    Drafts for this task
    """

    id: typing.Optional[int] = None
    predictions: typing.Optional[typing.List[LseTaskSerializerForAnnotatorsPredictionsItem]] = pydantic.Field(
        default=None
    )
    """
    Predictions for this task
    """

    predictions_results: typing.Optional[str] = None
    predictions_score: typing.Optional[float] = None
    reviews_rejected: typing.Optional[int] = None
    total_annotations: typing.Optional[int] = None
    total_predictions: typing.Optional[int] = None
    unresolved_comment_count: typing.Optional[str] = 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
