# 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, UniversalBaseModel


class OrganizationResponse(UniversalBaseModel):
    """
    Schema for organization response.
    """

    id: str
    name: str
    type: str
    description: typing.Optional[str] = None
    domain: typing.Optional[str] = pydantic.Field(default=None)
    """
    Primary email domain for the organization (deprecated, use domains)
    """

    domains: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Email domains for automatic member access
    """

    website: typing.Optional[str] = None
    industry: typing.Optional[str] = None
    company_size: typing.Optional[str] = None
    logo_image: typing.Optional[str] = None
    image_url: typing.Optional[str] = None
    is_active: bool
    owner_id: typing.Optional[str] = None
    api_usage_limit: float
    total_usage_limit: float
    storage_free_bytes_allowance: int
    pricing_tier_id: typing.Optional[str] = None
    created_at: dt.datetime
    updated_at: dt.datetime
    users_added_from_domains: typing.Optional[int] = pydantic.Field(default=None)
    """
    Number of users automatically added based on email domains
    """

    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
