# coding: utf-8

"""
    Kaggle API

    API for kaggle.com  # noqa: E501

    OpenAPI spec version: 1
    
    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 kaggle.api_client import ApiClient


class KaggleApi(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 competitions_data_download_file(self, id, file_name, **kwargs):  # noqa: E501
        """Download competition data file  # noqa: E501

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

        :param async bool
        :param str id: Competition name (required)
        :param str file_name: Competition name (required)
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.competitions_data_download_file_with_http_info(id, file_name, **kwargs)  # noqa: E501
        else:
            (data) = self.competitions_data_download_file_with_http_info(id, file_name, **kwargs)  # noqa: E501
            return data

    def competitions_data_download_file_with_http_info(self, id, file_name, **kwargs):  # noqa: E501
        """Download competition data file  # noqa: E501

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

        :param async bool
        :param str id: Competition name (required)
        :param str file_name: Competition name (required)
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'file_name']  # 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 competitions_data_download_file" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `competitions_data_download_file`")  # noqa: E501
        # verify the required parameter 'file_name' is set
        if ('file_name' not in params or
                params['file_name'] is None):
            raise ValueError("Missing the required parameter `file_name` when calling `competitions_data_download_file`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501
        if 'file_name' in params:
            path_params['fileName'] = params['file_name']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        return self.api_client.call_api(
            '/competitions/data/download/{id}/{fileName}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Result',  # 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)

    def competitions_data_list_files(self, id, **kwargs):  # noqa: E501
        """List competition data files  # noqa: E501

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

        :param async bool
        :param str id: Competition name (required)
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.competitions_data_list_files_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.competitions_data_list_files_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def competitions_data_list_files_with_http_info(self, id, **kwargs):  # noqa: E501
        """List competition data files  # noqa: E501

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

        :param async bool
        :param str id: Competition name (required)
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # 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 competitions_data_list_files" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `competitions_data_list_files`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        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 = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/competitions/data/list/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Result',  # 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)

    def competitions_list(self, **kwargs):  # noqa: E501
        """List competitions  # noqa: E501

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

        :param async bool
        :param int page: Page number
        :param str search: Search terms
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.competitions_list_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.competitions_list_with_http_info(**kwargs)  # noqa: E501
            return data

    def competitions_list_with_http_info(self, **kwargs):  # noqa: E501
        """List competitions  # noqa: E501

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

        :param async bool
        :param int page: Page number
        :param str search: Search terms
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['page', 'search']  # 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 competitions_list" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'page' in params:
            query_params.append(('page', params['page']))  # noqa: E501
        if 'search' in params:
            query_params.append(('search', params['search']))  # 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 = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/competitions/list', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Result',  # 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)

    def competitions_submissions_list(self, id, **kwargs):  # noqa: E501
        """List competition submissions  # noqa: E501

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

        :param async bool
        :param str id: Competition name (required)
        :param int page: Page number
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.competitions_submissions_list_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.competitions_submissions_list_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def competitions_submissions_list_with_http_info(self, id, **kwargs):  # noqa: E501
        """List competition submissions  # noqa: E501

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

        :param async bool
        :param str id: Competition name (required)
        :param int page: Page number
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'page']  # 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 competitions_submissions_list" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `competitions_submissions_list`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []
        if 'page' in params:
            query_params.append(('page', params['page']))  # 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 = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/competitions/submissions/list/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Result',  # 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)

    def competitions_submissions_submit(self, blob_file_tokens, submission_description, id, **kwargs):  # noqa: E501
        """Submit to competition  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.competitions_submissions_submit(blob_file_tokens, submission_description, id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str blob_file_tokens: Token identifying location of uploaded submission file (required)
        :param str submission_description: Description of competition submission (required)
        :param str id: Competition name (required)
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.competitions_submissions_submit_with_http_info(blob_file_tokens, submission_description, id, **kwargs)  # noqa: E501
        else:
            (data) = self.competitions_submissions_submit_with_http_info(blob_file_tokens, submission_description, id, **kwargs)  # noqa: E501
            return data

    def competitions_submissions_submit_with_http_info(self, blob_file_tokens, submission_description, id, **kwargs):  # noqa: E501
        """Submit to competition  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.competitions_submissions_submit_with_http_info(blob_file_tokens, submission_description, id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str blob_file_tokens: Token identifying location of uploaded submission file (required)
        :param str submission_description: Description of competition submission (required)
        :param str id: Competition name (required)
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['blob_file_tokens', 'submission_description', 'id']  # 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 competitions_submissions_submit" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'blob_file_tokens' is set
        if ('blob_file_tokens' not in params or
                params['blob_file_tokens'] is None):
            raise ValueError("Missing the required parameter `blob_file_tokens` when calling `competitions_submissions_submit`")  # noqa: E501
        # verify the required parameter 'submission_description' is set
        if ('submission_description' not in params or
                params['submission_description'] is None):
            raise ValueError("Missing the required parameter `submission_description` when calling `competitions_submissions_submit`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `competitions_submissions_submit`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'blob_file_tokens' in params:
            form_params.append(('blobFileTokens', params['blob_file_tokens']))  # noqa: E501
        if 'submission_description' in params:
            form_params.append(('submissionDescription', params['submission_description']))  # noqa: E501

        body_params = None
        # 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
            ['multipart/form-data'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/competitions/submissions/submit/{id}', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Result',  # 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)

    def competitions_submissions_upload(self, file, guid, content_length, last_modified_date_utc, **kwargs):  # noqa: E501
        """Upload competition submission file  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.competitions_submissions_upload(file, guid, content_length, last_modified_date_utc, async=True)
        >>> result = thread.get()

        :param async bool
        :param file file: Competition submission file (required)
        :param str guid: Location where submission should be uploaded (required)
        :param int content_length: Content length of file in bytes (required)
        :param int last_modified_date_utc: Last modified date of file in milliseconds since epoch in UTC (required)
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.competitions_submissions_upload_with_http_info(file, guid, content_length, last_modified_date_utc, **kwargs)  # noqa: E501
        else:
            (data) = self.competitions_submissions_upload_with_http_info(file, guid, content_length, last_modified_date_utc, **kwargs)  # noqa: E501
            return data

    def competitions_submissions_upload_with_http_info(self, file, guid, content_length, last_modified_date_utc, **kwargs):  # noqa: E501
        """Upload competition submission file  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.competitions_submissions_upload_with_http_info(file, guid, content_length, last_modified_date_utc, async=True)
        >>> result = thread.get()

        :param async bool
        :param file file: Competition submission file (required)
        :param str guid: Location where submission should be uploaded (required)
        :param int content_length: Content length of file in bytes (required)
        :param int last_modified_date_utc: Last modified date of file in milliseconds since epoch in UTC (required)
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['file', 'guid', 'content_length', 'last_modified_date_utc']  # 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 competitions_submissions_upload" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'file' is set
        if ('file' not in params or
                params['file'] is None):
            raise ValueError("Missing the required parameter `file` when calling `competitions_submissions_upload`")  # noqa: E501
        # verify the required parameter 'guid' is set
        if ('guid' not in params or
                params['guid'] is None):
            raise ValueError("Missing the required parameter `guid` when calling `competitions_submissions_upload`")  # noqa: E501
        # verify the required parameter 'content_length' is set
        if ('content_length' not in params or
                params['content_length'] is None):
            raise ValueError("Missing the required parameter `content_length` when calling `competitions_submissions_upload`")  # noqa: E501
        # verify the required parameter 'last_modified_date_utc' is set
        if ('last_modified_date_utc' not in params or
                params['last_modified_date_utc'] is None):
            raise ValueError("Missing the required parameter `last_modified_date_utc` when calling `competitions_submissions_upload`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'guid' in params:
            path_params['guid'] = params['guid']  # noqa: E501
        if 'content_length' in params:
            path_params['contentLength'] = params['content_length']  # noqa: E501
        if 'last_modified_date_utc' in params:
            path_params['lastModifiedDateUtc'] = params['last_modified_date_utc']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'file' in params:
            local_var_files['file'] = params['file']  # noqa: E501

        body_params = None
        # 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
            ['multipart/form-data'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/competitions/submissions/upload/{guid}/{contentLength}/{lastModifiedDateUtc}', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Result',  # 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)

    def competitions_submissions_url(self, content_length, last_modified_date_utc, **kwargs):  # noqa: E501
        """Generate competition submission URL  # noqa: E501

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

        :param async bool
        :param int content_length: Content length of file in bytes (required)
        :param int last_modified_date_utc: Last modified date of file in milliseconds since epoch in UTC (required)
        :param str file_name: Competition submission file name
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.competitions_submissions_url_with_http_info(content_length, last_modified_date_utc, **kwargs)  # noqa: E501
        else:
            (data) = self.competitions_submissions_url_with_http_info(content_length, last_modified_date_utc, **kwargs)  # noqa: E501
            return data

    def competitions_submissions_url_with_http_info(self, content_length, last_modified_date_utc, **kwargs):  # noqa: E501
        """Generate competition submission URL  # noqa: E501

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

        :param async bool
        :param int content_length: Content length of file in bytes (required)
        :param int last_modified_date_utc: Last modified date of file in milliseconds since epoch in UTC (required)
        :param str file_name: Competition submission file name
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['content_length', 'last_modified_date_utc', 'file_name']  # 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 competitions_submissions_url" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'content_length' is set
        if ('content_length' not in params or
                params['content_length'] is None):
            raise ValueError("Missing the required parameter `content_length` when calling `competitions_submissions_url`")  # noqa: E501
        # verify the required parameter 'last_modified_date_utc' is set
        if ('last_modified_date_utc' not in params or
                params['last_modified_date_utc'] is None):
            raise ValueError("Missing the required parameter `last_modified_date_utc` when calling `competitions_submissions_url`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'content_length' in params:
            path_params['contentLength'] = params['content_length']  # noqa: E501
        if 'last_modified_date_utc' in params:
            path_params['lastModifiedDateUtc'] = params['last_modified_date_utc']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'file_name' in params:
            form_params.append(('fileName', params['file_name']))  # noqa: E501

        body_params = None
        # 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
            ['multipart/form-data'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/competitions/submissions/url/{contentLength}/{lastModifiedDateUtc}', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Result',  # 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)

    def datasets_create_new(self, dataset_new_request, **kwargs):  # noqa: E501
        """Create a new dataset  # noqa: E501

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

        :param async bool
        :param DatasetNewRequest dataset_new_request: Information for creating a new dataset (required)
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.datasets_create_new_with_http_info(dataset_new_request, **kwargs)  # noqa: E501
        else:
            (data) = self.datasets_create_new_with_http_info(dataset_new_request, **kwargs)  # noqa: E501
            return data

    def datasets_create_new_with_http_info(self, dataset_new_request, **kwargs):  # noqa: E501
        """Create a new dataset  # noqa: E501

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

        :param async bool
        :param DatasetNewRequest dataset_new_request: Information for creating a new dataset (required)
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['dataset_new_request']  # 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 datasets_create_new" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'dataset_new_request' is set
        if ('dataset_new_request' not in params or
                params['dataset_new_request'] is None):
            raise ValueError("Missing the required parameter `dataset_new_request` when calling `datasets_create_new`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'dataset_new_request' in params:
            body_params = params['dataset_new_request']
        # 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 = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/datasets/create/new', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Result',  # 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)

    def datasets_create_version(self, owner_slug, dataset_slug, dataset_new_version_request, **kwargs):  # noqa: E501
        """Create a new dataset version  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.datasets_create_version(owner_slug, dataset_slug, dataset_new_version_request, async=True)
        >>> result = thread.get()

        :param async bool
        :param str owner_slug: Dataset owner (required)
        :param str dataset_slug: Dataset name (required)
        :param DatasetNewVersionRequest dataset_new_version_request: Information for creating a new dataset version (required)
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.datasets_create_version_with_http_info(owner_slug, dataset_slug, dataset_new_version_request, **kwargs)  # noqa: E501
        else:
            (data) = self.datasets_create_version_with_http_info(owner_slug, dataset_slug, dataset_new_version_request, **kwargs)  # noqa: E501
            return data

    def datasets_create_version_with_http_info(self, owner_slug, dataset_slug, dataset_new_version_request, **kwargs):  # noqa: E501
        """Create a new dataset version  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.datasets_create_version_with_http_info(owner_slug, dataset_slug, dataset_new_version_request, async=True)
        >>> result = thread.get()

        :param async bool
        :param str owner_slug: Dataset owner (required)
        :param str dataset_slug: Dataset name (required)
        :param DatasetNewVersionRequest dataset_new_version_request: Information for creating a new dataset version (required)
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['owner_slug', 'dataset_slug', 'dataset_new_version_request']  # 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 datasets_create_version" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'owner_slug' is set
        if ('owner_slug' not in params or
                params['owner_slug'] is None):
            raise ValueError("Missing the required parameter `owner_slug` when calling `datasets_create_version`")  # noqa: E501
        # verify the required parameter 'dataset_slug' is set
        if ('dataset_slug' not in params or
                params['dataset_slug'] is None):
            raise ValueError("Missing the required parameter `dataset_slug` when calling `datasets_create_version`")  # noqa: E501
        # verify the required parameter 'dataset_new_version_request' is set
        if ('dataset_new_version_request' not in params or
                params['dataset_new_version_request'] is None):
            raise ValueError("Missing the required parameter `dataset_new_version_request` when calling `datasets_create_version`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'owner_slug' in params:
            path_params['ownerSlug'] = params['owner_slug']  # noqa: E501
        if 'dataset_slug' in params:
            path_params['datasetSlug'] = params['dataset_slug']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'dataset_new_version_request' in params:
            body_params = params['dataset_new_version_request']
        # 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 = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/datasets/create/version/{ownerSlug}/{datasetSlug}', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Result',  # 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)

    def datasets_download_file(self, owner_slug, dataset_slug, file_name, **kwargs):  # noqa: E501
        """Download dataset file  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.datasets_download_file(owner_slug, dataset_slug, file_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param str owner_slug: Dataset owner (required)
        :param str dataset_slug: Dataset name (required)
        :param str file_name: File name (required)
        :param str dataset_version_number: Dataset version number
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.datasets_download_file_with_http_info(owner_slug, dataset_slug, file_name, **kwargs)  # noqa: E501
        else:
            (data) = self.datasets_download_file_with_http_info(owner_slug, dataset_slug, file_name, **kwargs)  # noqa: E501
            return data

    def datasets_download_file_with_http_info(self, owner_slug, dataset_slug, file_name, **kwargs):  # noqa: E501
        """Download dataset file  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.datasets_download_file_with_http_info(owner_slug, dataset_slug, file_name, async=True)
        >>> result = thread.get()

        :param async bool
        :param str owner_slug: Dataset owner (required)
        :param str dataset_slug: Dataset name (required)
        :param str file_name: File name (required)
        :param str dataset_version_number: Dataset version number
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['owner_slug', 'dataset_slug', 'file_name', 'dataset_version_number']  # 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 datasets_download_file" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'owner_slug' is set
        if ('owner_slug' not in params or
                params['owner_slug'] is None):
            raise ValueError("Missing the required parameter `owner_slug` when calling `datasets_download_file`")  # noqa: E501
        # verify the required parameter 'dataset_slug' is set
        if ('dataset_slug' not in params or
                params['dataset_slug'] is None):
            raise ValueError("Missing the required parameter `dataset_slug` when calling `datasets_download_file`")  # noqa: E501
        # verify the required parameter 'file_name' is set
        if ('file_name' not in params or
                params['file_name'] is None):
            raise ValueError("Missing the required parameter `file_name` when calling `datasets_download_file`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'owner_slug' in params:
            path_params['ownerSlug'] = params['owner_slug']  # noqa: E501
        if 'dataset_slug' in params:
            path_params['datasetSlug'] = params['dataset_slug']  # noqa: E501
        if 'file_name' in params:
            path_params['fileName'] = params['file_name']  # noqa: E501

        query_params = []
        if 'dataset_version_number' in params:
            query_params.append(('datasetVersionNumber', params['dataset_version_number']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['file'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/datasets/download/{ownerSlug}/{datasetSlug}/{fileName}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Result',  # 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)

    def datasets_list(self, **kwargs):  # noqa: E501
        """List datasets  # noqa: E501

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

        :param async bool
        :param int page: Page number
        :param str search: Search terms
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.datasets_list_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.datasets_list_with_http_info(**kwargs)  # noqa: E501
            return data

    def datasets_list_with_http_info(self, **kwargs):  # noqa: E501
        """List datasets  # noqa: E501

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

        :param async bool
        :param int page: Page number
        :param str search: Search terms
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['page', 'search']  # 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 datasets_list" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'page' in params:
            query_params.append(('page', params['page']))  # noqa: E501
        if 'search' in params:
            query_params.append(('search', params['search']))  # 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 = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/datasets/list', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Result',  # 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)

    def datasets_list_files(self, owner_slug, dataset_slug, **kwargs):  # noqa: E501
        """List dataset files  # noqa: E501

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

        :param async bool
        :param str owner_slug: Dataset owner (required)
        :param str dataset_slug: Dataset name (required)
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.datasets_list_files_with_http_info(owner_slug, dataset_slug, **kwargs)  # noqa: E501
        else:
            (data) = self.datasets_list_files_with_http_info(owner_slug, dataset_slug, **kwargs)  # noqa: E501
            return data

    def datasets_list_files_with_http_info(self, owner_slug, dataset_slug, **kwargs):  # noqa: E501
        """List dataset files  # noqa: E501

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

        :param async bool
        :param str owner_slug: Dataset owner (required)
        :param str dataset_slug: Dataset name (required)
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['owner_slug', 'dataset_slug']  # 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 datasets_list_files" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'owner_slug' is set
        if ('owner_slug' not in params or
                params['owner_slug'] is None):
            raise ValueError("Missing the required parameter `owner_slug` when calling `datasets_list_files`")  # noqa: E501
        # verify the required parameter 'dataset_slug' is set
        if ('dataset_slug' not in params or
                params['dataset_slug'] is None):
            raise ValueError("Missing the required parameter `dataset_slug` when calling `datasets_list_files`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'owner_slug' in params:
            path_params['ownerSlug'] = params['owner_slug']  # noqa: E501
        if 'dataset_slug' in params:
            path_params['datasetSlug'] = params['dataset_slug']  # noqa: E501

        query_params = []

        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 = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/datasets/list/{ownerSlug}/{datasetSlug}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Result',  # 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)

    def datasets_upload_file(self, file_name, content_length, last_modified_date_utc, **kwargs):  # noqa: E501
        """Get URL and token to start uploading a data file  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.datasets_upload_file(file_name, content_length, last_modified_date_utc, async=True)
        >>> result = thread.get()

        :param async bool
        :param str file_name: Dataset file name (required)
        :param int content_length: Content length of file in bytes (required)
        :param int last_modified_date_utc: Last modified date of file in milliseconds since epoch in UTC (required)
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.datasets_upload_file_with_http_info(file_name, content_length, last_modified_date_utc, **kwargs)  # noqa: E501
        else:
            (data) = self.datasets_upload_file_with_http_info(file_name, content_length, last_modified_date_utc, **kwargs)  # noqa: E501
            return data

    def datasets_upload_file_with_http_info(self, file_name, content_length, last_modified_date_utc, **kwargs):  # noqa: E501
        """Get URL and token to start uploading a data file  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.datasets_upload_file_with_http_info(file_name, content_length, last_modified_date_utc, async=True)
        >>> result = thread.get()

        :param async bool
        :param str file_name: Dataset file name (required)
        :param int content_length: Content length of file in bytes (required)
        :param int last_modified_date_utc: Last modified date of file in milliseconds since epoch in UTC (required)
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['file_name', 'content_length', 'last_modified_date_utc']  # 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 datasets_upload_file" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'file_name' is set
        if ('file_name' not in params or
                params['file_name'] is None):
            raise ValueError("Missing the required parameter `file_name` when calling `datasets_upload_file`")  # noqa: E501
        # verify the required parameter 'content_length' is set
        if ('content_length' not in params or
                params['content_length'] is None):
            raise ValueError("Missing the required parameter `content_length` when calling `datasets_upload_file`")  # noqa: E501
        # verify the required parameter 'last_modified_date_utc' is set
        if ('last_modified_date_utc' not in params or
                params['last_modified_date_utc'] is None):
            raise ValueError("Missing the required parameter `last_modified_date_utc` when calling `datasets_upload_file`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'content_length' in params:
            path_params['contentLength'] = params['content_length']  # noqa: E501
        if 'last_modified_date_utc' in params:
            path_params['lastModifiedDateUtc'] = params['last_modified_date_utc']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'file_name' in params:
            form_params.append(('fileName', params['file_name']))  # noqa: E501

        body_params = None
        # 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
            ['multipart/form-data'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/datasets/upload/file/{contentLength}/{lastModifiedDateUtc}', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Result',  # 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)

    def datasets_view(self, owner_slug, dataset_slug, **kwargs):  # noqa: E501
        """Show details about a dataset  # noqa: E501

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

        :param async bool
        :param str owner_slug: Dataset owner (required)
        :param str dataset_slug: Dataset name (required)
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.datasets_view_with_http_info(owner_slug, dataset_slug, **kwargs)  # noqa: E501
        else:
            (data) = self.datasets_view_with_http_info(owner_slug, dataset_slug, **kwargs)  # noqa: E501
            return data

    def datasets_view_with_http_info(self, owner_slug, dataset_slug, **kwargs):  # noqa: E501
        """Show details about a dataset  # noqa: E501

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

        :param async bool
        :param str owner_slug: Dataset owner (required)
        :param str dataset_slug: Dataset name (required)
        :return: Result
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['owner_slug', 'dataset_slug']  # 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 datasets_view" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'owner_slug' is set
        if ('owner_slug' not in params or
                params['owner_slug'] is None):
            raise ValueError("Missing the required parameter `owner_slug` when calling `datasets_view`")  # noqa: E501
        # verify the required parameter 'dataset_slug' is set
        if ('dataset_slug' not in params or
                params['dataset_slug'] is None):
            raise ValueError("Missing the required parameter `dataset_slug` when calling `datasets_view`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'owner_slug' in params:
            path_params['ownerSlug'] = params['owner_slug']  # noqa: E501
        if 'dataset_slug' in params:
            path_params['datasetSlug'] = params['dataset_slug']  # noqa: E501

        query_params = []

        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 = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/datasets/view/{ownerSlug}/{datasetSlug}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Result',  # 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)
