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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .role_response_permissions import RoleResponsePermissions


class RoleResponse(UniversalBaseModel):
    """
    Schema for role response.
    """

    id: str
    name: str
    description: typing.Optional[str] = None
    permissions: typing.Optional[RoleResponsePermissions] = None
    is_base_role: bool
    is_custom: bool
    is_system_role: typing.Optional[bool] = None
    capabilities: typing.Optional[typing.List[str]] = None
    member_count: typing.Optional[int] = None
    knowledge_slice_ids: typing.Optional[typing.List[str]] = None
    organization_id: typing.Optional[str] = None
    created_at: 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
