# coding: utf-8

"""
    Syntropy network API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 1.0.0
    Contact: support@syntropynet.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 syntropy_sdk.api_client import ApiClient


class AuthApi(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 v1_network_auth_access_token_login(self, body, **kwargs):  # noqa: E501
        """Login (Access token)  # noqa: E501

        Retrieve JWT from Access token.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_access_token_login(body, async_req=True)
        >>> result = thread.get()

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

    def v1_network_auth_access_token_login_with_http_info(
        self, body, **kwargs
    ):  # noqa: E501
        """Login (Access token)  # noqa: E501

        Retrieve JWT from Access token.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_access_token_login_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param V1NetworkAuthAccessTokenLoginRequest body: (required)
        :return: V1NetworkAuthAccessTokenLoginResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "body" in params:
            body_params = params["body"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # 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(
            "/v1/network/auth/access-token/login",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="V1NetworkAuthAccessTokenLoginResponse",  # 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 v1_network_auth_access_tokens_create(self, body, **kwargs):  # noqa: E501
        """Create Access token  # noqa: E501

        Creates Access token.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_access_tokens_create(body, async_req=True)
        >>> result = thread.get()

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

    def v1_network_auth_access_tokens_create_with_http_info(
        self, body, **kwargs
    ):  # noqa: E501
        """Create Access token  # noqa: E501

        Creates Access token.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_access_tokens_create_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param V1NetworkAuthAccessTokensCreateRequest body: (required)
        :return: V1NetworkAuthAccessTokensCreateResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "body" in params:
            body_params = params["body"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # 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 = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/access-tokens",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="V1NetworkAuthAccessTokensCreateResponse",  # 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 v1_network_auth_access_tokens_delete(
        self, access_token_id, **kwargs
    ):  # noqa: E501
        """Delete Access token  # noqa: E501

        Deletes Access token.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_access_tokens_delete(access_token_id, async_req=True)
        >>> result = thread.get()

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

    def v1_network_auth_access_tokens_delete_with_http_info(
        self, access_token_id, **kwargs
    ):  # noqa: E501
        """Delete Access token  # noqa: E501

        Deletes Access token.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_access_tokens_delete_with_http_info(access_token_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str access_token_id: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if "access_token_id" in params:
            path_params["access_token_id"] = params["access_token_id"]  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/access-tokens/{access_token_id}",
            "DELETE",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def v1_network_auth_access_tokens_get(self, **kwargs):  # noqa: E501
        """Get Access tokens  # noqa: E501

        Lists Access tokens.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_access_tokens_get(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param SkipNumber skip:
        :param TakeNumber take:
        :param AccessTokenOrder order:
        :return: V1NetworkAuthAccessTokensGetResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.v1_network_auth_access_tokens_get_with_http_info(
                **kwargs
            )  # noqa: E501
        else:
            (data) = self.v1_network_auth_access_tokens_get_with_http_info(
                **kwargs
            )  # noqa: E501
            return data

    def v1_network_auth_access_tokens_get_with_http_info(self, **kwargs):  # noqa: E501
        """Get Access tokens  # noqa: E501

        Lists Access tokens.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_access_tokens_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param SkipNumber skip:
        :param TakeNumber take:
        :param AccessTokenOrder order:
        :return: V1NetworkAuthAccessTokensGetResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["skip", "take", "order"]  # 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 v1_network_auth_access_tokens_get" % key
                )
            params[key] = val
        del params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []
        if "skip" in params:
            query_params.append(("skip", params["skip"]))  # noqa: E501
        if "take" in params:
            query_params.append(("take", params["take"]))  # noqa: E501
        if "order" in params:
            query_params.append(("order", params["order"]))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/access-tokens",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="V1NetworkAuthAccessTokensGetResponse",  # 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 v1_network_auth_access_tokens_permissions_get(self, **kwargs):  # noqa: E501
        """Get Access token permissions  # noqa: E501

        Retrieves a list of Access token permissions  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_access_tokens_permissions_get(async_req=True)
        >>> result = thread.get()

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

    def v1_network_auth_access_tokens_permissions_get_with_http_info(
        self, **kwargs
    ):  # noqa: E501
        """Get Access token permissions  # noqa: E501

        Retrieves a list of Access token permissions  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_access_tokens_permissions_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: V1NetworkAuthAccessTokensPermissionsGetResponse
                 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 v1_network_auth_access_tokens_permissions_get" % key
                )
            params[key] = val
        del params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/access-tokens/permissions",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="V1NetworkAuthAccessTokensPermissionsGetResponse",  # 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 v1_network_auth_api_keys_create(self, body, **kwargs):  # noqa: E501
        """Create API key  # noqa: E501

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

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

    def v1_network_auth_api_keys_create_with_http_info(
        self, body, **kwargs
    ):  # noqa: E501
        """Create API key  # noqa: E501

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

        :param async_req bool
        :param V1NetworkAuthApiKeysCreateRequest body: (required)
        :return: V1NetworkAuthApiKeysCreateResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "body" in params:
            body_params = params["body"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # 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 = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/api-keys",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="V1NetworkAuthApiKeysCreateResponse",  # 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 v1_network_auth_api_keys_delete(self, api_key_id, **kwargs):  # noqa: E501
        """Delete API key  # noqa: E501

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

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

    def v1_network_auth_api_keys_delete_with_http_info(
        self, api_key_id, **kwargs
    ):  # noqa: E501
        """Delete API key  # noqa: E501

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

        :param async_req bool
        :param IdNumber api_key_id: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}
        if "api_key_id" in params:
            path_params["api_key_id"] = params["api_key_id"]  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/api-keys/{api_key_id}",
            "DELETE",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def v1_network_auth_api_keys_get(self, **kwargs):  # noqa: E501
        """Get API keys  # noqa: E501

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

        :param async_req bool
        :param SkipNumber skip:
        :param TakeNumber take:
        :param OrderString order: string: \"ASC\" | \"DESC\"
        :param WhereString filter: array of api_key_ids
        :return: V1NetworkAuthApiKeysGetResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.v1_network_auth_api_keys_get_with_http_info(
                **kwargs
            )  # noqa: E501
        else:
            (data) = self.v1_network_auth_api_keys_get_with_http_info(
                **kwargs
            )  # noqa: E501
            return data

    def v1_network_auth_api_keys_get_with_http_info(self, **kwargs):  # noqa: E501
        """Get API keys  # noqa: E501

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

        :param async_req bool
        :param SkipNumber skip:
        :param TakeNumber take:
        :param OrderString order: string: \"ASC\" | \"DESC\"
        :param WhereString filter: array of api_key_ids
        :return: V1NetworkAuthApiKeysGetResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["skip", "take", "order", "filter"]  # 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 v1_network_auth_api_keys_get" % key
                )
            params[key] = val
        del params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []
        if "skip" in params:
            query_params.append(("skip", params["skip"]))  # noqa: E501
        if "take" in params:
            query_params.append(("take", params["take"]))  # noqa: E501
        if "order" in params:
            query_params.append(("order", params["order"]))  # noqa: E501
        if "filter" in params:
            query_params.append(("filter", params["filter"]))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/api-keys",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="V1NetworkAuthApiKeysGetResponse",  # 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 v1_network_auth_logout(self, **kwargs):  # noqa: E501
        """Logout  # noqa: E501

        Deletes session cookies.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_logout(async_req=True)
        >>> result = thread.get()

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

    def v1_network_auth_logout_with_http_info(self, **kwargs):  # noqa: E501
        """Logout  # noqa: E501

        Deletes session cookies.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_logout_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: None
                 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 v1_network_auth_logout" % key
                )
            params[key] = val
        del params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/logout",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def v1_network_auth_mfa_confirm(self, body, **kwargs):  # noqa: E501
        """Confirm MFA  # noqa: E501

        Confirms MFA.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_mfa_confirm(body, async_req=True)
        >>> result = thread.get()

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

    def v1_network_auth_mfa_confirm_with_http_info(self, body, **kwargs):  # noqa: E501
        """Confirm MFA  # noqa: E501

        Confirms MFA.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_mfa_confirm_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param V1NetworkAuthMfaConfirmRequest body: (required)
        :return: V1NetworkAuthMfaConfirmResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "body" in params:
            body_params = params["body"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # 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 = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/mfa/confirm",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="V1NetworkAuthMfaConfirmResponse",  # 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 v1_network_auth_mfa_disable(self, body, **kwargs):  # noqa: E501
        """Disable MFA  # noqa: E501

        Disables MFA.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_mfa_disable(body, async_req=True)
        >>> result = thread.get()

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

    def v1_network_auth_mfa_disable_with_http_info(self, body, **kwargs):  # noqa: E501
        """Disable MFA  # noqa: E501

        Disables MFA.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_mfa_disable_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param V1NetworkAuthMfaDisableRequest body: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "body" in params:
            body_params = params["body"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # 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 = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/mfa/disable",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def v1_network_auth_mfa_disable_using_backup(self, body, **kwargs):  # noqa: E501
        """Disable MFA (backup)  # noqa: E501

        Disables MFA using backup.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_mfa_disable_using_backup(body, async_req=True)
        >>> result = thread.get()

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

    def v1_network_auth_mfa_disable_using_backup_with_http_info(
        self, body, **kwargs
    ):  # noqa: E501
        """Disable MFA (backup)  # noqa: E501

        Disables MFA using backup.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_mfa_disable_using_backup_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param V1NetworkAuthMfaDisableUsingBackupRequest body: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "body" in params:
            body_params = params["body"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # 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 = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/mfa/disable-using-backup",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def v1_network_auth_mfa_generate(self, **kwargs):  # noqa: E501
        """Generate MFA  # noqa: E501

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

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

    def v1_network_auth_mfa_generate_with_http_info(self, **kwargs):  # noqa: E501
        """Generate MFA  # noqa: E501

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

        :param async_req bool
        :return: V1NetworkAuthMfaGenerateResponse
                 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 v1_network_auth_mfa_generate" % key
                )
            params[key] = val
        del params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/mfa/generate",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="V1NetworkAuthMfaGenerateResponse",  # 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 v1_network_auth_settings_update(self, body, **kwargs):  # noqa: E501
        """Update User settings  # noqa: E501

        Updates User settings.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_settings_update(body, async_req=True)
        >>> result = thread.get()

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

    def v1_network_auth_settings_update_with_http_info(
        self, body, **kwargs
    ):  # noqa: E501
        """Update User settings  # noqa: E501

        Updates User settings.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_settings_update_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param UserSettings body: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "body" in params:
            body_params = params["body"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # 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 = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/user/settings",
            "PATCH",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def v1_network_auth_user_get(self, **kwargs):  # noqa: E501
        """Get User info  # noqa: E501

        Returns authorized User data. This is recommended way to get the latest user's information.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_user_get(async_req=True)
        >>> result = thread.get()

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

    def v1_network_auth_user_get_with_http_info(self, **kwargs):  # noqa: E501
        """Get User info  # noqa: E501

        Returns authorized User data. This is recommended way to get the latest user's information.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_user_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: V1NetworkAuthUserGetResponse
                 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 v1_network_auth_user_get" % key
                )
            params[key] = val
        del params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/user",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="V1NetworkAuthUserGetResponse",  # 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 v1_network_auth_user_invitations_get(self, **kwargs):  # noqa: E501
        """Get invitations for authenticated user  # noqa: E501

        Gets invitations for authenticated 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.v1_network_auth_user_invitations_get(async_req=True)
        >>> result = thread.get()

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

    def v1_network_auth_user_invitations_get_with_http_info(
        self, **kwargs
    ):  # noqa: E501
        """Get invitations for authenticated user  # noqa: E501

        Gets invitations for authenticated 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.v1_network_auth_user_invitations_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: V1NetworkAuthUserInvitationsGetResponse
                 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 v1_network_auth_user_invitations_get" % key
                )
            params[key] = val
        del params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/user/invitations",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="V1NetworkAuthUserInvitationsGetResponse",  # 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 v1_network_auth_users_get(self, **kwargs):  # noqa: E501
        """Get workspace users  # noqa: E501

        Gets workspace 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.v1_network_auth_users_get(async_req=True)
        >>> result = thread.get()

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

    def v1_network_auth_users_get_with_http_info(self, **kwargs):  # noqa: E501
        """Get workspace users  # noqa: E501

        Gets workspace 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.v1_network_auth_users_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: V1NetworkAuthUsersGetResponse
                 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 v1_network_auth_users_get" % key
                )
            params[key] = val
        del params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/users",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="V1NetworkAuthUsersGetResponse",  # 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 v1_network_auth_users_remove(self, body, **kwargs):  # noqa: E501
        """Remove users from workspace  # noqa: E501

        Removes users from workspace.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_users_remove(body, async_req=True)
        >>> result = thread.get()

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

    def v1_network_auth_users_remove_with_http_info(self, body, **kwargs):  # noqa: E501
        """Remove users from workspace  # noqa: E501

        Removes users from workspace.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_users_remove_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param V1NetworkAuthUsersRemoveRequest body: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "body" in params:
            body_params = params["body"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # 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 = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/users/remove",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def v1_network_auth_users_role_update(self, body, user_id, **kwargs):  # noqa: E501
        """Update user role in the workspace  # noqa: E501

        Updates user role in the workspace.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_users_role_update(body, user_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param V1NetworkAuthUsersRoleUpdateRequest body: (required)
        :param IdNumber user_id: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.v1_network_auth_users_role_update_with_http_info(
                body, user_id, **kwargs
            )  # noqa: E501
        else:
            (data) = self.v1_network_auth_users_role_update_with_http_info(
                body, user_id, **kwargs
            )  # noqa: E501
            return data

    def v1_network_auth_users_role_update_with_http_info(
        self, body, user_id, **kwargs
    ):  # noqa: E501
        """Update user role in the workspace  # noqa: E501

        Updates user role in the workspace.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_users_role_update_with_http_info(body, user_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param V1NetworkAuthUsersRoleUpdateRequest body: (required)
        :param IdNumber user_id: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if "user_id" in params:
            path_params["user_id"] = params["user_id"]  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "body" in params:
            body_params = params["body"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # 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 = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/users/{user_id}/role",
            "PATCH",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def v1_network_auth_verify_email(self, code, **kwargs):  # noqa: E501
        """Verify email  # noqa: E501

        Verifies User's email address.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_verify_email(code, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str code: Email verification code (received by mail). (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.v1_network_auth_verify_email_with_http_info(
                code, **kwargs
            )  # noqa: E501
        else:
            (data) = self.v1_network_auth_verify_email_with_http_info(
                code, **kwargs
            )  # noqa: E501
            return data

    def v1_network_auth_verify_email_with_http_info(self, code, **kwargs):  # noqa: E501
        """Verify email  # noqa: E501

        Verifies User's email address.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_verify_email_with_http_info(code, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str code: Email verification code (received by mail). (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if "code" in params:
            path_params["code"] = params["code"]  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/verify-email/{code}",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def v1_network_auth_workspace_create(self, body, **kwargs):  # noqa: E501
        """Create workspace  # noqa: E501

        Creates workspace.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_workspace_create(body, async_req=True)
        >>> result = thread.get()

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

    def v1_network_auth_workspace_create_with_http_info(
        self, body, **kwargs
    ):  # noqa: E501
        """Create workspace  # noqa: E501

        Creates workspace.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_workspace_create_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param V1NetworkAuthWorkspaceCreateRequest body: (required)
        :return: V1NetworkAuthWorkspaceCreateResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "body" in params:
            body_params = params["body"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # 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 = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/workspaces",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="V1NetworkAuthWorkspaceCreateResponse",  # 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 v1_network_auth_workspace_delete(self, workspace_id, **kwargs):  # noqa: E501
        """Delete workspace  # noqa: E501

        Deletes workspace.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_workspace_delete(workspace_id, async_req=True)
        >>> result = thread.get()

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

    def v1_network_auth_workspace_delete_with_http_info(
        self, workspace_id, **kwargs
    ):  # noqa: E501
        """Delete workspace  # noqa: E501

        Deletes workspace.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_workspace_delete_with_http_info(workspace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param IdNumber workspace_id: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if "workspace_id" in params:
            path_params["workspace_id"] = params["workspace_id"]  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/workspaces/{workspace_id}",
            "DELETE",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def v1_network_auth_workspace_get(self, **kwargs):  # noqa: E501
        """Get workspaces  # noqa: E501

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

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

    def v1_network_auth_workspace_get_with_http_info(self, **kwargs):  # noqa: E501
        """Get workspaces  # noqa: E501

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

        :param async_req bool
        :return: V1NetworkAuthWorkspaceGetResponse
                 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 v1_network_auth_workspace_get" % key
                )
            params[key] = val
        del params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/workspaces",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="V1NetworkAuthWorkspaceGetResponse",  # 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 v1_network_auth_workspace_update(
        self, body, workspace_id, **kwargs
    ):  # noqa: E501
        """Update workspace  # noqa: E501

        Updates workspace.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_workspace_update(body, workspace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param V1NetworkAuthWorkspaceUpdateRequest body: (required)
        :param IdNumber workspace_id: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.v1_network_auth_workspace_update_with_http_info(
                body, workspace_id, **kwargs
            )  # noqa: E501
        else:
            (data) = self.v1_network_auth_workspace_update_with_http_info(
                body, workspace_id, **kwargs
            )  # noqa: E501
            return data

    def v1_network_auth_workspace_update_with_http_info(
        self, body, workspace_id, **kwargs
    ):  # noqa: E501
        """Update workspace  # noqa: E501

        Updates workspace.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_workspace_update_with_http_info(body, workspace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param V1NetworkAuthWorkspaceUpdateRequest body: (required)
        :param IdNumber workspace_id: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if "workspace_id" in params:
            path_params["workspace_id"] = params["workspace_id"]  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "body" in params:
            body_params = params["body"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # 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 = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/workspaces/{workspace_id}",
            "PATCH",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def v1_network_auth_workspaces_invitations_accept(
        self, invitation_id, **kwargs
    ):  # noqa: E501
        """Accept workspace invitation  # noqa: E501

        Accepts workspace invitation.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_workspaces_invitations_accept(invitation_id, async_req=True)
        >>> result = thread.get()

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

    def v1_network_auth_workspaces_invitations_accept_with_http_info(
        self, invitation_id, **kwargs
    ):  # noqa: E501
        """Accept workspace invitation  # noqa: E501

        Accepts workspace invitation.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_workspaces_invitations_accept_with_http_info(invitation_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param IdNumber invitation_id: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if "invitation_id" in params:
            path_params["invitation_id"] = params["invitation_id"]  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/workspaces/invitations/{invitation_id}/accept",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def v1_network_auth_workspaces_invitations_create(
        self, body, **kwargs
    ):  # noqa: E501
        """Create workspace invitation  # noqa: E501

        Creates workspace invitation.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_workspaces_invitations_create(body, async_req=True)
        >>> result = thread.get()

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

    def v1_network_auth_workspaces_invitations_create_with_http_info(
        self, body, **kwargs
    ):  # noqa: E501
        """Create workspace invitation  # noqa: E501

        Creates workspace invitation.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_workspaces_invitations_create_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param V1NetworkAuthWorkspacesInvitationsCreateRequest body: (required)
        :return: V1NetworkAuthWorkspacesInvitationsCreateResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "body" in params:
            body_params = params["body"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # 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 = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/workspaces/invitations",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="V1NetworkAuthWorkspacesInvitationsCreateResponse",  # 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 v1_network_auth_workspaces_invitations_decline(
        self, invitation_id, **kwargs
    ):  # noqa: E501
        """Decline workspace invitation  # noqa: E501

        Declines workspace invitation.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_workspaces_invitations_decline(invitation_id, async_req=True)
        >>> result = thread.get()

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

    def v1_network_auth_workspaces_invitations_decline_with_http_info(
        self, invitation_id, **kwargs
    ):  # noqa: E501
        """Decline workspace invitation  # noqa: E501

        Declines workspace invitation.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_workspaces_invitations_decline_with_http_info(invitation_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param IdNumber invitation_id: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if "invitation_id" in params:
            path_params["invitation_id"] = params["invitation_id"]  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/workspaces/invitations/{invitation_id}/decline",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def v1_network_auth_workspaces_invitations_get(self, **kwargs):  # noqa: E501
        """Get workspace invitations  # noqa: E501

        Gets workspace invitations.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_workspaces_invitations_get(async_req=True)
        >>> result = thread.get()

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

    def v1_network_auth_workspaces_invitations_get_with_http_info(
        self, **kwargs
    ):  # noqa: E501
        """Get workspace invitations  # noqa: E501

        Gets workspace invitations.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_workspaces_invitations_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: V1NetworkAuthWorkspacesInvitationsGetResponse
                 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 v1_network_auth_workspaces_invitations_get" % key
                )
            params[key] = val
        del params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/workspaces/invitations",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="V1NetworkAuthWorkspacesInvitationsGetResponse",  # 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 v1_network_auth_workspaces_invitations_remove(
        self, body, **kwargs
    ):  # noqa: E501
        """Delete workspace invitations  # noqa: E501

        Deletes workspace invitations.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_workspaces_invitations_remove(body, async_req=True)
        >>> result = thread.get()

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

    def v1_network_auth_workspaces_invitations_remove_with_http_info(
        self, body, **kwargs
    ):  # noqa: E501
        """Delete workspace invitations  # noqa: E501

        Deletes workspace invitations.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v1_network_auth_workspaces_invitations_remove_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param V1NetworkAuthWorkspacesInvitationsRemoveRequest body: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "body" in params:
            body_params = params["body"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # 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 = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/workspaces/invitations/remove",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def v1_network_auth_workspaces_leave(self, **kwargs):  # noqa: E501
        """Leave workspace  # noqa: E501

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

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

    def v1_network_auth_workspaces_leave_with_http_info(self, **kwargs):  # noqa: E501
        """Leave workspace  # noqa: E501

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

        :param async_req bool
        :return: None
                 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 v1_network_auth_workspaces_leave" % key
                )
            params[key] = val
        del params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ["jwt"]  # noqa: E501

        return self.api_client.call_api(
            "/v1/network/auth/workspaces/leave",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )
