# 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.models.success_response_schema import SuccessResponseSchema

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 PooledTTPInteractionsApi:
    """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_interactions_ttp_endpoints_get_compound_interactions(
        self,
        compound: Annotated[StrictStr, Field(description="Name of the compound")],
        compound2: Annotated[
            Optional[StrictStr],
            Field(
                description="Name of the compound to get interactions for (provided as path parameter)."
            ),
        ] = None,
        hit_calling: Annotated[
            Optional[StrictBool], Field(description="Filter by hit calling status.")
        ] = None,
        species_acronym: Annotated[
            Optional[StrictStr], Field(description="Species acronym filter.")
        ] = None,
        isolate_name: Annotated[
            Optional[StrictStr], Field(description="Isolate name filter.")
        ] = None,
        min_ttp_score: Annotated[
            Optional[Union[StrictFloat, StrictInt]],
            Field(description="Minimum TTP score threshold."),
        ] = None,
        sort_field: Annotated[
            Optional[StrictStr], Field(description="Field to sort results by.")
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="Sort order: 'asc' or '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,
    ) -> SuccessResponseSchema:
        """Get compound interactions

        Get all protein-compound interactions for a specific compound.

        :param compound: Name of the compound (required)
        :type compound: str
        :param compound2: Name of the compound to get interactions for (provided as path parameter).
        :type compound2: str
        :param hit_calling: Filter by hit calling status.
        :type hit_calling: bool
        :param species_acronym: Species acronym filter.
        :type species_acronym: str
        :param isolate_name: Isolate name filter.
        :type isolate_name: str
        :param min_ttp_score: Minimum TTP score threshold.
        :type min_ttp_score: float
        :param sort_field: Field to sort results by.
        :type sort_field: str
        :param sort_order: Sort order: 'asc' or '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_interactions_ttp_endpoints_get_compound_interactions_serialize(
            compound=compound,
            compound2=compound2,
            hit_calling=hit_calling,
            species_acronym=species_acronym,
            isolate_name=isolate_name,
            min_ttp_score=min_ttp_score,
            sort_field=sort_field,
            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": "SuccessResponseSchema",
        }
        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_interactions_ttp_endpoints_get_compound_interactions_with_http_info(
        self,
        compound: Annotated[StrictStr, Field(description="Name of the compound")],
        compound2: Annotated[
            Optional[StrictStr],
            Field(
                description="Name of the compound to get interactions for (provided as path parameter)."
            ),
        ] = None,
        hit_calling: Annotated[
            Optional[StrictBool], Field(description="Filter by hit calling status.")
        ] = None,
        species_acronym: Annotated[
            Optional[StrictStr], Field(description="Species acronym filter.")
        ] = None,
        isolate_name: Annotated[
            Optional[StrictStr], Field(description="Isolate name filter.")
        ] = None,
        min_ttp_score: Annotated[
            Optional[Union[StrictFloat, StrictInt]],
            Field(description="Minimum TTP score threshold."),
        ] = None,
        sort_field: Annotated[
            Optional[StrictStr], Field(description="Field to sort results by.")
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="Sort order: 'asc' or '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[SuccessResponseSchema]:
        """Get compound interactions

        Get all protein-compound interactions for a specific compound.

        :param compound: Name of the compound (required)
        :type compound: str
        :param compound2: Name of the compound to get interactions for (provided as path parameter).
        :type compound2: str
        :param hit_calling: Filter by hit calling status.
        :type hit_calling: bool
        :param species_acronym: Species acronym filter.
        :type species_acronym: str
        :param isolate_name: Isolate name filter.
        :type isolate_name: str
        :param min_ttp_score: Minimum TTP score threshold.
        :type min_ttp_score: float
        :param sort_field: Field to sort results by.
        :type sort_field: str
        :param sort_order: Sort order: 'asc' or '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_interactions_ttp_endpoints_get_compound_interactions_serialize(
            compound=compound,
            compound2=compound2,
            hit_calling=hit_calling,
            species_acronym=species_acronym,
            isolate_name=isolate_name,
            min_ttp_score=min_ttp_score,
            sort_field=sort_field,
            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": "SuccessResponseSchema",
        }
        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_interactions_ttp_endpoints_get_compound_interactions_without_preload_content(
        self,
        compound: Annotated[StrictStr, Field(description="Name of the compound")],
        compound2: Annotated[
            Optional[StrictStr],
            Field(
                description="Name of the compound to get interactions for (provided as path parameter)."
            ),
        ] = None,
        hit_calling: Annotated[
            Optional[StrictBool], Field(description="Filter by hit calling status.")
        ] = None,
        species_acronym: Annotated[
            Optional[StrictStr], Field(description="Species acronym filter.")
        ] = None,
        isolate_name: Annotated[
            Optional[StrictStr], Field(description="Isolate name filter.")
        ] = None,
        min_ttp_score: Annotated[
            Optional[Union[StrictFloat, StrictInt]],
            Field(description="Minimum TTP score threshold."),
        ] = None,
        sort_field: Annotated[
            Optional[StrictStr], Field(description="Field to sort results by.")
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="Sort order: 'asc' or '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:
        """Get compound interactions

        Get all protein-compound interactions for a specific compound.

        :param compound: Name of the compound (required)
        :type compound: str
        :param compound2: Name of the compound to get interactions for (provided as path parameter).
        :type compound2: str
        :param hit_calling: Filter by hit calling status.
        :type hit_calling: bool
        :param species_acronym: Species acronym filter.
        :type species_acronym: str
        :param isolate_name: Isolate name filter.
        :type isolate_name: str
        :param min_ttp_score: Minimum TTP score threshold.
        :type min_ttp_score: float
        :param sort_field: Field to sort results by.
        :type sort_field: str
        :param sort_order: Sort order: 'asc' or '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_interactions_ttp_endpoints_get_compound_interactions_serialize(
            compound=compound,
            compound2=compound2,
            hit_calling=hit_calling,
            species_acronym=species_acronym,
            isolate_name=isolate_name,
            min_ttp_score=min_ttp_score,
            sort_field=sort_field,
            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": "SuccessResponseSchema",
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data.response

    def _dataportal_api_interactions_ttp_endpoints_get_compound_interactions_serialize(
        self,
        compound,
        compound2,
        hit_calling,
        species_acronym,
        isolate_name,
        min_ttp_score,
        sort_field,
        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
        if compound is not None:
            _path_params["compound"] = compound
        # process the query parameters
        if compound2 is not None:
            _query_params.append(("compound", compound2))

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

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

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

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

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

        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/ttp/compound/{compound}/interactions",
            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_interactions_ttp_endpoints_get_gene_interactions(
        self,
        locus_tag: Annotated[StrictStr, Field(description="Locus tag of the gene")],
        locus_tag2: Annotated[
            Optional[StrictStr],
            Field(
                description="Locus tag of the gene to get interactions for (provided as path parameter)."
            ),
        ] = None,
        hit_calling: Annotated[
            Optional[StrictBool], Field(description="Filter by hit calling status.")
        ] = None,
        pool_a: Annotated[
            Optional[StrictStr], Field(description="Filter by poolA.")
        ] = None,
        pool_b: Annotated[
            Optional[StrictStr], Field(description="Filter by poolB.")
        ] = None,
        min_ttp_score: Annotated[
            Optional[Union[StrictFloat, StrictInt]],
            Field(description="Minimum TTP score threshold."),
        ] = None,
        sort_field: Annotated[
            Optional[StrictStr], Field(description="Field to sort results by.")
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="Sort order: 'asc' or '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,
    ) -> SuccessResponseSchema:
        """Get gene interactions

        Get all protein-compound interactions for a specific gene.

        :param locus_tag: Locus tag of the gene (required)
        :type locus_tag: str
        :param locus_tag2: Locus tag of the gene to get interactions for (provided as path parameter).
        :type locus_tag2: str
        :param hit_calling: Filter by hit calling status.
        :type hit_calling: bool
        :param pool_a: Filter by poolA.
        :type pool_a: str
        :param pool_b: Filter by poolB.
        :type pool_b: str
        :param min_ttp_score: Minimum TTP score threshold.
        :type min_ttp_score: float
        :param sort_field: Field to sort results by.
        :type sort_field: str
        :param sort_order: Sort order: 'asc' or '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_interactions_ttp_endpoints_get_gene_interactions_serialize(
            locus_tag=locus_tag,
            locus_tag2=locus_tag2,
            hit_calling=hit_calling,
            pool_a=pool_a,
            pool_b=pool_b,
            min_ttp_score=min_ttp_score,
            sort_field=sort_field,
            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": "SuccessResponseSchema",
        }
        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_interactions_ttp_endpoints_get_gene_interactions_with_http_info(
        self,
        locus_tag: Annotated[StrictStr, Field(description="Locus tag of the gene")],
        locus_tag2: Annotated[
            Optional[StrictStr],
            Field(
                description="Locus tag of the gene to get interactions for (provided as path parameter)."
            ),
        ] = None,
        hit_calling: Annotated[
            Optional[StrictBool], Field(description="Filter by hit calling status.")
        ] = None,
        pool_a: Annotated[
            Optional[StrictStr], Field(description="Filter by poolA.")
        ] = None,
        pool_b: Annotated[
            Optional[StrictStr], Field(description="Filter by poolB.")
        ] = None,
        min_ttp_score: Annotated[
            Optional[Union[StrictFloat, StrictInt]],
            Field(description="Minimum TTP score threshold."),
        ] = None,
        sort_field: Annotated[
            Optional[StrictStr], Field(description="Field to sort results by.")
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="Sort order: 'asc' or '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[SuccessResponseSchema]:
        """Get gene interactions

        Get all protein-compound interactions for a specific gene.

        :param locus_tag: Locus tag of the gene (required)
        :type locus_tag: str
        :param locus_tag2: Locus tag of the gene to get interactions for (provided as path parameter).
        :type locus_tag2: str
        :param hit_calling: Filter by hit calling status.
        :type hit_calling: bool
        :param pool_a: Filter by poolA.
        :type pool_a: str
        :param pool_b: Filter by poolB.
        :type pool_b: str
        :param min_ttp_score: Minimum TTP score threshold.
        :type min_ttp_score: float
        :param sort_field: Field to sort results by.
        :type sort_field: str
        :param sort_order: Sort order: 'asc' or '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_interactions_ttp_endpoints_get_gene_interactions_serialize(
            locus_tag=locus_tag,
            locus_tag2=locus_tag2,
            hit_calling=hit_calling,
            pool_a=pool_a,
            pool_b=pool_b,
            min_ttp_score=min_ttp_score,
            sort_field=sort_field,
            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": "SuccessResponseSchema",
        }
        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_interactions_ttp_endpoints_get_gene_interactions_without_preload_content(
        self,
        locus_tag: Annotated[StrictStr, Field(description="Locus tag of the gene")],
        locus_tag2: Annotated[
            Optional[StrictStr],
            Field(
                description="Locus tag of the gene to get interactions for (provided as path parameter)."
            ),
        ] = None,
        hit_calling: Annotated[
            Optional[StrictBool], Field(description="Filter by hit calling status.")
        ] = None,
        pool_a: Annotated[
            Optional[StrictStr], Field(description="Filter by poolA.")
        ] = None,
        pool_b: Annotated[
            Optional[StrictStr], Field(description="Filter by poolB.")
        ] = None,
        min_ttp_score: Annotated[
            Optional[Union[StrictFloat, StrictInt]],
            Field(description="Minimum TTP score threshold."),
        ] = None,
        sort_field: Annotated[
            Optional[StrictStr], Field(description="Field to sort results by.")
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="Sort order: 'asc' or '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:
        """Get gene interactions

        Get all protein-compound interactions for a specific gene.

        :param locus_tag: Locus tag of the gene (required)
        :type locus_tag: str
        :param locus_tag2: Locus tag of the gene to get interactions for (provided as path parameter).
        :type locus_tag2: str
        :param hit_calling: Filter by hit calling status.
        :type hit_calling: bool
        :param pool_a: Filter by poolA.
        :type pool_a: str
        :param pool_b: Filter by poolB.
        :type pool_b: str
        :param min_ttp_score: Minimum TTP score threshold.
        :type min_ttp_score: float
        :param sort_field: Field to sort results by.
        :type sort_field: str
        :param sort_order: Sort order: 'asc' or '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_interactions_ttp_endpoints_get_gene_interactions_serialize(
            locus_tag=locus_tag,
            locus_tag2=locus_tag2,
            hit_calling=hit_calling,
            pool_a=pool_a,
            pool_b=pool_b,
            min_ttp_score=min_ttp_score,
            sort_field=sort_field,
            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": "SuccessResponseSchema",
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data.response

    def _dataportal_api_interactions_ttp_endpoints_get_gene_interactions_serialize(
        self,
        locus_tag,
        locus_tag2,
        hit_calling,
        pool_a,
        pool_b,
        min_ttp_score,
        sort_field,
        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
        if locus_tag is not None:
            _path_params["locus_tag"] = locus_tag
        # process the query parameters
        if locus_tag2 is not None:
            _query_params.append(("locus_tag", locus_tag2))

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

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

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

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

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

        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/ttp/gene/{locus_tag}/interactions",
            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_interactions_ttp_endpoints_get_ttp_metadata(
        self,
        _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,
    ) -> SuccessResponseSchema:
        """Get TTP metadata

        Get metadata about the TTP dataset including counts, available compounds, and score ranges.

        :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_interactions_ttp_endpoints_get_ttp_metadata_serialize(
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "SuccessResponseSchema",
        }
        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_interactions_ttp_endpoints_get_ttp_metadata_with_http_info(
        self,
        _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[SuccessResponseSchema]:
        """Get TTP metadata

        Get metadata about the TTP dataset including counts, available compounds, and score ranges.

        :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_interactions_ttp_endpoints_get_ttp_metadata_serialize(
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "SuccessResponseSchema",
        }
        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_interactions_ttp_endpoints_get_ttp_metadata_without_preload_content(
        self,
        _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 TTP metadata

        Get metadata about the TTP dataset including counts, available compounds, and score ranges.

        :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_interactions_ttp_endpoints_get_ttp_metadata_serialize(
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )
        )

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

    def _dataportal_api_interactions_ttp_endpoints_get_ttp_metadata_serialize(
        self,
        _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
        # 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/ttp/metadata",
            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_interactions_ttp_endpoints_search_interactions(
        self,
        query: Annotated[
            Optional[StrictStr],
            Field(
                description="Free-text search term to match against gene names, locus tags, or compound names."
            ),
        ] = None,
        page: Annotated[
            Optional[StrictInt],
            Field(description="Page number for pagination (1-based)."),
        ] = None,
        per_page: Annotated[
            Optional[StrictInt],
            Field(description="Number of interactions to return per page."),
        ] = None,
        sort_field: Annotated[
            Optional[StrictStr],
            Field(
                description="Field to sort results by (e.g., 'ttp_score', 'fdr', 'compound')."
            ),
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="Sort order: 'asc' or '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 TTP interactions

        Search for protein-compound interactions with basic filtering and pagination.

        :param query: Free-text search term to match against gene names, locus tags, or compound names.
        :type query: str
        :param page: Page number for pagination (1-based).
        :type page: int
        :param per_page: Number of interactions to return per page.
        :type per_page: int
        :param sort_field: Field to sort results by (e.g., 'ttp_score', 'fdr', 'compound').
        :type sort_field: str
        :param sort_order: Sort order: 'asc' or '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_interactions_ttp_endpoints_search_interactions_serialize(
            query=query,
            page=page,
            per_page=per_page,
            sort_field=sort_field,
            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_interactions_ttp_endpoints_search_interactions_with_http_info(
        self,
        query: Annotated[
            Optional[StrictStr],
            Field(
                description="Free-text search term to match against gene names, locus tags, or compound names."
            ),
        ] = None,
        page: Annotated[
            Optional[StrictInt],
            Field(description="Page number for pagination (1-based)."),
        ] = None,
        per_page: Annotated[
            Optional[StrictInt],
            Field(description="Number of interactions to return per page."),
        ] = None,
        sort_field: Annotated[
            Optional[StrictStr],
            Field(
                description="Field to sort results by (e.g., 'ttp_score', 'fdr', 'compound')."
            ),
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="Sort order: 'asc' or '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 TTP interactions

        Search for protein-compound interactions with basic filtering and pagination.

        :param query: Free-text search term to match against gene names, locus tags, or compound names.
        :type query: str
        :param page: Page number for pagination (1-based).
        :type page: int
        :param per_page: Number of interactions to return per page.
        :type per_page: int
        :param sort_field: Field to sort results by (e.g., 'ttp_score', 'fdr', 'compound').
        :type sort_field: str
        :param sort_order: Sort order: 'asc' or '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_interactions_ttp_endpoints_search_interactions_serialize(
            query=query,
            page=page,
            per_page=per_page,
            sort_field=sort_field,
            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_interactions_ttp_endpoints_search_interactions_without_preload_content(
        self,
        query: Annotated[
            Optional[StrictStr],
            Field(
                description="Free-text search term to match against gene names, locus tags, or compound names."
            ),
        ] = None,
        page: Annotated[
            Optional[StrictInt],
            Field(description="Page number for pagination (1-based)."),
        ] = None,
        per_page: Annotated[
            Optional[StrictInt],
            Field(description="Number of interactions to return per page."),
        ] = None,
        sort_field: Annotated[
            Optional[StrictStr],
            Field(
                description="Field to sort results by (e.g., 'ttp_score', 'fdr', 'compound')."
            ),
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="Sort order: 'asc' or '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 TTP interactions

        Search for protein-compound interactions with basic filtering and pagination.

        :param query: Free-text search term to match against gene names, locus tags, or compound names.
        :type query: str
        :param page: Page number for pagination (1-based).
        :type page: int
        :param per_page: Number of interactions to return per page.
        :type per_page: int
        :param sort_field: Field to sort results by (e.g., 'ttp_score', 'fdr', 'compound').
        :type sort_field: str
        :param sort_order: Sort order: 'asc' or '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_interactions_ttp_endpoints_search_interactions_serialize(
            query=query,
            page=page,
            per_page=per_page,
            sort_field=sort_field,
            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_interactions_ttp_endpoints_search_interactions_serialize(
        self,
        query,
        page,
        per_page,
        sort_field,
        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 page is not None:
            _query_params.append(("page", page))

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

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

        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/ttp/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,
        )
