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

from ...core.pydantic_utilities import UniversalBaseModel
import typing
import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2


class ProjectsUpdateResponse(UniversalBaseModel):
    """
    Project
    """

    title: typing.Optional[str] = pydantic.Field(default=None)
    """
    Project title
    """

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    Project description
    """

    label_config: typing.Optional[str] = pydantic.Field(default=None)
    """
    Label config in XML format
    """

    expert_instruction: typing.Optional[str] = pydantic.Field(default=None)
    """
    Labeling instructions to show to the user
    """

    show_instruction: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Show labeling instructions
    """

    show_skip_button: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Show skip button
    """

    enable_empty_annotation: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Allow empty annotations
    """

    show_annotation_history: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Show annotation history
    """

    reveal_preannotations_interactively: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Reveal preannotations interactively. If set to True, predictions will be shown to the user only after selecting the area of interest
    """

    show_collab_predictions: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Show predictions to annotators
    """

    maximum_annotations: typing.Optional[int] = pydantic.Field(default=None)
    """
    Maximum annotations per task
    """

    annotation_limit_count: typing.Optional[int] = pydantic.Field(default=None)
    """
    Maximum number of annotations per annotator
    """

    annotation_limit_percent: typing.Optional[float] = pydantic.Field(default=None)
    """
    Maximum percentage of annotations per annotator
    """

    color: typing.Optional[str] = pydantic.Field(default=None)
    """
    Project color in HEX format
    """

    control_weights: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
    """
    Dict of weights for each control tag in metric calculation. Each control tag (e.g. label or choice) will have its own key in control weight dict with weight for each label and overall weight. For example, if a bounding box annotation with a control tag named my_bbox should be included with 0.33 weight in agreement calculation, and the first label Car should be twice as important as Airplane, then you need to specify: {'my_bbox': {'type': 'RectangleLabels', 'labels': {'Car': 1.0, 'Airplane': 0.5}, 'overall': 0.33}
    """

    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
