# coding: utf-8

"""
    Sparks OpenAPI

    Generated documentation for the Logicdrop Sparks API and OpenAPI clients.  Logicdrop Sparks lets users build rules, analyze data, and automate documents.  Use it to make decisions faster, generate documents better, and learn from your data.  ### Documentation - [User Documentation](https://docs.logicdrop.com)  ### Modules - [Sparks Compute](https://docs.logicdrop.com/rules/introduction) - [Sparks Decision Tables](https://docs.logicdrop.com/rules/authoring-decision-tables) - [Sparks Documents](https://docs.logicdrop.com/documents/introduction)  ### Clients - [OpenAPI Clients](https://docs.logicdrop.com/development/sample-clients)  ### Security - [Authorizing API Requests](https://docs.logicdrop.com/development/authorization)   # noqa: E501

    The version of the OpenAPI document: v_VERSION_._BUILD_
    Contact: support@logicdrop.com
    Generated by: https://openapi-generator.tech
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from logicdrop.sparks.openapi.api_client import ApiClient
from logicdrop.sparks.openapi.exceptions import (
    ApiTypeError,
    ApiValueError
)


class DataServicesApi(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

    def delete_dataset(self, client, project, artifact, **kwargs):  # noqa: E501
        """Delete dataset  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_dataset(client, project, artifact, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param str v: Dataset version
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: ArtifactResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.delete_dataset_with_http_info(client, project, artifact, **kwargs)  # noqa: E501

    def delete_dataset_with_http_info(self, client, project, artifact, **kwargs):  # noqa: E501
        """Delete dataset  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_dataset_with_http_info(client, project, artifact, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param str v: Dataset version
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(ArtifactResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client', 'project', 'artifact', 'v']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_dataset" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'client' is set
        if self.api_client.client_side_validation and ('client' not in local_var_params or  # noqa: E501
                                                        local_var_params['client'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `client` when calling `delete_dataset`")  # noqa: E501
        # verify the required parameter 'project' is set
        if self.api_client.client_side_validation and ('project' not in local_var_params or  # noqa: E501
                                                        local_var_params['project'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `project` when calling `delete_dataset`")  # noqa: E501
        # verify the required parameter 'artifact' is set
        if self.api_client.client_side_validation and ('artifact' not in local_var_params or  # noqa: E501
                                                        local_var_params['artifact'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `artifact` when calling `delete_dataset`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'client' in local_var_params:
            path_params['client'] = local_var_params['client']  # noqa: E501
        if 'project' in local_var_params:
            path_params['project'] = local_var_params['project']  # noqa: E501
        if 'artifact' in local_var_params:
            path_params['artifact'] = local_var_params['artifact']  # noqa: E501

        query_params = []
        if 'v' in local_var_params and local_var_params['v'] is not None:  # noqa: E501
            query_params.append(('v', local_var_params['v']))  # 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 = ['api', 'jwt', 'oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/data/{client}/{project}/{artifact}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ArtifactResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def delete_datasets(self, client, project, delete_artifact_request, **kwargs):  # noqa: E501
        """Delete datasets  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_datasets(client, project, delete_artifact_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param DeleteArtifactRequest delete_artifact_request: Remove datasets by criteria (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: ArtifactResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.delete_datasets_with_http_info(client, project, delete_artifact_request, **kwargs)  # noqa: E501

    def delete_datasets_with_http_info(self, client, project, delete_artifact_request, **kwargs):  # noqa: E501
        """Delete datasets  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_datasets_with_http_info(client, project, delete_artifact_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param DeleteArtifactRequest delete_artifact_request: Remove datasets by criteria (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(ArtifactResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client', 'project', 'delete_artifact_request']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_datasets" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'client' is set
        if self.api_client.client_side_validation and ('client' not in local_var_params or  # noqa: E501
                                                        local_var_params['client'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `client` when calling `delete_datasets`")  # noqa: E501
        # verify the required parameter 'project' is set
        if self.api_client.client_side_validation and ('project' not in local_var_params or  # noqa: E501
                                                        local_var_params['project'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `project` when calling `delete_datasets`")  # noqa: E501
        # verify the required parameter 'delete_artifact_request' is set
        if self.api_client.client_side_validation and ('delete_artifact_request' not in local_var_params or  # noqa: E501
                                                        local_var_params['delete_artifact_request'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `delete_artifact_request` when calling `delete_datasets`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'client' in local_var_params:
            path_params['client'] = local_var_params['client']  # noqa: E501
        if 'project' in local_var_params:
            path_params['project'] = local_var_params['project']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'delete_artifact_request' in local_var_params:
            body_params = local_var_params['delete_artifact_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 = ['api', 'jwt', 'oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/data/{client}/{project}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ArtifactResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def delete_record(self, client, project, artifact, id, **kwargs):  # noqa: E501
        """Delete record  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_record(client, project, artifact, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param str id: Record Id (required)
        :param str v: Dataset version
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DataResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.delete_record_with_http_info(client, project, artifact, id, **kwargs)  # noqa: E501

    def delete_record_with_http_info(self, client, project, artifact, id, **kwargs):  # noqa: E501
        """Delete record  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_record_with_http_info(client, project, artifact, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param str id: Record Id (required)
        :param str v: Dataset version
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DataResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client', 'project', 'artifact', 'id', 'v']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_record" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'client' is set
        if self.api_client.client_side_validation and ('client' not in local_var_params or  # noqa: E501
                                                        local_var_params['client'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `client` when calling `delete_record`")  # noqa: E501
        # verify the required parameter 'project' is set
        if self.api_client.client_side_validation and ('project' not in local_var_params or  # noqa: E501
                                                        local_var_params['project'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `project` when calling `delete_record`")  # noqa: E501
        # verify the required parameter 'artifact' is set
        if self.api_client.client_side_validation and ('artifact' not in local_var_params or  # noqa: E501
                                                        local_var_params['artifact'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `artifact` when calling `delete_record`")  # noqa: E501
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in local_var_params or  # noqa: E501
                                                        local_var_params['id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `id` when calling `delete_record`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'client' in local_var_params:
            path_params['client'] = local_var_params['client']  # noqa: E501
        if 'project' in local_var_params:
            path_params['project'] = local_var_params['project']  # noqa: E501
        if 'artifact' in local_var_params:
            path_params['artifact'] = local_var_params['artifact']  # noqa: E501
        if 'id' in local_var_params:
            path_params['id'] = local_var_params['id']  # noqa: E501

        query_params = []
        if 'v' in local_var_params and local_var_params['v'] is not None:  # noqa: E501
            query_params.append(('v', local_var_params['v']))  # 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 = ['api', 'jwt', 'oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/data/{client}/{project}/{artifact}/rows/{id}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DataResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def delete_records(self, client, project, artifact, delete_data_request, **kwargs):  # noqa: E501
        """Delete records  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_records(client, project, artifact, delete_data_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param DeleteDataRequest delete_data_request: Remove records by criteria (required)
        :param str v: Dataset version
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DataResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.delete_records_with_http_info(client, project, artifact, delete_data_request, **kwargs)  # noqa: E501

    def delete_records_with_http_info(self, client, project, artifact, delete_data_request, **kwargs):  # noqa: E501
        """Delete records  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_records_with_http_info(client, project, artifact, delete_data_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param DeleteDataRequest delete_data_request: Remove records by criteria (required)
        :param str v: Dataset version
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DataResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client', 'project', 'artifact', 'delete_data_request', 'v']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_records" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'client' is set
        if self.api_client.client_side_validation and ('client' not in local_var_params or  # noqa: E501
                                                        local_var_params['client'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `client` when calling `delete_records`")  # noqa: E501
        # verify the required parameter 'project' is set
        if self.api_client.client_side_validation and ('project' not in local_var_params or  # noqa: E501
                                                        local_var_params['project'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `project` when calling `delete_records`")  # noqa: E501
        # verify the required parameter 'artifact' is set
        if self.api_client.client_side_validation and ('artifact' not in local_var_params or  # noqa: E501
                                                        local_var_params['artifact'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `artifact` when calling `delete_records`")  # noqa: E501
        # verify the required parameter 'delete_data_request' is set
        if self.api_client.client_side_validation and ('delete_data_request' not in local_var_params or  # noqa: E501
                                                        local_var_params['delete_data_request'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `delete_data_request` when calling `delete_records`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'client' in local_var_params:
            path_params['client'] = local_var_params['client']  # noqa: E501
        if 'project' in local_var_params:
            path_params['project'] = local_var_params['project']  # noqa: E501
        if 'artifact' in local_var_params:
            path_params['artifact'] = local_var_params['artifact']  # noqa: E501

        query_params = []
        if 'v' in local_var_params and local_var_params['v'] is not None:  # noqa: E501
            query_params.append(('v', local_var_params['v']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'delete_data_request' in local_var_params:
            body_params = local_var_params['delete_data_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 = ['api', 'jwt', 'oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/data/{client}/{project}/{artifact}/rows', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DataResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_dataset(self, client, project, artifact, **kwargs):  # noqa: E501
        """Get dataset  # noqa: E501

        Get a dataset  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_dataset(client, project, artifact, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param str v: Dataset version
        :param list[str] view: Fields to return in the results
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Dataset
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_dataset_with_http_info(client, project, artifact, **kwargs)  # noqa: E501

    def get_dataset_with_http_info(self, client, project, artifact, **kwargs):  # noqa: E501
        """Get dataset  # noqa: E501

        Get a dataset  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_dataset_with_http_info(client, project, artifact, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param str v: Dataset version
        :param list[str] view: Fields to return in the results
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(Dataset, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client', 'project', 'artifact', 'v', 'view']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_dataset" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'client' is set
        if self.api_client.client_side_validation and ('client' not in local_var_params or  # noqa: E501
                                                        local_var_params['client'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `client` when calling `get_dataset`")  # noqa: E501
        # verify the required parameter 'project' is set
        if self.api_client.client_side_validation and ('project' not in local_var_params or  # noqa: E501
                                                        local_var_params['project'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `project` when calling `get_dataset`")  # noqa: E501
        # verify the required parameter 'artifact' is set
        if self.api_client.client_side_validation and ('artifact' not in local_var_params or  # noqa: E501
                                                        local_var_params['artifact'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `artifact` when calling `get_dataset`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'client' in local_var_params:
            path_params['client'] = local_var_params['client']  # noqa: E501
        if 'project' in local_var_params:
            path_params['project'] = local_var_params['project']  # noqa: E501
        if 'artifact' in local_var_params:
            path_params['artifact'] = local_var_params['artifact']  # noqa: E501

        query_params = []
        if 'v' in local_var_params and local_var_params['v'] is not None:  # noqa: E501
            query_params.append(('v', local_var_params['v']))  # noqa: E501
        if 'view' in local_var_params and local_var_params['view'] is not None:  # noqa: E501
            query_params.append(('view', local_var_params['view']))  # noqa: E501
            collection_formats['view'] = 'csv'  # 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 = ['api', 'jwt', 'oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/data/{client}/{project}/{artifact}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Dataset',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_dataset_content(self, client, project, artifact, **kwargs):  # noqa: E501
        """Get content  # noqa: E501

        Get dataset content using optional simple filters  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_dataset_content(client, project, artifact, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param str v: Dataset version
        :param list[str] view: Fields to return in the results
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_dataset_content_with_http_info(client, project, artifact, **kwargs)  # noqa: E501

    def get_dataset_content_with_http_info(self, client, project, artifact, **kwargs):  # noqa: E501
        """Get content  # noqa: E501

        Get dataset content using optional simple filters  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_dataset_content_with_http_info(client, project, artifact, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param str v: Dataset version
        :param list[str] view: Fields to return in the results
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(object, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client', 'project', 'artifact', 'v', 'view']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_dataset_content" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'client' is set
        if self.api_client.client_side_validation and ('client' not in local_var_params or  # noqa: E501
                                                        local_var_params['client'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `client` when calling `get_dataset_content`")  # noqa: E501
        # verify the required parameter 'project' is set
        if self.api_client.client_side_validation and ('project' not in local_var_params or  # noqa: E501
                                                        local_var_params['project'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `project` when calling `get_dataset_content`")  # noqa: E501
        # verify the required parameter 'artifact' is set
        if self.api_client.client_side_validation and ('artifact' not in local_var_params or  # noqa: E501
                                                        local_var_params['artifact'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `artifact` when calling `get_dataset_content`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'client' in local_var_params:
            path_params['client'] = local_var_params['client']  # noqa: E501
        if 'project' in local_var_params:
            path_params['project'] = local_var_params['project']  # noqa: E501
        if 'artifact' in local_var_params:
            path_params['artifact'] = local_var_params['artifact']  # noqa: E501

        query_params = []
        if 'v' in local_var_params and local_var_params['v'] is not None:  # noqa: E501
            query_params.append(('v', local_var_params['v']))  # noqa: E501
        if 'view' in local_var_params and local_var_params['view'] is not None:  # noqa: E501
            query_params.append(('view', local_var_params['view']))  # noqa: E501
            collection_formats['view'] = 'csv'  # 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 = ['api', 'jwt', 'oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/data/{client}/{project}/{artifact}/content', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='object',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_record(self, client, project, artifact, id, **kwargs):  # noqa: E501
        """Get record  # noqa: E501

        Get a record  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_record(client, project, artifact, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param str id: Record Id (required)
        :param str v: Dataset version
        :param list[str] view: Fields to return in the results
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: UserData
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_record_with_http_info(client, project, artifact, id, **kwargs)  # noqa: E501

    def get_record_with_http_info(self, client, project, artifact, id, **kwargs):  # noqa: E501
        """Get record  # noqa: E501

        Get a record  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_record_with_http_info(client, project, artifact, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param str id: Record Id (required)
        :param str v: Dataset version
        :param list[str] view: Fields to return in the results
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(UserData, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client', 'project', 'artifact', 'id', 'v', 'view']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_record" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'client' is set
        if self.api_client.client_side_validation and ('client' not in local_var_params or  # noqa: E501
                                                        local_var_params['client'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `client` when calling `get_record`")  # noqa: E501
        # verify the required parameter 'project' is set
        if self.api_client.client_side_validation and ('project' not in local_var_params or  # noqa: E501
                                                        local_var_params['project'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `project` when calling `get_record`")  # noqa: E501
        # verify the required parameter 'artifact' is set
        if self.api_client.client_side_validation and ('artifact' not in local_var_params or  # noqa: E501
                                                        local_var_params['artifact'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `artifact` when calling `get_record`")  # noqa: E501
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in local_var_params or  # noqa: E501
                                                        local_var_params['id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `id` when calling `get_record`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'client' in local_var_params:
            path_params['client'] = local_var_params['client']  # noqa: E501
        if 'project' in local_var_params:
            path_params['project'] = local_var_params['project']  # noqa: E501
        if 'artifact' in local_var_params:
            path_params['artifact'] = local_var_params['artifact']  # noqa: E501
        if 'id' in local_var_params:
            path_params['id'] = local_var_params['id']  # noqa: E501

        query_params = []
        if 'v' in local_var_params and local_var_params['v'] is not None:  # noqa: E501
            query_params.append(('v', local_var_params['v']))  # noqa: E501
        if 'view' in local_var_params and local_var_params['view'] is not None:  # noqa: E501
            query_params.append(('view', local_var_params['view']))  # noqa: E501
            collection_formats['view'] = 'csv'  # 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 = ['api', 'jwt', 'oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/data/{client}/{project}/{artifact}/rows/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='UserData',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def list_datasets(self, client, project, **kwargs):  # noqa: E501
        """List datasets  # noqa: E501

        Get datasets using optional simple filters  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_datasets(client, project, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param list[str] view: Fields to return in the results
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: list[Dataset]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.list_datasets_with_http_info(client, project, **kwargs)  # noqa: E501

    def list_datasets_with_http_info(self, client, project, **kwargs):  # noqa: E501
        """List datasets  # noqa: E501

        Get datasets using optional simple filters  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_datasets_with_http_info(client, project, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param list[str] view: Fields to return in the results
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(list[Dataset], status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client', 'project', 'view']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method list_datasets" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'client' is set
        if self.api_client.client_side_validation and ('client' not in local_var_params or  # noqa: E501
                                                        local_var_params['client'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `client` when calling `list_datasets`")  # noqa: E501
        # verify the required parameter 'project' is set
        if self.api_client.client_side_validation and ('project' not in local_var_params or  # noqa: E501
                                                        local_var_params['project'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `project` when calling `list_datasets`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'client' in local_var_params:
            path_params['client'] = local_var_params['client']  # noqa: E501
        if 'project' in local_var_params:
            path_params['project'] = local_var_params['project']  # noqa: E501

        query_params = []
        if 'view' in local_var_params and local_var_params['view'] is not None:  # noqa: E501
            query_params.append(('view', local_var_params['view']))  # noqa: E501
            collection_formats['view'] = 'csv'  # 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 = ['api', 'jwt', 'oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/data/{client}/{project}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[Dataset]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def list_records(self, client, project, artifact, **kwargs):  # noqa: E501
        """List records  # noqa: E501

        Get records using optional simple filters  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_records(client, project, artifact, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param str v: Dataset version
        :param str criteria: SQL-like query
        :param list[str] fields: Any fields that match the single value only (requires a value)
        :param str value: Value to find in any fields (requires fields)
        :param list[str] view: Fields to return in the results
        :param list[str] filter: Filters to apply
        :param list[str] order: Fields to order by (field:asc|desc)
        :param list[str] tags: Tags to filter by
        :param bool ignore_case: Ignore case
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: list[UserData]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.list_records_with_http_info(client, project, artifact, **kwargs)  # noqa: E501

    def list_records_with_http_info(self, client, project, artifact, **kwargs):  # noqa: E501
        """List records  # noqa: E501

        Get records using optional simple filters  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_records_with_http_info(client, project, artifact, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param str v: Dataset version
        :param str criteria: SQL-like query
        :param list[str] fields: Any fields that match the single value only (requires a value)
        :param str value: Value to find in any fields (requires fields)
        :param list[str] view: Fields to return in the results
        :param list[str] filter: Filters to apply
        :param list[str] order: Fields to order by (field:asc|desc)
        :param list[str] tags: Tags to filter by
        :param bool ignore_case: Ignore case
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(list[UserData], status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client', 'project', 'artifact', 'v', 'criteria', 'fields', 'value', 'view', 'filter', 'order', 'tags', 'ignore_case']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method list_records" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'client' is set
        if self.api_client.client_side_validation and ('client' not in local_var_params or  # noqa: E501
                                                        local_var_params['client'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `client` when calling `list_records`")  # noqa: E501
        # verify the required parameter 'project' is set
        if self.api_client.client_side_validation and ('project' not in local_var_params or  # noqa: E501
                                                        local_var_params['project'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `project` when calling `list_records`")  # noqa: E501
        # verify the required parameter 'artifact' is set
        if self.api_client.client_side_validation and ('artifact' not in local_var_params or  # noqa: E501
                                                        local_var_params['artifact'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `artifact` when calling `list_records`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'client' in local_var_params:
            path_params['client'] = local_var_params['client']  # noqa: E501
        if 'project' in local_var_params:
            path_params['project'] = local_var_params['project']  # noqa: E501
        if 'artifact' in local_var_params:
            path_params['artifact'] = local_var_params['artifact']  # noqa: E501

        query_params = []
        if 'v' in local_var_params and local_var_params['v'] is not None:  # noqa: E501
            query_params.append(('v', local_var_params['v']))  # noqa: E501
        if 'criteria' in local_var_params and local_var_params['criteria'] is not None:  # noqa: E501
            query_params.append(('criteria', local_var_params['criteria']))  # noqa: E501
        if 'fields' in local_var_params and local_var_params['fields'] is not None:  # noqa: E501
            query_params.append(('fields', local_var_params['fields']))  # noqa: E501
            collection_formats['fields'] = 'csv'  # noqa: E501
        if 'value' in local_var_params and local_var_params['value'] is not None:  # noqa: E501
            query_params.append(('value', local_var_params['value']))  # noqa: E501
        if 'view' in local_var_params and local_var_params['view'] is not None:  # noqa: E501
            query_params.append(('view', local_var_params['view']))  # noqa: E501
            collection_formats['view'] = 'csv'  # noqa: E501
        if 'filter' in local_var_params and local_var_params['filter'] is not None:  # noqa: E501
            query_params.append(('filter', local_var_params['filter']))  # noqa: E501
            collection_formats['filter'] = 'csv'  # noqa: E501
        if 'order' in local_var_params and local_var_params['order'] is not None:  # noqa: E501
            query_params.append(('order', local_var_params['order']))  # noqa: E501
            collection_formats['order'] = 'csv'  # noqa: E501
        if 'tags' in local_var_params and local_var_params['tags'] is not None:  # noqa: E501
            query_params.append(('tags', local_var_params['tags']))  # noqa: E501
            collection_formats['tags'] = 'csv'  # noqa: E501
        if 'ignore_case' in local_var_params and local_var_params['ignore_case'] is not None:  # noqa: E501
            query_params.append(('ignoreCase', local_var_params['ignore_case']))  # 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 = ['api', 'jwt', 'oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/data/{client}/{project}/{artifact}/rows', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[UserData]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def list_records_by_key(self, client, project, artifact, key, value, **kwargs):  # noqa: E501
        """List records by key  # noqa: E501

        Get records using a single key/value  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_records_by_key(client, project, artifact, key, value, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param str key: Field name (required)
        :param str value: Field value (required)
        :param str v: Dataset version
        :param list[str] view: Fields to return in the results
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: list[UserData]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.list_records_by_key_with_http_info(client, project, artifact, key, value, **kwargs)  # noqa: E501

    def list_records_by_key_with_http_info(self, client, project, artifact, key, value, **kwargs):  # noqa: E501
        """List records by key  # noqa: E501

        Get records using a single key/value  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_records_by_key_with_http_info(client, project, artifact, key, value, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param str key: Field name (required)
        :param str value: Field value (required)
        :param str v: Dataset version
        :param list[str] view: Fields to return in the results
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(list[UserData], status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client', 'project', 'artifact', 'key', 'value', 'v', 'view']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method list_records_by_key" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'client' is set
        if self.api_client.client_side_validation and ('client' not in local_var_params or  # noqa: E501
                                                        local_var_params['client'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `client` when calling `list_records_by_key`")  # noqa: E501
        # verify the required parameter 'project' is set
        if self.api_client.client_side_validation and ('project' not in local_var_params or  # noqa: E501
                                                        local_var_params['project'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `project` when calling `list_records_by_key`")  # noqa: E501
        # verify the required parameter 'artifact' is set
        if self.api_client.client_side_validation and ('artifact' not in local_var_params or  # noqa: E501
                                                        local_var_params['artifact'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `artifact` when calling `list_records_by_key`")  # noqa: E501
        # verify the required parameter 'key' is set
        if self.api_client.client_side_validation and ('key' not in local_var_params or  # noqa: E501
                                                        local_var_params['key'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `key` when calling `list_records_by_key`")  # noqa: E501
        # verify the required parameter 'value' is set
        if self.api_client.client_side_validation and ('value' not in local_var_params or  # noqa: E501
                                                        local_var_params['value'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `value` when calling `list_records_by_key`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'client' in local_var_params:
            path_params['client'] = local_var_params['client']  # noqa: E501
        if 'project' in local_var_params:
            path_params['project'] = local_var_params['project']  # noqa: E501
        if 'artifact' in local_var_params:
            path_params['artifact'] = local_var_params['artifact']  # noqa: E501
        if 'key' in local_var_params:
            path_params['key'] = local_var_params['key']  # noqa: E501
        if 'value' in local_var_params:
            path_params['value'] = local_var_params['value']  # noqa: E501

        query_params = []
        if 'v' in local_var_params and local_var_params['v'] is not None:  # noqa: E501
            query_params.append(('v', local_var_params['v']))  # noqa: E501
        if 'view' in local_var_params and local_var_params['view'] is not None:  # noqa: E501
            query_params.append(('view', local_var_params['view']))  # noqa: E501
            collection_formats['view'] = 'csv'  # 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 = ['api', 'jwt', 'oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/data/{client}/{project}/{artifact}/rows/{key}/{value}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[UserData]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def list_sources(self, client, **kwargs):  # noqa: E501
        """List external sources  # noqa: E501

        Get available external sources or check if a source exists  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_sources(client, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str check: Check if source name exists?
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: list[ExternalSource]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.list_sources_with_http_info(client, **kwargs)  # noqa: E501

    def list_sources_with_http_info(self, client, **kwargs):  # noqa: E501
        """List external sources  # noqa: E501

        Get available external sources or check if a source exists  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_sources_with_http_info(client, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str check: Check if source name exists?
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(list[ExternalSource], status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client', 'check']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method list_sources" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'client' is set
        if self.api_client.client_side_validation and ('client' not in local_var_params or  # noqa: E501
                                                        local_var_params['client'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `client` when calling `list_sources`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'client' in local_var_params:
            path_params['client'] = local_var_params['client']  # noqa: E501

        query_params = []
        if 'check' in local_var_params and local_var_params['check'] is not None:  # noqa: E501
            query_params.append(('check', local_var_params['check']))  # 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 = ['api', 'jwt', 'oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/data/{client}/sources', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[ExternalSource]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def save_dataset(self, client, project, dataset, **kwargs):  # noqa: E501
        """Save dataset  # noqa: E501

        Saves or creates an dataset (overwrite)  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.save_dataset(client, project, dataset, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param Dataset dataset: Dataset to persist (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Dataset
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.save_dataset_with_http_info(client, project, dataset, **kwargs)  # noqa: E501

    def save_dataset_with_http_info(self, client, project, dataset, **kwargs):  # noqa: E501
        """Save dataset  # noqa: E501

        Saves or creates an dataset (overwrite)  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.save_dataset_with_http_info(client, project, dataset, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param Dataset dataset: Dataset to persist (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(Dataset, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client', 'project', 'dataset']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method save_dataset" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'client' is set
        if self.api_client.client_side_validation and ('client' not in local_var_params or  # noqa: E501
                                                        local_var_params['client'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `client` when calling `save_dataset`")  # noqa: E501
        # verify the required parameter 'project' is set
        if self.api_client.client_side_validation and ('project' not in local_var_params or  # noqa: E501
                                                        local_var_params['project'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `project` when calling `save_dataset`")  # noqa: E501
        # verify the required parameter 'dataset' is set
        if self.api_client.client_side_validation and ('dataset' not in local_var_params or  # noqa: E501
                                                        local_var_params['dataset'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `dataset` when calling `save_dataset`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'client' in local_var_params:
            path_params['client'] = local_var_params['client']  # noqa: E501
        if 'project' in local_var_params:
            path_params['project'] = local_var_params['project']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'dataset' in local_var_params:
            body_params = local_var_params['dataset']
        # 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 = ['api', 'jwt', 'oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/data/{client}/{project}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Dataset',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def save_dataset_content(self, client, project, artifact, save_content_request, **kwargs):  # noqa: E501
        """Save content  # noqa: E501

        Save dataset content  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.save_dataset_content(client, project, artifact, save_content_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param SaveContentRequest save_content_request: Content to persist (required)
        :param str v: Dataset version
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.save_dataset_content_with_http_info(client, project, artifact, save_content_request, **kwargs)  # noqa: E501

    def save_dataset_content_with_http_info(self, client, project, artifact, save_content_request, **kwargs):  # noqa: E501
        """Save content  # noqa: E501

        Save dataset content  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.save_dataset_content_with_http_info(client, project, artifact, save_content_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param SaveContentRequest save_content_request: Content to persist (required)
        :param str v: Dataset version
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(object, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client', 'project', 'artifact', 'save_content_request', 'v']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method save_dataset_content" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'client' is set
        if self.api_client.client_side_validation and ('client' not in local_var_params or  # noqa: E501
                                                        local_var_params['client'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `client` when calling `save_dataset_content`")  # noqa: E501
        # verify the required parameter 'project' is set
        if self.api_client.client_side_validation and ('project' not in local_var_params or  # noqa: E501
                                                        local_var_params['project'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `project` when calling `save_dataset_content`")  # noqa: E501
        # verify the required parameter 'artifact' is set
        if self.api_client.client_side_validation and ('artifact' not in local_var_params or  # noqa: E501
                                                        local_var_params['artifact'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `artifact` when calling `save_dataset_content`")  # noqa: E501
        # verify the required parameter 'save_content_request' is set
        if self.api_client.client_side_validation and ('save_content_request' not in local_var_params or  # noqa: E501
                                                        local_var_params['save_content_request'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `save_content_request` when calling `save_dataset_content`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'client' in local_var_params:
            path_params['client'] = local_var_params['client']  # noqa: E501
        if 'project' in local_var_params:
            path_params['project'] = local_var_params['project']  # noqa: E501
        if 'artifact' in local_var_params:
            path_params['artifact'] = local_var_params['artifact']  # noqa: E501

        query_params = []
        if 'v' in local_var_params and local_var_params['v'] is not None:  # noqa: E501
            query_params.append(('v', local_var_params['v']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'save_content_request' in local_var_params:
            body_params = local_var_params['save_content_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 = ['api', 'jwt', 'oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/data/{client}/{project}/{artifact}/content', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='object',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def save_record(self, client, project, artifact, request_body, **kwargs):  # noqa: E501
        """Save record  # noqa: E501

        Saves or create a record (overwrite)  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.save_record(client, project, artifact, request_body, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param dict(str, object) request_body: Record to persist (required)
        :param str v: Dataset version
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: UserData
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.save_record_with_http_info(client, project, artifact, request_body, **kwargs)  # noqa: E501

    def save_record_with_http_info(self, client, project, artifact, request_body, **kwargs):  # noqa: E501
        """Save record  # noqa: E501

        Saves or create a record (overwrite)  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.save_record_with_http_info(client, project, artifact, request_body, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param dict(str, object) request_body: Record to persist (required)
        :param str v: Dataset version
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(UserData, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client', 'project', 'artifact', 'request_body', 'v']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method save_record" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'client' is set
        if self.api_client.client_side_validation and ('client' not in local_var_params or  # noqa: E501
                                                        local_var_params['client'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `client` when calling `save_record`")  # noqa: E501
        # verify the required parameter 'project' is set
        if self.api_client.client_side_validation and ('project' not in local_var_params or  # noqa: E501
                                                        local_var_params['project'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `project` when calling `save_record`")  # noqa: E501
        # verify the required parameter 'artifact' is set
        if self.api_client.client_side_validation and ('artifact' not in local_var_params or  # noqa: E501
                                                        local_var_params['artifact'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `artifact` when calling `save_record`")  # noqa: E501
        # verify the required parameter 'request_body' is set
        if self.api_client.client_side_validation and ('request_body' not in local_var_params or  # noqa: E501
                                                        local_var_params['request_body'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `request_body` when calling `save_record`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'client' in local_var_params:
            path_params['client'] = local_var_params['client']  # noqa: E501
        if 'project' in local_var_params:
            path_params['project'] = local_var_params['project']  # noqa: E501
        if 'artifact' in local_var_params:
            path_params['artifact'] = local_var_params['artifact']  # noqa: E501

        query_params = []
        if 'v' in local_var_params and local_var_params['v'] is not None:  # noqa: E501
            query_params.append(('v', local_var_params['v']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = ['api', 'jwt', 'oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/data/{client}/{project}/{artifact}/rows', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='UserData',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_dataset(self, client, project, update_artifact_request, **kwargs):  # noqa: E501
        """Update dataset  # noqa: E501

        Updates one dataset  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_dataset(client, project, update_artifact_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param UpdateArtifactRequest update_artifact_request: Dataset to update (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: ArtifactResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.update_dataset_with_http_info(client, project, update_artifact_request, **kwargs)  # noqa: E501

    def update_dataset_with_http_info(self, client, project, update_artifact_request, **kwargs):  # noqa: E501
        """Update dataset  # noqa: E501

        Updates one dataset  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_dataset_with_http_info(client, project, update_artifact_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param UpdateArtifactRequest update_artifact_request: Dataset to update (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(ArtifactResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client', 'project', 'update_artifact_request']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_dataset" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'client' is set
        if self.api_client.client_side_validation and ('client' not in local_var_params or  # noqa: E501
                                                        local_var_params['client'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `client` when calling `update_dataset`")  # noqa: E501
        # verify the required parameter 'project' is set
        if self.api_client.client_side_validation and ('project' not in local_var_params or  # noqa: E501
                                                        local_var_params['project'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `project` when calling `update_dataset`")  # noqa: E501
        # verify the required parameter 'update_artifact_request' is set
        if self.api_client.client_side_validation and ('update_artifact_request' not in local_var_params or  # noqa: E501
                                                        local_var_params['update_artifact_request'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `update_artifact_request` when calling `update_dataset`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'client' in local_var_params:
            path_params['client'] = local_var_params['client']  # noqa: E501
        if 'project' in local_var_params:
            path_params['project'] = local_var_params['project']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'update_artifact_request' in local_var_params:
            body_params = local_var_params['update_artifact_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 = ['api', 'jwt', 'oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/data/{client}/{project}', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ArtifactResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_dataset_content(self, client, project, artifact, update_data_request, **kwargs):  # noqa: E501
        """Update content  # noqa: E501

        Update dataset content  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_dataset_content(client, project, artifact, update_data_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param UpdateDataRequest update_data_request: Records to transform (required)
        :param str v: Dataset version
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.update_dataset_content_with_http_info(client, project, artifact, update_data_request, **kwargs)  # noqa: E501

    def update_dataset_content_with_http_info(self, client, project, artifact, update_data_request, **kwargs):  # noqa: E501
        """Update content  # noqa: E501

        Update dataset content  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_dataset_content_with_http_info(client, project, artifact, update_data_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param UpdateDataRequest update_data_request: Records to transform (required)
        :param str v: Dataset version
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(object, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client', 'project', 'artifact', 'update_data_request', 'v']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_dataset_content" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'client' is set
        if self.api_client.client_side_validation and ('client' not in local_var_params or  # noqa: E501
                                                        local_var_params['client'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `client` when calling `update_dataset_content`")  # noqa: E501
        # verify the required parameter 'project' is set
        if self.api_client.client_side_validation and ('project' not in local_var_params or  # noqa: E501
                                                        local_var_params['project'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `project` when calling `update_dataset_content`")  # noqa: E501
        # verify the required parameter 'artifact' is set
        if self.api_client.client_side_validation and ('artifact' not in local_var_params or  # noqa: E501
                                                        local_var_params['artifact'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `artifact` when calling `update_dataset_content`")  # noqa: E501
        # verify the required parameter 'update_data_request' is set
        if self.api_client.client_side_validation and ('update_data_request' not in local_var_params or  # noqa: E501
                                                        local_var_params['update_data_request'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `update_data_request` when calling `update_dataset_content`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'client' in local_var_params:
            path_params['client'] = local_var_params['client']  # noqa: E501
        if 'project' in local_var_params:
            path_params['project'] = local_var_params['project']  # noqa: E501
        if 'artifact' in local_var_params:
            path_params['artifact'] = local_var_params['artifact']  # noqa: E501

        query_params = []
        if 'v' in local_var_params and local_var_params['v'] is not None:  # noqa: E501
            query_params.append(('v', local_var_params['v']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'update_data_request' in local_var_params:
            body_params = local_var_params['update_data_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 = ['api', 'jwt', 'oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/data/{client}/{project}/{artifact}/content', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='object',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_dataset_content_at(self, client, project, artifact, index, update_data_request, **kwargs):  # noqa: E501
        """Update content item  # noqa: E501

        Update dataset content item  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_dataset_content_at(client, project, artifact, index, update_data_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param str index: Index or property to save at (required)
        :param UpdateDataRequest update_data_request: Content to persist at key (required)
        :param str v: Dataset version
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.update_dataset_content_at_with_http_info(client, project, artifact, index, update_data_request, **kwargs)  # noqa: E501

    def update_dataset_content_at_with_http_info(self, client, project, artifact, index, update_data_request, **kwargs):  # noqa: E501
        """Update content item  # noqa: E501

        Update dataset content item  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_dataset_content_at_with_http_info(client, project, artifact, index, update_data_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param str index: Index or property to save at (required)
        :param UpdateDataRequest update_data_request: Content to persist at key (required)
        :param str v: Dataset version
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(object, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client', 'project', 'artifact', 'index', 'update_data_request', 'v']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_dataset_content_at" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'client' is set
        if self.api_client.client_side_validation and ('client' not in local_var_params or  # noqa: E501
                                                        local_var_params['client'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `client` when calling `update_dataset_content_at`")  # noqa: E501
        # verify the required parameter 'project' is set
        if self.api_client.client_side_validation and ('project' not in local_var_params or  # noqa: E501
                                                        local_var_params['project'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `project` when calling `update_dataset_content_at`")  # noqa: E501
        # verify the required parameter 'artifact' is set
        if self.api_client.client_side_validation and ('artifact' not in local_var_params or  # noqa: E501
                                                        local_var_params['artifact'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `artifact` when calling `update_dataset_content_at`")  # noqa: E501
        # verify the required parameter 'index' is set
        if self.api_client.client_side_validation and ('index' not in local_var_params or  # noqa: E501
                                                        local_var_params['index'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `index` when calling `update_dataset_content_at`")  # noqa: E501
        # verify the required parameter 'update_data_request' is set
        if self.api_client.client_side_validation and ('update_data_request' not in local_var_params or  # noqa: E501
                                                        local_var_params['update_data_request'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `update_data_request` when calling `update_dataset_content_at`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'client' in local_var_params:
            path_params['client'] = local_var_params['client']  # noqa: E501
        if 'project' in local_var_params:
            path_params['project'] = local_var_params['project']  # noqa: E501
        if 'artifact' in local_var_params:
            path_params['artifact'] = local_var_params['artifact']  # noqa: E501
        if 'index' in local_var_params:
            path_params['index'] = local_var_params['index']  # noqa: E501

        query_params = []
        if 'v' in local_var_params and local_var_params['v'] is not None:  # noqa: E501
            query_params.append(('v', local_var_params['v']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'update_data_request' in local_var_params:
            body_params = local_var_params['update_data_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 = ['api', 'jwt', 'oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/data/{client}/{project}/{artifact}/content/{index}', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='object',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_datasets(self, client, project, update_artifact_request, **kwargs):  # noqa: E501
        """Update datasets  # noqa: E501

        Updates multiple datasets  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_datasets(client, project, update_artifact_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param UpdateArtifactRequest update_artifact_request: Datasets to update (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: ArtifactResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.update_datasets_with_http_info(client, project, update_artifact_request, **kwargs)  # noqa: E501

    def update_datasets_with_http_info(self, client, project, update_artifact_request, **kwargs):  # noqa: E501
        """Update datasets  # noqa: E501

        Updates multiple datasets  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_datasets_with_http_info(client, project, update_artifact_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param UpdateArtifactRequest update_artifact_request: Datasets to update (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(ArtifactResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client', 'project', 'update_artifact_request']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_datasets" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'client' is set
        if self.api_client.client_side_validation and ('client' not in local_var_params or  # noqa: E501
                                                        local_var_params['client'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `client` when calling `update_datasets`")  # noqa: E501
        # verify the required parameter 'project' is set
        if self.api_client.client_side_validation and ('project' not in local_var_params or  # noqa: E501
                                                        local_var_params['project'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `project` when calling `update_datasets`")  # noqa: E501
        # verify the required parameter 'update_artifact_request' is set
        if self.api_client.client_side_validation and ('update_artifact_request' not in local_var_params or  # noqa: E501
                                                        local_var_params['update_artifact_request'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `update_artifact_request` when calling `update_datasets`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'client' in local_var_params:
            path_params['client'] = local_var_params['client']  # noqa: E501
        if 'project' in local_var_params:
            path_params['project'] = local_var_params['project']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'update_artifact_request' in local_var_params:
            body_params = local_var_params['update_artifact_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 = ['api', 'jwt', 'oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/data/{client}/{project}', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ArtifactResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_records(self, client, project, artifact, update_data_request, **kwargs):  # noqa: E501
        """Update records  # noqa: E501

        Updates existing records (overwrite)  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_records(client, project, artifact, update_data_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param UpdateDataRequest update_data_request: Records to update (required)
        :param str v: Dataset version
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DataResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.update_records_with_http_info(client, project, artifact, update_data_request, **kwargs)  # noqa: E501

    def update_records_with_http_info(self, client, project, artifact, update_data_request, **kwargs):  # noqa: E501
        """Update records  # noqa: E501

        Updates existing records (overwrite)  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_records_with_http_info(client, project, artifact, update_data_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param UpdateDataRequest update_data_request: Records to update (required)
        :param str v: Dataset version
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DataResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client', 'project', 'artifact', 'update_data_request', 'v']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_records" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'client' is set
        if self.api_client.client_side_validation and ('client' not in local_var_params or  # noqa: E501
                                                        local_var_params['client'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `client` when calling `update_records`")  # noqa: E501
        # verify the required parameter 'project' is set
        if self.api_client.client_side_validation and ('project' not in local_var_params or  # noqa: E501
                                                        local_var_params['project'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `project` when calling `update_records`")  # noqa: E501
        # verify the required parameter 'artifact' is set
        if self.api_client.client_side_validation and ('artifact' not in local_var_params or  # noqa: E501
                                                        local_var_params['artifact'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `artifact` when calling `update_records`")  # noqa: E501
        # verify the required parameter 'update_data_request' is set
        if self.api_client.client_side_validation and ('update_data_request' not in local_var_params or  # noqa: E501
                                                        local_var_params['update_data_request'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `update_data_request` when calling `update_records`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'client' in local_var_params:
            path_params['client'] = local_var_params['client']  # noqa: E501
        if 'project' in local_var_params:
            path_params['project'] = local_var_params['project']  # noqa: E501
        if 'artifact' in local_var_params:
            path_params['artifact'] = local_var_params['artifact']  # noqa: E501

        query_params = []
        if 'v' in local_var_params and local_var_params['v'] is not None:  # noqa: E501
            query_params.append(('v', local_var_params['v']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'update_data_request' in local_var_params:
            body_params = local_var_params['update_data_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 = ['api', 'jwt', 'oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/data/{client}/{project}/{artifact}/rows', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DataResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def upload_dataset(self, client, project, artifact, identity, **kwargs):  # noqa: E501
        """Import datasets  # noqa: E501

        Import datasets  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.upload_dataset(client, project, artifact, identity, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param str identity: Unique row identifier (key) (required)
        :param str v: Dataset version
        :param str external: Document or collection
        :param file file: File
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: UploadResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.upload_dataset_with_http_info(client, project, artifact, identity, **kwargs)  # noqa: E501

    def upload_dataset_with_http_info(self, client, project, artifact, identity, **kwargs):  # noqa: E501
        """Import datasets  # noqa: E501

        Import datasets  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.upload_dataset_with_http_info(client, project, artifact, identity, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str client: Client name (required)
        :param str project: Project name (required)
        :param str artifact: Dataset name (required)
        :param str identity: Unique row identifier (key) (required)
        :param str v: Dataset version
        :param str external: Document or collection
        :param file file: File
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(UploadResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client', 'project', 'artifact', 'identity', 'v', 'external', 'file']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method upload_dataset" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'client' is set
        if self.api_client.client_side_validation and ('client' not in local_var_params or  # noqa: E501
                                                        local_var_params['client'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `client` when calling `upload_dataset`")  # noqa: E501
        # verify the required parameter 'project' is set
        if self.api_client.client_side_validation and ('project' not in local_var_params or  # noqa: E501
                                                        local_var_params['project'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `project` when calling `upload_dataset`")  # noqa: E501
        # verify the required parameter 'artifact' is set
        if self.api_client.client_side_validation and ('artifact' not in local_var_params or  # noqa: E501
                                                        local_var_params['artifact'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `artifact` when calling `upload_dataset`")  # noqa: E501
        # verify the required parameter 'identity' is set
        if self.api_client.client_side_validation and ('identity' not in local_var_params or  # noqa: E501
                                                        local_var_params['identity'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `identity` when calling `upload_dataset`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'client' in local_var_params:
            path_params['client'] = local_var_params['client']  # noqa: E501
        if 'project' in local_var_params:
            path_params['project'] = local_var_params['project']  # noqa: E501
        if 'artifact' in local_var_params:
            path_params['artifact'] = local_var_params['artifact']  # noqa: E501

        query_params = []
        if 'v' in local_var_params and local_var_params['v'] is not None:  # noqa: E501
            query_params.append(('v', local_var_params['v']))  # noqa: E501
        if 'identity' in local_var_params and local_var_params['identity'] is not None:  # noqa: E501
            query_params.append(('identity', local_var_params['identity']))  # noqa: E501
        if 'external' in local_var_params and local_var_params['external'] is not None:  # noqa: E501
            query_params.append(('external', local_var_params['external']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'file' in local_var_params:
            local_var_files['file'] = local_var_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 = ['api', 'jwt', 'oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/data/{client}/{project}/{artifact}/import', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='UploadResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
