# 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.evaluation_set_run import EvaluationSetRun
from .raw_client import AsyncRawEvaluationSetRunsClient, RawEvaluationSetRunsClient


class EvaluationSetRunsClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawEvaluationSetRunsClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        RawEvaluationSetRunsClient
        """
        return self._raw_client

    def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> EvaluationSetRun:
        """
        Get details of an evaluation set run.

        Parameters
        ----------
        id : str
            The ID of the evaluation set run.

            Example: `"evr_Xj8mK2pL9nR4vT7qY5wZ"`

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

        Returns
        -------
        EvaluationSetRun
            Successfully retrieved evaluation set run

        Examples
        --------
        from extend_ai import Extend

        client = Extend(
            token="YOUR_TOKEN",
        )
        client.evaluation_set_runs.retrieve(
            id="evaluation_set_run_id_here",
        )
        """
        _response = self._raw_client.retrieve(id, request_options=request_options)
        return _response.data


class AsyncEvaluationSetRunsClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawEvaluationSetRunsClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        AsyncRawEvaluationSetRunsClient
        """
        return self._raw_client

    async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> EvaluationSetRun:
        """
        Get details of an evaluation set run.

        Parameters
        ----------
        id : str
            The ID of the evaluation set run.

            Example: `"evr_Xj8mK2pL9nR4vT7qY5wZ"`

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

        Returns
        -------
        EvaluationSetRun
            Successfully retrieved evaluation set run

        Examples
        --------
        import asyncio

        from extend_ai import AsyncExtend

        client = AsyncExtend(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.evaluation_set_runs.retrieve(
                id="evaluation_set_run_id_here",
            )


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