# coding: utf-8

"""
    Abstract API

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

    OpenAPI spec version: 1.0.0
    
    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 enigma.swagger_client.api_client import ApiClient


class DatasetSummaryApi(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 api_dataset_summary_get(self, **kwargs):  # noqa: E501
        """api_dataset_summary_get  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_=True
        >>> thread = api.api_dataset_summary_get(async_=True)
        >>> result = thread.get()

        :param async_ bool
        :param list[str] filter:
        :param list[str] has_tag:
        :param str in_collection_id:
        :param bool include_serialids:
        :param bool match_metadata:
        :param bool match_rows:
        :param int max_row_count:
        :param int min_row_count:
        :param str mode:
        :param list[str] parent_collection_id:
        :param int phrase_distance:
        :param str query:
        :param int row_limit:
        :param int row_offset:
        :param str row_sort:
        :param list[str] sort:
        :return: DatasetSummary
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_'):
            return self.api_dataset_summary_get_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.api_dataset_summary_get_with_http_info(**kwargs)  # noqa: E501
            return data

    def api_dataset_summary_get_with_http_info(self, **kwargs):  # noqa: E501
        """api_dataset_summary_get  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_=True
        >>> thread = api.api_dataset_summary_get_with_http_info(async_=True)
        >>> result = thread.get()

        :param async_ bool
        :param list[str] filter:
        :param list[str] has_tag:
        :param str in_collection_id:
        :param bool include_serialids:
        :param bool match_metadata:
        :param bool match_rows:
        :param int max_row_count:
        :param int min_row_count:
        :param str mode:
        :param list[str] parent_collection_id:
        :param int phrase_distance:
        :param str query:
        :param int row_limit:
        :param int row_offset:
        :param str row_sort:
        :param list[str] sort:
        :return: DatasetSummary
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['filter', 'has_tag', 'in_collection_id', 'include_serialids', 'match_metadata', 'match_rows', 'max_row_count', 'min_row_count', 'mode', 'parent_collection_id', 'phrase_distance', 'query', 'row_limit', 'row_offset', 'row_sort', 'sort']  # noqa: E501
        all_params.append('async_')
        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 api_dataset_summary_get" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'filter' in params:
            query_params.append(('filter', params['filter']))  # noqa: E501
            collection_formats['filter'] = 'multi'  # noqa: E501
        if 'has_tag' in params:
            query_params.append(('has_tag', params['has_tag']))  # noqa: E501
            collection_formats['has_tag'] = 'multi'  # noqa: E501
        if 'in_collection_id' in params:
            query_params.append(('in_collection_id', params['in_collection_id']))  # noqa: E501
        if 'include_serialids' in params:
            query_params.append(('include_serialids', params['include_serialids']))  # noqa: E501
        if 'match_metadata' in params:
            query_params.append(('match_metadata', params['match_metadata']))  # noqa: E501
        if 'match_rows' in params:
            query_params.append(('match_rows', params['match_rows']))  # noqa: E501
        if 'max_row_count' in params:
            query_params.append(('max_row_count', params['max_row_count']))  # noqa: E501
        if 'min_row_count' in params:
            query_params.append(('min_row_count', params['min_row_count']))  # noqa: E501
        if 'mode' in params:
            query_params.append(('mode', params['mode']))  # noqa: E501
        if 'parent_collection_id' in params:
            query_params.append(('parent_collection_id', params['parent_collection_id']))  # noqa: E501
            collection_formats['parent_collection_id'] = 'multi'  # noqa: E501
        if 'phrase_distance' in params:
            query_params.append(('phrase_distance', params['phrase_distance']))  # noqa: E501
        if 'query' in params:
            query_params.append(('query', params['query']))  # noqa: E501
        if 'row_limit' in params:
            query_params.append(('row_limit', params['row_limit']))  # noqa: E501
        if 'row_offset' in params:
            query_params.append(('row_offset', params['row_offset']))  # noqa: E501
        if 'row_sort' in params:
            query_params.append(('row_sort', params['row_sort']))  # noqa: E501
        if 'sort' in params:
            query_params.append(('sort', params['sort']))  # noqa: E501
            collection_formats['sort'] = 'multi'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/dataset_summary', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DatasetSummary',  # noqa: E501
            auth_settings=auth_settings,
            async_=params.get('async_'),
            _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)
