# coding: utf-8

"""
    Dokumenty CITES

    API pro datový řadič dokumentů CITES ### Verze 1.0.0    - public   - developers  ### Verze 1.1.0    - admins   - additional   - statement   - attachments   - registration_cards   - permit   # noqa: E501

    OpenAPI spec version: 1.1.0
    Contact: info@sysnet.cz
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from citesdoc_110.api_client import ApiClient


class PermitApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def convert_permit_cz2_doc(self, **kwargs):  # noqa: E501
        """Konvertuje permit z formátu CZ do produkčního formátu CITES  # noqa: E501

        Provede konverzi bez uložení CZ -> Dod  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.convert_permit_cz2_doc(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CZCitesPermitType body: CZ Work Permit
        :return: CitesDocumentPrincipalType
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.convert_permit_cz2_doc_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.convert_permit_cz2_doc_with_http_info(**kwargs)  # noqa: E501
            return data

    def convert_permit_cz2_doc_with_http_info(self, **kwargs):  # noqa: E501
        """Konvertuje permit z formátu CZ do produkčního formátu CITES  # noqa: E501

        Provede konverzi bez uložení CZ -> Dod  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.convert_permit_cz2_doc_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CZCitesPermitType body: CZ Work Permit
        :return: CitesDocumentPrincipalType
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method convert_permit_cz2_doc" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'text/plain; charset=utf-8'])  # 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_key_auth']  # noqa: E501

        return self.api_client.call_api(
            '/convert/cz/doc', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CitesDocumentPrincipalType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def convert_permit_cz2_eu(self, **kwargs):  # noqa: E501
        """Konvertuje permit z formátu CZ do EU  # noqa: E501

        Provede konverzi bez uložení CZ -> EU  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.convert_permit_cz2_eu(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CZCitesPermitType body: CZ Work Permit
        :return: CITESEPermitType
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.convert_permit_cz2_eu_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.convert_permit_cz2_eu_with_http_info(**kwargs)  # noqa: E501
            return data

    def convert_permit_cz2_eu_with_http_info(self, **kwargs):  # noqa: E501
        """Konvertuje permit z formátu CZ do EU  # noqa: E501

        Provede konverzi bez uložení CZ -> EU  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.convert_permit_cz2_eu_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CZCitesPermitType body: CZ Work Permit
        :return: CITESEPermitType
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method convert_permit_cz2_eu" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'text/plain; charset=utf-8'])  # 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_key_auth']  # noqa: E501

        return self.api_client.call_api(
            '/convert/cz/eu', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CITESEPermitType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def convert_permit_doc2_cz(self, **kwargs):  # noqa: E501
        """Konvertuje permit z produkčního formátu CITES do formátu CZ  # noqa: E501

        Provede konverzi bez uložení doc -> CZ  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.convert_permit_doc2_cz(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CitesDocumentPrincipalType body:
        :return: CZCitesPermitType
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.convert_permit_doc2_cz_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.convert_permit_doc2_cz_with_http_info(**kwargs)  # noqa: E501
            return data

    def convert_permit_doc2_cz_with_http_info(self, **kwargs):  # noqa: E501
        """Konvertuje permit z produkčního formátu CITES do formátu CZ  # noqa: E501

        Provede konverzi bez uložení doc -> CZ  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.convert_permit_doc2_cz_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CitesDocumentPrincipalType body:
        :return: CZCitesPermitType
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method convert_permit_doc2_cz" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'text/plain; charset=utf-8'])  # 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_key_auth']  # noqa: E501

        return self.api_client.call_api(
            '/convert/doc/cz', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CZCitesPermitType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def convert_permit_doc2_eu(self, **kwargs):  # noqa: E501
        """Konvertuje permit z produkčního formátu CITES do formátu EU  # noqa: E501

        Provede konverzi bez uložení doc -> EU  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.convert_permit_doc2_eu(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CitesDocumentPrincipalType body:
        :return: CITESEPermitType
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.convert_permit_doc2_eu_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.convert_permit_doc2_eu_with_http_info(**kwargs)  # noqa: E501
            return data

    def convert_permit_doc2_eu_with_http_info(self, **kwargs):  # noqa: E501
        """Konvertuje permit z produkčního formátu CITES do formátu EU  # noqa: E501

        Provede konverzi bez uložení doc -> EU  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.convert_permit_doc2_eu_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CitesDocumentPrincipalType body:
        :return: CITESEPermitType
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method convert_permit_doc2_eu" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'text/plain; charset=utf-8'])  # 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_key_auth']  # noqa: E501

        return self.api_client.call_api(
            '/convert/doc/eu', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CITESEPermitType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def convert_permit_eu2_cz(self, **kwargs):  # noqa: E501
        """Konvertuje permit z formátu EU do CZ  # noqa: E501

        Provede konverzi bez uložení EU -> CZ  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.convert_permit_eu2_cz(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CITESEPermitType body: EU Permit
        :return: CZCitesPermitType
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.convert_permit_eu2_cz_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.convert_permit_eu2_cz_with_http_info(**kwargs)  # noqa: E501
            return data

    def convert_permit_eu2_cz_with_http_info(self, **kwargs):  # noqa: E501
        """Konvertuje permit z formátu EU do CZ  # noqa: E501

        Provede konverzi bez uložení EU -> CZ  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.convert_permit_eu2_cz_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CITESEPermitType body: EU Permit
        :return: CZCitesPermitType
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method convert_permit_eu2_cz" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'text/plain; charset=utf-8'])  # 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_key_auth']  # noqa: E501

        return self.api_client.call_api(
            '/convert/eu/cz', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CZCitesPermitType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def convert_permit_eu2_doc(self, **kwargs):  # noqa: E501
        """Konvertuje permit z formátu EU do produkčního formátu CITES  # noqa: E501

        Provede konverzi bez uložení EU -> doc  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.convert_permit_eu2_doc(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CITESEPermitType body: EU Permit
        :return: CitesDocumentPrincipalType
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.convert_permit_eu2_doc_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.convert_permit_eu2_doc_with_http_info(**kwargs)  # noqa: E501
            return data

    def convert_permit_eu2_doc_with_http_info(self, **kwargs):  # noqa: E501
        """Konvertuje permit z formátu EU do produkčního formátu CITES  # noqa: E501

        Provede konverzi bez uložení EU -> doc  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.convert_permit_eu2_doc_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CITESEPermitType body: EU Permit
        :return: CitesDocumentPrincipalType
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method convert_permit_eu2_doc" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'text/plain; charset=utf-8'])  # 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_key_auth']  # noqa: E501

        return self.api_client.call_api(
            '/convert/eu/doc', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CitesDocumentPrincipalType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_permit_cz(self, idno, **kwargs):  # noqa: E501
        """Vrací permit v CZ CITES formátu  # noqa: E501

        Vrátí permit CZ CITES  # 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_permit_cz(idno, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str idno: Číslo permitu (required)
        :param str token: Bezpečnostní token permitu
        :return: CZCitesPermitType
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_permit_cz_with_http_info(idno, **kwargs)  # noqa: E501
        else:
            (data) = self.get_permit_cz_with_http_info(idno, **kwargs)  # noqa: E501
            return data

    def get_permit_cz_with_http_info(self, idno, **kwargs):  # noqa: E501
        """Vrací permit v CZ CITES formátu  # noqa: E501

        Vrátí permit CZ CITES  # 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_permit_cz_with_http_info(idno, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str idno: Číslo permitu (required)
        :param str token: Bezpečnostní token permitu
        :return: CZCitesPermitType
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_permit_cz" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'idno' is set
        if ('idno' not in params or
                params['idno'] is None):
            raise ValueError("Missing the required parameter `idno` when calling `get_permit_cz`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'token' in params:
            query_params.append(('token', params['token']))  # 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', 'text/plain; charset=utf-8'])  # noqa: E501

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

        return self.api_client.call_api(
            '/permit/cz/{idno}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CZCitesPermitType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_permit_doc(self, idno, **kwargs):  # noqa: E501
        """Vrací permit v produkčním CITES formátu  # noqa: E501

        Vrátí dokument permitu  # 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_permit_doc(idno, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str idno: Číslo permitu (required)
        :param str token: Bezpečnostní token permitu
        :return: CitesDocumentPrincipalType
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_permit_doc_with_http_info(idno, **kwargs)  # noqa: E501
        else:
            (data) = self.get_permit_doc_with_http_info(idno, **kwargs)  # noqa: E501
            return data

    def get_permit_doc_with_http_info(self, idno, **kwargs):  # noqa: E501
        """Vrací permit v produkčním CITES formátu  # noqa: E501

        Vrátí dokument permitu  # 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_permit_doc_with_http_info(idno, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str idno: Číslo permitu (required)
        :param str token: Bezpečnostní token permitu
        :return: CitesDocumentPrincipalType
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_permit_doc" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'idno' is set
        if ('idno' not in params or
                params['idno'] is None):
            raise ValueError("Missing the required parameter `idno` when calling `get_permit_doc`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'token' in params:
            query_params.append(('token', params['token']))  # 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', 'text/plain; charset=utf-8'])  # noqa: E501

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

        return self.api_client.call_api(
            '/permit/doc/{idno}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CitesDocumentPrincipalType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_permit_eu(self, idno, **kwargs):  # noqa: E501
        """Vrací permit v EU CITES formátu  # noqa: E501

        Vrátí permit EU CITES  # 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_permit_eu(idno, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str idno: Číslo permitu (required)
        :param str token: Bezpečnostní token permitu
        :return: CITESEPermitType
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_permit_eu_with_http_info(idno, **kwargs)  # noqa: E501
        else:
            (data) = self.get_permit_eu_with_http_info(idno, **kwargs)  # noqa: E501
            return data

    def get_permit_eu_with_http_info(self, idno, **kwargs):  # noqa: E501
        """Vrací permit v EU CITES formátu  # noqa: E501

        Vrátí permit EU CITES  # 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_permit_eu_with_http_info(idno, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str idno: Číslo permitu (required)
        :param str token: Bezpečnostní token permitu
        :return: CITESEPermitType
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_permit_eu" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'idno' is set
        if ('idno' not in params or
                params['idno'] is None):
            raise ValueError("Missing the required parameter `idno` when calling `get_permit_eu`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'token' in params:
            query_params.append(('token', params['token']))  # 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', 'text/plain; charset=utf-8'])  # noqa: E501

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

        return self.api_client.call_api(
            '/permit/eu/{idno}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CITESEPermitType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def post_permit_cz(self, idno, **kwargs):  # noqa: E501
        """Nahraje permit ve formátu EU  # noqa: E501

        Nahraje nový permit ve formátu EU. Vrátí uuid uloženého dokumentu.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_permit_cz(idno, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str idno: Číslo permitu (required)
        :param CZCitesPermitType body: CZ Work Permit
        :param str token: Bezpečnostní token permitu
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.post_permit_cz_with_http_info(idno, **kwargs)  # noqa: E501
        else:
            (data) = self.post_permit_cz_with_http_info(idno, **kwargs)  # noqa: E501
            return data

    def post_permit_cz_with_http_info(self, idno, **kwargs):  # noqa: E501
        """Nahraje permit ve formátu EU  # noqa: E501

        Nahraje nový permit ve formátu EU. Vrátí uuid uloženého dokumentu.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_permit_cz_with_http_info(idno, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str idno: Číslo permitu (required)
        :param CZCitesPermitType body: CZ Work Permit
        :param str token: Bezpečnostní token permitu
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['idno', 'body', 'token']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method post_permit_cz" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'idno' is set
        if ('idno' not in params or
                params['idno'] is None):
            raise ValueError("Missing the required parameter `idno` when calling `post_permit_cz`")  # noqa: E501

        collection_formats = {}

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

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

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'text/plain', 'text/plain; charset=utf-8'])  # 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_key_auth']  # noqa: E501

        return self.api_client.call_api(
            '/permit/cz/{idno}', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def post_permit_doc(self, idno, **kwargs):  # noqa: E501
        """Nahraje permit v produkčním formátu CITES  # noqa: E501

        Nahraje nový permit produkčním formátu CITES. Vrátí uuid uloženého dokumentu.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_permit_doc(idno, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str idno: Číslo permitu (required)
        :param CitesDocumentPrincipalType body:
        :param str token: Bezpečnostní token permitu
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.post_permit_doc_with_http_info(idno, **kwargs)  # noqa: E501
        else:
            (data) = self.post_permit_doc_with_http_info(idno, **kwargs)  # noqa: E501
            return data

    def post_permit_doc_with_http_info(self, idno, **kwargs):  # noqa: E501
        """Nahraje permit v produkčním formátu CITES  # noqa: E501

        Nahraje nový permit produkčním formátu CITES. Vrátí uuid uloženého dokumentu.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_permit_doc_with_http_info(idno, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str idno: Číslo permitu (required)
        :param CitesDocumentPrincipalType body:
        :param str token: Bezpečnostní token permitu
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['idno', 'body', 'token']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method post_permit_doc" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'idno' is set
        if ('idno' not in params or
                params['idno'] is None):
            raise ValueError("Missing the required parameter `idno` when calling `post_permit_doc`")  # noqa: E501

        collection_formats = {}

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

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

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'text/plain', 'text/plain; charset=utf-8'])  # 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_key_auth']  # noqa: E501

        return self.api_client.call_api(
            '/permit/doc/{idno}', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def post_permit_eu(self, idno, **kwargs):  # noqa: E501
        """Nahraje permit ve formátu EU  # noqa: E501

        Nahraje nový permit ve formátu EU. Vrátí uuid uloženého dokumentu.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_permit_eu(idno, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str idno: Číslo permitu (required)
        :param CITESEPermitType body: EU Permit
        :param str token: Bezpečnostní token permitu
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.post_permit_eu_with_http_info(idno, **kwargs)  # noqa: E501
        else:
            (data) = self.post_permit_eu_with_http_info(idno, **kwargs)  # noqa: E501
            return data

    def post_permit_eu_with_http_info(self, idno, **kwargs):  # noqa: E501
        """Nahraje permit ve formátu EU  # noqa: E501

        Nahraje nový permit ve formátu EU. Vrátí uuid uloženého dokumentu.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_permit_eu_with_http_info(idno, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str idno: Číslo permitu (required)
        :param CITESEPermitType body: EU Permit
        :param str token: Bezpečnostní token permitu
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['idno', 'body', 'token']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method post_permit_eu" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'idno' is set
        if ('idno' not in params or
                params['idno'] is None):
            raise ValueError("Missing the required parameter `idno` when calling `post_permit_eu`")  # noqa: E501

        collection_formats = {}

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

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

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'text/plain', 'text/plain; charset=utf-8'])  # 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_key_auth']  # noqa: E501

        return self.api_client.call_api(
            '/permit/eu/{idno}', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def put_permit_cz(self, idno, **kwargs):  # noqa: E501
        """Aktualizuje permit ve formátu EU  # noqa: E501

        Aktualizuje uložený dokument permitu nahráním permit ve formátu EU. Vrátí uuid uloženého dokumentu.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.put_permit_cz(idno, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str idno: Číslo permitu (required)
        :param CZCitesPermitType body: CZ Work Permit
        :param str token: Bezpečnostní token permitu
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.put_permit_cz_with_http_info(idno, **kwargs)  # noqa: E501
        else:
            (data) = self.put_permit_cz_with_http_info(idno, **kwargs)  # noqa: E501
            return data

    def put_permit_cz_with_http_info(self, idno, **kwargs):  # noqa: E501
        """Aktualizuje permit ve formátu EU  # noqa: E501

        Aktualizuje uložený dokument permitu nahráním permit ve formátu EU. Vrátí uuid uloženého dokumentu.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.put_permit_cz_with_http_info(idno, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str idno: Číslo permitu (required)
        :param CZCitesPermitType body: CZ Work Permit
        :param str token: Bezpečnostní token permitu
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['idno', 'body', 'token']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method put_permit_cz" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'idno' is set
        if ('idno' not in params or
                params['idno'] is None):
            raise ValueError("Missing the required parameter `idno` when calling `put_permit_cz`")  # noqa: E501

        collection_formats = {}

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

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

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'text/plain', 'text/plain; charset=utf-8'])  # 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_key_auth']  # noqa: E501

        return self.api_client.call_api(
            '/permit/cz/{idno}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def put_permit_doc(self, idno, **kwargs):  # noqa: E501
        """Aktualizuje permit v produkčním formátu CITES  # noqa: E501

        Aktualizuje uložený dokument permitu nahráním permit v produkčním formátu. Vrátí uuid uloženého dokumentu.   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.put_permit_doc(idno, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str idno: Číslo permitu (required)
        :param CitesDocumentPrincipalType body:
        :param str token: Bezpečnostní token permitu
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.put_permit_doc_with_http_info(idno, **kwargs)  # noqa: E501
        else:
            (data) = self.put_permit_doc_with_http_info(idno, **kwargs)  # noqa: E501
            return data

    def put_permit_doc_with_http_info(self, idno, **kwargs):  # noqa: E501
        """Aktualizuje permit v produkčním formátu CITES  # noqa: E501

        Aktualizuje uložený dokument permitu nahráním permit v produkčním formátu. Vrátí uuid uloženého dokumentu.   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.put_permit_doc_with_http_info(idno, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str idno: Číslo permitu (required)
        :param CitesDocumentPrincipalType body:
        :param str token: Bezpečnostní token permitu
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['idno', 'body', 'token']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method put_permit_doc" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'idno' is set
        if ('idno' not in params or
                params['idno'] is None):
            raise ValueError("Missing the required parameter `idno` when calling `put_permit_doc`")  # noqa: E501

        collection_formats = {}

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

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

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'text/plain', 'text/plain; charset=utf-8'])  # 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_key_auth']  # noqa: E501

        return self.api_client.call_api(
            '/permit/doc/{idno}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def put_permit_eu(self, idno, **kwargs):  # noqa: E501
        """Aktualizuje permit ve formátu EU  # noqa: E501

        Aktualizuje uložený dokument permitu nahráním permit ve formátu EU. Vrátí uuid uloženého dokumentu.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.put_permit_eu(idno, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str idno: Číslo permitu (required)
        :param CITESEPermitType body: EU Permit
        :param str token: Bezpečnostní token permitu
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.put_permit_eu_with_http_info(idno, **kwargs)  # noqa: E501
        else:
            (data) = self.put_permit_eu_with_http_info(idno, **kwargs)  # noqa: E501
            return data

    def put_permit_eu_with_http_info(self, idno, **kwargs):  # noqa: E501
        """Aktualizuje permit ve formátu EU  # noqa: E501

        Aktualizuje uložený dokument permitu nahráním permit ve formátu EU. Vrátí uuid uloženého dokumentu.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.put_permit_eu_with_http_info(idno, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str idno: Číslo permitu (required)
        :param CITESEPermitType body: EU Permit
        :param str token: Bezpečnostní token permitu
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['idno', 'body', 'token']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method put_permit_eu" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'idno' is set
        if ('idno' not in params or
                params['idno'] is None):
            raise ValueError("Missing the required parameter `idno` when calling `put_permit_eu`")  # noqa: E501

        collection_formats = {}

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

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

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'text/plain', 'text/plain; charset=utf-8'])  # 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_key_auth']  # noqa: E501

        return self.api_client.call_api(
            '/permit/eu/{idno}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)
