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


class LseOrganization(UncheckedBaseModel):
    billing: OrganizationBilling
    created_at: typing.Optional[dt.datetime] = None
    custom_scripts_enabled: typing.Optional[str] = None
    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[str] = None
    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
    """

    id: typing.Optional[int] = None
    title: typing.Optional[str] = None
    token: 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
