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

import typing

from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from ..types.access_grant_list_response import AccessGrantListResponse
from ..types.access_grant_response import AccessGrantResponse
from ..types.access_overview_response import AccessOverviewResponse
from ..types.bulk_grant_entry import BulkGrantEntry
from ..types.resolved_access_response import ResolvedAccessResponse
from ..types.users_with_access_response import UsersWithAccessResponse
from .raw_client import AsyncRawAccessControlClient, RawAccessControlClient

# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)


class AccessControlClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawAccessControlClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> RawAccessControlClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawAccessControlClient
        """
        return self._raw_client

    def list_grants(
        self,
        organization_id: str,
        *,
        entity_type: typing.Optional[str] = None,
        entity_id: typing.Optional[str] = None,
        grantee_type: typing.Optional[str] = None,
        grantee_id: typing.Optional[str] = None,
        skip: typing.Optional[int] = None,
        limit: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AccessGrantListResponse:
        """
        List access grants for an organization with optional filters.

        Includes both real AccessGrant records and synthesized grants
        from legacy VectorStore.access_mode.

        Parameters
        ----------
        organization_id : str

        entity_type : typing.Optional[str]

        entity_id : typing.Optional[str]

        grantee_type : typing.Optional[str]

        grantee_id : typing.Optional[str]

        skip : typing.Optional[int]

        limit : typing.Optional[int]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AccessGrantListResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.access_control.list_grants(
            organization_id="organization_id",
        )
        """
        _response = self._raw_client.list_grants(
            organization_id,
            entity_type=entity_type,
            entity_id=entity_id,
            grantee_type=grantee_type,
            grantee_id=grantee_id,
            skip=skip,
            limit=limit,
            request_options=request_options,
        )
        return _response.data

    def create_grant(
        self,
        organization_id: str,
        *,
        entity_type: str,
        entity_id: str,
        grantee_type: str,
        grantee_id: str,
        access_level: str,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AccessGrantResponse:
        """
        Create a new access grant.

        Parameters
        ----------
        organization_id : str

        entity_type : str

        entity_id : str

        grantee_type : str

        grantee_id : str

        access_level : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AccessGrantResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.access_control.create_grant(
            organization_id="organization_id",
            entity_type="entity_type",
            entity_id="entity_id",
            grantee_type="grantee_type",
            grantee_id="grantee_id",
            access_level="access_level",
        )
        """
        _response = self._raw_client.create_grant(
            organization_id,
            entity_type=entity_type,
            entity_id=entity_id,
            grantee_type=grantee_type,
            grantee_id=grantee_id,
            access_level=access_level,
            request_options=request_options,
        )
        return _response.data

    def get_access_overview(
        self, organization_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> AccessOverviewResponse:
        """
        Get a role-scoped access overview for the Access Overview page.

        Admins see all slices, stores, and grants. Regular users see only
        entities they have access to and grants for those entities.

        Parameters
        ----------
        organization_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AccessOverviewResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.access_control.get_access_overview(
            organization_id="organization_id",
        )
        """
        _response = self._raw_client.get_access_overview(organization_id, request_options=request_options)
        return _response.data

    def bulk_create_grants(
        self,
        organization_id: str,
        *,
        entity_type: str,
        entity_id: str,
        grants: typing.Sequence[BulkGrantEntry],
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.List[AccessGrantResponse]:
        """
        Create multiple access grants for the same entity.

        Parameters
        ----------
        organization_id : str

        entity_type : str

        entity_id : str

        grants : typing.Sequence[BulkGrantEntry]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        typing.List[AccessGrantResponse]
            Successful Response

        Examples
        --------
        from aitronos import Aitronos, BulkGrantEntry

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.access_control.bulk_create_grants(
            organization_id="organization_id",
            entity_type="entity_type",
            entity_id="entity_id",
            grants=[
                BulkGrantEntry(
                    grantee_type="grantee_type",
                    grantee_id="grantee_id",
                    access_level="access_level",
                )
            ],
        )
        """
        _response = self._raw_client.bulk_create_grants(
            organization_id,
            entity_type=entity_type,
            entity_id=entity_id,
            grants=grants,
            request_options=request_options,
        )
        return _response.data

    def revoke_grant(
        self, organization_id: str, grant_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> None:
        """
        Revoke (soft-delete) an access grant.

        Parameters
        ----------
        organization_id : str

        grant_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        None

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.access_control.revoke_grant(
            organization_id="organization_id",
            grant_id="grant_id",
        )
        """
        _response = self._raw_client.revoke_grant(organization_id, grant_id, request_options=request_options)
        return _response.data

    def update_grant(
        self,
        organization_id: str,
        grant_id: str,
        *,
        access_level: str,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AccessGrantResponse:
        """
        Update the access level of an existing grant.

        Parameters
        ----------
        organization_id : str

        grant_id : str

        access_level : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AccessGrantResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.access_control.update_grant(
            organization_id="organization_id",
            grant_id="grant_id",
            access_level="access_level",
        )
        """
        _response = self._raw_client.update_grant(
            organization_id, grant_id, access_level=access_level, request_options=request_options
        )
        return _response.data

    def list_slice_grants(
        self,
        organization_id: str,
        slice_id: str,
        *,
        skip: typing.Optional[int] = None,
        limit: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AccessGrantListResponse:
        """
        List access grants for a specific knowledge slice.

        Includes both real AccessGrant records and synthesized grants
        from legacy VectorStore.access_mode on the slice's stores.

        Parameters
        ----------
        organization_id : str

        slice_id : str

        skip : typing.Optional[int]

        limit : typing.Optional[int]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AccessGrantListResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.access_control.list_slice_grants(
            organization_id="organization_id",
            slice_id="slice_id",
        )
        """
        _response = self._raw_client.list_slice_grants(
            organization_id, slice_id, skip=skip, limit=limit, request_options=request_options
        )
        return _response.data

    def list_store_grants(
        self,
        organization_id: str,
        store_id: str,
        *,
        skip: typing.Optional[int] = None,
        limit: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AccessGrantListResponse:
        """
        List access grants for a specific vector store.

        Includes both real AccessGrant records and synthesized grants
        from legacy VectorStore.access_mode.

        Parameters
        ----------
        organization_id : str

        store_id : str

        skip : typing.Optional[int]

        limit : typing.Optional[int]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AccessGrantListResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.access_control.list_store_grants(
            organization_id="organization_id",
            store_id="store_id",
        )
        """
        _response = self._raw_client.list_store_grants(
            organization_id, store_id, skip=skip, limit=limit, request_options=request_options
        )
        return _response.data

    def list_assistant_grants(
        self,
        organization_id: str,
        assistant_id: str,
        *,
        skip: typing.Optional[int] = None,
        limit: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AccessGrantListResponse:
        """
        List access grants for a specific assistant.

        Parameters
        ----------
        organization_id : str

        assistant_id : str

        skip : typing.Optional[int]

        limit : typing.Optional[int]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AccessGrantListResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.access_control.list_assistant_grants(
            organization_id="organization_id",
            assistant_id="assistant_id",
        )
        """
        _response = self._raw_client.list_assistant_grants(
            organization_id, assistant_id, skip=skip, limit=limit, request_options=request_options
        )
        return _response.data

    def get_resolved_access(
        self,
        organization_id: str,
        user_id: str,
        *,
        entity_type: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ResolvedAccessResponse:
        """
        Compute effective access for a user across all entity types, split by slice and store.

        Parameters
        ----------
        organization_id : str

        user_id : str

        entity_type : typing.Optional[str]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        ResolvedAccessResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.access_control.get_resolved_access(
            organization_id="organization_id",
            user_id="user_id",
        )
        """
        _response = self._raw_client.get_resolved_access(
            organization_id, user_id, entity_type=entity_type, request_options=request_options
        )
        return _response.data

    def get_users_with_access(
        self,
        organization_id: str,
        *,
        entity_type: str,
        entity_id: str,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UsersWithAccessResponse:
        """
        Get all users who have access to a specific entity.

        Parameters
        ----------
        organization_id : str

        entity_type : str

        entity_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UsersWithAccessResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.access_control.get_users_with_access(
            organization_id="organization_id",
            entity_type="entity_type",
            entity_id="entity_id",
        )
        """
        _response = self._raw_client.get_users_with_access(
            organization_id, entity_type=entity_type, entity_id=entity_id, request_options=request_options
        )
        return _response.data


class AsyncAccessControlClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawAccessControlClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> AsyncRawAccessControlClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawAccessControlClient
        """
        return self._raw_client

    async def list_grants(
        self,
        organization_id: str,
        *,
        entity_type: typing.Optional[str] = None,
        entity_id: typing.Optional[str] = None,
        grantee_type: typing.Optional[str] = None,
        grantee_id: typing.Optional[str] = None,
        skip: typing.Optional[int] = None,
        limit: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AccessGrantListResponse:
        """
        List access grants for an organization with optional filters.

        Includes both real AccessGrant records and synthesized grants
        from legacy VectorStore.access_mode.

        Parameters
        ----------
        organization_id : str

        entity_type : typing.Optional[str]

        entity_id : typing.Optional[str]

        grantee_type : typing.Optional[str]

        grantee_id : typing.Optional[str]

        skip : typing.Optional[int]

        limit : typing.Optional[int]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AccessGrantListResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.access_control.list_grants(
                organization_id="organization_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.list_grants(
            organization_id,
            entity_type=entity_type,
            entity_id=entity_id,
            grantee_type=grantee_type,
            grantee_id=grantee_id,
            skip=skip,
            limit=limit,
            request_options=request_options,
        )
        return _response.data

    async def create_grant(
        self,
        organization_id: str,
        *,
        entity_type: str,
        entity_id: str,
        grantee_type: str,
        grantee_id: str,
        access_level: str,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AccessGrantResponse:
        """
        Create a new access grant.

        Parameters
        ----------
        organization_id : str

        entity_type : str

        entity_id : str

        grantee_type : str

        grantee_id : str

        access_level : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AccessGrantResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.access_control.create_grant(
                organization_id="organization_id",
                entity_type="entity_type",
                entity_id="entity_id",
                grantee_type="grantee_type",
                grantee_id="grantee_id",
                access_level="access_level",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.create_grant(
            organization_id,
            entity_type=entity_type,
            entity_id=entity_id,
            grantee_type=grantee_type,
            grantee_id=grantee_id,
            access_level=access_level,
            request_options=request_options,
        )
        return _response.data

    async def get_access_overview(
        self, organization_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> AccessOverviewResponse:
        """
        Get a role-scoped access overview for the Access Overview page.

        Admins see all slices, stores, and grants. Regular users see only
        entities they have access to and grants for those entities.

        Parameters
        ----------
        organization_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AccessOverviewResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.access_control.get_access_overview(
                organization_id="organization_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_access_overview(organization_id, request_options=request_options)
        return _response.data

    async def bulk_create_grants(
        self,
        organization_id: str,
        *,
        entity_type: str,
        entity_id: str,
        grants: typing.Sequence[BulkGrantEntry],
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.List[AccessGrantResponse]:
        """
        Create multiple access grants for the same entity.

        Parameters
        ----------
        organization_id : str

        entity_type : str

        entity_id : str

        grants : typing.Sequence[BulkGrantEntry]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        typing.List[AccessGrantResponse]
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos, BulkGrantEntry

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.access_control.bulk_create_grants(
                organization_id="organization_id",
                entity_type="entity_type",
                entity_id="entity_id",
                grants=[
                    BulkGrantEntry(
                        grantee_type="grantee_type",
                        grantee_id="grantee_id",
                        access_level="access_level",
                    )
                ],
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.bulk_create_grants(
            organization_id,
            entity_type=entity_type,
            entity_id=entity_id,
            grants=grants,
            request_options=request_options,
        )
        return _response.data

    async def revoke_grant(
        self, organization_id: str, grant_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> None:
        """
        Revoke (soft-delete) an access grant.

        Parameters
        ----------
        organization_id : str

        grant_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        None

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.access_control.revoke_grant(
                organization_id="organization_id",
                grant_id="grant_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.revoke_grant(organization_id, grant_id, request_options=request_options)
        return _response.data

    async def update_grant(
        self,
        organization_id: str,
        grant_id: str,
        *,
        access_level: str,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AccessGrantResponse:
        """
        Update the access level of an existing grant.

        Parameters
        ----------
        organization_id : str

        grant_id : str

        access_level : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AccessGrantResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.access_control.update_grant(
                organization_id="organization_id",
                grant_id="grant_id",
                access_level="access_level",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.update_grant(
            organization_id, grant_id, access_level=access_level, request_options=request_options
        )
        return _response.data

    async def list_slice_grants(
        self,
        organization_id: str,
        slice_id: str,
        *,
        skip: typing.Optional[int] = None,
        limit: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AccessGrantListResponse:
        """
        List access grants for a specific knowledge slice.

        Includes both real AccessGrant records and synthesized grants
        from legacy VectorStore.access_mode on the slice's stores.

        Parameters
        ----------
        organization_id : str

        slice_id : str

        skip : typing.Optional[int]

        limit : typing.Optional[int]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AccessGrantListResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.access_control.list_slice_grants(
                organization_id="organization_id",
                slice_id="slice_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.list_slice_grants(
            organization_id, slice_id, skip=skip, limit=limit, request_options=request_options
        )
        return _response.data

    async def list_store_grants(
        self,
        organization_id: str,
        store_id: str,
        *,
        skip: typing.Optional[int] = None,
        limit: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AccessGrantListResponse:
        """
        List access grants for a specific vector store.

        Includes both real AccessGrant records and synthesized grants
        from legacy VectorStore.access_mode.

        Parameters
        ----------
        organization_id : str

        store_id : str

        skip : typing.Optional[int]

        limit : typing.Optional[int]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AccessGrantListResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.access_control.list_store_grants(
                organization_id="organization_id",
                store_id="store_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.list_store_grants(
            organization_id, store_id, skip=skip, limit=limit, request_options=request_options
        )
        return _response.data

    async def list_assistant_grants(
        self,
        organization_id: str,
        assistant_id: str,
        *,
        skip: typing.Optional[int] = None,
        limit: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AccessGrantListResponse:
        """
        List access grants for a specific assistant.

        Parameters
        ----------
        organization_id : str

        assistant_id : str

        skip : typing.Optional[int]

        limit : typing.Optional[int]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AccessGrantListResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.access_control.list_assistant_grants(
                organization_id="organization_id",
                assistant_id="assistant_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.list_assistant_grants(
            organization_id, assistant_id, skip=skip, limit=limit, request_options=request_options
        )
        return _response.data

    async def get_resolved_access(
        self,
        organization_id: str,
        user_id: str,
        *,
        entity_type: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ResolvedAccessResponse:
        """
        Compute effective access for a user across all entity types, split by slice and store.

        Parameters
        ----------
        organization_id : str

        user_id : str

        entity_type : typing.Optional[str]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        ResolvedAccessResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.access_control.get_resolved_access(
                organization_id="organization_id",
                user_id="user_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_resolved_access(
            organization_id, user_id, entity_type=entity_type, request_options=request_options
        )
        return _response.data

    async def get_users_with_access(
        self,
        organization_id: str,
        *,
        entity_type: str,
        entity_id: str,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UsersWithAccessResponse:
        """
        Get all users who have access to a specific entity.

        Parameters
        ----------
        organization_id : str

        entity_type : str

        entity_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UsersWithAccessResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.access_control.get_users_with_access(
                organization_id="organization_id",
                entity_type="entity_type",
                entity_id="entity_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_users_with_access(
            organization_id, entity_type=entity_type, entity_id=entity_id, request_options=request_options
        )
        return _response.data
