# 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.projects_response import ProjectsResponse
from .raw_client import AsyncRawScopesClient, RawScopesClient


class ScopesClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawScopesClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        RawScopesClient
        """
        return self._raw_client

    def get_projects(
        self, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.List[ProjectsResponse]:
        """
        Parameters
        ----------
        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

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

        Examples
        --------
        from agenta import AgentaApi

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.scopes.get_projects()
        """
        _response = self._raw_client.get_projects(request_options=request_options)
        return _response.data


class AsyncScopesClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawScopesClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        AsyncRawScopesClient
        """
        return self._raw_client

    async def get_projects(
        self, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.List[ProjectsResponse]:
        """
        Parameters
        ----------
        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

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

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.scopes.get_projects()


        asyncio.run(main())
        """
        _response = await self._raw_client.get_projects(request_options=request_options)
        return _response.data
