# coding: utf-8

"""
    Coinsecure Api Documentation

    To generate an API key, please visit <a href='https://coinsecure.in/api' target='_new' class='homeapi'>https://coinsecure.in/api</a>.<br>Guidelines for use can be accessed at <a href='https://api.coinsecure.in/v1/guidelines'>https://api.coinsecure.in/v1/guidelines</a>.<br>Programming Language Libraries for use can be accessed at <a href='https://api.coinsecure.in/v1/code-libraries'>https://api.coinsecure.in/v1/code-libraries</a>.

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

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""

from __future__ import absolute_import

import sys
import os
import re

# python 2 and python 3 compatibility library
from six import iteritems

from ..configuration import Configuration
from ..api_client import ApiClient


class SecurityActionsApi(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):
        config = Configuration()
        if api_client:
            self.api_client = api_client
        else:
            if not config.api_client:
                config.api_client = ApiClient()
            self.api_client = config.api_client

    def v1mfaauthyinitiate(self, body, **kwargs):
        """
        Initiate Authy Registration.
        Sends a Token via call or sms to begin the registration. This token needs to be used as the code in /v1/user/mfa/authy/initiate/register.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.v1mfaauthyinitiate(body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param MethodCountryMobile body: Please Send Valid Json as below. (required)
        :param str authorization: API object to be added
        :param str accept: JSON, XML or CSV can be returned (Optional)
        :return: SuccessResult
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.v1mfaauthyinitiate_with_http_info(body, **kwargs)
        else:
            (data) = self.v1mfaauthyinitiate_with_http_info(body, **kwargs)
            return data

    def v1mfaauthyinitiate_with_http_info(self, body, **kwargs):
        """
        Initiate Authy Registration.
        Sends a Token via call or sms to begin the registration. This token needs to be used as the code in /v1/user/mfa/authy/initiate/register.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.v1mfaauthyinitiate_with_http_info(body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param MethodCountryMobile body: Please Send Valid Json as below. (required)
        :param str authorization: API object to be added
        :param str accept: JSON, XML or CSV can be returned (Optional)
        :return: SuccessResult
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'authorization', 'accept']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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


        collection_formats = {}

        resource_path = '/v1/mfa/authy/initiate'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}
        if 'authorization' in params:
            header_params['Authorization'] = params['authorization']
        if 'accept' in params:
            header_params['accept'] = params['accept']

        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', 'application/xml', 'application/csv'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='SuccessResult',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _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 v1mfagainitiate(self, **kwargs):
        """
        Initiate GA Registration.
        Returns the Google Authenticator Secret and a QR code URL.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.v1mfagainitiate(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str authorization: API object to be added
        :param str accept: JSON, XML or CSV can be returned (Optional)
        :return: SuccessResult
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.v1mfagainitiate_with_http_info(**kwargs)
        else:
            (data) = self.v1mfagainitiate_with_http_info(**kwargs)
            return data

    def v1mfagainitiate_with_http_info(self, **kwargs):
        """
        Initiate GA Registration.
        Returns the Google Authenticator Secret and a QR code URL.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.v1mfagainitiate_with_http_info(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str authorization: API object to be added
        :param str accept: JSON, XML or CSV can be returned (Optional)
        :return: SuccessResult
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['authorization', 'accept']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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


        collection_formats = {}

        resource_path = '/v1/mfa/ga/initiate'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}
        if 'authorization' in params:
            header_params['Authorization'] = params['authorization']
        if 'accept' in params:
            header_params['accept'] = params['accept']

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'application/csv'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='SuccessResult',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _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 v1usermfaauthycall(self, **kwargs):
        """
        Authy Call Code
        Calls valid phone user with a code.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.v1usermfaauthycall(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str authorization: Login Token or any Apikey to be added as Authorization in header
        :param str accept: JSON, XML or CSV can be returned (Optional)
        :return: SuccessResult
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.v1usermfaauthycall_with_http_info(**kwargs)
        else:
            (data) = self.v1usermfaauthycall_with_http_info(**kwargs)
            return data

    def v1usermfaauthycall_with_http_info(self, **kwargs):
        """
        Authy Call Code
        Calls valid phone user with a code.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.v1usermfaauthycall_with_http_info(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str authorization: Login Token or any Apikey to be added as Authorization in header
        :param str accept: JSON, XML or CSV can be returned (Optional)
        :return: SuccessResult
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['authorization', 'accept']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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


        collection_formats = {}

        resource_path = '/v1/mfa/authy/call'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}
        if 'authorization' in params:
            header_params['Authorization'] = params['authorization']
        if 'accept' in params:
            header_params['accept'] = params['accept']

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'application/csv'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='SuccessResult',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _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 v1usermfaauthydisable_code(self, code, **kwargs):
        """
        Disable Authy
        Disables users Authy

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.v1usermfaauthydisable_code(code, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str code:  (required)
        :param str authorization: API object to be added
        :param str accept: JSON, XML or CSV can be returned (Optional)
        :return: SuccessResult
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.v1usermfaauthydisable_code_with_http_info(code, **kwargs)
        else:
            (data) = self.v1usermfaauthydisable_code_with_http_info(code, **kwargs)
            return data

    def v1usermfaauthydisable_code_with_http_info(self, code, **kwargs):
        """
        Disable Authy
        Disables users Authy

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.v1usermfaauthydisable_code_with_http_info(code, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str code:  (required)
        :param str authorization: API object to be added
        :param str accept: JSON, XML or CSV can be returned (Optional)
        :return: SuccessResult
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['code', 'authorization', 'accept']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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


        collection_formats = {}

        resource_path = '/v1/user/mfa/authy/disable/{code}'.replace('{format}', 'json')
        path_params = {}
        if 'code' in params:
            path_params['code'] = params['code']

        query_params = {}

        header_params = {}
        if 'authorization' in params:
            header_params['Authorization'] = params['authorization']
        if 'accept' in params:
            header_params['accept'] = params['accept']

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'application/csv'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api(resource_path, 'DELETE',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='SuccessResult',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _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 v1usermfaauthyinitiateenable(self, body, **kwargs):
        """
        Verify Authy Registration
        Verifies and registers the user with verification code sent to sms or call from /v1/mfa/authy/initiate.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.v1usermfaauthyinitiateenable(body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param CodeCountryMobile body: Please Send Valid Json as below. (required)
        :param str authorization: API object to be added
        :param str accept: JSON, XML or CSV can be returned (Optional)
        :return: SuccessResult
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.v1usermfaauthyinitiateenable_with_http_info(body, **kwargs)
        else:
            (data) = self.v1usermfaauthyinitiateenable_with_http_info(body, **kwargs)
            return data

    def v1usermfaauthyinitiateenable_with_http_info(self, body, **kwargs):
        """
        Verify Authy Registration
        Verifies and registers the user with verification code sent to sms or call from /v1/mfa/authy/initiate.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.v1usermfaauthyinitiateenable_with_http_info(body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param CodeCountryMobile body: Please Send Valid Json as below. (required)
        :param str authorization: API object to be added
        :param str accept: JSON, XML or CSV can be returned (Optional)
        :return: SuccessResult
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'authorization', 'accept']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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


        collection_formats = {}

        resource_path = '/v1/user/mfa/authy/initiate/enable'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}
        if 'authorization' in params:
            header_params['Authorization'] = params['authorization']
        if 'accept' in params:
            header_params['accept'] = params['accept']

        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', 'application/xml', 'application/csv'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='SuccessResult',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _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 v1usermfaauthysms(self, **kwargs):
        """
        Authy Sms Code
        Disables users Authy

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.v1usermfaauthysms(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str authorization: Login Token or any Apikey to be added as Authorization in header
        :param str accept: JSON, XML or CSV can be returned (Optional)
        :return: SuccessResult
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.v1usermfaauthysms_with_http_info(**kwargs)
        else:
            (data) = self.v1usermfaauthysms_with_http_info(**kwargs)
            return data

    def v1usermfaauthysms_with_http_info(self, **kwargs):
        """
        Authy Sms Code
        Disables users Authy

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.v1usermfaauthysms_with_http_info(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str authorization: Login Token or any Apikey to be added as Authorization in header
        :param str accept: JSON, XML or CSV can be returned (Optional)
        :return: SuccessResult
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['authorization', 'accept']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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


        collection_formats = {}

        resource_path = '/v1/mfa/authy/sms'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}
        if 'authorization' in params:
            header_params['Authorization'] = params['authorization']
        if 'accept' in params:
            header_params['accept'] = params['accept']

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'application/csv'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='SuccessResult',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _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 v1usermfagadisable_code(self, code, **kwargs):
        """
        Disable Google Authenticator
        Disables users Google Authenticator 2FA

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.v1usermfagadisable_code(code, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str code:  (required)
        :param str authorization: API object to be added
        :param str accept: JSON, XML or CSV can be returned (Optional)
        :return: SuccessResult
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.v1usermfagadisable_code_with_http_info(code, **kwargs)
        else:
            (data) = self.v1usermfagadisable_code_with_http_info(code, **kwargs)
            return data

    def v1usermfagadisable_code_with_http_info(self, code, **kwargs):
        """
        Disable Google Authenticator
        Disables users Google Authenticator 2FA

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.v1usermfagadisable_code_with_http_info(code, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str code:  (required)
        :param str authorization: API object to be added
        :param str accept: JSON, XML or CSV can be returned (Optional)
        :return: SuccessResult
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['code', 'authorization', 'accept']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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


        collection_formats = {}

        resource_path = '/v1/user/mfa/ga/disable/{code}'.replace('{format}', 'json')
        path_params = {}
        if 'code' in params:
            path_params['code'] = params['code']

        query_params = {}

        header_params = {}
        if 'authorization' in params:
            header_params['Authorization'] = params['authorization']
        if 'accept' in params:
            header_params['accept'] = params['accept']

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'application/csv'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api(resource_path, 'DELETE',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='SuccessResult',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _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 v1usermfagainitiateenable(self, body, **kwargs):
        """
        Enable Google Authenticator
        Enables Google Authenticator 2FA with the code from /v1/mfa/ga/initiate.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.v1usermfagainitiateenable(body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param Code body: Please Send Valid Json as below. (required)
        :param str authorization: API object to be added
        :param str accept: JSON, XML or CSV can be returned (Optional)
        :return: SuccessResult
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.v1usermfagainitiateenable_with_http_info(body, **kwargs)
        else:
            (data) = self.v1usermfagainitiateenable_with_http_info(body, **kwargs)
            return data

    def v1usermfagainitiateenable_with_http_info(self, body, **kwargs):
        """
        Enable Google Authenticator
        Enables Google Authenticator 2FA with the code from /v1/mfa/ga/initiate.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.v1usermfagainitiateenable_with_http_info(body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param Code body: Please Send Valid Json as below. (required)
        :param str authorization: API object to be added
        :param str accept: JSON, XML or CSV can be returned (Optional)
        :return: SuccessResult
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'authorization', 'accept']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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


        collection_formats = {}

        resource_path = '/v1/user/mfa/ga/initiate/enable'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}
        if 'authorization' in params:
            header_params['Authorization'] = params['authorization']
        if 'accept' in params:
            header_params['accept'] = params['accept']

        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', 'application/xml', 'application/csv'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='SuccessResult',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _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 v1userpasswordchange(self, body, **kwargs):
        """
        Change Password.
        Changes an account Password.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.v1userpasswordchange(body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param ChangePassword body:  (required)
        :param str authorization: Enter a valid Api Key.
        :param str accept: JSON, XML or CSV can be returned (Optional)
        :return: SuccessResult
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.v1userpasswordchange_with_http_info(body, **kwargs)
        else:
            (data) = self.v1userpasswordchange_with_http_info(body, **kwargs)
            return data

    def v1userpasswordchange_with_http_info(self, body, **kwargs):
        """
        Change Password.
        Changes an account Password.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.v1userpasswordchange_with_http_info(body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param ChangePassword body:  (required)
        :param str authorization: Enter a valid Api Key.
        :param str accept: JSON, XML or CSV can be returned (Optional)
        :return: SuccessResult
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'authorization', 'accept']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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


        collection_formats = {}

        resource_path = '/v1/user/password/change'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}
        if 'authorization' in params:
            header_params['Authorization'] = params['authorization']
        if 'accept' in params:
            header_params['accept'] = params['accept']

        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', 'application/xml', 'application/csv'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='SuccessResult',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _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 v1userpasswordreset(self, body, **kwargs):
        """
        Reset Password.
        Resets an account Password. Use forgotPassword to generate a token.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.v1userpasswordreset(body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param ResetPassword body: Please Send Valid Json as below. (required)
        :param str accept: JSON, XML or CSV can be returned (Optional)
        :return: SuccessResult
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.v1userpasswordreset_with_http_info(body, **kwargs)
        else:
            (data) = self.v1userpasswordreset_with_http_info(body, **kwargs)
            return data

    def v1userpasswordreset_with_http_info(self, body, **kwargs):
        """
        Reset Password.
        Resets an account Password. Use forgotPassword to generate a token.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.v1userpasswordreset_with_http_info(body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param ResetPassword body: Please Send Valid Json as below. (required)
        :param str accept: JSON, XML or CSV can be returned (Optional)
        :return: SuccessResult
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'accept']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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


        collection_formats = {}

        resource_path = '/v1/user/password/reset'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}
        if 'accept' in params:
            header_params['accept'] = params['accept']

        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', 'application/xml', 'application/csv'])
        if not header_params['Accept']:
            del header_params['Accept']

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

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='SuccessResult',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _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)
