# 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 .user_access_entry_response import UserAccessEntryResponse


class UsersWithAccessResponse(UniversalBaseModel):
    """
    Response for users-with-access endpoint.
    """

    entity_type: str = pydantic.Field()
    """
    Type of entity: 'knowledge_slice', 'vector_store', or 'assistant'
    """

    entity_id: str = pydantic.Field()
    """
    ID of the entity
    """

    users: typing.List[UserAccessEntryResponse] = pydantic.Field()
    """
    List of users with access to this entity
    """

    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
