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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .billing_plan import BillingPlan


class OrganizationCreate(UniversalBaseModel):
    """
    Organization creation schema.
    """

    name: str = pydantic.Field()
    """
    Organization name
    """

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

    auth_0_org_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="auth0_org_id")] = (
        pydantic.Field(default=None)
    )
    """
    Auth0 organization ID
    """

    org_type: typing.Optional[str] = pydantic.Field(default=None)
    """
    Organization type (personal or manual)
    """

    org_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
    """
    Additional organization metadata
    """

    billing_plan: typing.Optional[BillingPlan] = pydantic.Field(default=None)
    """
    Billing plan for the organization
    """

    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
