# 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 .access_overview_grant import AccessOverviewGrant
from .access_overview_slice import AccessOverviewSlice
from .access_overview_store import AccessOverviewStore
from .composite_member_mapping import CompositeMemberMapping
from .slice_store_mapping import SliceStoreMapping


class AccessOverviewResponse(UniversalBaseModel):
    """
    Full access overview response for the Access Overview page.

    Scoped by the caller's role: admins see all, regular users see
    only entities they have access to.
    """

    can_view_all: bool
    slices: typing.List[AccessOverviewSlice]
    stores: typing.List[AccessOverviewStore]
    grants: typing.List[AccessOverviewGrant]
    slice_store_map: typing.List[SliceStoreMapping]
    composite_members: typing.List[CompositeMemberMapping]
    admin_users: typing.Optional[typing.List[str]] = None
    org_member_ids: typing.Optional[typing.List[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
