# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing_extensions import Literal

import httpx

from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._utils import (
    maybe_transform,
    async_maybe_transform,
)
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
    to_raw_response_wrapper,
    to_streamed_response_wrapper,
    async_to_raw_response_wrapper,
    async_to_streamed_response_wrapper,
)
from ...pagination import SyncPageResponse, AsyncPageResponse
from ..._base_client import AsyncPaginator, make_request_options
from ...types.evaluation_datasets import (
    autogenerated_draft_test_case_list_params,
    autogenerated_draft_test_case_create_params,
    autogenerated_draft_test_case_update_params,
    autogenerated_draft_test_case_approve_params,
)
from ...types.shared.generic_delete_response import GenericDeleteResponse
from ...types.evaluation_datasets.auto_generated_draft_test_case import AutoGeneratedDraftTestCase
from ...types.evaluation_datasets.autogenerated_draft_test_case_list_response import (
    AutogeneratedDraftTestCaseListResponse,
)
from ...types.evaluation_datasets.approve_auto_generated_draft_test_case_response import (
    ApproveAutoGeneratedDraftTestCaseResponse,
)

__all__ = ["AutogeneratedDraftTestCasesResource", "AsyncAutogeneratedDraftTestCasesResource"]


class AutogeneratedDraftTestCasesResource(SyncAPIResource):
    @cached_property
    def with_raw_response(self) -> AutogeneratedDraftTestCasesResourceWithRawResponse:
        """
        This property can be used as a prefix for any HTTP method call to return the
        the raw response object instead of the parsed content.

        For more information, see https://www.github.com/scaleapi/sgp-python#accessing-raw-response-data-eg-headers
        """
        return AutogeneratedDraftTestCasesResourceWithRawResponse(self)

    @cached_property
    def with_streaming_response(self) -> AutogeneratedDraftTestCasesResourceWithStreamingResponse:
        """
        An alternative to `.with_raw_response` that doesn't eagerly read the response body.

        For more information, see https://www.github.com/scaleapi/sgp-python#with_streaming_response
        """
        return AutogeneratedDraftTestCasesResourceWithStreamingResponse(self)

    def create(
        self,
        evaluation_dataset_id: str,
        *,
        account_id: str,
        approved: bool,
        test_case_data: autogenerated_draft_test_case_create_params.TestCaseData,
        schema_type: Literal["GENERATION"] | NotGiven = NOT_GIVEN,
        topic_str: str | NotGiven = NOT_GIVEN,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    ) -> AutoGeneratedDraftTestCase:
        """
        ### Description

        Creates a autogenerated draft test case

        ### Details

        This API can be used to create a autogenerated draft test case. To use this API,
        review the request schema and pass in all fields that are required to create a
        autogenerated draft test case.

        Args:
          account_id: The ID of the account that owns the given entity.

          approved: Boolean to track whether or not the draft test case is approved

          test_case_data: The data for the test case in a format matching the provided schema_type

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        if not evaluation_dataset_id:
            raise ValueError(
                f"Expected a non-empty value for `evaluation_dataset_id` but received {evaluation_dataset_id!r}"
            )
        return self._post(
            f"/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases",
            body=maybe_transform(
                {
                    "account_id": account_id,
                    "approved": approved,
                    "test_case_data": test_case_data,
                    "schema_type": schema_type,
                    "topic_str": topic_str,
                },
                autogenerated_draft_test_case_create_params.AutogeneratedDraftTestCaseCreateParams,
            ),
            options=make_request_options(
                extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
            ),
            cast_to=AutoGeneratedDraftTestCase,
        )

    def retrieve(
        self,
        autogenerated_draft_test_case_id: str,
        *,
        evaluation_dataset_id: str,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    ) -> AutoGeneratedDraftTestCase:
        """
        ### Description

        Get the test case by its id.

        Args:
          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        if not evaluation_dataset_id:
            raise ValueError(
                f"Expected a non-empty value for `evaluation_dataset_id` but received {evaluation_dataset_id!r}"
            )
        if not autogenerated_draft_test_case_id:
            raise ValueError(
                f"Expected a non-empty value for `autogenerated_draft_test_case_id` but received {autogenerated_draft_test_case_id!r}"
            )
        return self._get(
            f"/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases/{autogenerated_draft_test_case_id}",
            options=make_request_options(
                extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
            ),
            cast_to=AutoGeneratedDraftTestCase,
        )

    def update(
        self,
        autogenerated_draft_test_case_id: str,
        *,
        evaluation_dataset_id: str,
        approved: bool | NotGiven = NOT_GIVEN,
        schema_type: Literal["GENERATION"] | NotGiven = NOT_GIVEN,
        test_case_data: autogenerated_draft_test_case_update_params.TestCaseData | NotGiven = NOT_GIVEN,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    ) -> AutoGeneratedDraftTestCase:
        """
        ### Description

        Update a test case draft.

        Args:
          approved: Boolean to track whether or not the draft test case is approved

          test_case_data: The data for the test case in a format matching the provided schema_type

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        if not evaluation_dataset_id:
            raise ValueError(
                f"Expected a non-empty value for `evaluation_dataset_id` but received {evaluation_dataset_id!r}"
            )
        if not autogenerated_draft_test_case_id:
            raise ValueError(
                f"Expected a non-empty value for `autogenerated_draft_test_case_id` but received {autogenerated_draft_test_case_id!r}"
            )
        return self._patch(
            f"/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases/{autogenerated_draft_test_case_id}",
            body=maybe_transform(
                {
                    "approved": approved,
                    "schema_type": schema_type,
                    "test_case_data": test_case_data,
                },
                autogenerated_draft_test_case_update_params.AutogeneratedDraftTestCaseUpdateParams,
            ),
            options=make_request_options(
                extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
            ),
            cast_to=AutoGeneratedDraftTestCase,
        )

    def list(
        self,
        evaluation_dataset_id: str,
        *,
        check_missing_chunks: bool | NotGiven = NOT_GIVEN,
        limit: int | NotGiven = NOT_GIVEN,
        page: int | NotGiven = NOT_GIVEN,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    ) -> SyncPageResponse[AutogeneratedDraftTestCaseListResponse]:
        """
        List Autogenerated Draft Test Cases

        Args:
          check_missing_chunks: Check if test cases are based on missing chunks

          limit: Maximum number of artifacts to be returned by the given endpoint. Defaults to
              100 and cannot be greater than 10k.

          page: Page number for pagination to be returned by the given endpoint. Starts at page
              1

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        if not evaluation_dataset_id:
            raise ValueError(
                f"Expected a non-empty value for `evaluation_dataset_id` but received {evaluation_dataset_id!r}"
            )
        return self._get_api_list(
            f"/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases",
            page=SyncPageResponse[AutogeneratedDraftTestCaseListResponse],
            options=make_request_options(
                extra_headers=extra_headers,
                extra_query=extra_query,
                extra_body=extra_body,
                timeout=timeout,
                query=maybe_transform(
                    {
                        "check_missing_chunks": check_missing_chunks,
                        "limit": limit,
                        "page": page,
                    },
                    autogenerated_draft_test_case_list_params.AutogeneratedDraftTestCaseListParams,
                ),
            ),
            model=AutogeneratedDraftTestCaseListResponse,
        )

    def delete(
        self,
        autogenerated_draft_test_case_id: str,
        *,
        evaluation_dataset_id: str,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    ) -> GenericDeleteResponse:
        """### Description

        Delete a specified draft test case.

        This version will not be retained.

        Args:
          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        if not evaluation_dataset_id:
            raise ValueError(
                f"Expected a non-empty value for `evaluation_dataset_id` but received {evaluation_dataset_id!r}"
            )
        if not autogenerated_draft_test_case_id:
            raise ValueError(
                f"Expected a non-empty value for `autogenerated_draft_test_case_id` but received {autogenerated_draft_test_case_id!r}"
            )
        return self._delete(
            f"/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases/{autogenerated_draft_test_case_id}",
            options=make_request_options(
                extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
            ),
            cast_to=GenericDeleteResponse,
        )

    def approve(
        self,
        autogenerated_draft_test_case_id: str,
        *,
        evaluation_dataset_id: str,
        force: bool | NotGiven = NOT_GIVEN,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    ) -> ApproveAutoGeneratedDraftTestCaseResponse:
        """
        Approve Autogenerated Draft Test Case

        Args:
          force: Force approve a failing test case

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        if not evaluation_dataset_id:
            raise ValueError(
                f"Expected a non-empty value for `evaluation_dataset_id` but received {evaluation_dataset_id!r}"
            )
        if not autogenerated_draft_test_case_id:
            raise ValueError(
                f"Expected a non-empty value for `autogenerated_draft_test_case_id` but received {autogenerated_draft_test_case_id!r}"
            )
        return self._post(
            f"/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases/{autogenerated_draft_test_case_id}/approve",
            options=make_request_options(
                extra_headers=extra_headers,
                extra_query=extra_query,
                extra_body=extra_body,
                timeout=timeout,
                query=maybe_transform(
                    {"force": force},
                    autogenerated_draft_test_case_approve_params.AutogeneratedDraftTestCaseApproveParams,
                ),
            ),
            cast_to=ApproveAutoGeneratedDraftTestCaseResponse,
        )


