"""
    SORACOM API

    SORACOM API v1  # noqa: E501

    The version of the OpenAPI document: VERSION_PLACEHOLDER
    Generated by: https://openapi-generator.tech
"""


import re  # noqa: F401
import sys  # noqa: F401

from soracom_api.api_client import ApiClient, Endpoint as _Endpoint
from soracom_api.model_utils import (  # noqa: F401
    check_allowed_values,
    check_validations,
    date,
    datetime,
    file_type,
    none_type,
    validate_and_convert_types
)
from soracom_api.model.device import Device
from soracom_api.model.sigfox_device import SigfoxDevice
from soracom_api.model.sim import Sim
from soracom_api.model.subscriber import Subscriber
from soracom_api.model.traffic_volume_ranking import TrafficVolumeRanking


class QueryApi(object):
    """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):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client
        self.search_devices_endpoint = _Endpoint(
            settings={
                'response_type': ([Device],),
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/query/devices',
                'operation_id': 'search_devices',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'name',
                    'group',
                    'device_id',
                    'tag',
                    'imsi',
                    'imei',
                    'limit',
                    'last_evaluated_key',
                    'search_type',
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                    'search_type',
                ],
                'validation': [
                    'limit',
                ]
            },
            root_map={
                'validations': {
                    ('limit',): {

                        'inclusive_maximum': 100,
                    },
                },
                'allowed_values': {
                    ('search_type',): {

                        "AND": "and",
                        "OR": "or"
                    },
                },
                'openapi_types': {
                    'name':
                        ([str],),
                    'group':
                        ([str],),
                    'device_id':
                        ([str],),
                    'tag':
                        ([str],),
                    'imsi':
                        ([str],),
                    'imei':
                        ([str],),
                    'limit':
                        (int,),
                    'last_evaluated_key':
                        (str,),
                    'search_type':
                        (str,),
                },
                'attribute_map': {
                    'name': 'name',
                    'group': 'group',
                    'device_id': 'deviceId',
                    'tag': 'tag',
                    'imsi': 'imsi',
                    'imei': 'imei',
                    'limit': 'limit',
                    'last_evaluated_key': 'last_evaluated_key',
                    'search_type': 'search_type',
                },
                'location_map': {
                    'name': 'query',
                    'group': 'query',
                    'device_id': 'query',
                    'tag': 'query',
                    'imsi': 'query',
                    'imei': 'query',
                    'limit': 'query',
                    'last_evaluated_key': 'query',
                    'search_type': 'query',
                },
                'collection_format_map': {
                    'name': 'multi',
                    'group': 'multi',
                    'device_id': 'multi',
                    'tag': 'multi',
                    'imsi': 'multi',
                    'imei': 'multi',
                }
            },
            headers_map={
                'accept': [
                    'application/json;charset=UTF-8'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.search_sigfox_devices_endpoint = _Endpoint(
            settings={
                'response_type': ([SigfoxDevice],),
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/query/sigfox_devices',
                'operation_id': 'search_sigfox_devices',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'name',
                    'group',
                    'device_id',
                    'tag',
                    'status',
                    'registration',
                    'limit',
                    'last_evaluated_key',
                    'search_type',
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                    'status',
                    'registration',
                    'search_type',
                ],
                'validation': [
                    'limit',
                ]
            },
            root_map={
                'validations': {
                    ('limit',): {

                        'inclusive_maximum': 100,
                    },
                },
                'allowed_values': {
                    ('status',): {

                        "ACTIVE": "active",
                        "INACTIVE": "inactive",
                        "SUSPENDED": "suspended",
                        "TERMINATED": "terminated",
                        "SHIPPED": "shipped",
                        "READY": "ready",
                        "INSTOCK": "inStock",
                        "BANNED": "banned",
                        "STANDBY": "standby"
                    },
                    ('registration',): {

                        "NOTSTARTED": "notStarted",
                        "PENDING": "pending",
                        "SUCCESS": "success",
                        "FAILED": "failed"
                    },
                    ('search_type',): {

                        "AND": "and",
                        "OR": "or"
                    },
                },
                'openapi_types': {
                    'name':
                        ([str],),
                    'group':
                        ([str],),
                    'device_id':
                        ([str],),
                    'tag':
                        ([str],),
                    'status':
                        (str,),
                    'registration':
                        (str,),
                    'limit':
                        (int,),
                    'last_evaluated_key':
                        (str,),
                    'search_type':
                        (str,),
                },
                'attribute_map': {
                    'name': 'name',
                    'group': 'group',
                    'device_id': 'deviceId',
                    'tag': 'tag',
                    'status': 'status',
                    'registration': 'registration',
                    'limit': 'limit',
                    'last_evaluated_key': 'last_evaluated_key',
                    'search_type': 'search_type',
                },
                'location_map': {
                    'name': 'query',
                    'group': 'query',
                    'device_id': 'query',
                    'tag': 'query',
                    'status': 'query',
                    'registration': 'query',
                    'limit': 'query',
                    'last_evaluated_key': 'query',
                    'search_type': 'query',
                },
                'collection_format_map': {
                    'name': 'multi',
                    'group': 'multi',
                    'device_id': 'multi',
                    'tag': 'multi',
                }
            },
            headers_map={
                'accept': [
                    'application/json;charset=UTF-8'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.search_sims_endpoint = _Endpoint(
            settings={
                'response_type': ([Sim],),
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/query/sims',
                'operation_id': 'search_sims',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'name',
                    'group',
                    'sim_id',
                    'imsi',
                    'msisdn',
                    'iccid',
                    'serial_number',
                    'tag',
                    'bundles',
                    'session_status',
                    'limit',
                    'last_evaluated_key',
                    'search_type',
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                    'session_status',
                    'search_type',
                ],
                'validation': [
                    'limit',
                ]
            },
            root_map={
                'validations': {
                    ('limit',): {

                        'inclusive_maximum': 100,
                    },
                },
                'allowed_values': {
                    ('session_status',): {

                        "NA": "NA",
                        "ONLINE": "ONLINE",
                        "OFFLINE": "OFFLINE"
                    },
                    ('search_type',): {

                        "AND": "and",
                        "OR": "or"
                    },
                },
                'openapi_types': {
                    'name':
                        ([str],),
                    'group':
                        ([str],),
                    'sim_id':
                        ([str],),
                    'imsi':
                        ([str],),
                    'msisdn':
                        ([str],),
                    'iccid':
                        ([str],),
                    'serial_number':
                        ([str],),
                    'tag':
                        ([str],),
                    'bundles':
                        ([str],),
                    'session_status':
                        (str,),
                    'limit':
                        (int,),
                    'last_evaluated_key':
                        (str,),
                    'search_type':
                        (str,),
                },
                'attribute_map': {
                    'name': 'name',
                    'group': 'group',
                    'sim_id': 'sim_id',
                    'imsi': 'imsi',
                    'msisdn': 'msisdn',
                    'iccid': 'iccid',
                    'serial_number': 'serial_number',
                    'tag': 'tag',
                    'bundles': 'bundles',
                    'session_status': 'session_status',
                    'limit': 'limit',
                    'last_evaluated_key': 'last_evaluated_key',
                    'search_type': 'search_type',
                },
                'location_map': {
                    'name': 'query',
                    'group': 'query',
                    'sim_id': 'query',
                    'imsi': 'query',
                    'msisdn': 'query',
                    'iccid': 'query',
                    'serial_number': 'query',
                    'tag': 'query',
                    'bundles': 'query',
                    'session_status': 'query',
                    'limit': 'query',
                    'last_evaluated_key': 'query',
                    'search_type': 'query',
                },
                'collection_format_map': {
                    'name': 'multi',
                    'group': 'multi',
                    'sim_id': 'multi',
                    'imsi': 'multi',
                    'msisdn': 'multi',
                    'iccid': 'multi',
                    'serial_number': 'multi',
                    'tag': 'multi',
                    'bundles': 'multi',
                }
            },
            headers_map={
                'accept': [
                    'application/json;charset=UTF-8'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.search_subscriber_traffic_volume_ranking_endpoint = _Endpoint(
            settings={
                'response_type': ([TrafficVolumeRanking],),
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/query/subscribers/traffic_volume/ranking',
                'operation_id': 'search_subscriber_traffic_volume_ranking',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    '_from',
                    'to',
                    'limit',
                    'order',
                ],
                'required': [
                    '_from',
                    'to',
                ],
                'nullable': [
                ],
                'enum': [
                    'order',
                ],
                'validation': [
                    'limit',
                ]
            },
            root_map={
                'validations': {
                    ('limit',): {

                        'inclusive_maximum': 500,
                    },
                },
                'allowed_values': {
                    ('order',): {

                        "ASC": "asc",
                        "DESC": "desc"
                    },
                },
                'openapi_types': {
                    '_from':
                        (int,),
                    'to':
                        (int,),
                    'limit':
                        (int,),
                    'order':
                        (str,),
                },
                'attribute_map': {
                    '_from': 'from',
                    'to': 'to',
                    'limit': 'limit',
                    'order': 'order',
                },
                'location_map': {
                    '_from': 'query',
                    'to': 'query',
                    'limit': 'query',
                    'order': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json;charset=UTF-8'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.search_subscribers_endpoint = _Endpoint(
            settings={
                'response_type': ([Subscriber],),
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/query/subscribers',
                'operation_id': 'search_subscribers',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'name',
                    'group',
                    'imsi',
                    'msisdn',
                    'iccid',
                    'serial_number',
                    'tag',
                    'subscription',
                    'module_type',
                    'limit',
                    'last_evaluated_key',
                    'search_type',
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                    'search_type',
                ],
                'validation': [
                    'limit',
                ]
            },
            root_map={
                'validations': {
                    ('limit',): {

                        'inclusive_maximum': 100,
                    },
                },
                'allowed_values': {
                    ('search_type',): {

                        "AND": "and",
                        "OR": "or"
                    },
                },
                'openapi_types': {
                    'name':
                        ([str],),
                    'group':
                        ([str],),
                    'imsi':
                        ([str],),
                    'msisdn':
                        ([str],),
                    'iccid':
                        ([str],),
                    'serial_number':
                        ([str],),
                    'tag':
                        ([str],),
                    'subscription':
                        ([str],),
                    'module_type':
                        ([str],),
                    'limit':
                        (int,),
                    'last_evaluated_key':
                        (str,),
                    'search_type':
                        (str,),
                },
                'attribute_map': {
                    'name': 'name',
                    'group': 'group',
                    'imsi': 'imsi',
                    'msisdn': 'msisdn',
                    'iccid': 'iccid',
                    'serial_number': 'serial_number',
                    'tag': 'tag',
                    'subscription': 'subscription',
                    'module_type': 'module_type',
                    'limit': 'limit',
                    'last_evaluated_key': 'last_evaluated_key',
                    'search_type': 'search_type',
                },
                'location_map': {
                    'name': 'query',
                    'group': 'query',
                    'imsi': 'query',
                    'msisdn': 'query',
                    'iccid': 'query',
                    'serial_number': 'query',
                    'tag': 'query',
                    'subscription': 'query',
                    'module_type': 'query',
                    'limit': 'query',
                    'last_evaluated_key': 'query',
                    'search_type': 'query',
                },
                'collection_format_map': {
                    'name': 'multi',
                    'group': 'multi',
                    'imsi': 'multi',
                    'msisdn': 'multi',
                    'iccid': 'multi',
                    'serial_number': 'multi',
                    'tag': 'multi',
                    'subscription': 'multi',
                    'module_type': 'multi',
                }
            },
            headers_map={
                'accept': [
                    'application/json;charset=UTF-8'
                ],
                'content_type': [],
            },
            api_client=api_client
        )

    def search_devices(
        self,
        **kwargs
    ):
        """Search SORACOM Inventory devices by query  # noqa: E501

        Search SORACOM Inventory devices by query terms. It returns partial match results. When this API permission is allowed, it grants the authority to search and retrieve all SORACOM Inventory devices that includes their group 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.search_devices(async_req=True)
        >>> result = thread.get()


        Keyword Args:
            name ([str]): Name to search. [optional]
            group ([str]): Group name to search. [optional]
            device_id ([str]): SORACOM Inventory device ID to search. [optional]
            tag ([str]): String of tag values to search. [optional]
            imsi ([str]): IMSI of the device that was used on bootstrapping. [optional]
            imei ([str]): IMEI of the device that was used on bootstrapping. [optional]
            limit (int): The maximum number of item to retrieve. [optional] if omitted the server will use the default value of 10
            last_evaluated_key (str): The SORACOM Inventory device ID of the last Inventory device retrieved on the current page. By specifying this parameter, you can continue to retrieve the list from the next Inventory device onward.. [optional]
            search_type (str): Type of the search ('AND searching' or 'OR searching'). [optional] if omitted the server will use the default value of "and"
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): 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.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            [Device]
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        return self.search_devices_endpoint.call_with_http_info(**kwargs)

    def search_sigfox_devices(
        self,
        **kwargs
    ):
        """Search Sigfox devices by query  # noqa: E501

        Search Sigfox devices by query terms. It returns partial match results. When this API permission is allowed, it grants the authority to search and retrieve all Sigfox devices that includes their group 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.search_sigfox_devices(async_req=True)
        >>> result = thread.get()


        Keyword Args:
            name ([str]): Name to search. [optional]
            group ([str]): Group name to search. [optional]
            device_id ([str]): Sigfox device ID to search. [optional]
            tag ([str]): String of tag values to search. [optional]
            status (str): Status of sigfox devices. [optional] if omitted the server will use the default value of "and"
            registration (str): Registration status of sigfox devices. [optional] if omitted the server will use the default value of "and"
            limit (int): The maximum number of item to retrieve. [optional] if omitted the server will use the default value of 10
            last_evaluated_key (str): The Sigfox device ID of the last Sigfox device retrieved on the current page. By specifying this parameter, you can continue to retrieve the list from the next Sigfox device onward.. [optional]
            search_type (str): Type of the search ('AND searching' or 'OR searching'). [optional] if omitted the server will use the default value of "and"
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): 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.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            [SigfoxDevice]
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        return self.search_sigfox_devices_endpoint.call_with_http_info(**kwargs)

    def search_sims(
        self,
        **kwargs
    ):
        """Search SIMs by query terms  # noqa: E501

        Search SIMs by query terms. It returns partial match results. When this API permission is allowed, it grants the authority to search and retrieve all SIMs that includes their group 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.search_sims(async_req=True)
        >>> result = thread.get()


        Keyword Args:
            name ([str]): Name to search. [optional]
            group ([str]): Group name to search. [optional]
            sim_id ([str]): Identifier of the SIM to search. [optional]
            imsi ([str]): IMSI to search. [optional]
            msisdn ([str]): MSISDN to search. [optional]
            iccid ([str]): ICCID to search. [optional]
            serial_number ([str]): Serial number to search. [optional]
            tag ([str]): String of tag values to search. [optional]
            bundles ([str]): Bundles type to search. [optional]
            session_status (str): Status of the session to search (ONLINE or OFFLINE). [optional] if omitted the server will use the default value of "NA"
            limit (int): The maximum number of item to retrieve. [optional] if omitted the server will use the default value of 10
            last_evaluated_key (str): The SIM ID of the last SIM retrieved on the current page. By specifying this parameter, you can continue to retrieve the list from the next SIM onward.. [optional]
            search_type (str): Type of the search ('AND searching' or 'OR searching'). [optional] if omitted the server will use the default value of "and"
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): 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.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            [Sim]
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        return self.search_sims_endpoint.call_with_http_info(**kwargs)

    def search_subscriber_traffic_volume_ranking(
        self,
        _from,
        to,
        **kwargs
    ):
        """Search traffic volume ranking of subscribers  # noqa: E501

        Search traffic volume ranking of subscribers  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.search_subscriber_traffic_volume_ranking(_from, to, async_req=True)
        >>> result = thread.get()

        Args:
            _from (int): The beginning point of searching range (unixtime: in milliseconds)
            to (int): The end point of searching range (unixtime: in milliseconds)

        Keyword Args:
            limit (int): The maximum number of item to retrieve. [optional] if omitted the server will use the default value of 10
            order (str): The order of ranking. [optional] if omitted the server will use the default value of "desc"
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): 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.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            [TrafficVolumeRanking]
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['_from'] = \
            _from
        kwargs['to'] = \
            to
        return self.search_subscriber_traffic_volume_ranking_endpoint.call_with_http_info(**kwargs)

    def search_subscribers(
        self,
        **kwargs
    ):
        """(DEPRECATED) Search subscribers by query terms  # noqa: E501

        (DEPRECATED: please consider to use `/query/sims` API instead) Search subscribers by query terms. It returns partial match results. When this API permission is allowed, it grants the authority to search and retrieve all SIMs that includes their group 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.search_subscribers(async_req=True)
        >>> result = thread.get()


        Keyword Args:
            name ([str]): Name to search. [optional]
            group ([str]): Group name to search. [optional]
            imsi ([str]): IMSI to search. [optional]
            msisdn ([str]): MSISDN to search. [optional]
            iccid ([str]): ICCID to search. [optional]
            serial_number ([str]): Serial number to search. [optional]
            tag ([str]): String of tag values to search. [optional]
            subscription ([str]): Subscription (e.g. `plan01s`) to search. [optional]
            module_type ([str]): Module type (e.g. `mini`, `virtual`) to search. [optional]
            limit (int): The maximum number of item to retrieve. [optional] if omitted the server will use the default value of 10
            last_evaluated_key (str): The IMSI of the last subscriber retrieved on the current page. By specifying this parameter, you can continue to retrieve the list from the next subscriber onward.. [optional]
            search_type (str): Type of the search ('AND searching' or 'OR searching'). [optional] if omitted the server will use the default value of "and"
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): 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.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            [Subscriber]
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        return self.search_subscribers_endpoint.call_with_http_info(**kwargs)

