# coding: utf-8

"""
    Api Documentation

    Api Documentation  # noqa: E501

    OpenAPI spec version: 1.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from swagger_client.api_client import ApiClient


class IssuerControllerApi(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 get_credential_definition_using_put(self, **kwargs):  # noqa: E501
        """getCredentialDefinition  # 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_credential_definition_using_put(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cred_def_id: credDefId
        :param int indy_wallet_wallet_handle:
        :param str master_secret_id:
        :param str name:
        :param str person_did:
        :return: CredentialDefinition
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_credential_definition_using_put_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_credential_definition_using_put_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_credential_definition_using_put_with_http_info(self, **kwargs):  # noqa: E501
        """getCredentialDefinition  # 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_credential_definition_using_put_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str cred_def_id: credDefId
        :param int indy_wallet_wallet_handle:
        :param str master_secret_id:
        :param str name:
        :param str person_did:
        :return: CredentialDefinition
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cred_def_id', 'indy_wallet_wallet_handle', 'master_secret_id', 'name', 'person_did']  # 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_credential_definition_using_put" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'cred_def_id' in params:
            query_params.append(('credDefId', params['cred_def_id']))  # noqa: E501
        if 'indy_wallet_wallet_handle' in params:
            query_params.append(('indyWallet.walletHandle', params['indy_wallet_wallet_handle']))  # noqa: E501
        if 'master_secret_id' in params:
            query_params.append(('masterSecretId', params['master_secret_id']))  # noqa: E501
        if 'name' in params:
            query_params.append(('name', params['name']))  # noqa: E501
        if 'person_did' in params:
            query_params.append(('personDid', params['person_did']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['*/*'])  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/get-credential-definition', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CredentialDefinition',  # 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 issuer_create_credentials_using_put(self, **kwargs):  # noqa: E501
        """Issues a Driving Licence to a prover  # noqa: E501

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

        :param async_req bool
        :param str cred_def_id: credDefId
        :param str date_of_birth: dateOfBirth
        :param str issuer_did: issuerDid
        :param str issuer_wallet_id: issuerWalletId
        :param str issuer_wallet_key: issuerWalletKey
        :param str licence_level: licenceLevel
        :param str name: name
        :param str prover_did: proverDid
        :param str prover_wallet_id: proverWalletId
        :param str prover_wallet_key: proverWalletKey
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.issuer_create_credentials_using_put_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.issuer_create_credentials_using_put_with_http_info(**kwargs)  # noqa: E501
            return data

    def issuer_create_credentials_using_put_with_http_info(self, **kwargs):  # noqa: E501
        """Issues a Driving Licence to a prover  # noqa: E501

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

        :param async_req bool
        :param str cred_def_id: credDefId
        :param str date_of_birth: dateOfBirth
        :param str issuer_did: issuerDid
        :param str issuer_wallet_id: issuerWalletId
        :param str issuer_wallet_key: issuerWalletKey
        :param str licence_level: licenceLevel
        :param str name: name
        :param str prover_did: proverDid
        :param str prover_wallet_id: proverWalletId
        :param str prover_wallet_key: proverWalletKey
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cred_def_id', 'date_of_birth', 'issuer_did', 'issuer_wallet_id', 'issuer_wallet_key', 'licence_level', 'name', 'prover_did', 'prover_wallet_id', 'prover_wallet_key']  # 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 issuer_create_credentials_using_put" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'cred_def_id' in params:
            query_params.append(('credDefId', params['cred_def_id']))  # noqa: E501
        if 'date_of_birth' in params:
            query_params.append(('dateOfBirth', params['date_of_birth']))  # noqa: E501
        if 'issuer_did' in params:
            query_params.append(('issuerDid', params['issuer_did']))  # noqa: E501
        if 'issuer_wallet_id' in params:
            query_params.append(('issuerWalletId', params['issuer_wallet_id']))  # noqa: E501
        if 'issuer_wallet_key' in params:
            query_params.append(('issuerWalletKey', params['issuer_wallet_key']))  # noqa: E501
        if 'licence_level' in params:
            query_params.append(('licenceLevel', params['licence_level']))  # noqa: E501
        if 'name' in params:
            query_params.append(('name', params['name']))  # noqa: E501
        if 'prover_did' in params:
            query_params.append(('proverDid', params['prover_did']))  # noqa: E501
        if 'prover_wallet_id' in params:
            query_params.append(('proverWalletId', params['prover_wallet_id']))  # noqa: E501
        if 'prover_wallet_key' in params:
            query_params.append(('proverWalletKey', params['prover_wallet_key']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['*/*'])  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/create', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='object',  # noqa: E501
            auth_settings=auth_settings,
            async_req=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 issuer_create_ticket_credentials_using_put(self, **kwargs):  # noqa: E501
        """Issues a ticket to a prover  # noqa: E501

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

        :param async_req bool
        :param str cred_def_id: credDefId
        :param str issuer_did: issuerDid
        :param str issuer_wallet_id: issuerWalletId
        :param str issuer_wallet_key: issuerWalletKey
        :param str name: name
        :param str prover_did: proverDid
        :param str prover_wallet_id: proverWalletId
        :param str prover_wallet_key: proverWalletKey
        :param str ticket_level: ticketLevel
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.issuer_create_ticket_credentials_using_put_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.issuer_create_ticket_credentials_using_put_with_http_info(**kwargs)  # noqa: E501
            return data

    def issuer_create_ticket_credentials_using_put_with_http_info(self, **kwargs):  # noqa: E501
        """Issues a ticket to a prover  # noqa: E501

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

        :param async_req bool
        :param str cred_def_id: credDefId
        :param str issuer_did: issuerDid
        :param str issuer_wallet_id: issuerWalletId
        :param str issuer_wallet_key: issuerWalletKey
        :param str name: name
        :param str prover_did: proverDid
        :param str prover_wallet_id: proverWalletId
        :param str prover_wallet_key: proverWalletKey
        :param str ticket_level: ticketLevel
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cred_def_id', 'issuer_did', 'issuer_wallet_id', 'issuer_wallet_key', 'name', 'prover_did', 'prover_wallet_id', 'prover_wallet_key', 'ticket_level']  # 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 issuer_create_ticket_credentials_using_put" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'cred_def_id' in params:
            query_params.append(('credDefId', params['cred_def_id']))  # noqa: E501
        if 'issuer_did' in params:
            query_params.append(('issuerDid', params['issuer_did']))  # noqa: E501
        if 'issuer_wallet_id' in params:
            query_params.append(('issuerWalletId', params['issuer_wallet_id']))  # noqa: E501
        if 'issuer_wallet_key' in params:
            query_params.append(('issuerWalletKey', params['issuer_wallet_key']))  # noqa: E501
        if 'name' in params:
            query_params.append(('name', params['name']))  # noqa: E501
        if 'prover_did' in params:
            query_params.append(('proverDid', params['prover_did']))  # noqa: E501
        if 'prover_wallet_id' in params:
            query_params.append(('proverWalletId', params['prover_wallet_id']))  # noqa: E501
        if 'prover_wallet_key' in params:
            query_params.append(('proverWalletKey', params['prover_wallet_key']))  # noqa: E501
        if 'ticket_level' in params:
            query_params.append(('ticketLevel', params['ticket_level']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['*/*'])  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/create-ticket', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='object',  # noqa: E501
            auth_settings=auth_settings,
            async_req=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 issuer_email_created_credentials_using_put(self, **kwargs):  # noqa: E501
        """Issues a Driving Licence to a prover, emailing the response  # noqa: E501

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

        :param async_req bool
        :param str cred_def_id: credDefId
        :param str date_of_birth: dateOfBirth
        :param str email: email
        :param str issuer_did: issuerDid
        :param str issuer_wallet_id: issuerWalletId
        :param str issuer_wallet_key: issuerWalletKey
        :param str licence_level: licenceLevel
        :param str name: name
        :param str prover_did: proverDid
        :param str prover_wallet_id: proverWalletId
        :param str prover_wallet_key: proverWalletKey
        :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.issuer_email_created_credentials_using_put_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.issuer_email_created_credentials_using_put_with_http_info(**kwargs)  # noqa: E501
            return data

    def issuer_email_created_credentials_using_put_with_http_info(self, **kwargs):  # noqa: E501
        """Issues a Driving Licence to a prover, emailing the response  # noqa: E501

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

        :param async_req bool
        :param str cred_def_id: credDefId
        :param str date_of_birth: dateOfBirth
        :param str email: email
        :param str issuer_did: issuerDid
        :param str issuer_wallet_id: issuerWalletId
        :param str issuer_wallet_key: issuerWalletKey
        :param str licence_level: licenceLevel
        :param str name: name
        :param str prover_did: proverDid
        :param str prover_wallet_id: proverWalletId
        :param str prover_wallet_key: proverWalletKey
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cred_def_id', 'date_of_birth', 'email', 'issuer_did', 'issuer_wallet_id', 'issuer_wallet_key', 'licence_level', 'name', 'prover_did', 'prover_wallet_id', 'prover_wallet_key']  # 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 issuer_email_created_credentials_using_put" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'cred_def_id' in params:
            query_params.append(('credDefId', params['cred_def_id']))  # noqa: E501
        if 'date_of_birth' in params:
            query_params.append(('dateOfBirth', params['date_of_birth']))  # noqa: E501
        if 'email' in params:
            query_params.append(('email', params['email']))  # noqa: E501
        if 'issuer_did' in params:
            query_params.append(('issuerDid', params['issuer_did']))  # noqa: E501
        if 'issuer_wallet_id' in params:
            query_params.append(('issuerWalletId', params['issuer_wallet_id']))  # noqa: E501
        if 'issuer_wallet_key' in params:
            query_params.append(('issuerWalletKey', params['issuer_wallet_key']))  # noqa: E501
        if 'licence_level' in params:
            query_params.append(('licenceLevel', params['licence_level']))  # noqa: E501
        if 'name' in params:
            query_params.append(('name', params['name']))  # noqa: E501
        if 'prover_did' in params:
            query_params.append(('proverDid', params['prover_did']))  # noqa: E501
        if 'prover_wallet_id' in params:
            query_params.append(('proverWalletId', params['prover_wallet_id']))  # noqa: E501
        if 'prover_wallet_key' in params:
            query_params.append(('proverWalletKey', params['prover_wallet_key']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['*/*'])  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/create-email', '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 issuer_email_created_ticket_credentials_using_put(self, **kwargs):  # noqa: E501
        """Issues a ticket to a prover, emailing the response  # noqa: E501

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

        :param async_req bool
        :param str cred_def_id: credDefId
        :param str email: email
        :param str issuer_did: issuerDid
        :param str issuer_wallet_id: issuerWalletId
        :param str issuer_wallet_key: issuerWalletKey
        :param str name: name
        :param str prover_did: proverDid
        :param str prover_wallet_id: proverWalletId
        :param str prover_wallet_key: proverWalletKey
        :param str ticket_level: ticketLevel
        :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.issuer_email_created_ticket_credentials_using_put_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.issuer_email_created_ticket_credentials_using_put_with_http_info(**kwargs)  # noqa: E501
            return data

    def issuer_email_created_ticket_credentials_using_put_with_http_info(self, **kwargs):  # noqa: E501
        """Issues a ticket to a prover, emailing the response  # noqa: E501

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

        :param async_req bool
        :param str cred_def_id: credDefId
        :param str email: email
        :param str issuer_did: issuerDid
        :param str issuer_wallet_id: issuerWalletId
        :param str issuer_wallet_key: issuerWalletKey
        :param str name: name
        :param str prover_did: proverDid
        :param str prover_wallet_id: proverWalletId
        :param str prover_wallet_key: proverWalletKey
        :param str ticket_level: ticketLevel
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cred_def_id', 'email', 'issuer_did', 'issuer_wallet_id', 'issuer_wallet_key', 'name', 'prover_did', 'prover_wallet_id', 'prover_wallet_key', 'ticket_level']  # 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 issuer_email_created_ticket_credentials_using_put" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'cred_def_id' in params:
            query_params.append(('credDefId', params['cred_def_id']))  # noqa: E501
        if 'email' in params:
            query_params.append(('email', params['email']))  # noqa: E501
        if 'issuer_did' in params:
            query_params.append(('issuerDid', params['issuer_did']))  # noqa: E501
        if 'issuer_wallet_id' in params:
            query_params.append(('issuerWalletId', params['issuer_wallet_id']))  # noqa: E501
        if 'issuer_wallet_key' in params:
            query_params.append(('issuerWalletKey', params['issuer_wallet_key']))  # noqa: E501
        if 'name' in params:
            query_params.append(('name', params['name']))  # noqa: E501
        if 'prover_did' in params:
            query_params.append(('proverDid', params['prover_did']))  # noqa: E501
        if 'prover_wallet_id' in params:
            query_params.append(('proverWalletId', params['prover_wallet_id']))  # noqa: E501
        if 'prover_wallet_key' in params:
            query_params.append(('proverWalletKey', params['prover_wallet_key']))  # noqa: E501
        if 'ticket_level' in params:
            query_params.append(('ticketLevel', params['ticket_level']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['*/*'])  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/create-email-ticket', '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)