class AsyncAutogeneratedDraftTestCasesResource(AsyncAPIResource):
    @cached_property
    def with_raw_response(self) -> AsyncAutogeneratedDraftTestCasesResourceWithRawResponse:
        """
        This property can be used as a prefix for any HTTP method call to return the
        the raw response object instead of the parsed content.

        For more information, see https://www.github.com/scaleapi/sgp-python#accessing-raw-response-data-eg-headers
        """
        return AsyncAutogeneratedDraftTestCasesResourceWithRawResponse(self)

    @cached_property
    def with_streaming_response(self) -> AsyncAutogeneratedDraftTestCasesResourceWithStreamingResponse:
        """
        An alternative to `.with_raw_response` that doesn't eagerly read the response body.

        For more information, see https://www.github.com/scaleapi/sgp-python#with_streaming_response
        """
        return AsyncAutogeneratedDraftTestCasesResourceWithStreamingResponse(self)

    async def create(
        self,
        evaluation_dataset_id: str,
        *,
        account_id: str,
        approved: bool,
        test_case_data: autogenerated_draft_test_case_create_params.TestCaseData,
        schema_type: Literal["GENERATION"] | NotGiven = NOT_GIVEN,
        topic_str: str | NotGiven = NOT_GIVEN,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    ) -> AutoGeneratedDraftTestCase:
        """
        ### Description

        Creates a autogenerated draft test case

        ### Details

        This API can be used to create a autogenerated draft test case. To use this API,
        review the request schema and pass in all fields that are required to create a
        autogenerated draft test case.

        Args:
          account_id: The ID of the account that owns the given entity.

          approved: Boolean to track whether or not the draft test case is approved

          test_case_data: The data for the test case in a format matching the provided schema_type

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        if not evaluation_dataset_id:
            raise ValueError(
                f"Expected a non-empty value for `evaluation_dataset_id` but received {evaluation_dataset_id!r}"
            )
        return await self._post(
            f"/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases",
            body=await async_maybe_transform(
                {
                    "account_id": account_id,
                    "approved": approved,
                    "test_case_data": test_case_data,
                    "schema_type": schema_type,
                    "topic_str": topic_str,
                },
                autogenerated_draft_test_case_create_params.AutogeneratedDraftTestCaseCreateParams,
            ),
            options=make_request_options(
                extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
            ),
            cast_to=AutoGeneratedDraftTestCase,
        )

    async def retrieve(
        self,
        autogenerated_draft_test_case_id: str,
        *,
        evaluation_dataset_id: str,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    ) -> AutoGeneratedDraftTestCase:
        """
        ### Description

        Get the test case by its id.

        Args:
          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        if not evaluation_dataset_id:
            raise ValueError(
                f"Expected a non-empty value for `evaluation_dataset_id` but received {evaluation_dataset_id!r}"
            )
        if not autogenerated_draft_test_case_id:
            raise ValueError(
                f"Expected a non-empty value for `autogenerated_draft_test_case_id` but received {autogenerated_draft_test_case_id!r}"
            )
        return await self._get(
            f"/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases/{autogenerated_draft_test_case_id}",
            options=make_request_options(
                extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
            ),
            cast_to=AutoGeneratedDraftTestCase,
        )

    async def update(
        self,
        autogenerated_draft_test_case_id: str,
        *,
        evaluation_dataset_id: str,
        approved: bool | NotGiven = NOT_GIVEN,
        schema_type: Literal["GENERATION"] | NotGiven = NOT_GIVEN,
        test_case_data: autogenerated_draft_test_case_update_params.TestCaseData | NotGiven = NOT_GIVEN,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    ) -> AutoGeneratedDraftTestCase:
        """
        ### Description

        Update a test case draft.

        Args:
          approved: Boolean to track whether or not the draft test case is approved

          test_case_data: The data for the test case in a format matching the provided schema_type

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        if not evaluation_dataset_id:
            raise ValueError(
                f"Expected a non-empty value for `evaluation_dataset_id` but received {evaluation_dataset_id!r}"
            )
        if not autogenerated_draft_test_case_id:
            raise ValueError(
                f"Expected a non-empty value for `autogenerated_draft_test_case_id` but received {autogenerated_draft_test_case_id!r}"
            )
        return await self._patch(
            f"/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases/{autogenerated_draft_test_case_id}",
            body=await async_maybe_transform(
                {
                    "approved": approved,
                    "schema_type": schema_type,
                    "test_case_data": test_case_data,
                },
                autogenerated_draft_test_case_update_params.AutogeneratedDraftTestCaseUpdateParams,
            ),
            options=make_request_options(
                extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
            ),
            cast_to=AutoGeneratedDraftTestCase,
        )

    def list(
        self,
        evaluation_dataset_id: str,
        *,
        check_missing_chunks: bool | NotGiven = NOT_GIVEN,
        limit: int | NotGiven = NOT_GIVEN,
        page: int | NotGiven = NOT_GIVEN,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    ) -> AsyncPaginator[
        AutogeneratedDraftTestCaseListResponse, AsyncPageResponse[AutogeneratedDraftTestCaseListResponse]
    ]:
        """
        List Autogenerated Draft Test Cases

        Args:
          check_missing_chunks: Check if test cases are based on missing chunks

          limit: Maximum number of artifacts to be returned by the given endpoint. Defaults to
              100 and cannot be greater than 10k.

          page: Page number for pagination to be returned by the given endpoint. Starts at page
              1

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        if not evaluation_dataset_id:
            raise ValueError(
                f"Expected a non-empty value for `evaluation_dataset_id` but received {evaluation_dataset_id!r}"
            )
        return self._get_api_list(
            f"/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases",
            page=AsyncPageResponse[AutogeneratedDraftTestCaseListResponse],
            options=make_request_options(
                extra_headers=extra_headers,
                extra_query=extra_query,
                extra_body=extra_body,
                timeout=timeout,
                query=maybe_transform(
                    {
                        "check_missing_chunks": check_missing_chunks,
                        "limit": limit,
                        "page": page,
                    },
                    autogenerated_draft_test_case_list_params.AutogeneratedDraftTestCaseListParams,
                ),
            ),
            model=AutogeneratedDraftTestCaseListResponse,
        )

    async def delete(
        self,
        autogenerated_draft_test_case_id: str,
        *,
        evaluation_dataset_id: str,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    ) -> GenericDeleteResponse:
        """### Description

        Delete a specified draft test case.

        This version will not be retained.

        Args:
          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        if not evaluation_dataset_id:
            raise ValueError(
                f"Expected a non-empty value for `evaluation_dataset_id` but received {evaluation_dataset_id!r}"
            )
        if not autogenerated_draft_test_case_id:
            raise ValueError(
                f"Expected a non-empty value for `autogenerated_draft_test_case_id` but received {autogenerated_draft_test_case_id!r}"
            )
        return await self._delete(
            f"/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases/{autogenerated_draft_test_case_id}",
            options=make_request_options(
                extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
            ),
            cast_to=GenericDeleteResponse,
        )

    async def approve(
        self,
        autogenerated_draft_test_case_id: str,
        *,
        evaluation_dataset_id: str,
        force: bool | NotGiven = NOT_GIVEN,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    ) -> ApproveAutoGeneratedDraftTestCaseResponse:
        """
        Approve Autogenerated Draft Test Case

        Args:
          force: Force approve a failing test case

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        if not evaluation_dataset_id:
            raise ValueError(
                f"Expected a non-empty value for `evaluation_dataset_id` but received {evaluation_dataset_id!r}"
            )
        if not autogenerated_draft_test_case_id:
            raise ValueError(
                f"Expected a non-empty value for `autogenerated_draft_test_case_id` but received {autogenerated_draft_test_case_id!r}"
            )
        return await self._post(
            f"/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases/{autogenerated_draft_test_case_id}/approve",
            options=make_request_options(
                extra_headers=extra_headers,
                extra_query=extra_query,
                extra_body=extra_body,
                timeout=timeout,
                query=await async_maybe_transform(
                    {"force": force},
                    autogenerated_draft_test_case_approve_params.AutogeneratedDraftTestCaseApproveParams,
                ),
            ),
            cast_to=ApproveAutoGeneratedDraftTestCaseResponse,
        )


