# 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 .raw_client import AsyncRawContainersClient, RawContainersClient


class ContainersClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawContainersClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        RawContainersClient
        """
        return self._raw_client

    def container_templates(
        self, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.Optional[typing.Any]:
        """
        Returns a list of templates available for creating new containers.

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

        Returns
        -------
        typing.Optional[typing.Any]
            Successful Response

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

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


class AsyncContainersClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawContainersClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        AsyncRawContainersClient
        """
        return self._raw_client

    async def container_templates(
        self, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.Optional[typing.Any]:
        """
        Returns a list of templates available for creating new containers.

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

        Returns
        -------
        typing.Optional[typing.Any]
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.containers.container_templates()


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