# coding: utf-8

"""
    Syntropy network API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 1.0.0
    Contact: support@syntropynet.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from syntropy_sdk.api_client import ApiClient


class AnalyticsApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

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

    def v1_network_a_bandwidth_get(
        self, agent_src_id, agent_dst_id, _from, to, **kwargs
    ):  # noqa: E501
        """Get bandwidth  # noqa: E501

        Retrieves Connections bandwidth information.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_a_bandwidth_get(agent_src_id, agent_dst_id, _from, to, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param IdNumber agent_src_id: Source Agent Id (required)
        :param IdNumber agent_dst_id: Destination Agent Id (required)
        :param datetime _from: (required)
        :param datetime to: (required)
        :return: ADataResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.v1_network_a_bandwidth_get_with_http_info(
                agent_src_id, agent_dst_id, _from, to, **kwargs
            )  # noqa: E501
        else:
            (data) = self.v1_network_a_bandwidth_get_with_http_info(
                agent_src_id, agent_dst_id, _from, to, **kwargs
            )  # noqa: E501
            return data

    def v1_network_a_bandwidth_get_with_http_info(
        self, agent_src_id, agent_dst_id, _from, to, **kwargs
    ):  # noqa: E501
        """Get bandwidth  # noqa: E501

        Retrieves Connections bandwidth information.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_a_bandwidth_get_with_http_info(agent_src_id, agent_dst_id, _from, to, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param IdNumber agent_src_id: Source Agent Id (required)
        :param IdNumber agent_dst_id: Destination Agent Id (required)
        :param datetime _from: (required)
        :param datetime to: (required)
        :return: ADataResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["agent_src_id", "agent_dst_id", "_from", "to"]  # noqa: E501
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in six.iteritems(params["kwargs"]):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method v1_network_a_bandwidth_get" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'agent_src_id' is set
        if "agent_src_id" not in params or params["agent_src_id"] is None:
            raise ValueError(
                "Missing the required parameter `agent_src_id` when calling `v1_network_a_bandwidth_get`"
            )  # noqa: E501
        # verify the required parameter 'agent_dst_id' is set
        if "agent_dst_id" not in params or params["agent_dst_id"] is None:
            raise ValueError(
                "Missing the required parameter `agent_dst_id` when calling `v1_network_a_bandwidth_get`"
            )  # noqa: E501
        # verify the required parameter '_from' is set
        if "_from" not in params or params["_from"] is None:
            raise ValueError(
                "Missing the required parameter `_from` when calling `v1_network_a_bandwidth_get`"
            )  # noqa: E501
        # verify the required parameter 'to' is set
        if "to" not in params or params["to"] is None:
            raise ValueError(
                "Missing the required parameter `to` when calling `v1_network_a_bandwidth_get`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if "agent_src_id" in params:
            query_params.append(("agent_src_id", params["agent_src_id"]))  # noqa: E501
        if "agent_dst_id" in params:
            query_params.append(("agent_dst_id", params["agent_dst_id"]))  # noqa: E501
        if "_from" in params:
            query_params.append(("from", params["_from"]))  # noqa: E501
        if "to" in params:
            query_params.append(("to", params["to"]))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # noqa: E501

        # Authentication setting
        auth_settings = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/a/bandwidth",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="ADataResponse",  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def v1_network_a_iface_active_change_get(
        self, agent_src_id, agent_dst_id, _from, to, **kwargs
    ):  # noqa: E501
        """Get active iface changes  # noqa: E501

        Retrieves active iface changes data.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_a_iface_active_change_get(agent_src_id, agent_dst_id, _from, to, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int agent_src_id: Source Agent Id (required)
        :param int agent_dst_id: Destination Agent Id (required)
        :param datetime _from: (required)
        :param datetime to: (required)
        :return: ADataResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.v1_network_a_iface_active_change_get_with_http_info(
                agent_src_id, agent_dst_id, _from, to, **kwargs
            )  # noqa: E501
        else:
            (data) = self.v1_network_a_iface_active_change_get_with_http_info(
                agent_src_id, agent_dst_id, _from, to, **kwargs
            )  # noqa: E501
            return data

    def v1_network_a_iface_active_change_get_with_http_info(
        self, agent_src_id, agent_dst_id, _from, to, **kwargs
    ):  # noqa: E501
        """Get active iface changes  # noqa: E501

        Retrieves active iface changes data.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_a_iface_active_change_get_with_http_info(agent_src_id, agent_dst_id, _from, to, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int agent_src_id: Source Agent Id (required)
        :param int agent_dst_id: Destination Agent Id (required)
        :param datetime _from: (required)
        :param datetime to: (required)
        :return: ADataResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["agent_src_id", "agent_dst_id", "_from", "to"]  # noqa: E501
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in six.iteritems(params["kwargs"]):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method v1_network_a_iface_active_change_get" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'agent_src_id' is set
        if "agent_src_id" not in params or params["agent_src_id"] is None:
            raise ValueError(
                "Missing the required parameter `agent_src_id` when calling `v1_network_a_iface_active_change_get`"
            )  # noqa: E501
        # verify the required parameter 'agent_dst_id' is set
        if "agent_dst_id" not in params or params["agent_dst_id"] is None:
            raise ValueError(
                "Missing the required parameter `agent_dst_id` when calling `v1_network_a_iface_active_change_get`"
            )  # noqa: E501
        # verify the required parameter '_from' is set
        if "_from" not in params or params["_from"] is None:
            raise ValueError(
                "Missing the required parameter `_from` when calling `v1_network_a_iface_active_change_get`"
            )  # noqa: E501
        # verify the required parameter 'to' is set
        if "to" not in params or params["to"] is None:
            raise ValueError(
                "Missing the required parameter `to` when calling `v1_network_a_iface_active_change_get`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if "agent_src_id" in params:
            query_params.append(("agent_src_id", params["agent_src_id"]))  # noqa: E501
        if "agent_dst_id" in params:
            query_params.append(("agent_dst_id", params["agent_dst_id"]))  # noqa: E501
        if "_from" in params:
            query_params.append(("from", params["_from"]))  # noqa: E501
        if "to" in params:
            query_params.append(("to", params["to"]))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # noqa: E501

        # Authentication setting
        auth_settings = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/a/iface-active-change",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="ADataResponse",  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def v1_network_a_latency_get(
        self, agent_src_id, agent_dst_id, _from, to, **kwargs
    ):  # noqa: E501
        """Get latency  # noqa: E501

        Retrieves Connections latency.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_a_latency_get(agent_src_id, agent_dst_id, _from, to, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int agent_src_id: Source Agent Id (required)
        :param int agent_dst_id: Destination Agent Id (required)
        :param datetime _from: (required)
        :param datetime to: (required)
        :return: ADataResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.v1_network_a_latency_get_with_http_info(
                agent_src_id, agent_dst_id, _from, to, **kwargs
            )  # noqa: E501
        else:
            (data) = self.v1_network_a_latency_get_with_http_info(
                agent_src_id, agent_dst_id, _from, to, **kwargs
            )  # noqa: E501
            return data

    def v1_network_a_latency_get_with_http_info(
        self, agent_src_id, agent_dst_id, _from, to, **kwargs
    ):  # noqa: E501
        """Get latency  # noqa: E501

        Retrieves Connections latency.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_a_latency_get_with_http_info(agent_src_id, agent_dst_id, _from, to, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int agent_src_id: Source Agent Id (required)
        :param int agent_dst_id: Destination Agent Id (required)
        :param datetime _from: (required)
        :param datetime to: (required)
        :return: ADataResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["agent_src_id", "agent_dst_id", "_from", "to"]  # noqa: E501
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in six.iteritems(params["kwargs"]):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method v1_network_a_latency_get" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'agent_src_id' is set
        if "agent_src_id" not in params or params["agent_src_id"] is None:
            raise ValueError(
                "Missing the required parameter `agent_src_id` when calling `v1_network_a_latency_get`"
            )  # noqa: E501
        # verify the required parameter 'agent_dst_id' is set
        if "agent_dst_id" not in params or params["agent_dst_id"] is None:
            raise ValueError(
                "Missing the required parameter `agent_dst_id` when calling `v1_network_a_latency_get`"
            )  # noqa: E501
        # verify the required parameter '_from' is set
        if "_from" not in params or params["_from"] is None:
            raise ValueError(
                "Missing the required parameter `_from` when calling `v1_network_a_latency_get`"
            )  # noqa: E501
        # verify the required parameter 'to' is set
        if "to" not in params or params["to"] is None:
            raise ValueError(
                "Missing the required parameter `to` when calling `v1_network_a_latency_get`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if "agent_src_id" in params:
            query_params.append(("agent_src_id", params["agent_src_id"]))  # noqa: E501
        if "agent_dst_id" in params:
            query_params.append(("agent_dst_id", params["agent_dst_id"]))  # noqa: E501
        if "_from" in params:
            query_params.append(("from", params["_from"]))  # noqa: E501
        if "to" in params:
            query_params.append(("to", params["to"]))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # noqa: E501

        # Authentication setting
        auth_settings = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/a/latency",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="ADataResponse",  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def v1_network_a_packet_loss_get(
        self, agent_src_id, agent_dst_id, _from, to, **kwargs
    ):  # noqa: E501
        """Get packet loss  # noqa: E501

        Retrieves Connections packet loss.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_a_packet_loss_get(agent_src_id, agent_dst_id, _from, to, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int agent_src_id: Source Agent Id (required)
        :param int agent_dst_id: Destination Agent Id (required)
        :param datetime _from: (required)
        :param datetime to: (required)
        :return: ADataResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.v1_network_a_packet_loss_get_with_http_info(
                agent_src_id, agent_dst_id, _from, to, **kwargs
            )  # noqa: E501
        else:
            (data) = self.v1_network_a_packet_loss_get_with_http_info(
                agent_src_id, agent_dst_id, _from, to, **kwargs
            )  # noqa: E501
            return data

    def v1_network_a_packet_loss_get_with_http_info(
        self, agent_src_id, agent_dst_id, _from, to, **kwargs
    ):  # noqa: E501
        """Get packet loss  # noqa: E501

        Retrieves Connections packet loss.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_a_packet_loss_get_with_http_info(agent_src_id, agent_dst_id, _from, to, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int agent_src_id: Source Agent Id (required)
        :param int agent_dst_id: Destination Agent Id (required)
        :param datetime _from: (required)
        :param datetime to: (required)
        :return: ADataResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["agent_src_id", "agent_dst_id", "_from", "to"]  # noqa: E501
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in six.iteritems(params["kwargs"]):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method v1_network_a_packet_loss_get" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'agent_src_id' is set
        if "agent_src_id" not in params or params["agent_src_id"] is None:
            raise ValueError(
                "Missing the required parameter `agent_src_id` when calling `v1_network_a_packet_loss_get`"
            )  # noqa: E501
        # verify the required parameter 'agent_dst_id' is set
        if "agent_dst_id" not in params or params["agent_dst_id"] is None:
            raise ValueError(
                "Missing the required parameter `agent_dst_id` when calling `v1_network_a_packet_loss_get`"
            )  # noqa: E501
        # verify the required parameter '_from' is set
        if "_from" not in params or params["_from"] is None:
            raise ValueError(
                "Missing the required parameter `_from` when calling `v1_network_a_packet_loss_get`"
            )  # noqa: E501
        # verify the required parameter 'to' is set
        if "to" not in params or params["to"] is None:
            raise ValueError(
                "Missing the required parameter `to` when calling `v1_network_a_packet_loss_get`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if "agent_src_id" in params:
            query_params.append(("agent_src_id", params["agent_src_id"]))  # noqa: E501
        if "agent_dst_id" in params:
            query_params.append(("agent_dst_id", params["agent_dst_id"]))  # noqa: E501
        if "_from" in params:
            query_params.append(("from", params["_from"]))  # noqa: E501
        if "to" in params:
            query_params.append(("to", params["to"]))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # noqa: E501

        # Authentication setting
        auth_settings = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/a/packet-loss",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="ADataResponse",  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def v1_network_a_statuses_search(self, body, **kwargs):  # noqa: E501
        """Search statuses  # noqa: E501

        Retrieve Connection statuses by given criteria.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_a_statuses_search(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param V1NetworkAStatusesSearchRequest body: (required)
        :return: V1NetworkAStatusesSearchResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.v1_network_a_statuses_search_with_http_info(
                body, **kwargs
            )  # noqa: E501
        else:
            (data) = self.v1_network_a_statuses_search_with_http_info(
                body, **kwargs
            )  # noqa: E501
            return data

    def v1_network_a_statuses_search_with_http_info(self, body, **kwargs):  # noqa: E501
        """Search statuses  # noqa: E501

        Retrieve Connection statuses by given criteria.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_a_statuses_search_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param V1NetworkAStatusesSearchRequest body: (required)
        :return: V1NetworkAStatusesSearchResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["body"]  # noqa: E501
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in six.iteritems(params["kwargs"]):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method v1_network_a_statuses_search" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'body' is set
        if "body" not in params or params["body"] is None:
            raise ValueError(
                "Missing the required parameter `body` when calling `v1_network_a_statuses_search`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "body" in params:
            body_params = params["body"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # noqa: E501

        # HTTP header `Content-Type`
        header_params[
            "Content-Type"
        ] = self.api_client.select_header_content_type(  # noqa: E501
            ["application/json"]
        )  # noqa: E501

        # Authentication setting
        auth_settings = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/a/statuses/search",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="V1NetworkAStatusesSearchResponse",  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def v1_network_a_statuses_warnings_search(self, body, **kwargs):  # noqa: E501
        """Search status warnings  # noqa: E501

        Retrieves status warnings by given criteria.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_a_statuses_warnings_search(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param V1NetworkAStatusesWarningsSearchRequest body: (required)
        :return: V1NetworkAStatusesWarningsSearchResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.v1_network_a_statuses_warnings_search_with_http_info(
                body, **kwargs
            )  # noqa: E501
        else:
            (data) = self.v1_network_a_statuses_warnings_search_with_http_info(
                body, **kwargs
            )  # noqa: E501
            return data

    def v1_network_a_statuses_warnings_search_with_http_info(
        self, body, **kwargs
    ):  # noqa: E501
        """Search status warnings  # noqa: E501

        Retrieves status warnings by given criteria.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_a_statuses_warnings_search_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param V1NetworkAStatusesWarningsSearchRequest body: (required)
        :return: V1NetworkAStatusesWarningsSearchResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["body"]  # noqa: E501
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in six.iteritems(params["kwargs"]):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method v1_network_a_statuses_warnings_search" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'body' is set
        if "body" not in params or params["body"] is None:
            raise ValueError(
                "Missing the required parameter `body` when calling `v1_network_a_statuses_warnings_search`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "body" in params:
            body_params = params["body"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # noqa: E501

        # HTTP header `Content-Type`
        header_params[
            "Content-Type"
        ] = self.api_client.select_header_content_type(  # noqa: E501
            ["application/json"]
        )  # noqa: E501

        # Authentication setting
        auth_settings = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/a/statuses/warnings/search",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="V1NetworkAStatusesWarningsSearchResponse",  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )
