# 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
from .role9e7enum import Role9E7Enum


class DefaultRole(UncheckedBaseModel):
    annotator_reviewer_firewall_enabled_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Set to current time to restrict data sharing between annotators and reviewers in the label stream, review stream, and notifications (which will be disabled). In these settings, information about annotator and reviewer identity is suppressed in the UI.
    """

    custom_scripts_enabled_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Set to current time to enable custom scripts (Plugins) for this organization. Can only be enabled if no organization members are active members of any other organizations; otherwise an error will be raised. If this occurs, contact the LEAP team for assistance with enabling custom scripts (Plugins).
    """

    default_role: typing.Optional[Role9E7Enum] = pydantic.Field(default=None)
    """
    Default membership role for invited users
    
    * `OW` - Owner
    * `AD` - Administrator
    * `MA` - Manager
    * `RE` - Reviewer
    * `AN` - Annotator
    * `DI` - Deactivated
    * `NO` - Not Activated
    """

    email_notification_settings: typing.Optional[typing.Any] = pydantic.Field(default=None)
    """
    Email notification settings for this organization. Controls which email notifications users can receive. Structure: {"notifications_allowed": {"notification_type": bool}}
    """

    embed_domains: typing.Optional[typing.Any] = pydantic.Field(default=None)
    """
    List of objects: {"domain": "example.com"}. Used for CSP header on /embed routes.
    """

    embed_settings: typing.Optional[typing.Any] = pydantic.Field(default=None)
    """
    Embed settings for this organization
    """

    external_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    External ID to uniquely identify this organization
    """

    extra_data_on_activity_logs: typing.Optional[bool] = None
    label_stream_navigation_disabled_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Set to current time to disable the label stream navigation for this organization. This will prevent users from going back in the label stream to view previous labels.
    """

    organization: int = pydantic.Field()
    """
    A unique integer value identifying this organization.
    """

    read_only_quick_view_enabled_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Set to current time to prevent creating or editing annotations in quick view.
    """

    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