class AutogeneratedDraftTestCasesResourceWithRawResponse:
    def __init__(self, autogenerated_draft_test_cases: AutogeneratedDraftTestCasesResource) -> None:
        self._autogenerated_draft_test_cases = autogenerated_draft_test_cases

        self.create = to_raw_response_wrapper(
            autogenerated_draft_test_cases.create,
        )
        self.retrieve = to_raw_response_wrapper(
            autogenerated_draft_test_cases.retrieve,
        )
        self.update = to_raw_response_wrapper(
            autogenerated_draft_test_cases.update,
        )
        self.list = to_raw_response_wrapper(
            autogenerated_draft_test_cases.list,
        )
        self.delete = to_raw_response_wrapper(
            autogenerated_draft_test_cases.delete,
        )
        self.approve = to_raw_response_wrapper(
            autogenerated_draft_test_cases.approve,
        )


class AsyncAutogeneratedDraftTestCasesResourceWithRawResponse:
    def __init__(self, autogenerated_draft_test_cases: AsyncAutogeneratedDraftTestCasesResource) -> None:
        self._autogenerated_draft_test_cases = autogenerated_draft_test_cases

        self.create = async_to_raw_response_wrapper(
            autogenerated_draft_test_cases.create,
        )
        self.retrieve = async_to_raw_response_wrapper(
            autogenerated_draft_test_cases.retrieve,
        )
        self.update = async_to_raw_response_wrapper(
            autogenerated_draft_test_cases.update,
        )
        self.list = async_to_raw_response_wrapper(
            autogenerated_draft_test_cases.list,
        )
        self.delete = async_to_raw_response_wrapper(
            autogenerated_draft_test_cases.delete,
        )
        self.approve = async_to_raw_response_wrapper(
            autogenerated_draft_test_cases.approve,
        )


