# coding: utf-8

"""
    EXACT - API

    API to interact with the EXACT Server  # noqa: E501

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

from __future__ import absolute_import
from exact_sync.v1.api.pagination_base_api import PaginationBaseAPI
import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from exact_sync.v1.api_client import ApiClient


class UsersApi(PaginationBaseAPI):
    """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_user(self, **kwargs):  # noqa: E501
        """create_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_user(async_req=True)
        >>> result = thread.get()

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

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

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

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501

        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'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

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

        return self.api_client.call_api(
            '/api/v1/users/users/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='User',  # 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_user(self, **kwargs):  # noqa: E501
        """create_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_user(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_user_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.create_user_with_http_info(**kwargs)  # noqa: E501
            return data

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

        :param async_req bool
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['username', 'is_superuser', 'is_staff', 'is_active', 'last_login']  # 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_user" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501

        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'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

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

        return self.api_client.call_api(
            '/api/v1/users/users/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='User',  # 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_user(self, **kwargs):  # noqa: E501
        """create_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_user(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_user_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.create_user_with_http_info(**kwargs)  # noqa: E501
            return data

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

        :param async_req bool
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['username', 'is_superuser', 'is_staff', 'is_active', 'last_login']  # 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_user" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501

        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'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

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

        return self.api_client.call_api(
            '/api/v1/users/users/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='User',  # 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 destroy_user(self, id, **kwargs):  # noqa: E501
        """destroy_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.destroy_user(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param str id2: id
        :param str username: username
        :param str username__contains: username__contains
        :param str is_superuser: is_superuser
        :param str is_staff: is_staff
        :param str is_active: is_active
        :param str last_login: last_login
        :param str team: team
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.destroy_user_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.destroy_user_with_http_info(id, **kwargs)  # noqa: E501
            return data

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

        :param async_req bool
        :param str id: (required)
        :param str id2: id
        :param str username: username
        :param str username__contains: username__contains
        :param str is_superuser: is_superuser
        :param str is_staff: is_staff
        :param str is_active: is_active
        :param str last_login: last_login
        :param str team: team
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'id2', 'username', 'username__contains', 'is_superuser', 'is_staff', 'is_active', 'last_login', 'team']  # 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 destroy_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 `destroy_user`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'id2' in params:
            query_params.append(('id', params['id2']))  # noqa: E501
        if 'username' in params:
            query_params.append(('username', params['username']))  # noqa: E501
        if 'username__contains' in params:
            query_params.append(('username__contains', params['username__contains']))  # noqa: E501
        if 'is_superuser' in params:
            query_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            query_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            query_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            query_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'team' in params:
            query_params.append(('team', params['team']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/users/users/{id}/', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # 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 list_users(self, pagination:bool=True, **kwargs):  # noqa: E501
        """list_users  # noqa: E501

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

        :param async_req bool
        :param int limit: Number of results to return per page.
        :param int offset: The initial index from which to return the results.
        :param str id: id
        :param str username: username
        :param str username__contains: username__contains
        :param str is_superuser: is_superuser
        :param str is_staff: is_staff
        :param str is_active: is_active
        :param str last_login: last_login
        :param str team: team
        :return: Users
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if pagination:
            if kwargs.get('async_req'):
                return self.list_users_with_http_info(**kwargs)  # noqa: E501
            else:
                (data) = self.list_users_with_http_info(**kwargs)  # noqa: E501
                return data
        else:
            return self._get_all(self.list_users_with_http_info, **kwargs)

    def list_users_with_http_info(self, **kwargs):  # noqa: E501
        """list_users  # noqa: E501

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

        :param async_req bool
        :param int limit: Number of results to return per page.
        :param int offset: The initial index from which to return the results.
        :param str id: id
        :param str username: username
        :param str username__contains: username__contains
        :param str is_superuser: is_superuser
        :param str is_staff: is_staff
        :param str is_active: is_active
        :param str last_login: last_login
        :param str team: team
        :return: Users
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['limit', 'offset', 'id', 'username', 'username__contains', 'is_superuser', 'is_staff', 'is_active', 'last_login', 'team']  # noqa: E501
        all_params.append('omit')
        all_params.append('fields')
        all_params.append('expand')
        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 list_users" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'offset' in params:
            query_params.append(('offset', params['offset']))  # noqa: E501
        if 'id' in params:
            query_params.append(('id', params['id']))  # noqa: E501
        if 'username' in params:
            query_params.append(('username', params['username']))  # noqa: E501
        if 'username__contains' in params:
            query_params.append(('username__contains', params['username__contains']))  # noqa: E501
        if 'is_superuser' in params:
            query_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            query_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            query_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            query_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'team' in params:
            query_params.append(('team', params['team']))  # noqa: E501
        if 'omit' in params:
            query_params.append(('omit', params['omit']))  # noqa: E501
        if 'fields' in params:
            query_params.append(('fields', params['fields']))  # noqa: E501
        if 'expand' in params:
            query_params.append(('expand', params['expand']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/api/v1/users/users/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Users',  # 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 partial_update_user(self, id, **kwargs):  # noqa: E501
        """partial_update_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.partial_update_user(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param Body6 body:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.partial_update_user_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.partial_update_user_with_http_info(id, **kwargs)  # noqa: E501
            return data

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

        :param async_req bool
        :param str id: (required)
        :param Body6 body:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'body', 'id2', 'username2', 'username__contains', 'is_superuser2', 'is_staff2', 'is_active2', 'last_login2', 'team']  # 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 partial_update_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 `partial_update_user`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'id2' in params:
            query_params.append(('id', params['id2']))  # noqa: E501
        if 'username2' in params:
            query_params.append(('username', params['username2']))  # noqa: E501
        if 'username__contains' in params:
            query_params.append(('username__contains', params['username__contains']))  # noqa: E501
        if 'is_superuser2' in params:
            query_params.append(('is_superuser', params['is_superuser2']))  # noqa: E501
        if 'is_staff2' in params:
            query_params.append(('is_staff', params['is_staff2']))  # noqa: E501
        if 'is_active2' in params:
            query_params.append(('is_active', params['is_active2']))  # noqa: E501
        if 'last_login2' in params:
            query_params.append(('last_login', params['last_login2']))  # noqa: E501
        if 'team' in params:
            query_params.append(('team', params['team']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501

        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'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

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

        return self.api_client.call_api(
            '/api/v1/users/users/{id}/', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='User',  # 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 partial_update_user(self, id, **kwargs):  # noqa: E501
        """partial_update_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.partial_update_user(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.partial_update_user_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.partial_update_user_with_http_info(id, **kwargs)  # noqa: E501
            return data

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

        :param async_req bool
        :param str id: (required)
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'username', 'is_superuser', 'is_staff', 'is_active', 'last_login', 'id2', 'username2', 'username__contains', 'is_superuser2', 'is_staff2', 'is_active2', 'last_login2', 'team']  # 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 partial_update_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 `partial_update_user`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'id2' in params:
            query_params.append(('id', params['id2']))  # noqa: E501
        if 'username2' in params:
            query_params.append(('username', params['username2']))  # noqa: E501
        if 'username__contains' in params:
            query_params.append(('username__contains', params['username__contains']))  # noqa: E501
        if 'is_superuser2' in params:
            query_params.append(('is_superuser', params['is_superuser2']))  # noqa: E501
        if 'is_staff2' in params:
            query_params.append(('is_staff', params['is_staff2']))  # noqa: E501
        if 'is_active2' in params:
            query_params.append(('is_active', params['is_active2']))  # noqa: E501
        if 'last_login2' in params:
            query_params.append(('last_login', params['last_login2']))  # noqa: E501
        if 'team' in params:
            query_params.append(('team', params['team']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501

        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'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

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

        return self.api_client.call_api(
            '/api/v1/users/users/{id}/', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='User',  # 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 partial_update_user(self, id, **kwargs):  # noqa: E501
        """partial_update_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.partial_update_user(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.partial_update_user_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.partial_update_user_with_http_info(id, **kwargs)  # noqa: E501
            return data

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

        :param async_req bool
        :param str id: (required)
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'username', 'is_superuser', 'is_staff', 'is_active', 'last_login', 'id2', 'username2', 'username__contains', 'is_superuser2', 'is_staff2', 'is_active2', 'last_login2', 'team']  # 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 partial_update_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 `partial_update_user`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'id2' in params:
            query_params.append(('id', params['id2']))  # noqa: E501
        if 'username2' in params:
            query_params.append(('username', params['username2']))  # noqa: E501
        if 'username__contains' in params:
            query_params.append(('username__contains', params['username__contains']))  # noqa: E501
        if 'is_superuser2' in params:
            query_params.append(('is_superuser', params['is_superuser2']))  # noqa: E501
        if 'is_staff2' in params:
            query_params.append(('is_staff', params['is_staff2']))  # noqa: E501
        if 'is_active2' in params:
            query_params.append(('is_active', params['is_active2']))  # noqa: E501
        if 'last_login2' in params:
            query_params.append(('last_login', params['last_login2']))  # noqa: E501
        if 'team' in params:
            query_params.append(('team', params['team']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501

        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'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

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

        return self.api_client.call_api(
            '/api/v1/users/users/{id}/', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='User',  # 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 retrieve_user(self, id, **kwargs):  # noqa: E501
        """retrieve_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.retrieve_user(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param str id2: id
        :param str username: username
        :param str username__contains: username__contains
        :param str is_superuser: is_superuser
        :param str is_staff: is_staff
        :param str is_active: is_active
        :param str last_login: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.retrieve_user_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.retrieve_user_with_http_info(id, **kwargs)  # noqa: E501
            return data

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

        :param async_req bool
        :param str id: (required)
        :param str id2: id
        :param str username: username
        :param str username__contains: username__contains
        :param str is_superuser: is_superuser
        :param str is_staff: is_staff
        :param str is_active: is_active
        :param str last_login: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'id2', 'username', 'username__contains', 'is_superuser', 'is_staff', 'is_active', 'last_login', 'team']  # noqa: E501
        all_params.append('async_req')
        all_params.append('omit')
        all_params.append('fields')
        all_params.append('expand')
        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 retrieve_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 `retrieve_user`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'id2' in params:
            query_params.append(('id', params['id2']))  # noqa: E501
        if 'username' in params:
            query_params.append(('username', params['username']))  # noqa: E501
        if 'username__contains' in params:
            query_params.append(('username__contains', params['username__contains']))  # noqa: E501
        if 'is_superuser' in params:
            query_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            query_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            query_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            query_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'team' in params:
            query_params.append(('team', params['team']))  # noqa: E501
        if 'omit' in params:
            query_params.append(('omit', params['omit']))  # noqa: E501
        if 'fields' in params:
            query_params.append(('fields', params['fields']))  # noqa: E50
        if 'expand' in params:
            query_params.append(('expand', params['expand']))  # noqa: E501
            
        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/api/v1/users/users/{id}/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='User',  # 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_user(self, id, **kwargs):  # noqa: E501
        """update_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_user(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param Body3 body:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_user_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.update_user_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def update_user_with_http_info(self, id, **kwargs):  # noqa: E501
        """update_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_user_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param Body3 body:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'body', 'id2', 'username2', 'username__contains', 'is_superuser2', 'is_staff2', 'is_active2', 'last_login2', 'team']  # 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_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_user`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'id2' in params:
            query_params.append(('id', params['id2']))  # noqa: E501
        if 'username2' in params:
            query_params.append(('username', params['username2']))  # noqa: E501
        if 'username__contains' in params:
            query_params.append(('username__contains', params['username__contains']))  # noqa: E501
        if 'is_superuser2' in params:
            query_params.append(('is_superuser', params['is_superuser2']))  # noqa: E501
        if 'is_staff2' in params:
            query_params.append(('is_staff', params['is_staff2']))  # noqa: E501
        if 'is_active2' in params:
            query_params.append(('is_active', params['is_active2']))  # noqa: E501
        if 'last_login2' in params:
            query_params.append(('last_login', params['last_login2']))  # noqa: E501
        if 'team' in params:
            query_params.append(('team', params['team']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501

        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'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

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

        return self.api_client.call_api(
            '/api/v1/users/users/{id}/', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='User',  # 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_user(self, id, **kwargs):  # noqa: E501
        """update_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_user(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_user_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.update_user_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def update_user_with_http_info(self, id, **kwargs):  # noqa: E501
        """update_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_user_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'username', 'is_superuser', 'is_staff', 'is_active', 'last_login', 'id2', 'username2', 'username__contains', 'is_superuser2', 'is_staff2', 'is_active2', 'last_login2', 'team']  # 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_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_user`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'id2' in params:
            query_params.append(('id', params['id2']))  # noqa: E501
        if 'username2' in params:
            query_params.append(('username', params['username2']))  # noqa: E501
        if 'username__contains' in params:
            query_params.append(('username__contains', params['username__contains']))  # noqa: E501
        if 'is_superuser2' in params:
            query_params.append(('is_superuser', params['is_superuser2']))  # noqa: E501
        if 'is_staff2' in params:
            query_params.append(('is_staff', params['is_staff2']))  # noqa: E501
        if 'is_active2' in params:
            query_params.append(('is_active', params['is_active2']))  # noqa: E501
        if 'last_login2' in params:
            query_params.append(('last_login', params['last_login2']))  # noqa: E501
        if 'team' in params:
            query_params.append(('team', params['team']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501

        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'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

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

        return self.api_client.call_api(
            '/api/v1/users/users/{id}/', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='User',  # 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_user(self, id, **kwargs):  # noqa: E501
        """update_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_user(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_user_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.update_user_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def update_user_with_http_info(self, id, **kwargs):  # noqa: E501
        """update_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_user_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'username', 'is_superuser', 'is_staff', 'is_active', 'last_login', 'id2', 'username2', 'username__contains', 'is_superuser2', 'is_staff2', 'is_active2', 'last_login2', 'team']  # 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_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_user`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'id2' in params:
            query_params.append(('id', params['id2']))  # noqa: E501
        if 'username2' in params:
            query_params.append(('username', params['username2']))  # noqa: E501
        if 'username__contains' in params:
            query_params.append(('username__contains', params['username__contains']))  # noqa: E501
        if 'is_superuser2' in params:
            query_params.append(('is_superuser', params['is_superuser2']))  # noqa: E501
        if 'is_staff2' in params:
            query_params.append(('is_staff', params['is_staff2']))  # noqa: E501
        if 'is_active2' in params:
            query_params.append(('is_active', params['is_active2']))  # noqa: E501
        if 'last_login2' in params:
            query_params.append(('last_login', params['last_login2']))  # noqa: E501
        if 'team' in params:
            query_params.append(('team', params['team']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501

        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'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

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

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

# coding: utf-8

"""
    EXACT - API

    API to interact with the EXACT Server  # noqa: E501

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

from __future__ import absolute_import
from exact_sync.v1.api.pagination_base_api import PaginationBaseAPI
import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from exact_sync.v1.api_client import ApiClient


class UsersApi(PaginationBaseAPI):
    """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_user(self, **kwargs):  # noqa: E501
        """create_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_user(async_req=True)
        >>> result = thread.get()

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

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

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

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501

        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'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

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

        return self.api_client.call_api(
            '/api/v1/users/users/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='User',  # 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_user(self, **kwargs):  # noqa: E501
        """create_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_user(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_user_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.create_user_with_http_info(**kwargs)  # noqa: E501
            return data

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

        :param async_req bool
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['username', 'is_superuser', 'is_staff', 'is_active', 'last_login']  # 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_user" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501

        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'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

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

        return self.api_client.call_api(
            '/api/v1/users/users/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='User',  # 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_user(self, **kwargs):  # noqa: E501
        """create_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_user(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_user_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.create_user_with_http_info(**kwargs)  # noqa: E501
            return data

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

        :param async_req bool
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['username', 'is_superuser', 'is_staff', 'is_active', 'last_login']  # 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_user" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501

        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'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

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

        return self.api_client.call_api(
            '/api/v1/users/users/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='User',  # 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 destroy_user(self, id, **kwargs):  # noqa: E501
        """destroy_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.destroy_user(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param str id2: id
        :param str username: username
        :param str username__contains: username__contains
        :param str is_superuser: is_superuser
        :param str is_staff: is_staff
        :param str is_active: is_active
        :param str last_login: last_login
        :param str team: team
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.destroy_user_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.destroy_user_with_http_info(id, **kwargs)  # noqa: E501
            return data

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

        :param async_req bool
        :param str id: (required)
        :param str id2: id
        :param str username: username
        :param str username__contains: username__contains
        :param str is_superuser: is_superuser
        :param str is_staff: is_staff
        :param str is_active: is_active
        :param str last_login: last_login
        :param str team: team
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'id2', 'username', 'username__contains', 'is_superuser', 'is_staff', 'is_active', 'last_login', 'team']  # 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 destroy_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 `destroy_user`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'id2' in params:
            query_params.append(('id', params['id2']))  # noqa: E501
        if 'username' in params:
            query_params.append(('username', params['username']))  # noqa: E501
        if 'username__contains' in params:
            query_params.append(('username__contains', params['username__contains']))  # noqa: E501
        if 'is_superuser' in params:
            query_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            query_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            query_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            query_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'team' in params:
            query_params.append(('team', params['team']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/users/users/{id}/', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # 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 list_users(self, pagination:bool=True, **kwargs):  # noqa: E501
        """list_users  # noqa: E501

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

        :param async_req bool
        :param int limit: Number of results to return per page.
        :param int offset: The initial index from which to return the results.
        :param str id: id
        :param str username: username
        :param str username__contains: username__contains
        :param str is_superuser: is_superuser
        :param str is_staff: is_staff
        :param str is_active: is_active
        :param str last_login: last_login
        :param str team: team
        :return: Users
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if pagination:
            if kwargs.get('async_req'):
                return self.list_users_with_http_info(**kwargs)  # noqa: E501
            else:
                (data) = self.list_users_with_http_info(**kwargs)  # noqa: E501
                return data
        else:
            return self._get_all(self.list_users_with_http_info, **kwargs)

    def list_users_with_http_info(self, **kwargs):  # noqa: E501
        """list_users  # noqa: E501

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

        :param async_req bool
        :param int limit: Number of results to return per page.
        :param int offset: The initial index from which to return the results.
        :param str id: id
        :param str username: username
        :param str username__contains: username__contains
        :param str is_superuser: is_superuser
        :param str is_staff: is_staff
        :param str is_active: is_active
        :param str last_login: last_login
        :param str team: team
        :return: Users
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['limit', 'offset', 'id', 'username', 'username__contains', 'is_superuser', 'is_staff', 'is_active', 'last_login', 'team']  # noqa: E501
        all_params.append('omit')
        all_params.append('fields')
        all_params.append('expand')
        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 list_users" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'offset' in params:
            query_params.append(('offset', params['offset']))  # noqa: E501
        if 'id' in params:
            query_params.append(('id', params['id']))  # noqa: E501
        if 'username' in params:
            query_params.append(('username', params['username']))  # noqa: E501
        if 'username__contains' in params:
            query_params.append(('username__contains', params['username__contains']))  # noqa: E501
        if 'is_superuser' in params:
            query_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            query_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            query_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            query_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'team' in params:
            query_params.append(('team', params['team']))  # noqa: E501
        if 'omit' in params:
            query_params.append(('omit', params['omit']))  # noqa: E501
        if 'fields' in params:
            query_params.append(('fields', params['fields']))  # noqa: E501
        if 'expand' in params:
            query_params.append(('expand', params['expand']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/api/v1/users/users/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Users',  # 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 partial_update_user(self, id, **kwargs):  # noqa: E501
        """partial_update_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.partial_update_user(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param Body6 body:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.partial_update_user_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.partial_update_user_with_http_info(id, **kwargs)  # noqa: E501
            return data

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

        :param async_req bool
        :param str id: (required)
        :param Body6 body:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'body', 'id2', 'username2', 'username__contains', 'is_superuser2', 'is_staff2', 'is_active2', 'last_login2', 'team']  # 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 partial_update_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 `partial_update_user`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'id2' in params:
            query_params.append(('id', params['id2']))  # noqa: E501
        if 'username2' in params:
            query_params.append(('username', params['username2']))  # noqa: E501
        if 'username__contains' in params:
            query_params.append(('username__contains', params['username__contains']))  # noqa: E501
        if 'is_superuser2' in params:
            query_params.append(('is_superuser', params['is_superuser2']))  # noqa: E501
        if 'is_staff2' in params:
            query_params.append(('is_staff', params['is_staff2']))  # noqa: E501
        if 'is_active2' in params:
            query_params.append(('is_active', params['is_active2']))  # noqa: E501
        if 'last_login2' in params:
            query_params.append(('last_login', params['last_login2']))  # noqa: E501
        if 'team' in params:
            query_params.append(('team', params['team']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501

        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'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

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

        return self.api_client.call_api(
            '/api/v1/users/users/{id}/', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='User',  # 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 partial_update_user(self, id, **kwargs):  # noqa: E501
        """partial_update_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.partial_update_user(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.partial_update_user_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.partial_update_user_with_http_info(id, **kwargs)  # noqa: E501
            return data

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

        :param async_req bool
        :param str id: (required)
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'username', 'is_superuser', 'is_staff', 'is_active', 'last_login', 'id2', 'username2', 'username__contains', 'is_superuser2', 'is_staff2', 'is_active2', 'last_login2', 'team']  # 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 partial_update_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 `partial_update_user`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'id2' in params:
            query_params.append(('id', params['id2']))  # noqa: E501
        if 'username2' in params:
            query_params.append(('username', params['username2']))  # noqa: E501
        if 'username__contains' in params:
            query_params.append(('username__contains', params['username__contains']))  # noqa: E501
        if 'is_superuser2' in params:
            query_params.append(('is_superuser', params['is_superuser2']))  # noqa: E501
        if 'is_staff2' in params:
            query_params.append(('is_staff', params['is_staff2']))  # noqa: E501
        if 'is_active2' in params:
            query_params.append(('is_active', params['is_active2']))  # noqa: E501
        if 'last_login2' in params:
            query_params.append(('last_login', params['last_login2']))  # noqa: E501
        if 'team' in params:
            query_params.append(('team', params['team']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501

        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'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

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

        return self.api_client.call_api(
            '/api/v1/users/users/{id}/', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='User',  # 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 partial_update_user(self, id, **kwargs):  # noqa: E501
        """partial_update_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.partial_update_user(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.partial_update_user_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.partial_update_user_with_http_info(id, **kwargs)  # noqa: E501
            return data

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

        :param async_req bool
        :param str id: (required)
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'username', 'is_superuser', 'is_staff', 'is_active', 'last_login', 'id2', 'username2', 'username__contains', 'is_superuser2', 'is_staff2', 'is_active2', 'last_login2', 'team']  # 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 partial_update_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 `partial_update_user`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'id2' in params:
            query_params.append(('id', params['id2']))  # noqa: E501
        if 'username2' in params:
            query_params.append(('username', params['username2']))  # noqa: E501
        if 'username__contains' in params:
            query_params.append(('username__contains', params['username__contains']))  # noqa: E501
        if 'is_superuser2' in params:
            query_params.append(('is_superuser', params['is_superuser2']))  # noqa: E501
        if 'is_staff2' in params:
            query_params.append(('is_staff', params['is_staff2']))  # noqa: E501
        if 'is_active2' in params:
            query_params.append(('is_active', params['is_active2']))  # noqa: E501
        if 'last_login2' in params:
            query_params.append(('last_login', params['last_login2']))  # noqa: E501
        if 'team' in params:
            query_params.append(('team', params['team']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501

        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'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

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

        return self.api_client.call_api(
            '/api/v1/users/users/{id}/', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='User',  # 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 retrieve_user(self, id, **kwargs):  # noqa: E501
        """retrieve_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.retrieve_user(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param str id2: id
        :param str username: username
        :param str username__contains: username__contains
        :param str is_superuser: is_superuser
        :param str is_staff: is_staff
        :param str is_active: is_active
        :param str last_login: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.retrieve_user_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.retrieve_user_with_http_info(id, **kwargs)  # noqa: E501
            return data

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

        :param async_req bool
        :param str id: (required)
        :param str id2: id
        :param str username: username
        :param str username__contains: username__contains
        :param str is_superuser: is_superuser
        :param str is_staff: is_staff
        :param str is_active: is_active
        :param str last_login: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'id2', 'username', 'username__contains', 'is_superuser', 'is_staff', 'is_active', 'last_login', 'team']  # noqa: E501
        all_params.append('async_req')
        all_params.append('omit')
        all_params.append('fields')
        all_params.append('expand')
        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 retrieve_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 `retrieve_user`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'id2' in params:
            query_params.append(('id', params['id2']))  # noqa: E501
        if 'username' in params:
            query_params.append(('username', params['username']))  # noqa: E501
        if 'username__contains' in params:
            query_params.append(('username__contains', params['username__contains']))  # noqa: E501
        if 'is_superuser' in params:
            query_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            query_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            query_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            query_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'team' in params:
            query_params.append(('team', params['team']))  # noqa: E501
        if 'omit' in params:
            query_params.append(('omit', params['omit']))  # noqa: E501
        if 'fields' in params:
            query_params.append(('fields', params['fields']))  # noqa: E50
        if 'expand' in params:
            query_params.append(('expand', params['expand']))  # noqa: E501
            
        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/api/v1/users/users/{id}/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='User',  # 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_user(self, id, **kwargs):  # noqa: E501
        """update_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_user(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param Body3 body:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_user_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.update_user_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def update_user_with_http_info(self, id, **kwargs):  # noqa: E501
        """update_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_user_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param Body3 body:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'body', 'id2', 'username2', 'username__contains', 'is_superuser2', 'is_staff2', 'is_active2', 'last_login2', 'team']  # 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_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_user`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'id2' in params:
            query_params.append(('id', params['id2']))  # noqa: E501
        if 'username2' in params:
            query_params.append(('username', params['username2']))  # noqa: E501
        if 'username__contains' in params:
            query_params.append(('username__contains', params['username__contains']))  # noqa: E501
        if 'is_superuser2' in params:
            query_params.append(('is_superuser', params['is_superuser2']))  # noqa: E501
        if 'is_staff2' in params:
            query_params.append(('is_staff', params['is_staff2']))  # noqa: E501
        if 'is_active2' in params:
            query_params.append(('is_active', params['is_active2']))  # noqa: E501
        if 'last_login2' in params:
            query_params.append(('last_login', params['last_login2']))  # noqa: E501
        if 'team' in params:
            query_params.append(('team', params['team']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501

        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'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

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

        return self.api_client.call_api(
            '/api/v1/users/users/{id}/', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='User',  # 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_user(self, id, **kwargs):  # noqa: E501
        """update_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_user(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_user_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.update_user_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def update_user_with_http_info(self, id, **kwargs):  # noqa: E501
        """update_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_user_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'username', 'is_superuser', 'is_staff', 'is_active', 'last_login', 'id2', 'username2', 'username__contains', 'is_superuser2', 'is_staff2', 'is_active2', 'last_login2', 'team']  # 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_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_user`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'id2' in params:
            query_params.append(('id', params['id2']))  # noqa: E501
        if 'username2' in params:
            query_params.append(('username', params['username2']))  # noqa: E501
        if 'username__contains' in params:
            query_params.append(('username__contains', params['username__contains']))  # noqa: E501
        if 'is_superuser2' in params:
            query_params.append(('is_superuser', params['is_superuser2']))  # noqa: E501
        if 'is_staff2' in params:
            query_params.append(('is_staff', params['is_staff2']))  # noqa: E501
        if 'is_active2' in params:
            query_params.append(('is_active', params['is_active2']))  # noqa: E501
        if 'last_login2' in params:
            query_params.append(('last_login', params['last_login2']))  # noqa: E501
        if 'team' in params:
            query_params.append(('team', params['team']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501

        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'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

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

        return self.api_client.call_api(
            '/api/v1/users/users/{id}/', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='User',  # 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_user(self, id, **kwargs):  # noqa: E501
        """update_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_user(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_user_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.update_user_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def update_user_with_http_info(self, id, **kwargs):  # noqa: E501
        """update_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_user_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: (required)
        :param str username:
        :param bool is_superuser:
        :param bool is_staff:
        :param bool is_active:
        :param datetime last_login:
        :param str id2: id
        :param str username2: username
        :param str username__contains: username__contains
        :param str is_superuser2: is_superuser
        :param str is_staff2: is_staff
        :param str is_active2: is_active
        :param str last_login2: last_login
        :param str team: team
        :return: User
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'username', 'is_superuser', 'is_staff', 'is_active', 'last_login', 'id2', 'username2', 'username__contains', 'is_superuser2', 'is_staff2', 'is_active2', 'last_login2', 'team']  # 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_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_user`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'id2' in params:
            query_params.append(('id', params['id2']))  # noqa: E501
        if 'username2' in params:
            query_params.append(('username', params['username2']))  # noqa: E501
        if 'username__contains' in params:
            query_params.append(('username__contains', params['username__contains']))  # noqa: E501
        if 'is_superuser2' in params:
            query_params.append(('is_superuser', params['is_superuser2']))  # noqa: E501
        if 'is_staff2' in params:
            query_params.append(('is_staff', params['is_staff2']))  # noqa: E501
        if 'is_active2' in params:
            query_params.append(('is_active', params['is_active2']))  # noqa: E501
        if 'last_login2' in params:
            query_params.append(('last_login', params['last_login2']))  # noqa: E501
        if 'team' in params:
            query_params.append(('team', params['team']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501
        if 'username' in params:
            form_params.append(('username', params['username']))  # noqa: E501
        if 'is_superuser' in params:
            form_params.append(('is_superuser', params['is_superuser']))  # noqa: E501
        if 'is_staff' in params:
            form_params.append(('is_staff', params['is_staff']))  # noqa: E501
        if 'is_active' in params:
            form_params.append(('is_active', params['is_active']))  # noqa: E501
        if 'last_login' in params:
            form_params.append(('last_login', params['last_login']))  # noqa: E501

        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'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

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

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

# coding: utf-8 EXACT - API      API to interact with the EXACT Server  # noqa: E501      OpenAPI spec version: 1.0.0          Generated by: https://github.com/swagger-api/swagger-codegen.git # noqa: F401 # python 2 and python 3 compatibility library 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 # noqa: E501 create_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_user(async_req=True)         >>> result = thread.get()          :param async_req bool         :param Body body:         :return: User                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 create_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_user_with_http_info(async_req=True)         >>> result = thread.get()          :param async_req bool         :param Body body:         :return: User                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 create_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_user(async_req=True)         >>> result = thread.get()          :param async_req bool         :param str username:         :param bool is_superuser:         :param bool is_staff:         :param bool is_active:         :param datetime last_login:         :return: User                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 create_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_user_with_http_info(async_req=True)         >>> result = thread.get()          :param async_req bool         :param str username:         :param bool is_superuser:         :param bool is_staff:         :param bool is_active:         :param datetime last_login:         :return: User                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 create_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_user(async_req=True)         >>> result = thread.get()          :param async_req bool         :param str username:         :param bool is_superuser:         :param bool is_staff:         :param bool is_active:         :param datetime last_login:         :return: User                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 create_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_user_with_http_info(async_req=True)         >>> result = thread.get()          :param async_req bool         :param str username:         :param bool is_superuser:         :param bool is_staff:         :param bool is_active:         :param datetime last_login:         :return: User                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 destroy_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.destroy_user(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str id: (required)         :param str id2: id         :param str username: username         :param str username__contains: username__contains         :param str is_superuser: is_superuser         :param str is_staff: is_staff         :param str is_active: is_active         :param str last_login: last_login         :param str team: team         :return: None                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 destroy_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.destroy_user_with_http_info(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str id: (required)         :param str id2: id         :param str username: username         :param str username__contains: username__contains         :param str is_superuser: is_superuser         :param str is_staff: is_staff         :param str is_active: is_active         :param str last_login: last_login         :param str team: team         :return: None                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 list_users  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.list_users(async_req=True)         >>> result = thread.get()          :param async_req bool         :param int limit: Number of results to return per page.         :param int offset: The initial index from which to return the results.         :param str id: id         :param str username: username         :param str username__contains: username__contains         :param str is_superuser: is_superuser         :param str is_staff: is_staff         :param str is_active: is_active         :param str last_login: last_login         :param str team: team         :return: Users                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 list_users  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.list_users_with_http_info(async_req=True)         >>> result = thread.get()          :param async_req bool         :param int limit: Number of results to return per page.         :param int offset: The initial index from which to return the results.         :param str id: id         :param str username: username         :param str username__contains: username__contains         :param str is_superuser: is_superuser         :param str is_staff: is_staff         :param str is_active: is_active         :param str last_login: last_login         :param str team: team         :return: Users                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 partial_update_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.partial_update_user(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str id: (required)         :param Body6 body:         :param str id2: id         :param str username2: username         :param str username__contains: username__contains         :param str is_superuser2: is_superuser         :param str is_staff2: is_staff         :param str is_active2: is_active         :param str last_login2: last_login         :param str team: team         :return: User                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 partial_update_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.partial_update_user_with_http_info(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str id: (required)         :param Body6 body:         :param str id2: id         :param str username2: username         :param str username__contains: username__contains         :param str is_superuser2: is_superuser         :param str is_staff2: is_staff         :param str is_active2: is_active         :param str last_login2: last_login         :param str team: team         :return: User                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 partial_update_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.partial_update_user(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str id: (required)         :param str username:         :param bool is_superuser:         :param bool is_staff:         :param bool is_active:         :param datetime last_login:         :param str id2: id         :param str username2: username         :param str username__contains: username__contains         :param str is_superuser2: is_superuser         :param str is_staff2: is_staff         :param str is_active2: is_active         :param str last_login2: last_login         :param str team: team         :return: User                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 partial_update_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.partial_update_user_with_http_info(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str id: (required)         :param str username:         :param bool is_superuser:         :param bool is_staff:         :param bool is_active:         :param datetime last_login:         :param str id2: id         :param str username2: username         :param str username__contains: username__contains         :param str is_superuser2: is_superuser         :param str is_staff2: is_staff         :param str is_active2: is_active         :param str last_login2: last_login         :param str team: team         :return: User                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 partial_update_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.partial_update_user(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str id: (required)         :param str username:         :param bool is_superuser:         :param bool is_staff:         :param bool is_active:         :param datetime last_login:         :param str id2: id         :param str username2: username         :param str username__contains: username__contains         :param str is_superuser2: is_superuser         :param str is_staff2: is_staff         :param str is_active2: is_active         :param str last_login2: last_login         :param str team: team         :return: User                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 partial_update_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.partial_update_user_with_http_info(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str id: (required)         :param str username:         :param bool is_superuser:         :param bool is_staff:         :param bool is_active:         :param datetime last_login:         :param str id2: id         :param str username2: username         :param str username__contains: username__contains         :param str is_superuser2: is_superuser         :param str is_staff2: is_staff         :param str is_active2: is_active         :param str last_login2: last_login         :param str team: team         :return: User                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 retrieve_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.retrieve_user(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str id: (required)         :param str id2: id         :param str username: username         :param str username__contains: username__contains         :param str is_superuser: is_superuser         :param str is_staff: is_staff         :param str is_active: is_active         :param str last_login: last_login         :param str team: team         :return: User                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 retrieve_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.retrieve_user_with_http_info(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str id: (required)         :param str id2: id         :param str username: username         :param str username__contains: username__contains         :param str is_superuser: is_superuser         :param str is_staff: is_staff         :param str is_active: is_active         :param str last_login: last_login         :param str team: team         :return: User                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E50 # noqa: E501 # HTTP header `Accept` # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 update_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_user(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str id: (required)         :param Body3 body:         :param str id2: id         :param str username2: username         :param str username__contains: username__contains         :param str is_superuser2: is_superuser         :param str is_staff2: is_staff         :param str is_active2: is_active         :param str last_login2: last_login         :param str team: team         :return: User                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 update_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_user_with_http_info(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str id: (required)         :param Body3 body:         :param str id2: id         :param str username2: username         :param str username__contains: username__contains         :param str is_superuser2: is_superuser         :param str is_staff2: is_staff         :param str is_active2: is_active         :param str last_login2: last_login         :param str team: team         :return: User                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 update_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_user(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str id: (required)         :param str username:         :param bool is_superuser:         :param bool is_staff:         :param bool is_active:         :param datetime last_login:         :param str id2: id         :param str username2: username         :param str username__contains: username__contains         :param str is_superuser2: is_superuser         :param str is_staff2: is_staff         :param str is_active2: is_active         :param str last_login2: last_login         :param str team: team         :return: User                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 update_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_user_with_http_info(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str id: (required)         :param str username:         :param bool is_superuser:         :param bool is_staff:         :param bool is_active:         :param datetime last_login:         :param str id2: id         :param str username2: username         :param str username__contains: username__contains         :param str is_superuser2: is_superuser         :param str is_staff2: is_staff         :param str is_active2: is_active         :param str last_login2: last_login         :param str team: team         :return: User                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 update_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_user(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str id: (required)         :param str username:         :param bool is_superuser:         :param bool is_staff:         :param bool is_active:         :param datetime last_login:         :param str id2: id         :param str username2: username         :param str username__contains: username__contains         :param str is_superuser2: is_superuser         :param str is_staff2: is_staff         :param str is_active2: is_active         :param str last_login2: last_login         :param str team: team         :return: User                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 update_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_user_with_http_info(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str id: (required)         :param str username:         :param bool is_superuser:         :param bool is_staff:         :param bool is_active:         :param datetime last_login:         :param str id2: id         :param str username2: username         :param str username__contains: username__contains         :param str is_superuser2: is_superuser         :param str is_staff2: is_staff         :param str is_active2: is_active         :param str last_login2: last_login         :param str team: team         :return: User                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501