text: # coding: utf-8
  
  """
      Python InsightVM API Client
  
      OpenAPI spec version: 3
      Contact: support@rapid7.com
      Generated by: https://github.com/swagger-api/swagger-codegen.git
  """
  
  
  from __future__ import absolute_import
  
  import re  # noqa: F401
  
  # python 2 and python 3 compatibility library
  import six
  
  from rapid7vmconsole.api_client import ApiClient
  
  
  class UserApi(object):
      """NOTE: This class is auto generated by the swagger code generator program.
  
      Do not edit the class manually.
      Ref: https://github.com/swagger-api/swagger-codegen
      """
  
      def __init__(self, api_client=None):
          if api_client is None:
              api_client = ApiClient()
          self.api_client = api_client
  
      def add_user_asset_group(self, id, asset_group_id, **kwargs):  # noqa: E501
          """Asset Group Access  # noqa: E501
  
          Grants the user access to the asset group. Individual asset group access cannot be granted to users with the `allAssetGroups` permission. <span class=\"authorization\">Global Administrator</span>  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.add_user_asset_group(id, asset_group_id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :param int asset_group_id: The identifier of the asset group. (required)
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.add_user_asset_group_with_http_info(id, asset_group_id, **kwargs)  # noqa: E501
          else:
              (data) = self.add_user_asset_group_with_http_info(id, asset_group_id, **kwargs)  # noqa: E501
              return data
  
      def add_user_asset_group_with_http_info(self, id, asset_group_id, **kwargs):  # noqa: E501
          """Asset Group Access  # noqa: E501
  
          Grants the user access to the asset group. Individual asset group access cannot be granted to users with the `allAssetGroups` permission. <span class=\"authorization\">Global Administrator</span>  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.add_user_asset_group_with_http_info(id, asset_group_id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :param int asset_group_id: The identifier of the asset group. (required)
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id', 'asset_group_id']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method add_user_asset_group" % 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 `add_user_asset_group`")  # noqa: E501
          # verify the required parameter 'asset_group_id' is set
          if ('asset_group_id' not in params or
                  params['asset_group_id'] is None):
              raise ValueError("Missing the required parameter `asset_group_id` when calling `add_user_asset_group`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
          if 'asset_group_id' in params:
              path_params['assetGroupId'] = params['asset_group_id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/users/{id}/asset_groups/{assetGroupId}', 'PUT',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='Links',  # 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 add_user_site(self, id, site_id, **kwargs):  # noqa: E501
          """Site Access  # noqa: E501
  
          Grants the user access to the site. Individual site access cannot be granted to users with the `allSites` permission. <span class=\"authorization\">Global Administrator</span>  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.add_user_site(id, site_id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :param int site_id: The identifier of the site. (required)
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.add_user_site_with_http_info(id, site_id, **kwargs)  # noqa: E501
          else:
              (data) = self.add_user_site_with_http_info(id, site_id, **kwargs)  # noqa: E501
              return data
  
      def add_user_site_with_http_info(self, id, site_id, **kwargs):  # noqa: E501
          """Site Access  # noqa: E501
  
          Grants the user access to the site. Individual site access cannot be granted to users with the `allSites` permission. <span class=\"authorization\">Global Administrator</span>  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.add_user_site_with_http_info(id, site_id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :param int site_id: The identifier of the site. (required)
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id', 'site_id']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method add_user_site" % 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 `add_user_site`")  # noqa: E501
          # verify the required parameter 'site_id' is set
          if ('site_id' not in params or
                  params['site_id'] is None):
              raise ValueError("Missing the required parameter `site_id` when calling `add_user_site`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
          if 'site_id' in params:
              path_params['siteId'] = params['site_id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/users/{id}/sites/{siteId}', 'PUT',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='Links',  # 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
          """Users  # noqa: E501
  
          Creates a new user. <span class=\"authorization\">Global Administrator</span>  # 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 UserEdit user: The details of the user.
          :return: CreatedReferenceUserIDLink
                   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
          """Users  # noqa: E501
  
          Creates a new user. <span class=\"authorization\">Global Administrator</span>  # 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 UserEdit user: The details of the user.
          :return: CreatedReferenceUserIDLink
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['user']  # 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 = {}
  
          body_params = None
          if 'user' in params:
              body_params = params['user']
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/users', 'POST',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='CreatedReferenceUserIDLink',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def delete_role(self, id, **kwargs):  # noqa: E501
          """Role  # noqa: E501
  
          Removes a role with the specified identifier. The role must not be built-in and cannot be currently assigned to any 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.delete_role(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str id: The identifier of the role. (required)
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.delete_role_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.delete_role_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def delete_role_with_http_info(self, id, **kwargs):  # noqa: E501
          """Role  # noqa: E501
  
          Removes a role with the specified identifier. The role must not be built-in and cannot be currently assigned to any 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.delete_role_with_http_info(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str id: The identifier of the role. (required)
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method delete_role" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'id' is set
          if ('id' not in params or
                  params['id'] is None):
              raise ValueError("Missing the required parameter `id` when calling `delete_role`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/roles/{id}', 'DELETE',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='Links',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def delete_user(self, id, **kwargs):  # noqa: E501
          """User  # noqa: E501
  
          Deletes a user account.<span class=\"authorization\">Global Administrator</span>  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.delete_user(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.delete_user_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.delete_user_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def delete_user_with_http_info(self, id, **kwargs):  # noqa: E501
          """User  # noqa: E501
  
          Deletes a user account.<span class=\"authorization\">Global Administrator</span>  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.delete_user_with_http_info(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method delete_user" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'id' is set
          if ('id' not in params or
                  params['id'] is None):
              raise ValueError("Missing the required parameter `id` when calling `delete_user`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/users/{id}', 'DELETE',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='Links',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_authentication_source(self, id, **kwargs):  # noqa: E501
          """Authentication Source  # noqa: E501
  
          Returns the details for an authentication source.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_authentication_source(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the authentication source. (required)
          :return: AuthenticationSource
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_authentication_source_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.get_authentication_source_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def get_authentication_source_with_http_info(self, id, **kwargs):  # noqa: E501
          """Authentication Source  # noqa: E501
  
          Returns the details for an authentication source.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_authentication_source_with_http_info(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the authentication source. (required)
          :return: AuthenticationSource
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_authentication_source" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'id' is set
          if ('id' not in params or
                  params['id'] is None):
              raise ValueError("Missing the required parameter `id` when calling `get_authentication_source`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/authentication_sources/{id}', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='AuthenticationSource',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_authentication_source_users(self, id, **kwargs):  # noqa: E501
          """Authentication Source Users  # noqa: E501
  
          Returns hypermedia links for the user accounts that use the authentication source to authenticate.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_authentication_source_users(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the authentication source. (required)
          :return: ReferencesWithUserIDLink
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_authentication_source_users_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.get_authentication_source_users_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def get_authentication_source_users_with_http_info(self, id, **kwargs):  # noqa: E501
          """Authentication Source Users  # noqa: E501
  
          Returns hypermedia links for the user accounts that use the authentication source to authenticate.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_authentication_source_users_with_http_info(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the authentication source. (required)
          :return: ReferencesWithUserIDLink
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_authentication_source_users" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'id' is set
          if ('id' not in params or
                  params['id'] is None):
              raise ValueError("Missing the required parameter `id` when calling `get_authentication_source_users`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/authentication_sources/{id}/users', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='ReferencesWithUserIDLink',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_authentication_sources(self, **kwargs):  # noqa: E501
          """Authentication Sources  # noqa: E501
  
          Returns all available sources of authentication for 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.get_authentication_sources(async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :return: ResourcesAuthenticationSource
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_authentication_sources_with_http_info(**kwargs)  # noqa: E501
          else:
              (data) = self.get_authentication_sources_with_http_info(**kwargs)  # noqa: E501
              return data
  
      def get_authentication_sources_with_http_info(self, **kwargs):  # noqa: E501
          """Authentication Sources  # noqa: E501
  
          Returns all available sources of authentication for 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.get_authentication_sources_with_http_info(async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :return: ResourcesAuthenticationSource
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = []  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_authentication_sources" % key
                  )
              params[key] = val
          del params['kwargs']
  
          collection_formats = {}
  
          path_params = {}
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/authentication_sources', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='ResourcesAuthenticationSource',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_privilege(self, id, **kwargs):  # noqa: E501
          """Privilege  # noqa: E501
  
          Returns the details for a privilege.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_privilege(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str id: The identifier of the privilege. (required)
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_privilege_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.get_privilege_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def get_privilege_with_http_info(self, id, **kwargs):  # noqa: E501
          """Privilege  # noqa: E501
  
          Returns the details for a privilege.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_privilege_with_http_info(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str id: The identifier of the privilege. (required)
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_privilege" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'id' is set
          if ('id' not in params or
                  params['id'] is None):
              raise ValueError("Missing the required parameter `id` when calling `get_privilege`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/privileges/{id}', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='Links',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_privileges(self, **kwargs):  # noqa: E501
          """Privileges  # noqa: E501
  
          Returns all privileges that may be granted to a role.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_privileges(async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :return: Privileges
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_privileges_with_http_info(**kwargs)  # noqa: E501
          else:
              (data) = self.get_privileges_with_http_info(**kwargs)  # noqa: E501
              return data
  
      def get_privileges_with_http_info(self, **kwargs):  # noqa: E501
          """Privileges  # noqa: E501
  
          Returns all privileges that may be granted to a role.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_privileges_with_http_info(async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :return: Privileges
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = []  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_privileges" % key
                  )
              params[key] = val
          del params['kwargs']
  
          collection_formats = {}
  
          path_params = {}
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/privileges', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='Privileges',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_role(self, id, **kwargs):  # noqa: E501
          """Role  # noqa: E501
  
          Retrieves the details of a role.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_role(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str id: The identifier of the role. (required)
          :return: Role
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_role_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.get_role_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def get_role_with_http_info(self, id, **kwargs):  # noqa: E501
          """Role  # noqa: E501
  
          Retrieves the details of a role.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_role_with_http_info(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str id: The identifier of the role. (required)
          :return: Role
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_role" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'id' is set
          if ('id' not in params or
                  params['id'] is None):
              raise ValueError("Missing the required parameter `id` when calling `get_role`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/roles/{id}', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='Role',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_role_users(self, id, **kwargs):  # noqa: E501
          """Users With Role  # noqa: E501
  
          Returns hypermedia links for the the users currently assigned a role.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_role_users(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str id: The identifier of the role. (required)
          :return: ReferencesWithUserIDLink
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_role_users_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.get_role_users_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def get_role_users_with_http_info(self, id, **kwargs):  # noqa: E501
          """Users With Role  # noqa: E501
  
          Returns hypermedia links for the the users currently assigned a role.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_role_users_with_http_info(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str id: The identifier of the role. (required)
          :return: ReferencesWithUserIDLink
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_role_users" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'id' is set
          if ('id' not in params or
                  params['id'] is None):
              raise ValueError("Missing the required parameter `id` when calling `get_role_users`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/roles/{id}/users', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='ReferencesWithUserIDLink',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_roles(self, **kwargs):  # noqa: E501
          """Roles  # noqa: E501
  
          Returns all roles for which users may be assigned.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_roles(async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :return: ResourcesRole
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_roles_with_http_info(**kwargs)  # noqa: E501
          else:
              (data) = self.get_roles_with_http_info(**kwargs)  # noqa: E501
              return data
  
      def get_roles_with_http_info(self, **kwargs):  # noqa: E501
          """Roles  # noqa: E501
  
          Returns all roles for which users may be assigned.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_roles_with_http_info(async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :return: ResourcesRole
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = []  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_roles" % key
                  )
              params[key] = val
          del params['kwargs']
  
          collection_formats = {}
  
          path_params = {}
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/roles', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='ResourcesRole',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_two_factor_authentication_key(self, id, **kwargs):  # noqa: E501
          """Two-Factor Authentication  # noqa: E501
  
          Retrieves the current authentication token seed (key) for the user, if configured.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_two_factor_authentication_key(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :return: TokenResource
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_two_factor_authentication_key_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.get_two_factor_authentication_key_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def get_two_factor_authentication_key_with_http_info(self, id, **kwargs):  # noqa: E501
          """Two-Factor Authentication  # noqa: E501
  
          Retrieves the current authentication token seed (key) for the user, if configured.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_two_factor_authentication_key_with_http_info(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :return: TokenResource
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_two_factor_authentication_key" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'id' is set
          if ('id' not in params or
                  params['id'] is None):
              raise ValueError("Missing the required parameter `id` when calling `get_two_factor_authentication_key`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/users/{id}/2FA', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='TokenResource',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_user(self, id, **kwargs):  # noqa: E501
          """User  # noqa: E501
  
          Returns the details for a user.<span class=\"authorization\">Global Administrator, Current User</span>  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_user(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :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.get_user_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.get_user_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def get_user_with_http_info(self, id, **kwargs):  # noqa: E501
          """User  # noqa: E501
  
          Returns the details for a user.<span class=\"authorization\">Global Administrator, Current User</span>  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_user_with_http_info(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :return: User
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_user" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'id' is set
          if ('id' not in params or
                  params['id'] is None):
              raise ValueError("Missing the required parameter `id` when calling `get_user`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/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 get_user_asset_groups(self, id, **kwargs):  # noqa: E501
          """Asset Groups Access  # noqa: E501
  
          Returns the asset groups to which the user has access.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_user_asset_groups(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :return: ReferencesWithAssetGroupIDLink
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_user_asset_groups_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.get_user_asset_groups_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def get_user_asset_groups_with_http_info(self, id, **kwargs):  # noqa: E501
          """Asset Groups Access  # noqa: E501
  
          Returns the asset groups to which the user has access.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_user_asset_groups_with_http_info(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :return: ReferencesWithAssetGroupIDLink
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_user_asset_groups" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'id' is set
          if ('id' not in params or
                  params['id'] is None):
              raise ValueError("Missing the required parameter `id` when calling `get_user_asset_groups`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/users/{id}/asset_groups', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='ReferencesWithAssetGroupIDLink',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_user_privileges(self, id, **kwargs):  # noqa: E501
          """User Privileges  # noqa: E501
  
          Returns the privileges granted to the user by their role. <span class=\"authorization\">Global Administrator</span>  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_user_privileges(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :return: Privileges
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_user_privileges_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.get_user_privileges_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def get_user_privileges_with_http_info(self, id, **kwargs):  # noqa: E501
          """User Privileges  # noqa: E501
  
          Returns the privileges granted to the user by their role. <span class=\"authorization\">Global Administrator</span>  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_user_privileges_with_http_info(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :return: Privileges
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_user_privileges" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'id' is set
          if ('id' not in params or
                  params['id'] is None):
              raise ValueError("Missing the required parameter `id` when calling `get_user_privileges`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/users/{id}/privileges', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='Privileges',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_user_sites(self, id, **kwargs):  # noqa: E501
          """Sites Access  # noqa: E501
  
          Returns the sites to which the user has access.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_user_sites(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :return: ReferencesWithSiteIDLink
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_user_sites_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.get_user_sites_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def get_user_sites_with_http_info(self, id, **kwargs):  # noqa: E501
          """Sites Access  # noqa: E501
  
          Returns the sites to which the user has access.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_user_sites_with_http_info(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :return: ReferencesWithSiteIDLink
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_user_sites" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'id' is set
          if ('id' not in params or
                  params['id'] is None):
              raise ValueError("Missing the required parameter `id` when calling `get_user_sites`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/users/{id}/sites', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='ReferencesWithSiteIDLink',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_users(self, **kwargs):  # noqa: E501
          """Users  # noqa: E501
  
          Returns all defined users. <span class=\"authorization\">Global Administrator</span>  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_users(async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int page: The index of the page (zero-based) to retrieve.
          :param int size: The number of records per page to retrieve.
          :param list[str] sort: The criteria to sort the records by, in the format: `property[,ASC|DESC]`. The default sort order is ascending. Multiple sort criteria can be specified using multiple sort query parameters.
          :return: PageOfUser
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_users_with_http_info(**kwargs)  # noqa: E501
          else:
              (data) = self.get_users_with_http_info(**kwargs)  # noqa: E501
              return data
  
      def get_users_with_http_info(self, **kwargs):  # noqa: E501
          """Users  # noqa: E501
  
          Returns all defined users. <span class=\"authorization\">Global Administrator</span>  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_users_with_http_info(async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int page: The index of the page (zero-based) to retrieve.
          :param int size: The number of records per page to retrieve.
          :param list[str] sort: The criteria to sort the records by, in the format: `property[,ASC|DESC]`. The default sort order is ascending. Multiple sort criteria can be specified using multiple sort query parameters.
          :return: PageOfUser
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['page', 'size', 'sort']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_users" % key
                  )
              params[key] = val
          del params['kwargs']
  
          collection_formats = {}
  
          path_params = {}
  
          query_params = []
          if 'page' in params:
              query_params.append(('page', params['page']))  # noqa: E501
          if 'size' in params:
              query_params.append(('size', params['size']))  # noqa: E501
          if 'sort' in params:
              query_params.append(('sort', params['sort']))  # noqa: E501
              collection_formats['sort'] = 'multi'  # 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;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/users', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='PageOfUser',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_users_with_privilege(self, id, **kwargs):  # noqa: E501
          """Users With Privilege  # noqa: E501
  
          Returns hypermedia links for all users granted the specified privilege by their role.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_users_with_privilege(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str id: The identifier of the privilege. (required)
          :return: ReferencesWithUserIDLink
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_users_with_privilege_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.get_users_with_privilege_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def get_users_with_privilege_with_http_info(self, id, **kwargs):  # noqa: E501
          """Users With Privilege  # noqa: E501
  
          Returns hypermedia links for all users granted the specified privilege by their role.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_users_with_privilege_with_http_info(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str id: The identifier of the privilege. (required)
          :return: ReferencesWithUserIDLink
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_users_with_privilege" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'id' is set
          if ('id' not in params or
                  params['id'] is None):
              raise ValueError("Missing the required parameter `id` when calling `get_users_with_privilege`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/privileges/{id}/users', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='ReferencesWithUserIDLink',  # 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 regenerate_two_factor_authentication(self, id, **kwargs):  # noqa: E501
          """Two-Factor Authentication  # noqa: E501
  
          Regenerates a new authentication token seed (key) and updates it for the user. This key may be then be used in the appropriate 2FA authenticator.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.regenerate_two_factor_authentication(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :return: TokenResource
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.regenerate_two_factor_authentication_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.regenerate_two_factor_authentication_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def regenerate_two_factor_authentication_with_http_info(self, id, **kwargs):  # noqa: E501
          """Two-Factor Authentication  # noqa: E501
  
          Regenerates a new authentication token seed (key) and updates it for the user. This key may be then be used in the appropriate 2FA authenticator.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.regenerate_two_factor_authentication_with_http_info(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :return: TokenResource
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method regenerate_two_factor_authentication" % 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 `regenerate_two_factor_authentication`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/users/{id}/2FA', 'POST',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='TokenResource',  # 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 remove_all_user_asset_groups(self, id, **kwargs):  # noqa: E501
          """Asset Groups Access  # noqa: E501
  
          Revokes access to all asset groups from the 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.remove_all_user_asset_groups(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.remove_all_user_asset_groups_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.remove_all_user_asset_groups_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def remove_all_user_asset_groups_with_http_info(self, id, **kwargs):  # noqa: E501
          """Asset Groups Access  # noqa: E501
  
          Revokes access to all asset groups from the 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.remove_all_user_asset_groups_with_http_info(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method remove_all_user_asset_groups" % 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 `remove_all_user_asset_groups`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/users/{id}/asset_groups', 'DELETE',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='Links',  # 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 remove_all_user_sites(self, id, **kwargs):  # noqa: E501
          """Sites Access  # noqa: E501
  
          Revokes access to all sites from the 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.remove_all_user_sites(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.remove_all_user_sites_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.remove_all_user_sites_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def remove_all_user_sites_with_http_info(self, id, **kwargs):  # noqa: E501
          """Sites Access  # noqa: E501
  
          Revokes access to all sites from the 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.remove_all_user_sites_with_http_info(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method remove_all_user_sites" % 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 `remove_all_user_sites`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/users/{id}/sites', 'DELETE',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='Links',  # 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 remove_user_asset_group(self, id, asset_group_id, **kwargs):  # noqa: E501
          """Asset Group Access  # noqa: E501
  
          Grants the user access to the asset group. Individual asset group access cannot be granted to users with the `allAssetGroups` permission. <span class=\"authorization\">Global Administrator</span>  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.remove_user_asset_group(id, asset_group_id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :param int asset_group_id: The identifier of the asset group. (required)
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.remove_user_asset_group_with_http_info(id, asset_group_id, **kwargs)  # noqa: E501
          else:
              (data) = self.remove_user_asset_group_with_http_info(id, asset_group_id, **kwargs)  # noqa: E501
              return data
  
      def remove_user_asset_group_with_http_info(self, id, asset_group_id, **kwargs):  # noqa: E501
          """Asset Group Access  # noqa: E501
  
          Grants the user access to the asset group. Individual asset group access cannot be granted to users with the `allAssetGroups` permission. <span class=\"authorization\">Global Administrator</span>  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.remove_user_asset_group_with_http_info(id, asset_group_id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :param int asset_group_id: The identifier of the asset group. (required)
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id', 'asset_group_id']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method remove_user_asset_group" % 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 `remove_user_asset_group`")  # noqa: E501
          # verify the required parameter 'asset_group_id' is set
          if ('asset_group_id' not in params or
                  params['asset_group_id'] is None):
              raise ValueError("Missing the required parameter `asset_group_id` when calling `remove_user_asset_group`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
          if 'asset_group_id' in params:
              path_params['assetGroupId'] = params['asset_group_id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/users/{id}/asset_groups/{assetGroupId}', 'DELETE',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='Links',  # 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 remove_user_site(self, id, site_id, **kwargs):  # noqa: E501
          """Site Access  # noqa: E501
  
          Grants the user access to the site. Individual site access cannot be granted to users with the `allSites` permission. <span class=\"authorization\">Global Administrator</span>  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.remove_user_site(id, site_id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :param int site_id: The identifier of the site. (required)
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.remove_user_site_with_http_info(id, site_id, **kwargs)  # noqa: E501
          else:
              (data) = self.remove_user_site_with_http_info(id, site_id, **kwargs)  # noqa: E501
              return data
  
      def remove_user_site_with_http_info(self, id, site_id, **kwargs):  # noqa: E501
          """Site Access  # noqa: E501
  
          Grants the user access to the site. Individual site access cannot be granted to users with the `allSites` permission. <span class=\"authorization\">Global Administrator</span>  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.remove_user_site_with_http_info(id, site_id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :param int site_id: The identifier of the site. (required)
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id', 'site_id']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method remove_user_site" % 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 `remove_user_site`")  # noqa: E501
          # verify the required parameter 'site_id' is set
          if ('site_id' not in params or
                  params['site_id'] is None):
              raise ValueError("Missing the required parameter `site_id` when calling `remove_user_site`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
          if 'site_id' in params:
              path_params['siteId'] = params['site_id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/users/{id}/sites/{siteId}', 'DELETE',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='Links',  # 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 reset_password(self, id, **kwargs):  # noqa: E501
          """Password Reset  # noqa: E501
  
          Changes the password for the user. Users may only change their own password.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.reset_password(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :param str password: The new password to set.
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.reset_password_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.reset_password_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def reset_password_with_http_info(self, id, **kwargs):  # noqa: E501
          """Password Reset  # noqa: E501
  
          Changes the password for the user. Users may only change their own password.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.reset_password_with_http_info(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :param str password: The new password to set.
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id', 'password']  # 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 reset_password" % 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 `reset_password`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          if 'password' in params:
              body_params = params['password']
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/users/{id}/password', 'PUT',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='Links',  # 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 set_two_factor_authentication(self, id, **kwargs):  # noqa: E501
          """Two-Factor Authentication  # noqa: E501
  
          Sets the authentication token seed (key) for the user. This key may be then be used in the appropriate 2FA authenticator.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.set_two_factor_authentication(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :param str token: The authentication token seed (key) to use for the user.
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.set_two_factor_authentication_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.set_two_factor_authentication_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def set_two_factor_authentication_with_http_info(self, id, **kwargs):  # noqa: E501
          """Two-Factor Authentication  # noqa: E501
  
          Sets the authentication token seed (key) for the user. This key may be then be used in the appropriate 2FA authenticator.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.set_two_factor_authentication_with_http_info(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :param str token: The authentication token seed (key) to use for the user.
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id', 'token']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method set_two_factor_authentication" % 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 `set_two_factor_authentication`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          if 'token' in params:
              body_params = params['token']
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/users/{id}/2FA', 'PUT',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='Links',  # 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 set_user_asset_groups(self, id, **kwargs):  # noqa: E501
          """Asset Groups Access  # noqa: E501
  
          Updates the asset groups to which the user has access. Individual asset group access cannot be granted to users with the `allAssetGroups` permission. <span class=\"authorization\">Global Administrator</span>  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.set_user_asset_groups(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :param list[int] asset_group_ids: The identifiers of the asset groups to grant the user access to. Ignored if user has access to `allAssetGroups`.
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.set_user_asset_groups_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.set_user_asset_groups_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def set_user_asset_groups_with_http_info(self, id, **kwargs):  # noqa: E501
          """Asset Groups Access  # noqa: E501
  
          Updates the asset groups to which the user has access. Individual asset group access cannot be granted to users with the `allAssetGroups` permission. <span class=\"authorization\">Global Administrator</span>  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.set_user_asset_groups_with_http_info(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :param list[int] asset_group_ids: The identifiers of the asset groups to grant the user access to. Ignored if user has access to `allAssetGroups`.
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id', 'asset_group_ids']  # 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 set_user_asset_groups" % 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 `set_user_asset_groups`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          if 'asset_group_ids' in params:
              body_params = params['asset_group_ids']
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/users/{id}/asset_groups', 'PUT',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='Links',  # 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 set_user_sites(self, id, **kwargs):  # noqa: E501
          """Sites Access  # noqa: E501
  
          Updates the sites to which the user has access. Individual site access cannot be granted to users with the `allSites` permission. <span class=\"authorization\">Global Administrator</span>  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.set_user_sites(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :param list[int] site_ids: The identifiers of the sites to grant the user access to. Ignored if the user has access to `allSites`.
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.set_user_sites_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.set_user_sites_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def set_user_sites_with_http_info(self, id, **kwargs):  # noqa: E501
          """Sites Access  # noqa: E501
  
          Updates the sites to which the user has access. Individual site access cannot be granted to users with the `allSites` permission. <span class=\"authorization\">Global Administrator</span>  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.set_user_sites_with_http_info(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :param list[int] site_ids: The identifiers of the sites to grant the user access to. Ignored if the user has access to `allSites`.
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id', 'site_ids']  # 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 set_user_sites" % 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 `set_user_sites`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          if 'site_ids' in params:
              body_params = params['site_ids']
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/users/{id}/sites', 'PUT',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='Links',  # 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 unlock_user(self, id, **kwargs):  # noqa: E501
          """Unlock Account  # noqa: E501
  
          Unlocks a locked user account that has too many failed authentication attempts. Disabled accounts may not be unlocked.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.unlock_user(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.unlock_user_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.unlock_user_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def unlock_user_with_http_info(self, id, **kwargs):  # noqa: E501
          """Unlock Account  # noqa: E501
  
          Unlocks a locked user account that has too many failed authentication attempts. Disabled accounts may not be unlocked.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.unlock_user_with_http_info(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int id: The identifier of the user. (required)
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method unlock_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 `unlock_user`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/users/{id}/lock', 'DELETE',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='Links',  # 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_role(self, id, **kwargs):  # noqa: E501
          """Role  # noqa: E501
  
          Updates the details of a role.  # 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_role(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str id: The identifier of the role. (required)
          :param Role role: The details of the role.
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.update_role_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.update_role_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def update_role_with_http_info(self, id, **kwargs):  # noqa: E501
          """Role  # noqa: E501
  
          Updates the details of a role.  # 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_role_with_http_info(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str id: The identifier of the role. (required)
          :param Role role: The details of the role.
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id', 'role']  # 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_role" % 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_role`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in params:
              path_params['id'] = params['id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          if 'role' in params:
              body_params = params['role']
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/roles/{id}', 'PUT',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='Links',  # 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
          """User  # noqa: E501
  
          Updates the details of a user. <span class=\"authorization\">Global Administrator</span>  # 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 int id: The identifier of the user. (required)
          :param UserEdit user: The details of the user.
          :return: Links
                   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
          """User  # noqa: E501
  
          Updates the details of a user. <span class=\"authorization\">Global Administrator</span>  # 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 int id: The identifier of the user. (required)
          :param UserEdit user: The details of the user.
          :return: Links
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id', 'user']  # 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 = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          if 'user' in params:
              body_params = params['user']
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json;charset=UTF-8'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/3/users/{id}', 'PUT',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='Links',  # 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)
  