# 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 SchemaServicesApi(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_schema(self, client, project, artifact, **kwargs):  # noqa: E501
        """Delete schema  # 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_schema(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: Schema name (required)
        :param str v: Schema 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_schema_with_http_info(client, project, artifact, **kwargs)  # noqa: E501

    def delete_schema_with_http_info(self, client, project, artifact, **kwargs):  # noqa: E501
        """Delete schema  # 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_schema_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: Schema name (required)
        :param str v: Schema 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_schema" % 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_schema`")  # 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_schema`")  # 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_schema`")  # 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(
            '/schemas/{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_schemas(self, client, project, delete_artifact_request, **kwargs):  # noqa: E501
        """Delete schemas  # 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_schemas(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 schemas 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_schemas_with_http_info(client, project, delete_artifact_request, **kwargs)  # noqa: E501

    def delete_schemas_with_http_info(self, client, project, delete_artifact_request, **kwargs):  # noqa: E501
        """Delete schemas  # 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_schemas_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 schemas 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_schemas" % 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_schemas`")  # 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_schemas`")  # 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_schemas`")  # 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(
            '/schemas/{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 get_schema(self, client, project, artifact, **kwargs):  # noqa: E501
        """Get schema  # noqa: E501

        Get an schema  # 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_schema(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: Schema name (required)
        :param str v: Schema 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: Schema
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_schema_with_http_info(client, project, artifact, **kwargs)  # noqa: E501

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

        Get an schema  # 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_schema_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: Schema name (required)
        :param str v: Schema 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(Schema, 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_schema" % 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_schema`")  # 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_schema`")  # 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_schema`")  # 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(
            '/schemas/{client}/{project}/{artifact}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Schema',  # 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_schemas(self, client, project, **kwargs):  # noqa: E501
        """List schemas  # noqa: E501

        Get schemas 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_schemas(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 str view: Comma separated fields to include
        :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[Schema]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.list_schemas_with_http_info(client, project, **kwargs)  # noqa: E501

    def list_schemas_with_http_info(self, client, project, **kwargs):  # noqa: E501
        """List schemas  # noqa: E501

        Get schemas 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_schemas_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 str view: Comma separated fields to include
        :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[Schema], 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_schemas" % 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_schemas`")  # 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_schemas`")  # 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

        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(
            '/schemas/{client}/{project}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[Schema]',  # 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_schema(self, client, project, schema, **kwargs):  # noqa: E501
        """Save schema  # noqa: E501

        Saves or creates a schema (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_schema(client, project, schema, 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 Schema schema: Schema 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: Schema
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.save_schema_with_http_info(client, project, schema, **kwargs)  # noqa: E501

    def save_schema_with_http_info(self, client, project, schema, **kwargs):  # noqa: E501
        """Save schema  # noqa: E501

        Saves or creates a schema (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_schema_with_http_info(client, project, schema, 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 Schema schema: Schema 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(Schema, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['client', 'project', 'schema']  # 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_schema" % 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_schema`")  # 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_schema`")  # noqa: E501
        # verify the required parameter 'schema' is set
        if self.api_client.client_side_validation and ('schema' not in local_var_params or  # noqa: E501
                                                        local_var_params['schema'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `schema` when calling `save_schema`")  # 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 'schema' in local_var_params:
            body_params = local_var_params['schema']
        # 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(
            '/schemas/{client}/{project}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Schema',  # 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_schema(self, client, project, update_artifact_request, **kwargs):  # noqa: E501
        """Update schema  # noqa: E501

        Updates one schema  # 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_schema(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: Schemas 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_schema_with_http_info(client, project, update_artifact_request, **kwargs)  # noqa: E501

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

        Updates one schema  # 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_schema_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: Schemas 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_schema" % 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_schema`")  # 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_schema`")  # 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_schema`")  # 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(
            '/schemas/{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_schemas(self, client, project, update_artifact_request, **kwargs):  # noqa: E501
        """Update schemas  # noqa: E501

        Updates multiple schemas  # 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_schemas(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: Schemas 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_schemas_with_http_info(client, project, update_artifact_request, **kwargs)  # noqa: E501

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

        Updates multiple schemas  # 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_schemas_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: Schemas 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_schemas" % 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_schemas`")  # 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_schemas`")  # 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_schemas`")  # 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(
            '/schemas/{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)
