# coding: utf-8

"""
    SevOne API Documentation

    Supported endpoints by the new RESTful API  # noqa: E501

    OpenAPI spec version: 2.1.18, Hash: db562e6
    
    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 ApiKeysApi(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 create_api_key(self, dto, **kwargs):  # noqa: E501
        """Create api key  # noqa: E501

        Generate api key  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_api_key(dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ApiKeyRequestDto dto: Api key request object (required)
        :return: ApiKeyDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_api_key_with_http_info(dto, **kwargs)  # noqa: E501
        else:
            (data) = self.create_api_key_with_http_info(dto, **kwargs)  # noqa: E501
            return data

    def create_api_key_with_http_info(self, dto, **kwargs):  # noqa: E501
        """Create api key  # noqa: E501

        Generate api key  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_api_key_with_http_info(dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ApiKeyRequestDto dto: Api key request object (required)
        :return: ApiKeyDto
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['dto']  # 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 create_api_key" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'dto' is set
        if ('dto' not in params or
                params['dto'] is None):
            raise ValueError("Missing the required parameter `dto` when calling `create_api_key`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/users/api-keys', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiKeyDto',  # 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 create_api_key1(self, dto, **kwargs):  # noqa: E501
        """Create api key  # noqa: E501

        Generate api key  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_api_key1(dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ApiKeyRequestDto dto: Api key request object (required)
        :return: ApiKeyDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_api_key1_with_http_info(dto, **kwargs)  # noqa: E501
        else:
            (data) = self.create_api_key1_with_http_info(dto, **kwargs)  # noqa: E501
            return data

    def create_api_key1_with_http_info(self, dto, **kwargs):  # noqa: E501
        """Create api key  # noqa: E501

        Generate api key  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_api_key1_with_http_info(dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ApiKeyRequestDto dto: Api key request object (required)
        :return: ApiKeyDto
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['dto']  # 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 create_api_key1" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'dto' is set
        if ('dto' not in params or
                params['dto'] is None):
            raise ValueError("Missing the required parameter `dto` when calling `create_api_key1`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v2/users/api-keys', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiKeyDto',  # 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 create_api_key_for_user(self, id, dto, **kwargs):  # noqa: E501
        """Create user api key   # noqa: E501

        Generate api key for user  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_api_key_for_user(id, dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: User for which api key will be created (required)
        :param ApiKeyRequestDto dto: Api key request object (required)
        :return: ApiKeyDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_api_key_for_user_with_http_info(id, dto, **kwargs)  # noqa: E501
        else:
            (data) = self.create_api_key_for_user_with_http_info(id, dto, **kwargs)  # noqa: E501
            return data

    def create_api_key_for_user_with_http_info(self, id, dto, **kwargs):  # noqa: E501
        """Create user api key   # noqa: E501

        Generate api key for user  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_api_key_for_user_with_http_info(id, dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: User for which api key will be created (required)
        :param ApiKeyRequestDto dto: Api key request object (required)
        :return: ApiKeyDto
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'dto']  # 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 create_api_key_for_user" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `create_api_key_for_user`")  # noqa: E501
        # verify the required parameter 'dto' is set
        if ('dto' not in params or
                params['dto'] is None):
            raise ValueError("Missing the required parameter `dto` when calling `create_api_key_for_user`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/users/{id}/api-keys', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiKeyDto',  # 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 create_api_key_for_user1(self, id, dto, **kwargs):  # noqa: E501
        """Create user api key   # noqa: E501

        Generate api key for user  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_api_key_for_user1(id, dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: User for which api key will be created (required)
        :param ApiKeyRequestDto dto: Api key request object (required)
        :return: ApiKeyDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_api_key_for_user1_with_http_info(id, dto, **kwargs)  # noqa: E501
        else:
            (data) = self.create_api_key_for_user1_with_http_info(id, dto, **kwargs)  # noqa: E501
            return data

    def create_api_key_for_user1_with_http_info(self, id, dto, **kwargs):  # noqa: E501
        """Create user api key   # noqa: E501

        Generate api key for user  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_api_key_for_user1_with_http_info(id, dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: User for which api key will be created (required)
        :param ApiKeyRequestDto dto: Api key request object (required)
        :return: ApiKeyDto
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'dto']  # 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 create_api_key_for_user1" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `create_api_key_for_user1`")  # noqa: E501
        # verify the required parameter 'dto' is set
        if ('dto' not in params or
                params['dto'] is None):
            raise ValueError("Missing the required parameter `dto` when calling `create_api_key_for_user1`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v2/users/{id}/api-keys', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiKeyDto',  # 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 delete_api_key(self, api_key, **kwargs):  # noqa: E501
        """Delete api keys  # noqa: E501

        Delete your api key  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_api_key(api_key, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str api_key: Api key as string (required)
        :return: int
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete_api_key_with_http_info(api_key, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_api_key_with_http_info(api_key, **kwargs)  # noqa: E501
            return data

    def delete_api_key_with_http_info(self, api_key, **kwargs):  # noqa: E501
        """Delete api keys  # noqa: E501

        Delete your api key  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_api_key_with_http_info(api_key, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str api_key: Api key as string (required)
        :return: int
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['api_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 delete_api_key" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'api_key' is set
        if ('api_key' not in params or
                params['api_key'] is None):
            raise ValueError("Missing the required parameter `api_key` when calling `delete_api_key`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # 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(
            '/api/v1/users/api-keys/{apiKey}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='int',  # 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 delete_api_key1(self, api_key, **kwargs):  # noqa: E501
        """Delete api keys  # noqa: E501

        Delete your api key  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_api_key1(api_key, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str api_key: Api key as string (required)
        :return: int
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete_api_key1_with_http_info(api_key, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_api_key1_with_http_info(api_key, **kwargs)  # noqa: E501
            return data

    def delete_api_key1_with_http_info(self, api_key, **kwargs):  # noqa: E501
        """Delete api keys  # noqa: E501

        Delete your api key  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_api_key1_with_http_info(api_key, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str api_key: Api key as string (required)
        :return: int
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['api_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 delete_api_key1" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'api_key' is set
        if ('api_key' not in params or
                params['api_key'] is None):
            raise ValueError("Missing the required parameter `api_key` when calling `delete_api_key1`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # 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(
            '/api/v2/users/api-keys/{apiKey}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='int',  # 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 delete_api_key_for_user(self, api_key, id, **kwargs):  # noqa: E501
        """Delete user api key  # noqa: E501

        Delete api key for user  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_api_key_for_user(api_key, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str api_key: Api key as string (required)
        :param int id: User for which api key will be deleted (required)
        :return: int
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete_api_key_for_user_with_http_info(api_key, id, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_api_key_for_user_with_http_info(api_key, id, **kwargs)  # noqa: E501
            return data

    def delete_api_key_for_user_with_http_info(self, api_key, id, **kwargs):  # noqa: E501
        """Delete user api key  # noqa: E501

        Delete api key for user  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_api_key_for_user_with_http_info(api_key, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str api_key: Api key as string (required)
        :param int id: User for which api key will be deleted (required)
        :return: int
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['api_key', 'id']  # 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 delete_api_key_for_user" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'api_key' is set
        if ('api_key' not in params or
                params['api_key'] is None):
            raise ValueError("Missing the required parameter `api_key` when calling `delete_api_key_for_user`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `delete_api_key_for_user`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'api_key' in params:
            path_params['apiKey'] = params['api_key']  # noqa: E501
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # 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(
            '/api/v1/users/{id}/api-keys/{apiKey}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='int',  # 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 delete_api_key_for_user1(self, api_key, id, **kwargs):  # noqa: E501
        """Delete user api key  # noqa: E501

        Delete api key for user  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_api_key_for_user1(api_key, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str api_key: Api key as string (required)
        :param int id: User for which api key will be deleted (required)
        :return: int
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete_api_key_for_user1_with_http_info(api_key, id, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_api_key_for_user1_with_http_info(api_key, id, **kwargs)  # noqa: E501
            return data

    def delete_api_key_for_user1_with_http_info(self, api_key, id, **kwargs):  # noqa: E501
        """Delete user api key  # noqa: E501

        Delete api key for user  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_api_key_for_user1_with_http_info(api_key, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str api_key: Api key as string (required)
        :param int id: User for which api key will be deleted (required)
        :return: int
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['api_key', 'id']  # 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 delete_api_key_for_user1" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'api_key' is set
        if ('api_key' not in params or
                params['api_key'] is None):
            raise ValueError("Missing the required parameter `api_key` when calling `delete_api_key_for_user1`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `delete_api_key_for_user1`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'api_key' in params:
            path_params['apiKey'] = params['api_key']  # noqa: E501
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # 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(
            '/api/v2/users/{id}/api-keys/{apiKey}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='int',  # 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 delete_api_keys(self, **kwargs):  # noqa: E501
        """Delete api keys  # noqa: E501

        Delete all your api keys  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_api_keys(async_req=True)
        >>> result = thread.get()

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

    def delete_api_keys_with_http_info(self, **kwargs):  # noqa: E501
        """Delete api keys  # noqa: E501

        Delete all your api keys  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_api_keys_with_http_info(async_req=True)
        >>> result = thread.get()

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

        all_params = []  # 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 delete_api_keys" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # 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(
            '/api/v1/users/api-keys', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='int',  # 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 delete_api_keys1(self, **kwargs):  # noqa: E501
        """Delete api keys  # noqa: E501

        Delete all your api keys  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_api_keys1(async_req=True)
        >>> result = thread.get()

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

    def delete_api_keys1_with_http_info(self, **kwargs):  # noqa: E501
        """Delete api keys  # noqa: E501

        Delete all your api keys  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_api_keys1_with_http_info(async_req=True)
        >>> result = thread.get()

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

        all_params = []  # 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 delete_api_keys1" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # 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(
            '/api/v2/users/api-keys', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='int',  # 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 delete_api_keys_for_user(self, id, **kwargs):  # noqa: E501
        """Delete user api keys  # noqa: E501

        Delete api keys for user  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_api_keys_for_user(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: User for which api keys will be deleted (required)
        :return: int
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete_api_keys_for_user_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_api_keys_for_user_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def delete_api_keys_for_user_with_http_info(self, id, **kwargs):  # noqa: E501
        """Delete user api keys  # noqa: E501

        Delete api keys for user  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_api_keys_for_user_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: User for which api keys will be deleted (required)
        :return: int
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # 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 delete_api_keys_for_user" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `delete_api_keys_for_user`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # 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(
            '/api/v1/users/{id}/api-keys', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='int',  # 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 delete_api_keys_for_user1(self, id, **kwargs):  # noqa: E501
        """Delete user api keys  # noqa: E501

        Delete api keys for user  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_api_keys_for_user1(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: User for which api keys will be deleted (required)
        :return: int
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete_api_keys_for_user1_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_api_keys_for_user1_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def delete_api_keys_for_user1_with_http_info(self, id, **kwargs):  # noqa: E501
        """Delete user api keys  # noqa: E501

        Delete api keys for user  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_api_keys_for_user1_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: User for which api keys will be deleted (required)
        :return: int
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # 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 delete_api_keys_for_user1" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `delete_api_keys_for_user1`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # 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(
            '/api/v2/users/{id}/api-keys', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='int',  # 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_api_keys(self, **kwargs):  # noqa: E501
        """View your api keys  # noqa: E501

        View your api keys  # 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_api_keys(async_req=True)
        >>> result = thread.get()

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

    def get_api_keys_with_http_info(self, **kwargs):  # noqa: E501
        """View your api keys  # noqa: E501

        View your api keys  # 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_api_keys_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: list[ApiKeyDto]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []  # 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_api_keys" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # 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(
            '/api/v1/users/api-keys', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[ApiKeyDto]',  # 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_api_keys1(self, **kwargs):  # noqa: E501
        """View your api keys  # noqa: E501

        View your api keys  # 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_api_keys1(async_req=True)
        >>> result = thread.get()

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

    def get_api_keys1_with_http_info(self, **kwargs):  # noqa: E501
        """View your api keys  # noqa: E501

        View your api keys  # 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_api_keys1_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: list[ApiKeyDto]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []  # 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_api_keys1" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # 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(
            '/api/v2/users/api-keys', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[ApiKeyDto]',  # 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_api_keys_for_user(self, id, **kwargs):  # noqa: E501
        """View user api keys  # noqa: E501

        View api keys for user  # 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_api_keys_for_user(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: User for which api keys will be returned (required)
        :return: list[ApiKeyDto]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_api_keys_for_user_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_api_keys_for_user_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def get_api_keys_for_user_with_http_info(self, id, **kwargs):  # noqa: E501
        """View user api keys  # noqa: E501

        View api keys for user  # 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_api_keys_for_user_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: User for which api keys will be returned (required)
        :return: list[ApiKeyDto]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # 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_api_keys_for_user" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `get_api_keys_for_user`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # 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(
            '/api/v1/users/{id}/api-keys', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[ApiKeyDto]',  # 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_api_keys_for_user1(self, id, **kwargs):  # noqa: E501
        """View user api keys  # noqa: E501

        View api keys for user  # 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_api_keys_for_user1(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: User for which api keys will be returned (required)
        :return: list[ApiKeyDto]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_api_keys_for_user1_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_api_keys_for_user1_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def get_api_keys_for_user1_with_http_info(self, id, **kwargs):  # noqa: E501
        """View user api keys  # noqa: E501

        View api keys for user  # 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_api_keys_for_user1_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: User for which api keys will be returned (required)
        :return: list[ApiKeyDto]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # 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_api_keys_for_user1" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `get_api_keys_for_user1`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # 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(
            '/api/v2/users/{id}/api-keys', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[ApiKeyDto]',  # 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 update_api_key(self, api_key, dto, **kwargs):  # noqa: E501
        """Update api key  # noqa: E501

        Update your api key  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_api_key(api_key, dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str api_key: Api key as string (required)
        :param ApiKeyRequestDto dto: Api key request object (required)
        :return: ApiKeyDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_api_key_with_http_info(api_key, dto, **kwargs)  # noqa: E501
        else:
            (data) = self.update_api_key_with_http_info(api_key, dto, **kwargs)  # noqa: E501
            return data

    def update_api_key_with_http_info(self, api_key, dto, **kwargs):  # noqa: E501
        """Update api key  # noqa: E501

        Update your api key  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_api_key_with_http_info(api_key, dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str api_key: Api key as string (required)
        :param ApiKeyRequestDto dto: Api key request object (required)
        :return: ApiKeyDto
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['api_key', 'dto']  # 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 update_api_key" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'api_key' is set
        if ('api_key' not in params or
                params['api_key'] is None):
            raise ValueError("Missing the required parameter `api_key` when calling `update_api_key`")  # noqa: E501
        # verify the required parameter 'dto' is set
        if ('dto' not in params or
                params['dto'] is None):
            raise ValueError("Missing the required parameter `dto` when calling `update_api_key`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/users/api-keys/{apiKey}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiKeyDto',  # 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 update_api_key1(self, api_key, dto, **kwargs):  # noqa: E501
        """Update api key  # noqa: E501

        Update your api key  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_api_key1(api_key, dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str api_key: Api key as string (required)
        :param ApiKeyRequestDto dto: Api key request object (required)
        :return: ApiKeyDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_api_key1_with_http_info(api_key, dto, **kwargs)  # noqa: E501
        else:
            (data) = self.update_api_key1_with_http_info(api_key, dto, **kwargs)  # noqa: E501
            return data

    def update_api_key1_with_http_info(self, api_key, dto, **kwargs):  # noqa: E501
        """Update api key  # noqa: E501

        Update your api key  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_api_key1_with_http_info(api_key, dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str api_key: Api key as string (required)
        :param ApiKeyRequestDto dto: Api key request object (required)
        :return: ApiKeyDto
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['api_key', 'dto']  # 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 update_api_key1" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'api_key' is set
        if ('api_key' not in params or
                params['api_key'] is None):
            raise ValueError("Missing the required parameter `api_key` when calling `update_api_key1`")  # noqa: E501
        # verify the required parameter 'dto' is set
        if ('dto' not in params or
                params['dto'] is None):
            raise ValueError("Missing the required parameter `dto` when calling `update_api_key1`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v2/users/api-keys/{apiKey}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiKeyDto',  # 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 update_api_key_for_user(self, id, api_key, dto, **kwargs):  # noqa: E501
        """Update user api key  # noqa: E501

        Update api key for user  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_api_key_for_user(id, api_key, dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: User for which api key will be updated (required)
        :param str api_key: Api key for which meta data will be updated (required)
        :param ApiKeyRequestDto dto: Api key request object (required)
        :return: ApiKeyDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_api_key_for_user_with_http_info(id, api_key, dto, **kwargs)  # noqa: E501
        else:
            (data) = self.update_api_key_for_user_with_http_info(id, api_key, dto, **kwargs)  # noqa: E501
            return data

    def update_api_key_for_user_with_http_info(self, id, api_key, dto, **kwargs):  # noqa: E501
        """Update user api key  # noqa: E501

        Update api key for user  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_api_key_for_user_with_http_info(id, api_key, dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: User for which api key will be updated (required)
        :param str api_key: Api key for which meta data will be updated (required)
        :param ApiKeyRequestDto dto: Api key request object (required)
        :return: ApiKeyDto
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'api_key', 'dto']  # 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 update_api_key_for_user" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `update_api_key_for_user`")  # noqa: E501
        # verify the required parameter 'api_key' is set
        if ('api_key' not in params or
                params['api_key'] is None):
            raise ValueError("Missing the required parameter `api_key` when calling `update_api_key_for_user`")  # noqa: E501
        # verify the required parameter 'dto' is set
        if ('dto' not in params or
                params['dto'] is None):
            raise ValueError("Missing the required parameter `dto` when calling `update_api_key_for_user`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501
        if 'api_key' in params:
            path_params['apiKey'] = params['api_key']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/users/{id}/api-keys/{apiKey}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiKeyDto',  # 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 update_api_key_for_user1(self, id, api_key, dto, **kwargs):  # noqa: E501
        """Update user api key  # noqa: E501

        Update api key for user  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_api_key_for_user1(id, api_key, dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: User for which api key will be updated (required)
        :param str api_key: Api key for which meta data will be updated (required)
        :param ApiKeyRequestDto dto: Api key request object (required)
        :return: ApiKeyDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_api_key_for_user1_with_http_info(id, api_key, dto, **kwargs)  # noqa: E501
        else:
            (data) = self.update_api_key_for_user1_with_http_info(id, api_key, dto, **kwargs)  # noqa: E501
            return data

    def update_api_key_for_user1_with_http_info(self, id, api_key, dto, **kwargs):  # noqa: E501
        """Update user api key  # noqa: E501

        Update api key for user  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_api_key_for_user1_with_http_info(id, api_key, dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: User for which api key will be updated (required)
        :param str api_key: Api key for which meta data will be updated (required)
        :param ApiKeyRequestDto dto: Api key request object (required)
        :return: ApiKeyDto
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'api_key', 'dto']  # 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 update_api_key_for_user1" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `update_api_key_for_user1`")  # noqa: E501
        # verify the required parameter 'api_key' is set
        if ('api_key' not in params or
                params['api_key'] is None):
            raise ValueError("Missing the required parameter `api_key` when calling `update_api_key_for_user1`")  # noqa: E501
        # verify the required parameter 'dto' is set
        if ('dto' not in params or
                params['dto'] is None):
            raise ValueError("Missing the required parameter `dto` when calling `update_api_key_for_user1`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501
        if 'api_key' in params:
            path_params['apiKey'] = params['api_key']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v2/users/{id}/api-keys/{apiKey}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApiKeyDto',  # 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)
