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

import datetime as dt
import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel


class ProjectTemplate(UncheckedBaseModel):
    assignment_settings: typing.Optional[typing.Any] = pydantic.Field(default=None)
    """
    general dict serialized assignment settings
    """

    created_at: typing.Optional[dt.datetime] = None
    created_by: typing.Optional[int] = None
    custom_script: typing.Optional[str] = pydantic.Field(default=None)
    """
    custom script (Plugin) for projects created from this template
    """

    description: typing.Optional[str] = None
    id: typing.Optional[int] = None
    name: str
    organization: typing.Optional[int] = None
    project_settings: typing.Optional[typing.Any] = pydantic.Field(default=None)
    """
    general dict serialized project settings
    """

    require_comment_on_skip: typing.Optional[bool] = pydantic.Field(default=None)
    """
    flag to require comment on skip
    """

    review_settings: typing.Optional[typing.Any] = pydantic.Field(default=None)
    """
    general dict serialized review settings
    """

    show_unused_data_columns_to_annotators: typing.Optional[bool] = None
    tags: typing.Optional[typing.Any] = None
    updated_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