class AutogeneratedDraftTestCasesResourceWithStreamingResponse:
    def __init__(self, autogenerated_draft_test_cases: AutogeneratedDraftTestCasesResource) -> None:
        self._autogenerated_draft_test_cases = autogenerated_draft_test_cases

        self.create = to_streamed_response_wrapper(
            autogenerated_draft_test_cases.create,
        )
        self.retrieve = to_streamed_response_wrapper(
            autogenerated_draft_test_cases.retrieve,
        )
        self.update = to_streamed_response_wrapper(
            autogenerated_draft_test_cases.update,
        )
        self.list = to_streamed_response_wrapper(
            autogenerated_draft_test_cases.list,
        )
        self.delete = to_streamed_response_wrapper(
            autogenerated_draft_test_cases.delete,
        )
        self.approve = to_streamed_response_wrapper(
            autogenerated_draft_test_cases.approve,
        )


class AsyncAutogeneratedDraftTestCasesResourceWithStreamingResponse:
    def __init__(self, autogenerated_draft_test_cases: AsyncAutogeneratedDraftTestCasesResource) -> None:
        self._autogenerated_draft_test_cases = autogenerated_draft_test_cases

        self.create = async_to_streamed_response_wrapper(
            autogenerated_draft_test_cases.create,
        )
        self.retrieve = async_to_streamed_response_wrapper(
            autogenerated_draft_test_cases.retrieve,
        )
        self.update = async_to_streamed_response_wrapper(
            autogenerated_draft_test_cases.update,
        )
        self.list = async_to_streamed_response_wrapper(
            autogenerated_draft_test_cases.list,
        )
        self.delete = async_to_streamed_response_wrapper(
            autogenerated_draft_test_cases.delete,
        )
        self.approve = async_to_streamed_response_wrapper(
            autogenerated_draft_test_cases.approve,
        )
