# coding: utf-8

"""
ME TT DataPortal Data Portal API

ME TT DataPortal Data Portal APIs to fetch Gut Microbes Genomes / Genes information.

The version of the OpenAPI document: 1.0.0
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
"""  # noqa: E501

from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated

from pydantic import StrictBool
from mett_dataportal_sdk.models.paginated_response_schema import PaginatedResponseSchema

from mett_dataportal_sdk.api_client import ApiClient, RequestSerialized
from mett_dataportal_sdk.api_response import ApiResponse
from mett_dataportal_sdk.rest import RESTResponseType


class DrugsApi:
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None) -> None:
        if api_client is None:
            api_client = ApiClient.get_default()
        self.api_client = api_client

    @validate_call
    def dataportal_api_experimental_drug_endpoints_get_drug_metabolism_by_drug(
        self,
        drug_name: Annotated[StrictStr, Field(description="Name of the drug")],
        species_acronym: Annotated[
            Optional[StrictStr],
            Field(description="Optional species acronym filter (BU, PV)"),
        ] = None,
        page: Annotated[
            Optional[Annotated[int, Field(strict=True, ge=1)]],
            Field(description="Page number"),
        ] = None,
        per_page: Annotated[
            Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
            Field(description="Number of results per page"),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> PaginatedResponseSchema:
        """Get metabolism data by drug name

        Retrieves metabolism data for a specific drug across all strains. Supports pagination and optional species filtering.

        :param drug_name: Name of the drug (required)
        :type drug_name: str
        :param species_acronym: Optional species acronym filter (BU, PV)
        :type species_acronym: str
        :param page: Page number
        :type page: int
        :param per_page: Number of results per page
        :type per_page: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._dataportal_api_experimental_drug_endpoints_get_drug_metabolism_by_drug_serialize(
            drug_name=drug_name,
            species_acronym=species_acronym,
            page=page,
            per_page=per_page,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "PaginatedResponseSchema",
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def dataportal_api_experimental_drug_endpoints_get_drug_metabolism_by_drug_with_http_info(
        self,
        drug_name: Annotated[StrictStr, Field(description="Name of the drug")],
        species_acronym: Annotated[
            Optional[StrictStr],
            Field(description="Optional species acronym filter (BU, PV)"),
        ] = None,
        page: Annotated[
            Optional[Annotated[int, Field(strict=True, ge=1)]],
            Field(description="Page number"),
        ] = None,
        per_page: Annotated[
            Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
            Field(description="Number of results per page"),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[PaginatedResponseSchema]:
        """Get metabolism data by drug name

        Retrieves metabolism data for a specific drug across all strains. Supports pagination and optional species filtering.

        :param drug_name: Name of the drug (required)
        :type drug_name: str
        :param species_acronym: Optional species acronym filter (BU, PV)
        :type species_acronym: str
        :param page: Page number
        :type page: int
        :param per_page: Number of results per page
        :type per_page: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._dataportal_api_experimental_drug_endpoints_get_drug_metabolism_by_drug_serialize(
            drug_name=drug_name,
            species_acronym=species_acronym,
            page=page,
            per_page=per_page,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "PaginatedResponseSchema",
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def dataportal_api_experimental_drug_endpoints_get_drug_metabolism_by_drug_without_preload_content(
        self,
        drug_name: Annotated[StrictStr, Field(description="Name of the drug")],
        species_acronym: Annotated[
            Optional[StrictStr],
            Field(description="Optional species acronym filter (BU, PV)"),
        ] = None,
        page: Annotated[
            Optional[Annotated[int, Field(strict=True, ge=1)]],
            Field(description="Page number"),
        ] = None,
        per_page: Annotated[
            Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
            Field(description="Number of results per page"),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Get metabolism data by drug name

        Retrieves metabolism data for a specific drug across all strains. Supports pagination and optional species filtering.

        :param drug_name: Name of the drug (required)
        :type drug_name: str
        :param species_acronym: Optional species acronym filter (BU, PV)
        :type species_acronym: str
        :param page: Page number
        :type page: int
        :param per_page: Number of results per page
        :type per_page: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._dataportal_api_experimental_drug_endpoints_get_drug_metabolism_by_drug_serialize(
            drug_name=drug_name,
            species_acronym=species_acronym,
            page=page,
            per_page=per_page,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "PaginatedResponseSchema",
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data.response

    def _dataportal_api_experimental_drug_endpoints_get_drug_metabolism_by_drug_serialize(
        self,
        drug_name,
        species_acronym,
        page,
        per_page,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:
        _host = None

        _collection_formats: Dict[str, str] = {}

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if drug_name is not None:
            _path_params["drug_name"] = drug_name
        # process the query parameters
        if species_acronym is not None:
            _query_params.append(("species_acronym", species_acronym))

        if page is not None:
            _query_params.append(("page", page))

        if per_page is not None:
            _query_params.append(("per_page", per_page))

        # process the header parameters
        # process the form parameters
        # process the body parameter

        # set the HTTP header `Accept`
        if "Accept" not in _header_params:
            _header_params["Accept"] = self.api_client.select_header_accept(
                ["application/json"]
            )

        # authentication setting
        _auth_settings: List[str] = ["RoleBasedJWTAuth"]

        return self.api_client.param_serialize(
            method="GET",
            resource_path="/api/drugs/metabolism/by-drug/{drug_name}",
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth,
        )

    @validate_call
    def dataportal_api_experimental_drug_endpoints_get_drug_mic_by_drug(
        self,
        drug_name: Annotated[StrictStr, Field(description="Name of the drug")],
        species_acronym: Annotated[
            Optional[StrictStr],
            Field(description="Optional species acronym filter (BU, PV)"),
        ] = None,
        page: Annotated[
            Optional[Annotated[int, Field(strict=True, ge=1)]],
            Field(description="Page number"),
        ] = None,
        per_page: Annotated[
            Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
            Field(description="Number of results per page"),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> PaginatedResponseSchema:
        """Get MIC data by drug name

        Retrieves MIC data for a specific drug across all strains. Supports pagination and optional species filtering.

        :param drug_name: Name of the drug (required)
        :type drug_name: str
        :param species_acronym: Optional species acronym filter (BU, PV)
        :type species_acronym: str
        :param page: Page number
        :type page: int
        :param per_page: Number of results per page
        :type per_page: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._dataportal_api_experimental_drug_endpoints_get_drug_mic_by_drug_serialize(
            drug_name=drug_name,
            species_acronym=species_acronym,
            page=page,
            per_page=per_page,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "PaginatedResponseSchema",
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def dataportal_api_experimental_drug_endpoints_get_drug_mic_by_drug_with_http_info(
        self,
        drug_name: Annotated[StrictStr, Field(description="Name of the drug")],
        species_acronym: Annotated[
            Optional[StrictStr],
            Field(description="Optional species acronym filter (BU, PV)"),
        ] = None,
        page: Annotated[
            Optional[Annotated[int, Field(strict=True, ge=1)]],
            Field(description="Page number"),
        ] = None,
        per_page: Annotated[
            Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
            Field(description="Number of results per page"),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[PaginatedResponseSchema]:
        """Get MIC data by drug name

        Retrieves MIC data for a specific drug across all strains. Supports pagination and optional species filtering.

        :param drug_name: Name of the drug (required)
        :type drug_name: str
        :param species_acronym: Optional species acronym filter (BU, PV)
        :type species_acronym: str
        :param page: Page number
        :type page: int
        :param per_page: Number of results per page
        :type per_page: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._dataportal_api_experimental_drug_endpoints_get_drug_mic_by_drug_serialize(
            drug_name=drug_name,
            species_acronym=species_acronym,
            page=page,
            per_page=per_page,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "PaginatedResponseSchema",
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def dataportal_api_experimental_drug_endpoints_get_drug_mic_by_drug_without_preload_content(
        self,
        drug_name: Annotated[StrictStr, Field(description="Name of the drug")],
        species_acronym: Annotated[
            Optional[StrictStr],
            Field(description="Optional species acronym filter (BU, PV)"),
        ] = None,
        page: Annotated[
            Optional[Annotated[int, Field(strict=True, ge=1)]],
            Field(description="Page number"),
        ] = None,
        per_page: Annotated[
            Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
            Field(description="Number of results per page"),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Get MIC data by drug name

        Retrieves MIC data for a specific drug across all strains. Supports pagination and optional species filtering.

        :param drug_name: Name of the drug (required)
        :type drug_name: str
        :param species_acronym: Optional species acronym filter (BU, PV)
        :type species_acronym: str
        :param page: Page number
        :type page: int
        :param per_page: Number of results per page
        :type per_page: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._dataportal_api_experimental_drug_endpoints_get_drug_mic_by_drug_serialize(
            drug_name=drug_name,
            species_acronym=species_acronym,
            page=page,
            per_page=per_page,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "PaginatedResponseSchema",
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data.response

    def _dataportal_api_experimental_drug_endpoints_get_drug_mic_by_drug_serialize(
        self,
        drug_name,
        species_acronym,
        page,
        per_page,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:
        _host = None

        _collection_formats: Dict[str, str] = {}

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if drug_name is not None:
            _path_params["drug_name"] = drug_name
        # process the query parameters
        if species_acronym is not None:
            _query_params.append(("species_acronym", species_acronym))

        if page is not None:
            _query_params.append(("page", page))

        if per_page is not None:
            _query_params.append(("per_page", per_page))

        # process the header parameters
        # process the form parameters
        # process the body parameter

        # set the HTTP header `Accept`
        if "Accept" not in _header_params:
            _header_params["Accept"] = self.api_client.select_header_accept(
                ["application/json"]
            )

        # authentication setting
        _auth_settings: List[str] = ["RoleBasedJWTAuth"]

        return self.api_client.param_serialize(
            method="GET",
            resource_path="/api/drugs/mic/by-drug/{drug_name}",
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth,
        )

    @validate_call
    def dataportal_api_experimental_drug_endpoints_search_drug_metabolism(
        self,
        query: Annotated[
            Optional[StrictStr],
            Field(description="Search term for drug name, class, or strain"),
        ] = None,
        drug_name: Annotated[
            Optional[StrictStr], Field(description="Filter by specific drug name")
        ] = None,
        drug_class: Annotated[
            Optional[StrictStr], Field(description="Filter by drug class")
        ] = None,
        species_acronym: Annotated[
            Optional[StrictStr], Field(description="Filter by species acronym")
        ] = None,
        min_fdr: Annotated[
            Optional[Union[StrictFloat, StrictInt]],
            Field(description="Maximum FDR threshold (e.g., 0.05)"),
        ] = None,
        min_degr_percent: Annotated[
            Optional[Union[StrictFloat, StrictInt]],
            Field(description="Minimum degradation percentage"),
        ] = None,
        metabolizer_classification: Annotated[
            Optional[StrictStr],
            Field(description="Filter by metabolizer classification"),
        ] = None,
        is_significant: Annotated[
            Optional[StrictBool],
            Field(description="Filter by statistical significance"),
        ] = None,
        experimental_condition: Annotated[
            Optional[StrictStr], Field(description="Filter by experimental condition")
        ] = None,
        page: Annotated[Optional[StrictInt], Field(description="Page number")] = None,
        per_page: Annotated[
            Optional[StrictInt], Field(description="Number of results per page")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr],
            Field(
                description="Sort field (isolate_name, species_acronym, species_scientific_name). Uses keyword fields for sorting."
            ),
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="Sort order (asc, desc)")
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> PaginatedResponseSchema:
        """Search drug metabolism data

        Search drug metabolism data across all strains. Supports filtering by drug name, class, species, statistical significance, degradation percentages, and experimental conditions. Returns paginated results with detailed metabolism measurements. Note: Sorting is limited to top-level fields (isolate_name, species_acronym, species_scientific_name).

        :param query: Search term for drug name, class, or strain
        :type query: str
        :param drug_name: Filter by specific drug name
        :type drug_name: str
        :param drug_class: Filter by drug class
        :type drug_class: str
        :param species_acronym: Filter by species acronym
        :type species_acronym: str
        :param min_fdr: Maximum FDR threshold (e.g., 0.05)
        :type min_fdr: float
        :param min_degr_percent: Minimum degradation percentage
        :type min_degr_percent: float
        :param metabolizer_classification: Filter by metabolizer classification
        :type metabolizer_classification: str
        :param is_significant: Filter by statistical significance
        :type is_significant: bool
        :param experimental_condition: Filter by experimental condition
        :type experimental_condition: str
        :param page: Page number
        :type page: int
        :param per_page: Number of results per page
        :type per_page: int
        :param sort_by: Sort field (isolate_name, species_acronym, species_scientific_name). Uses keyword fields for sorting.
        :type sort_by: str
        :param sort_order: Sort order (asc, desc)
        :type sort_order: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._dataportal_api_experimental_drug_endpoints_search_drug_metabolism_serialize(
            query=query,
            drug_name=drug_name,
            drug_class=drug_class,
            species_acronym=species_acronym,
            min_fdr=min_fdr,
            min_degr_percent=min_degr_percent,
            metabolizer_classification=metabolizer_classification,
            is_significant=is_significant,
            experimental_condition=experimental_condition,
            page=page,
            per_page=per_page,
            sort_by=sort_by,
            sort_order=sort_order,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "PaginatedResponseSchema",
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def dataportal_api_experimental_drug_endpoints_search_drug_metabolism_with_http_info(
        self,
        query: Annotated[
            Optional[StrictStr],
            Field(description="Search term for drug name, class, or strain"),
        ] = None,
        drug_name: Annotated[
            Optional[StrictStr], Field(description="Filter by specific drug name")
        ] = None,
        drug_class: Annotated[
            Optional[StrictStr], Field(description="Filter by drug class")
        ] = None,
        species_acronym: Annotated[
            Optional[StrictStr], Field(description="Filter by species acronym")
        ] = None,
        min_fdr: Annotated[
            Optional[Union[StrictFloat, StrictInt]],
            Field(description="Maximum FDR threshold (e.g., 0.05)"),
        ] = None,
        min_degr_percent: Annotated[
            Optional[Union[StrictFloat, StrictInt]],
            Field(description="Minimum degradation percentage"),
        ] = None,
        metabolizer_classification: Annotated[
            Optional[StrictStr],
            Field(description="Filter by metabolizer classification"),
        ] = None,
        is_significant: Annotated[
            Optional[StrictBool],
            Field(description="Filter by statistical significance"),
        ] = None,
        experimental_condition: Annotated[
            Optional[StrictStr], Field(description="Filter by experimental condition")
        ] = None,
        page: Annotated[Optional[StrictInt], Field(description="Page number")] = None,
        per_page: Annotated[
            Optional[StrictInt], Field(description="Number of results per page")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr],
            Field(
                description="Sort field (isolate_name, species_acronym, species_scientific_name). Uses keyword fields for sorting."
            ),
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="Sort order (asc, desc)")
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[PaginatedResponseSchema]:
        """Search drug metabolism data

        Search drug metabolism data across all strains. Supports filtering by drug name, class, species, statistical significance, degradation percentages, and experimental conditions. Returns paginated results with detailed metabolism measurements. Note: Sorting is limited to top-level fields (isolate_name, species_acronym, species_scientific_name).

        :param query: Search term for drug name, class, or strain
        :type query: str
        :param drug_name: Filter by specific drug name
        :type drug_name: str
        :param drug_class: Filter by drug class
        :type drug_class: str
        :param species_acronym: Filter by species acronym
        :type species_acronym: str
        :param min_fdr: Maximum FDR threshold (e.g., 0.05)
        :type min_fdr: float
        :param min_degr_percent: Minimum degradation percentage
        :type min_degr_percent: float
        :param metabolizer_classification: Filter by metabolizer classification
        :type metabolizer_classification: str
        :param is_significant: Filter by statistical significance
        :type is_significant: bool
        :param experimental_condition: Filter by experimental condition
        :type experimental_condition: str
        :param page: Page number
        :type page: int
        :param per_page: Number of results per page
        :type per_page: int
        :param sort_by: Sort field (isolate_name, species_acronym, species_scientific_name). Uses keyword fields for sorting.
        :type sort_by: str
        :param sort_order: Sort order (asc, desc)
        :type sort_order: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._dataportal_api_experimental_drug_endpoints_search_drug_metabolism_serialize(
            query=query,
            drug_name=drug_name,
            drug_class=drug_class,
            species_acronym=species_acronym,
            min_fdr=min_fdr,
            min_degr_percent=min_degr_percent,
            metabolizer_classification=metabolizer_classification,
            is_significant=is_significant,
            experimental_condition=experimental_condition,
            page=page,
            per_page=per_page,
            sort_by=sort_by,
            sort_order=sort_order,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "PaginatedResponseSchema",
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def dataportal_api_experimental_drug_endpoints_search_drug_metabolism_without_preload_content(
        self,
        query: Annotated[
            Optional[StrictStr],
            Field(description="Search term for drug name, class, or strain"),
        ] = None,
        drug_name: Annotated[
            Optional[StrictStr], Field(description="Filter by specific drug name")
        ] = None,
        drug_class: Annotated[
            Optional[StrictStr], Field(description="Filter by drug class")
        ] = None,
        species_acronym: Annotated[
            Optional[StrictStr], Field(description="Filter by species acronym")
        ] = None,
        min_fdr: Annotated[
            Optional[Union[StrictFloat, StrictInt]],
            Field(description="Maximum FDR threshold (e.g., 0.05)"),
        ] = None,
        min_degr_percent: Annotated[
            Optional[Union[StrictFloat, StrictInt]],
            Field(description="Minimum degradation percentage"),
        ] = None,
        metabolizer_classification: Annotated[
            Optional[StrictStr],
            Field(description="Filter by metabolizer classification"),
        ] = None,
        is_significant: Annotated[
            Optional[StrictBool],
            Field(description="Filter by statistical significance"),
        ] = None,
        experimental_condition: Annotated[
            Optional[StrictStr], Field(description="Filter by experimental condition")
        ] = None,
        page: Annotated[Optional[StrictInt], Field(description="Page number")] = None,
        per_page: Annotated[
            Optional[StrictInt], Field(description="Number of results per page")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr],
            Field(
                description="Sort field (isolate_name, species_acronym, species_scientific_name). Uses keyword fields for sorting."
            ),
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="Sort order (asc, desc)")
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Search drug metabolism data

        Search drug metabolism data across all strains. Supports filtering by drug name, class, species, statistical significance, degradation percentages, and experimental conditions. Returns paginated results with detailed metabolism measurements. Note: Sorting is limited to top-level fields (isolate_name, species_acronym, species_scientific_name).

        :param query: Search term for drug name, class, or strain
        :type query: str
        :param drug_name: Filter by specific drug name
        :type drug_name: str
        :param drug_class: Filter by drug class
        :type drug_class: str
        :param species_acronym: Filter by species acronym
        :type species_acronym: str
        :param min_fdr: Maximum FDR threshold (e.g., 0.05)
        :type min_fdr: float
        :param min_degr_percent: Minimum degradation percentage
        :type min_degr_percent: float
        :param metabolizer_classification: Filter by metabolizer classification
        :type metabolizer_classification: str
        :param is_significant: Filter by statistical significance
        :type is_significant: bool
        :param experimental_condition: Filter by experimental condition
        :type experimental_condition: str
        :param page: Page number
        :type page: int
        :param per_page: Number of results per page
        :type per_page: int
        :param sort_by: Sort field (isolate_name, species_acronym, species_scientific_name). Uses keyword fields for sorting.
        :type sort_by: str
        :param sort_order: Sort order (asc, desc)
        :type sort_order: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._dataportal_api_experimental_drug_endpoints_search_drug_metabolism_serialize(
            query=query,
            drug_name=drug_name,
            drug_class=drug_class,
            species_acronym=species_acronym,
            min_fdr=min_fdr,
            min_degr_percent=min_degr_percent,
            metabolizer_classification=metabolizer_classification,
            is_significant=is_significant,
            experimental_condition=experimental_condition,
            page=page,
            per_page=per_page,
            sort_by=sort_by,
            sort_order=sort_order,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "PaginatedResponseSchema",
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data.response

    def _dataportal_api_experimental_drug_endpoints_search_drug_metabolism_serialize(
        self,
        query,
        drug_name,
        drug_class,
        species_acronym,
        min_fdr,
        min_degr_percent,
        metabolizer_classification,
        is_significant,
        experimental_condition,
        page,
        per_page,
        sort_by,
        sort_order,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:
        _host = None

        _collection_formats: Dict[str, str] = {}

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        if query is not None:
            _query_params.append(("query", query))

        if drug_name is not None:
            _query_params.append(("drug_name", drug_name))

        if drug_class is not None:
            _query_params.append(("drug_class", drug_class))

        if species_acronym is not None:
            _query_params.append(("species_acronym", species_acronym))

        if min_fdr is not None:
            _query_params.append(("min_fdr", min_fdr))

        if min_degr_percent is not None:
            _query_params.append(("min_degr_percent", min_degr_percent))

        if metabolizer_classification is not None:
            _query_params.append(
                ("metabolizer_classification", metabolizer_classification)
            )

        if is_significant is not None:
            _query_params.append(("is_significant", is_significant))

        if experimental_condition is not None:
            _query_params.append(("experimental_condition", experimental_condition))

        if page is not None:
            _query_params.append(("page", page))

        if per_page is not None:
            _query_params.append(("per_page", per_page))

        if sort_by is not None:
            _query_params.append(("sort_by", sort_by))

        if sort_order is not None:
            _query_params.append(("sort_order", sort_order))

        # process the header parameters
        # process the form parameters
        # process the body parameter

        # set the HTTP header `Accept`
        if "Accept" not in _header_params:
            _header_params["Accept"] = self.api_client.select_header_accept(
                ["application/json"]
            )

        # authentication setting
        _auth_settings: List[str] = ["RoleBasedJWTAuth"]

        return self.api_client.param_serialize(
            method="GET",
            resource_path="/api/drugs/metabolism/search",
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth,
        )

    @validate_call
    def dataportal_api_experimental_drug_endpoints_search_drug_mic(
        self,
        query: Annotated[
            Optional[StrictStr],
            Field(description="Search term for drug name, class, or strain"),
        ] = None,
        drug_name: Annotated[
            Optional[StrictStr], Field(description="Filter by specific drug name")
        ] = None,
        drug_class: Annotated[
            Optional[StrictStr], Field(description="Filter by drug class")
        ] = None,
        species_acronym: Annotated[
            Optional[StrictStr], Field(description="Filter by species acronym")
        ] = None,
        min_mic_value: Annotated[
            Optional[Union[StrictFloat, StrictInt]],
            Field(description="Minimum MIC value threshold"),
        ] = None,
        max_mic_value: Annotated[
            Optional[Union[StrictFloat, StrictInt]],
            Field(description="Maximum MIC value threshold"),
        ] = None,
        unit: Annotated[
            Optional[StrictStr], Field(description="Filter by unit (uM, mg/L)")
        ] = None,
        experimental_condition: Annotated[
            Optional[StrictStr], Field(description="Filter by experimental condition")
        ] = None,
        page: Annotated[Optional[StrictInt], Field(description="Page number")] = None,
        per_page: Annotated[
            Optional[StrictInt], Field(description="Number of results per page")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr],
            Field(
                description="Sort field (isolate_name, species_acronym, species_scientific_name). Uses keyword fields for sorting."
            ),
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="Sort order (asc, desc)")
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> PaginatedResponseSchema:
        """Search drug MIC data

        Search drug MIC (Minimum Inhibitory Concentration) data across all strains. Supports filtering by drug name, class, species, MIC values, and experimental conditions. Returns paginated results with detailed MIC measurements. Note: Sorting is limited to top-level fields (isolate_name, species_acronym, species_scientific_name).

        :param query: Search term for drug name, class, or strain
        :type query: str
        :param drug_name: Filter by specific drug name
        :type drug_name: str
        :param drug_class: Filter by drug class
        :type drug_class: str
        :param species_acronym: Filter by species acronym
        :type species_acronym: str
        :param min_mic_value: Minimum MIC value threshold
        :type min_mic_value: float
        :param max_mic_value: Maximum MIC value threshold
        :type max_mic_value: float
        :param unit: Filter by unit (uM, mg/L)
        :type unit: str
        :param experimental_condition: Filter by experimental condition
        :type experimental_condition: str
        :param page: Page number
        :type page: int
        :param per_page: Number of results per page
        :type per_page: int
        :param sort_by: Sort field (isolate_name, species_acronym, species_scientific_name). Uses keyword fields for sorting.
        :type sort_by: str
        :param sort_order: Sort order (asc, desc)
        :type sort_order: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = (
            self._dataportal_api_experimental_drug_endpoints_search_drug_mic_serialize(
                query=query,
                drug_name=drug_name,
                drug_class=drug_class,
                species_acronym=species_acronym,
                min_mic_value=min_mic_value,
                max_mic_value=max_mic_value,
                unit=unit,
                experimental_condition=experimental_condition,
                page=page,
                per_page=per_page,
                sort_by=sort_by,
                sort_order=sort_order,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "PaginatedResponseSchema",
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def dataportal_api_experimental_drug_endpoints_search_drug_mic_with_http_info(
        self,
        query: Annotated[
            Optional[StrictStr],
            Field(description="Search term for drug name, class, or strain"),
        ] = None,
        drug_name: Annotated[
            Optional[StrictStr], Field(description="Filter by specific drug name")
        ] = None,
        drug_class: Annotated[
            Optional[StrictStr], Field(description="Filter by drug class")
        ] = None,
        species_acronym: Annotated[
            Optional[StrictStr], Field(description="Filter by species acronym")
        ] = None,
        min_mic_value: Annotated[
            Optional[Union[StrictFloat, StrictInt]],
            Field(description="Minimum MIC value threshold"),
        ] = None,
        max_mic_value: Annotated[
            Optional[Union[StrictFloat, StrictInt]],
            Field(description="Maximum MIC value threshold"),
        ] = None,
        unit: Annotated[
            Optional[StrictStr], Field(description="Filter by unit (uM, mg/L)")
        ] = None,
        experimental_condition: Annotated[
            Optional[StrictStr], Field(description="Filter by experimental condition")
        ] = None,
        page: Annotated[Optional[StrictInt], Field(description="Page number")] = None,
        per_page: Annotated[
            Optional[StrictInt], Field(description="Number of results per page")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr],
            Field(
                description="Sort field (isolate_name, species_acronym, species_scientific_name). Uses keyword fields for sorting."
            ),
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="Sort order (asc, desc)")
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[PaginatedResponseSchema]:
        """Search drug MIC data

        Search drug MIC (Minimum Inhibitory Concentration) data across all strains. Supports filtering by drug name, class, species, MIC values, and experimental conditions. Returns paginated results with detailed MIC measurements. Note: Sorting is limited to top-level fields (isolate_name, species_acronym, species_scientific_name).

        :param query: Search term for drug name, class, or strain
        :type query: str
        :param drug_name: Filter by specific drug name
        :type drug_name: str
        :param drug_class: Filter by drug class
        :type drug_class: str
        :param species_acronym: Filter by species acronym
        :type species_acronym: str
        :param min_mic_value: Minimum MIC value threshold
        :type min_mic_value: float
        :param max_mic_value: Maximum MIC value threshold
        :type max_mic_value: float
        :param unit: Filter by unit (uM, mg/L)
        :type unit: str
        :param experimental_condition: Filter by experimental condition
        :type experimental_condition: str
        :param page: Page number
        :type page: int
        :param per_page: Number of results per page
        :type per_page: int
        :param sort_by: Sort field (isolate_name, species_acronym, species_scientific_name). Uses keyword fields for sorting.
        :type sort_by: str
        :param sort_order: Sort order (asc, desc)
        :type sort_order: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = (
            self._dataportal_api_experimental_drug_endpoints_search_drug_mic_serialize(
                query=query,
                drug_name=drug_name,
                drug_class=drug_class,
                species_acronym=species_acronym,
                min_mic_value=min_mic_value,
                max_mic_value=max_mic_value,
                unit=unit,
                experimental_condition=experimental_condition,
                page=page,
                per_page=per_page,
                sort_by=sort_by,
                sort_order=sort_order,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "PaginatedResponseSchema",
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def dataportal_api_experimental_drug_endpoints_search_drug_mic_without_preload_content(
        self,
        query: Annotated[
            Optional[StrictStr],
            Field(description="Search term for drug name, class, or strain"),
        ] = None,
        drug_name: Annotated[
            Optional[StrictStr], Field(description="Filter by specific drug name")
        ] = None,
        drug_class: Annotated[
            Optional[StrictStr], Field(description="Filter by drug class")
        ] = None,
        species_acronym: Annotated[
            Optional[StrictStr], Field(description="Filter by species acronym")
        ] = None,
        min_mic_value: Annotated[
            Optional[Union[StrictFloat, StrictInt]],
            Field(description="Minimum MIC value threshold"),
        ] = None,
        max_mic_value: Annotated[
            Optional[Union[StrictFloat, StrictInt]],
            Field(description="Maximum MIC value threshold"),
        ] = None,
        unit: Annotated[
            Optional[StrictStr], Field(description="Filter by unit (uM, mg/L)")
        ] = None,
        experimental_condition: Annotated[
            Optional[StrictStr], Field(description="Filter by experimental condition")
        ] = None,
        page: Annotated[Optional[StrictInt], Field(description="Page number")] = None,
        per_page: Annotated[
            Optional[StrictInt], Field(description="Number of results per page")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr],
            Field(
                description="Sort field (isolate_name, species_acronym, species_scientific_name). Uses keyword fields for sorting."
            ),
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="Sort order (asc, desc)")
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Search drug MIC data

        Search drug MIC (Minimum Inhibitory Concentration) data across all strains. Supports filtering by drug name, class, species, MIC values, and experimental conditions. Returns paginated results with detailed MIC measurements. Note: Sorting is limited to top-level fields (isolate_name, species_acronym, species_scientific_name).

        :param query: Search term for drug name, class, or strain
        :type query: str
        :param drug_name: Filter by specific drug name
        :type drug_name: str
        :param drug_class: Filter by drug class
        :type drug_class: str
        :param species_acronym: Filter by species acronym
        :type species_acronym: str
        :param min_mic_value: Minimum MIC value threshold
        :type min_mic_value: float
        :param max_mic_value: Maximum MIC value threshold
        :type max_mic_value: float
        :param unit: Filter by unit (uM, mg/L)
        :type unit: str
        :param experimental_condition: Filter by experimental condition
        :type experimental_condition: str
        :param page: Page number
        :type page: int
        :param per_page: Number of results per page
        :type per_page: int
        :param sort_by: Sort field (isolate_name, species_acronym, species_scientific_name). Uses keyword fields for sorting.
        :type sort_by: str
        :param sort_order: Sort order (asc, desc)
        :type sort_order: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = (
            self._dataportal_api_experimental_drug_endpoints_search_drug_mic_serialize(
                query=query,
                drug_name=drug_name,
                drug_class=drug_class,
                species_acronym=species_acronym,
                min_mic_value=min_mic_value,
                max_mic_value=max_mic_value,
                unit=unit,
                experimental_condition=experimental_condition,
                page=page,
                per_page=per_page,
                sort_by=sort_by,
                sort_order=sort_order,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "PaginatedResponseSchema",
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data.response

    def _dataportal_api_experimental_drug_endpoints_search_drug_mic_serialize(
        self,
        query,
        drug_name,
        drug_class,
        species_acronym,
        min_mic_value,
        max_mic_value,
        unit,
        experimental_condition,
        page,
        per_page,
        sort_by,
        sort_order,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:
        _host = None

        _collection_formats: Dict[str, str] = {}

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        if query is not None:
            _query_params.append(("query", query))

        if drug_name is not None:
            _query_params.append(("drug_name", drug_name))

        if drug_class is not None:
            _query_params.append(("drug_class", drug_class))

        if species_acronym is not None:
            _query_params.append(("species_acronym", species_acronym))

        if min_mic_value is not None:
            _query_params.append(("min_mic_value", min_mic_value))

        if max_mic_value is not None:
            _query_params.append(("max_mic_value", max_mic_value))

        if unit is not None:
            _query_params.append(("unit", unit))

        if experimental_condition is not None:
            _query_params.append(("experimental_condition", experimental_condition))

        if page is not None:
            _query_params.append(("page", page))

        if per_page is not None:
            _query_params.append(("per_page", per_page))

        if sort_by is not None:
            _query_params.append(("sort_by", sort_by))

        if sort_order is not None:
            _query_params.append(("sort_order", sort_order))

        # process the header parameters
        # process the form parameters
        # process the body parameter

        # set the HTTP header `Accept`
        if "Accept" not in _header_params:
            _header_params["Accept"] = self.api_client.select_header_accept(
                ["application/json"]
            )

        # authentication setting
        _auth_settings: List[str] = ["RoleBasedJWTAuth"]

        return self.api_client.param_serialize(
            method="GET",
            resource_path="/api/drugs/mic/search",
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth,
        )
