Module mailslurp_client.api.mfa_controller_api

MailSlurp API

MailSlurp is an API for sending and receiving emails and SMS from dynamically allocated email addresses and phone numbers. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - Homepage - Get an API KEY - Generated SDK Clients - Examples repository # noqa: E501

The version of the OpenAPI document: 6.5.2 Contact: contact@mailslurp.dev Generated by: https://openapi-generator.tech

Classes

class MFAControllerApi (api_client=None)

NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech

Do not edit the class manually.

Expand source code
class MFAControllerApi(object):
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def create_totp_device_for_base32_secret_key(self, create_totp_device_base32_secret_key_options, **kwargs):  # noqa: E501
        """Create a TOTP device from an base32 secret key  # noqa: E501

        Create a virtual TOTP device for a given secret key. This is usually present as an alternative login option when pairing OTP devices.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_totp_device_for_base32_secret_key(create_totp_device_base32_secret_key_options, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param CreateTotpDeviceBase32SecretKeyOptions create_totp_device_base32_secret_key_options: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: TotpDeviceDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.create_totp_device_for_base32_secret_key_with_http_info(create_totp_device_base32_secret_key_options, **kwargs)  # noqa: E501

    def create_totp_device_for_base32_secret_key_with_http_info(self, create_totp_device_base32_secret_key_options, **kwargs):  # noqa: E501
        """Create a TOTP device from an base32 secret key  # noqa: E501

        Create a virtual TOTP device for a given secret key. This is usually present as an alternative login option when pairing OTP devices.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_totp_device_for_base32_secret_key_with_http_info(create_totp_device_base32_secret_key_options, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param CreateTotpDeviceBase32SecretKeyOptions create_totp_device_base32_secret_key_options: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(TotpDeviceDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'create_totp_device_base32_secret_key_options'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_totp_device_for_base32_secret_key" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'create_totp_device_base32_secret_key_options' is set
        if self.api_client.client_side_validation and ('create_totp_device_base32_secret_key_options' not in local_var_params or  # noqa: E501
                                                        local_var_params['create_totp_device_base32_secret_key_options'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `create_totp_device_base32_secret_key_options` when calling `create_totp_device_for_base32_secret_key`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'create_totp_device_base32_secret_key_options' in local_var_params:
            body_params = local_var_params['create_totp_device_base32_secret_key_options']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['*/*'])  # 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 = ['API_KEY']  # noqa: E501

        return self.api_client.call_api(
            '/mfa/totp/device/base32SecretKey', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TotpDeviceDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def create_totp_device_for_custom(self, create_totp_device_custom_options, **kwargs):  # noqa: E501
        """Create a TOTP device from custom options  # noqa: E501

        Create a virtual TOTP device for custom options specifying all parameters of the TOTP device.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_totp_device_for_custom(create_totp_device_custom_options, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param CreateTotpDeviceCustomOptions create_totp_device_custom_options: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: TotpDeviceDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.create_totp_device_for_custom_with_http_info(create_totp_device_custom_options, **kwargs)  # noqa: E501

    def create_totp_device_for_custom_with_http_info(self, create_totp_device_custom_options, **kwargs):  # noqa: E501
        """Create a TOTP device from custom options  # noqa: E501

        Create a virtual TOTP device for custom options specifying all parameters of the TOTP device.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_totp_device_for_custom_with_http_info(create_totp_device_custom_options, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param CreateTotpDeviceCustomOptions create_totp_device_custom_options: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(TotpDeviceDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'create_totp_device_custom_options'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_totp_device_for_custom" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'create_totp_device_custom_options' is set
        if self.api_client.client_side_validation and ('create_totp_device_custom_options' not in local_var_params or  # noqa: E501
                                                        local_var_params['create_totp_device_custom_options'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `create_totp_device_custom_options` when calling `create_totp_device_for_custom`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'create_totp_device_custom_options' in local_var_params:
            body_params = local_var_params['create_totp_device_custom_options']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['*/*'])  # 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 = ['API_KEY']  # noqa: E501

        return self.api_client.call_api(
            '/mfa/totp/device/custom', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TotpDeviceDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def create_totp_device_for_otp_auth_url(self, create_totp_device_otp_auth_url_options, **kwargs):  # noqa: E501
        """Create a TOTP device from an OTP Auth URL  # noqa: E501

        Create a virtual TOTP device for a given OTP Auth URL such as otpauth://totp/MyApp:alice@example.com?secret=ABC123&issuer=MyApp&period=30&digits=6&algorithm=SHA1. You can provider overrides in the options for each component of the URL.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_totp_device_for_otp_auth_url(create_totp_device_otp_auth_url_options, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param CreateTotpDeviceOtpAuthUrlOptions create_totp_device_otp_auth_url_options: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: TotpDeviceDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.create_totp_device_for_otp_auth_url_with_http_info(create_totp_device_otp_auth_url_options, **kwargs)  # noqa: E501

    def create_totp_device_for_otp_auth_url_with_http_info(self, create_totp_device_otp_auth_url_options, **kwargs):  # noqa: E501
        """Create a TOTP device from an OTP Auth URL  # noqa: E501

        Create a virtual TOTP device for a given OTP Auth URL such as otpauth://totp/MyApp:alice@example.com?secret=ABC123&issuer=MyApp&period=30&digits=6&algorithm=SHA1. You can provider overrides in the options for each component of the URL.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_totp_device_for_otp_auth_url_with_http_info(create_totp_device_otp_auth_url_options, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param CreateTotpDeviceOtpAuthUrlOptions create_totp_device_otp_auth_url_options: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(TotpDeviceDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'create_totp_device_otp_auth_url_options'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_totp_device_for_otp_auth_url" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'create_totp_device_otp_auth_url_options' is set
        if self.api_client.client_side_validation and ('create_totp_device_otp_auth_url_options' not in local_var_params or  # noqa: E501
                                                        local_var_params['create_totp_device_otp_auth_url_options'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `create_totp_device_otp_auth_url_options` when calling `create_totp_device_for_otp_auth_url`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'create_totp_device_otp_auth_url_options' in local_var_params:
            body_params = local_var_params['create_totp_device_otp_auth_url_options']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['*/*'])  # 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 = ['API_KEY']  # noqa: E501

        return self.api_client.call_api(
            '/mfa/totp/device/otpAuthUrl', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TotpDeviceDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def delete_totp_device(self, id, **kwargs):  # noqa: E501
        """Delete a TOTP device  # noqa: E501

        Delete a Time-Based One-Time Password (TOTP) device by ID.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_totp_device(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str id: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.delete_totp_device_with_http_info(id, **kwargs)  # noqa: E501

    def delete_totp_device_with_http_info(self, id, **kwargs):  # noqa: E501
        """Delete a TOTP device  # noqa: E501

        Delete a Time-Based One-Time Password (TOTP) device by ID.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_totp_device_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str id: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_totp_device" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in local_var_params or  # noqa: E501
                                                        local_var_params['id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `id` when calling `delete_totp_device`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        return self.api_client.call_api(
            '/mfa/totp/device/{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=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_totp_device(self, id, **kwargs):  # noqa: E501
        """Get a TOTP device by ID  # noqa: E501

        Get Time-Based One-Time Password (TOTP) device by its ID.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_totp_device(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str id: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: TotpDeviceDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_totp_device_with_http_info(id, **kwargs)  # noqa: E501

    def get_totp_device_with_http_info(self, id, **kwargs):  # noqa: E501
        """Get a TOTP device by ID  # noqa: E501

        Get Time-Based One-Time Password (TOTP) device by its ID.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_totp_device_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str id: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(TotpDeviceDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_totp_device" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in local_var_params or  # noqa: E501
                                                        local_var_params['id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `id` when calling `get_totp_device`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/mfa/totp/device/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TotpDeviceDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_totp_device_by(self, **kwargs):  # noqa: E501
        """Get a TOTP device by username, issuer, or name. Returns empty if not found.  # noqa: E501

        Get Time-Based One-Time Password (TOTP) device by its username and issuer mapping.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_totp_device_by(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str name: Optional name filter
        :param str issuer: Optional issuer filter
        :param str username: Optional username filter
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: TotpDeviceOptionalDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_totp_device_by_with_http_info(**kwargs)  # noqa: E501

    def get_totp_device_by_with_http_info(self, **kwargs):  # noqa: E501
        """Get a TOTP device by username, issuer, or name. Returns empty if not found.  # noqa: E501

        Get Time-Based One-Time Password (TOTP) device by its username and issuer mapping.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_totp_device_by_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str name: Optional name filter
        :param str issuer: Optional issuer filter
        :param str username: Optional username filter
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(TotpDeviceOptionalDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'name',
            'issuer',
            'username'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'name' in local_var_params and local_var_params['name'] is not None:  # noqa: E501
            query_params.append(('name', local_var_params['name']))  # noqa: E501
        if 'issuer' in local_var_params and local_var_params['issuer'] is not None:  # noqa: E501
            query_params.append(('issuer', local_var_params['issuer']))  # noqa: E501
        if 'username' in local_var_params and local_var_params['username'] is not None:  # noqa: E501
            query_params.append(('username', local_var_params['username']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/mfa/totp/device/by', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TotpDeviceOptionalDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_totp_device_code(self, id, **kwargs):  # noqa: E501
        """Get a TOTP device code by device ID  # noqa: E501

        Get Time-Based One-Time Password for a device by its ID.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_totp_device_code(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str id: ID of the TOTP device to get the code for (required)
        :param datetime at: Optional time to get code for. If not provided, current time is used.
        :param int min_seconds_until_expire: Optional minimum time until code expires. Will hold thread open until period reached.
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: TotpDeviceCodeDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_totp_device_code_with_http_info(id, **kwargs)  # noqa: E501

    def get_totp_device_code_with_http_info(self, id, **kwargs):  # noqa: E501
        """Get a TOTP device code by device ID  # noqa: E501

        Get Time-Based One-Time Password for a device by its ID.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_totp_device_code_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str id: ID of the TOTP device to get the code for (required)
        :param datetime at: Optional time to get code for. If not provided, current time is used.
        :param int min_seconds_until_expire: Optional minimum time until code expires. Will hold thread open until period reached.
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(TotpDeviceCodeDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'id',
            'at',
            'min_seconds_until_expire'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_totp_device_code" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in local_var_params or  # noqa: E501
                                                        local_var_params['id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `id` when calling `get_totp_device_code`")  # noqa: E501

        if self.api_client.client_side_validation and 'min_seconds_until_expire' in local_var_params and local_var_params['min_seconds_until_expire'] > 30:  # noqa: E501
            raise ApiValueError("Invalid value for parameter `min_seconds_until_expire` when calling `get_totp_device_code`, must be a value less than or equal to `30`")  # noqa: E501
        if self.api_client.client_side_validation and 'min_seconds_until_expire' in local_var_params and local_var_params['min_seconds_until_expire'] < 1:  # noqa: E501
            raise ApiValueError("Invalid value for parameter `min_seconds_until_expire` when calling `get_totp_device_code`, must be a value greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

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

        query_params = []
        if 'at' in local_var_params and local_var_params['at'] is not None:  # noqa: E501
            query_params.append(('at', local_var_params['at']))  # noqa: E501
        if 'min_seconds_until_expire' in local_var_params and local_var_params['min_seconds_until_expire'] is not None:  # noqa: E501
            query_params.append(('minSecondsUntilExpire', local_var_params['min_seconds_until_expire']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/mfa/totp/device/{id}/code', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TotpDeviceCodeDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_totp_devices(self, **kwargs):  # noqa: E501
        """List TOTP devices  # noqa: E501

        List Time-Based One-Time Password (TOTP) devices for the calling account.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_totp_devices(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param int page: Optional page index in list pagination
        :param int size: Optional page size for paginated result list.
        :param str sort: Optional createdAt sort direction ASC or DESC
        :param str issuer: Optional issuer filter
        :param str username: Optional username filter
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: PageTotpDeviceProjection
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_totp_devices_with_http_info(**kwargs)  # noqa: E501

    def get_totp_devices_with_http_info(self, **kwargs):  # noqa: E501
        """List TOTP devices  # noqa: E501

        List Time-Based One-Time Password (TOTP) devices for the calling account.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_totp_devices_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param int page: Optional page index in list pagination
        :param int size: Optional page size for paginated result list.
        :param str sort: Optional createdAt sort direction ASC or DESC
        :param str issuer: Optional issuer filter
        :param str username: Optional username filter
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(PageTotpDeviceProjection, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'page',
            'size',
            'sort',
            'issuer',
            'username'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

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

        if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 100:  # noqa: E501
            raise ApiValueError("Invalid value for parameter `size` when calling `get_totp_devices`, must be a value less than or equal to `100`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'page' in local_var_params and local_var_params['page'] is not None:  # noqa: E501
            query_params.append(('page', local_var_params['page']))  # noqa: E501
        if 'size' in local_var_params and local_var_params['size'] is not None:  # noqa: E501
            query_params.append(('size', local_var_params['size']))  # noqa: E501
        if 'sort' in local_var_params and local_var_params['sort'] is not None:  # noqa: E501
            query_params.append(('sort', local_var_params['sort']))  # noqa: E501
        if 'issuer' in local_var_params and local_var_params['issuer'] is not None:  # noqa: E501
            query_params.append(('issuer', local_var_params['issuer']))  # noqa: E501
        if 'username' in local_var_params and local_var_params['username'] is not None:  # noqa: E501
            query_params.append(('username', local_var_params['username']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/mfa/totp/device', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PageTotpDeviceProjection',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_totp_device(self, id, update_totp_device_options, **kwargs):  # noqa: E501
        """Update a TOTP device  # noqa: E501

        Update stored metadata and TOTP settings for a device by ID.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_totp_device(id, update_totp_device_options, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str id: (required)
        :param UpdateTotpDeviceOptions update_totp_device_options: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: TotpDeviceDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.update_totp_device_with_http_info(id, update_totp_device_options, **kwargs)  # noqa: E501

    def update_totp_device_with_http_info(self, id, update_totp_device_options, **kwargs):  # noqa: E501
        """Update a TOTP device  # noqa: E501

        Update stored metadata and TOTP settings for a device by ID.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_totp_device_with_http_info(id, update_totp_device_options, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str id: (required)
        :param UpdateTotpDeviceOptions update_totp_device_options: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(TotpDeviceDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'id',
            'update_totp_device_options'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_totp_device" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in local_var_params or  # noqa: E501
                                                        local_var_params['id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `id` when calling `update_totp_device`")  # noqa: E501
        # verify the required parameter 'update_totp_device_options' is set
        if self.api_client.client_side_validation and ('update_totp_device_options' not in local_var_params or  # noqa: E501
                                                        local_var_params['update_totp_device_options'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `update_totp_device_options` when calling `update_totp_device`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'update_totp_device_options' in local_var_params:
            body_params = local_var_params['update_totp_device_options']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['*/*'])  # 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 = ['API_KEY']  # noqa: E501

        return self.api_client.call_api(
            '/mfa/totp/device/{id}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TotpDeviceDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

Methods

def create_totp_device_for_base32_secret_key(self, create_totp_device_base32_secret_key_options, **kwargs)

Create a TOTP device from an base32 secret key # noqa: E501

Create a virtual TOTP device for a given secret key. This is usually present as an alternative login option when pairing OTP devices. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.create_totp_device_for_base32_secret_key(create_totp_device_base32_secret_key_options, async_req=True)
>>> result = thread.get()

:param async_req bool: execute request asynchronously :param CreateTotpDeviceBase32SecretKeyOptions create_totp_device_base32_secret_key_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: TotpDeviceDto If the method is called asynchronously, returns the request thread.

def create_totp_device_for_base32_secret_key_with_http_info(self, create_totp_device_base32_secret_key_options, **kwargs)

Create a TOTP device from an base32 secret key # noqa: E501

Create a virtual TOTP device for a given secret key. This is usually present as an alternative login option when pairing OTP devices. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.create_totp_device_for_base32_secret_key_with_http_info(create_totp_device_base32_secret_key_options, async_req=True)
>>> result = thread.get()

:param async_req bool: execute request asynchronously :param CreateTotpDeviceBase32SecretKeyOptions create_totp_device_base32_secret_key_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(TotpDeviceDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.

def create_totp_device_for_custom(self, create_totp_device_custom_options, **kwargs)

Create a TOTP device from custom options # noqa: E501

Create a virtual TOTP device for custom options specifying all parameters of the TOTP device. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.create_totp_device_for_custom(create_totp_device_custom_options, async_req=True)
>>> result = thread.get()

:param async_req bool: execute request asynchronously :param CreateTotpDeviceCustomOptions create_totp_device_custom_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: TotpDeviceDto If the method is called asynchronously, returns the request thread.

def create_totp_device_for_custom_with_http_info(self, create_totp_device_custom_options, **kwargs)

Create a TOTP device from custom options # noqa: E501

Create a virtual TOTP device for custom options specifying all parameters of the TOTP device. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.create_totp_device_for_custom_with_http_info(create_totp_device_custom_options, async_req=True)
>>> result = thread.get()

:param async_req bool: execute request asynchronously :param CreateTotpDeviceCustomOptions create_totp_device_custom_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(TotpDeviceDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.

def create_totp_device_for_otp_auth_url(self, create_totp_device_otp_auth_url_options, **kwargs)

Create a TOTP device from an OTP Auth URL # noqa: E501

Create a virtual TOTP device for a given OTP Auth URL such as otpauth://totp/MyApp:alice@example.com?secret=ABC123&issuer=MyApp&period=30&digits=6&algorithm=SHA1. You can provider overrides in the options for each component of the URL. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.create_totp_device_for_otp_auth_url(create_totp_device_otp_auth_url_options, async_req=True)
>>> result = thread.get()

:param async_req bool: execute request asynchronously :param CreateTotpDeviceOtpAuthUrlOptions create_totp_device_otp_auth_url_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: TotpDeviceDto If the method is called asynchronously, returns the request thread.

def create_totp_device_for_otp_auth_url_with_http_info(self, create_totp_device_otp_auth_url_options, **kwargs)

Create a TOTP device from an OTP Auth URL # noqa: E501

Create a virtual TOTP device for a given OTP Auth URL such as otpauth://totp/MyApp:alice@example.com?secret=ABC123&issuer=MyApp&period=30&digits=6&algorithm=SHA1. You can provider overrides in the options for each component of the URL. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.create_totp_device_for_otp_auth_url_with_http_info(create_totp_device_otp_auth_url_options, async_req=True)
>>> result = thread.get()

:param async_req bool: execute request asynchronously :param CreateTotpDeviceOtpAuthUrlOptions create_totp_device_otp_auth_url_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(TotpDeviceDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.

def delete_totp_device(self, id, **kwargs)

Delete a TOTP device # noqa: E501

Delete a Time-Based One-Time Password (TOTP) device by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.delete_totp_device(id, async_req=True)
>>> result = thread.get()

:param async_req bool: execute request asynchronously :param str id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.

def delete_totp_device_with_http_info(self, id, **kwargs)

Delete a TOTP device # noqa: E501

Delete a Time-Based One-Time Password (TOTP) device by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.delete_totp_device_with_http_info(id, async_req=True)
>>> result = thread.get()

:param async_req bool: execute request asynchronously :param str id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread.

def get_totp_device(self, id, **kwargs)

Get a TOTP device by ID # noqa: E501

Get Time-Based One-Time Password (TOTP) device by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.get_totp_device(id, async_req=True)
>>> result = thread.get()

:param async_req bool: execute request asynchronously :param str id: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: TotpDeviceDto If the method is called asynchronously, returns the request thread.

def get_totp_device_by(self, **kwargs)

Get a TOTP device by username, issuer, or name. Returns empty if not found. # noqa: E501

Get Time-Based One-Time Password (TOTP) device by its username and issuer mapping. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.get_totp_device_by(async_req=True)
>>> result = thread.get()

:param async_req bool: execute request asynchronously :param str name: Optional name filter :param str issuer: Optional issuer filter :param str username: Optional username filter :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: TotpDeviceOptionalDto If the method is called asynchronously, returns the request thread.

def get_totp_device_by_with_http_info(self, **kwargs)

Get a TOTP device by username, issuer, or name. Returns empty if not found. # noqa: E501

Get Time-Based One-Time Password (TOTP) device by its username and issuer mapping. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.get_totp_device_by_with_http_info(async_req=True)
>>> result = thread.get()

:param async_req bool: execute request asynchronously :param str name: Optional name filter :param str issuer: Optional issuer filter :param str username: Optional username filter :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(TotpDeviceOptionalDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.

def get_totp_device_code(self, id, **kwargs)

Get a TOTP device code by device ID # noqa: E501

Get Time-Based One-Time Password for a device by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.get_totp_device_code(id, async_req=True)
>>> result = thread.get()

:param async_req bool: execute request asynchronously :param str id: ID of the TOTP device to get the code for (required) :param datetime at: Optional time to get code for. If not provided, current time is used. :param int min_seconds_until_expire: Optional minimum time until code expires. Will hold thread open until period reached. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: TotpDeviceCodeDto If the method is called asynchronously, returns the request thread.

def get_totp_device_code_with_http_info(self, id, **kwargs)

Get a TOTP device code by device ID # noqa: E501

Get Time-Based One-Time Password for a device by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.get_totp_device_code_with_http_info(id, async_req=True)
>>> result = thread.get()

:param async_req bool: execute request asynchronously :param str id: ID of the TOTP device to get the code for (required) :param datetime at: Optional time to get code for. If not provided, current time is used. :param int min_seconds_until_expire: Optional minimum time until code expires. Will hold thread open until period reached. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(TotpDeviceCodeDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.

def get_totp_device_with_http_info(self, id, **kwargs)

Get a TOTP device by ID # noqa: E501

Get Time-Based One-Time Password (TOTP) device by its ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.get_totp_device_with_http_info(id, async_req=True)
>>> result = thread.get()

:param async_req bool: execute request asynchronously :param str id: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(TotpDeviceDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.

def get_totp_devices(self, **kwargs)

List TOTP devices # noqa: E501

List Time-Based One-Time Password (TOTP) devices for the calling account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.get_totp_devices(async_req=True)
>>> result = thread.get()

:param async_req bool: execute request asynchronously :param int page: Optional page index in list pagination :param int size: Optional page size for paginated result list. :param str sort: Optional createdAt sort direction ASC or DESC :param str issuer: Optional issuer filter :param str username: Optional username filter :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: PageTotpDeviceProjection If the method is called asynchronously, returns the request thread.

def get_totp_devices_with_http_info(self, **kwargs)

List TOTP devices # noqa: E501

List Time-Based One-Time Password (TOTP) devices for the calling account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.get_totp_devices_with_http_info(async_req=True)
>>> result = thread.get()

:param async_req bool: execute request asynchronously :param int page: Optional page index in list pagination :param int size: Optional page size for paginated result list. :param str sort: Optional createdAt sort direction ASC or DESC :param str issuer: Optional issuer filter :param str username: Optional username filter :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(PageTotpDeviceProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.

def update_totp_device(self, id, update_totp_device_options, **kwargs)

Update a TOTP device # noqa: E501

Update stored metadata and TOTP settings for a device by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.update_totp_device(id, update_totp_device_options, async_req=True)
>>> result = thread.get()

:param async_req bool: execute request asynchronously :param str id: (required) :param UpdateTotpDeviceOptions update_totp_device_options: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: TotpDeviceDto If the method is called asynchronously, returns the request thread.

def update_totp_device_with_http_info(self, id, update_totp_device_options, **kwargs)

Update a TOTP device # noqa: E501

Update stored metadata and TOTP settings for a device by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.update_totp_device_with_http_info(id, update_totp_device_options, async_req=True)
>>> result = thread.get()

:param async_req bool: execute request asynchronously :param str id: (required) :param UpdateTotpDeviceOptions update_totp_device_options: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(TotpDeviceDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.