# coding: utf-8

"""
    Onfido API

    The Onfido API is used to submit check requests.  # noqa: E501

    OpenAPI spec version: 2.0.0
    Generated by: https://openapi-generator.tech
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from onfido.api_client import ApiClient


class DefaultApi(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 cancel_report(self, check_id, report_id, **kwargs):  # noqa: E501
        """This endpoint is for cancelling individual paused reports.  # noqa: E501

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

        :param async_req bool
        :param str check_id: (required)
        :param str report_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.cancel_report_with_http_info(check_id, report_id, **kwargs)  # noqa: E501
        else:
            (data) = self.cancel_report_with_http_info(check_id, report_id, **kwargs)  # noqa: E501
            return data

    def cancel_report_with_http_info(self, check_id, report_id, **kwargs):  # noqa: E501
        """This endpoint is for cancelling individual paused reports.  # noqa: E501

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

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

        local_var_params = locals()

        all_params = ['check_id', 'report_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')

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

        collection_formats = {}

        path_params = {}
        if 'check_id' in local_var_params:
            path_params['check_id'] = local_var_params['check_id']  # noqa: E501
        if 'report_id' in local_var_params:
            path_params['report_id'] = local_var_params['report_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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/checks/{check_id}/reports/{report_id}/cancel', '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=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_applicant(self, applicant, **kwargs):  # noqa: E501
        """Create Applicant  # 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_applicant(applicant, async_req=True)
        >>> result = thread.get()

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

    def create_applicant_with_http_info(self, applicant, **kwargs):  # noqa: E501
        """Create Applicant  # 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_applicant_with_http_info(applicant, async_req=True)
        >>> result = thread.get()

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

        local_var_params = locals()

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'applicant' in local_var_params:
            body_params = local_var_params['applicant']
        # 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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/applicants', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Applicant',  # 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_check(self, applicant_id, check, **kwargs):  # noqa: E501
        """Create a check  # 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_check(applicant_id, check, async_req=True)
        >>> result = thread.get()

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

    def create_check_with_http_info(self, applicant_id, check, **kwargs):  # noqa: E501
        """Create a check  # 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_check_with_http_info(applicant_id, check, async_req=True)
        >>> result = thread.get()

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

        local_var_params = locals()

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'check' in local_var_params:
            body_params = local_var_params['check']
        # 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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/applicants/{applicant_id}/checks', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Check',  # 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_webhook(self, webhook, **kwargs):  # noqa: E501
        """Create a webhook  # 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_webhook(webhook, async_req=True)
        >>> result = thread.get()

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

    def create_webhook_with_http_info(self, webhook, **kwargs):  # noqa: E501
        """Create a webhook  # 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_webhook_with_http_info(webhook, async_req=True)
        >>> result = thread.get()

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

        local_var_params = locals()

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'webhook' in local_var_params:
            body_params = local_var_params['webhook']
        # 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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/webhooks', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Webhook',  # 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 destroy_applicant(self, applicant_id, **kwargs):  # noqa: E501
        """Delete Applicant  # noqa: E501

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

        :param async_req bool
        :param str applicant_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.destroy_applicant_with_http_info(applicant_id, **kwargs)  # noqa: E501
        else:
            (data) = self.destroy_applicant_with_http_info(applicant_id, **kwargs)  # noqa: E501
            return data

    def destroy_applicant_with_http_info(self, applicant_id, **kwargs):  # noqa: E501
        """Delete Applicant  # noqa: E501

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

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

        local_var_params = locals()

        all_params = ['applicant_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')

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

        collection_formats = {}

        path_params = {}
        if 'applicant_id' in local_var_params:
            path_params['applicant_id'] = local_var_params['applicant_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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/applicants/{applicant_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 download_document(self, applicant_id, document_id, **kwargs):  # noqa: E501
        """Download a documents raw data  # noqa: E501

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

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

    def download_document_with_http_info(self, applicant_id, document_id, **kwargs):  # noqa: E501
        """Download a documents raw data  # noqa: E501

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

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

        local_var_params = locals()

        all_params = ['applicant_id', 'document_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')

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

        collection_formats = {}

        path_params = {}
        if 'applicant_id' in local_var_params:
            path_params['applicant_id'] = local_var_params['applicant_id']  # noqa: E501
        if 'document_id' in local_var_params:
            path_params['document_id'] = local_var_params['document_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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/applicants/{applicant_id}/documents/{document_id}/download', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='file',  # 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 download_live_photo(self, live_photo_id, **kwargs):  # noqa: E501
        """Download live photo  # noqa: E501

        Live photos are downloaded using this endpoint.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.download_live_photo(live_photo_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str live_photo_id: The live photo’s unique identifier. (required)
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.download_live_photo_with_http_info(live_photo_id, **kwargs)  # noqa: E501
        else:
            (data) = self.download_live_photo_with_http_info(live_photo_id, **kwargs)  # noqa: E501
            return data

    def download_live_photo_with_http_info(self, live_photo_id, **kwargs):  # noqa: E501
        """Download live photo  # noqa: E501

        Live photos are downloaded using this endpoint.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.download_live_photo_with_http_info(live_photo_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str live_photo_id: The live photo’s unique identifier. (required)
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['live_photo_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')

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

        collection_formats = {}

        path_params = {}
        if 'live_photo_id' in local_var_params:
            path_params['live_photo_id'] = local_var_params['live_photo_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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/live_photos/{live_photo_id}/download', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='file',  # 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 download_live_video(self, live_video_id, **kwargs):  # noqa: E501
        """Download live video  # noqa: E501

        Live videos are downloaded using this endpoint.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.download_live_video(live_video_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str live_video_id: The live video’s unique identifier. (required)
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.download_live_video_with_http_info(live_video_id, **kwargs)  # noqa: E501
        else:
            (data) = self.download_live_video_with_http_info(live_video_id, **kwargs)  # noqa: E501
            return data

    def download_live_video_with_http_info(self, live_video_id, **kwargs):  # noqa: E501
        """Download live video  # noqa: E501

        Live videos are downloaded using this endpoint.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.download_live_video_with_http_info(live_video_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str live_video_id: The live video’s unique identifier. (required)
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['live_video_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')

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

        collection_formats = {}

        path_params = {}
        if 'live_video_id' in local_var_params:
            path_params['live_video_id'] = local_var_params['live_video_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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/live_videos/{live_video_id}/download', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='file',  # 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 find_addresses(self, postcode, **kwargs):  # noqa: E501
        """Search for addresses by postcode  # noqa: E501

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

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

    def find_addresses_with_http_info(self, postcode, **kwargs):  # noqa: E501
        """Search for addresses by postcode  # noqa: E501

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

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

        local_var_params = locals()

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

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'postcode' in local_var_params:
            query_params.append(('postcode', local_var_params['postcode']))  # 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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/addresses/pick', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GenericAddressesList',  # 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 find_applicant(self, applicant_id, **kwargs):  # noqa: E501
        """Retrieve Applicant  # noqa: E501

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

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

    def find_applicant_with_http_info(self, applicant_id, **kwargs):  # noqa: E501
        """Retrieve Applicant  # noqa: E501

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

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

        local_var_params = locals()

        all_params = ['applicant_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')

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

        collection_formats = {}

        path_params = {}
        if 'applicant_id' in local_var_params:
            path_params['applicant_id'] = local_var_params['applicant_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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/applicants/{applicant_id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Applicant',  # 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 find_check(self, applicant_id, check_id, **kwargs):  # noqa: E501
        """Retrieve a Check  # noqa: E501

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

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

    def find_check_with_http_info(self, applicant_id, check_id, **kwargs):  # noqa: E501
        """Retrieve a Check  # noqa: E501

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

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

        local_var_params = locals()

        all_params = ['applicant_id', 'check_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')

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

        collection_formats = {}

        path_params = {}
        if 'applicant_id' in local_var_params:
            path_params['applicant_id'] = local_var_params['applicant_id']  # noqa: E501
        if 'check_id' in local_var_params:
            path_params['check_id'] = local_var_params['check_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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/applicants/{applicant_id}/checks/{check_id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CheckWithReportIds',  # 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 find_document(self, applicant_id, document_id, **kwargs):  # noqa: E501
        """A single document can be retrieved by calling this endpoint with the document’s unique identifier.  # noqa: E501

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

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

    def find_document_with_http_info(self, applicant_id, document_id, **kwargs):  # noqa: E501
        """A single document can be retrieved by calling this endpoint with the document’s unique identifier.  # noqa: E501

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

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

        local_var_params = locals()

        all_params = ['applicant_id', 'document_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')

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

        collection_formats = {}

        path_params = {}
        if 'applicant_id' in local_var_params:
            path_params['applicant_id'] = local_var_params['applicant_id']  # noqa: E501
        if 'document_id' in local_var_params:
            path_params['document_id'] = local_var_params['document_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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/applicants/{applicant_id}/documents/{document_id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Document',  # 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 find_live_photo(self, live_photo_id, **kwargs):  # noqa: E501
        """Retrieve live photo  # noqa: E501

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

        :param async_req bool
        :param str live_photo_id: The live photo’s unique identifier. (required)
        :return: LivePhoto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.find_live_photo_with_http_info(live_photo_id, **kwargs)  # noqa: E501
        else:
            (data) = self.find_live_photo_with_http_info(live_photo_id, **kwargs)  # noqa: E501
            return data

    def find_live_photo_with_http_info(self, live_photo_id, **kwargs):  # noqa: E501
        """Retrieve live photo  # noqa: E501

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

        :param async_req bool
        :param str live_photo_id: The live photo’s unique identifier. (required)
        :return: LivePhoto
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['live_photo_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')

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

        collection_formats = {}

        path_params = {}
        if 'live_photo_id' in local_var_params:
            path_params['live_photo_id'] = local_var_params['live_photo_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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/live_photos/{live_photo_id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='LivePhoto',  # 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 find_live_video(self, live_video_id, **kwargs):  # noqa: E501
        """Retrieve live video  # noqa: E501

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

        :param async_req bool
        :param str live_video_id: The live video’s unique identifier. (required)
        :return: LiveVideo
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.find_live_video_with_http_info(live_video_id, **kwargs)  # noqa: E501
        else:
            (data) = self.find_live_video_with_http_info(live_video_id, **kwargs)  # noqa: E501
            return data

    def find_live_video_with_http_info(self, live_video_id, **kwargs):  # noqa: E501
        """Retrieve live video  # noqa: E501

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

        :param async_req bool
        :param str live_video_id: The live video’s unique identifier. (required)
        :return: LiveVideo
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['live_video_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')

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

        collection_formats = {}

        path_params = {}
        if 'live_video_id' in local_var_params:
            path_params['live_video_id'] = local_var_params['live_video_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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/live_videos/{live_video_id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='LiveVideo',  # 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 find_report(self, check_id, report_id, **kwargs):  # noqa: E501
        """A single report can be retrieved using this endpoint with the corresponding unique identifier.  # noqa: E501

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

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

    def find_report_with_http_info(self, check_id, report_id, **kwargs):  # noqa: E501
        """A single report can be retrieved using this endpoint with the corresponding unique identifier.  # noqa: E501

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

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

        local_var_params = locals()

        all_params = ['check_id', 'report_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')

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

        collection_formats = {}

        path_params = {}
        if 'check_id' in local_var_params:
            path_params['check_id'] = local_var_params['check_id']  # noqa: E501
        if 'report_id' in local_var_params:
            path_params['report_id'] = local_var_params['report_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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/checks/{check_id}/reports/{report_id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Report',  # 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 find_report_type_group(self, report_type_group_id, **kwargs):  # noqa: E501
        """Retrieve single report type group object  # noqa: E501

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

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

    def find_report_type_group_with_http_info(self, report_type_group_id, **kwargs):  # noqa: E501
        """Retrieve single report type group object  # noqa: E501

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

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

        local_var_params = locals()

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/report_type_groups/{report_type_group_id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ReportTypeGroup',  # 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 find_webhook(self, webhook_id, **kwargs):  # noqa: E501
        """Retrieve a Webhook  # noqa: E501

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

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

    def find_webhook_with_http_info(self, webhook_id, **kwargs):  # noqa: E501
        """Retrieve a Webhook  # noqa: E501

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

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

        local_var_params = locals()

        all_params = ['webhook_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')

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

        collection_formats = {}

        path_params = {}
        if 'webhook_id' in local_var_params:
            path_params['webhook_id'] = local_var_params['webhook_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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/webhooks/{webhook_id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Webhook',  # 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 list_applicants(self, **kwargs):  # noqa: E501
        """List Applicants  # noqa: E501

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

        :param async_req bool
        :param int page: The page to return. The first page is `page=1`
        :param int per_page: The number of objects per page.
        :param bool include_deleted: Whether to also include applicants scheduled for deletion.
        :return: ApplicantsList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.list_applicants_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.list_applicants_with_http_info(**kwargs)  # noqa: E501
            return data

    def list_applicants_with_http_info(self, **kwargs):  # noqa: E501
        """List Applicants  # noqa: E501

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

        :param async_req bool
        :param int page: The page to return. The first page is `page=1`
        :param int per_page: The number of objects per page.
        :param bool include_deleted: Whether to also include applicants scheduled for deletion.
        :return: ApplicantsList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['page', 'per_page', 'include_deleted']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'page' in local_var_params:
            query_params.append(('page', local_var_params['page']))  # noqa: E501
        if 'per_page' in local_var_params:
            query_params.append(('per_page', local_var_params['per_page']))  # noqa: E501
        if 'include_deleted' in local_var_params:
            query_params.append(('include_deleted', local_var_params['include_deleted']))  # 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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/applicants', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApplicantsList',  # 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 list_checks(self, applicant_id, **kwargs):  # noqa: E501
        """Retrieve Checks  # noqa: E501

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

        :param async_req bool
        :param str applicant_id: (required)
        :param int page: The page to return. The first page is `page=1`.
        :param int per_page: The number of objects per page.
        :return: ChecksList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.list_checks_with_http_info(applicant_id, **kwargs)  # noqa: E501
        else:
            (data) = self.list_checks_with_http_info(applicant_id, **kwargs)  # noqa: E501
            return data

    def list_checks_with_http_info(self, applicant_id, **kwargs):  # noqa: E501
        """Retrieve Checks  # noqa: E501

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

        :param async_req bool
        :param str applicant_id: (required)
        :param int page: The page to return. The first page is `page=1`.
        :param int per_page: The number of objects per page.
        :return: ChecksList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['applicant_id', 'page', 'per_page']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

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

        query_params = []
        if 'page' in local_var_params:
            query_params.append(('page', local_var_params['page']))  # noqa: E501
        if 'per_page' in local_var_params:
            query_params.append(('per_page', local_var_params['per_page']))  # 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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/applicants/{applicant_id}/checks', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ChecksList',  # 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 list_documents(self, applicant_id, **kwargs):  # noqa: E501
        """List documents  # noqa: E501

        All documents belonging to an applicant can be listed from this endpoint  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_documents(applicant_id, async_req=True)
        >>> result = thread.get()

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

    def list_documents_with_http_info(self, applicant_id, **kwargs):  # noqa: E501
        """List documents  # noqa: E501

        All documents belonging to an applicant can be listed from this endpoint  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_documents_with_http_info(applicant_id, async_req=True)
        >>> result = thread.get()

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

        local_var_params = locals()

        all_params = ['applicant_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')

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

        collection_formats = {}

        path_params = {}
        if 'applicant_id' in local_var_params:
            path_params['applicant_id'] = local_var_params['applicant_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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/applicants/{applicant_id}/documents', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DocumentsList',  # 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 list_live_photos(self, applicant_id, **kwargs):  # noqa: E501
        """List live photos  # noqa: E501

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

        :param async_req bool
        :param str applicant_id: The id of the applicant the live photos belong to. (required)
        :return: LivePhotosList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.list_live_photos_with_http_info(applicant_id, **kwargs)  # noqa: E501
        else:
            (data) = self.list_live_photos_with_http_info(applicant_id, **kwargs)  # noqa: E501
            return data

    def list_live_photos_with_http_info(self, applicant_id, **kwargs):  # noqa: E501
        """List live photos  # noqa: E501

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

        :param async_req bool
        :param str applicant_id: The id of the applicant the live photos belong to. (required)
        :return: LivePhotosList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['applicant_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')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'applicant_id' in local_var_params:
            query_params.append(('applicant_id', local_var_params['applicant_id']))  # 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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/live_photos', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='LivePhotosList',  # 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 list_live_videos(self, applicant_id, **kwargs):  # noqa: E501
        """List live videos  # noqa: E501

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

        :param async_req bool
        :param str applicant_id: The id of the applicant the live videos belong to. (required)
        :return: LiveVideosList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.list_live_videos_with_http_info(applicant_id, **kwargs)  # noqa: E501
        else:
            (data) = self.list_live_videos_with_http_info(applicant_id, **kwargs)  # noqa: E501
            return data

    def list_live_videos_with_http_info(self, applicant_id, **kwargs):  # noqa: E501
        """List live videos  # noqa: E501

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

        :param async_req bool
        :param str applicant_id: The id of the applicant the live videos belong to. (required)
        :return: LiveVideosList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['applicant_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')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'applicant_id' in local_var_params:
            query_params.append(('applicant_id', local_var_params['applicant_id']))  # 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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/live_videos', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='LiveVideosList',  # 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 list_report_type_groups(self, **kwargs):  # noqa: E501
        """Retrieve all report type groups  # noqa: E501

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

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

    def list_report_type_groups_with_http_info(self, **kwargs):  # noqa: E501
        """Retrieve all report type groups  # noqa: E501

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

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

        local_var_params = locals()

        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')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method list_report_type_groups" % key
                )
            local_var_params[key] = val
        del local_var_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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/report_type_groups', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ReportTypeGroupsList',  # 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 list_reports(self, check_id, **kwargs):  # noqa: E501
        """All the reports belonging to a particular check can be listed from this endpoint.  # noqa: E501

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

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

    def list_reports_with_http_info(self, check_id, **kwargs):  # noqa: E501
        """All the reports belonging to a particular check can be listed from this endpoint.  # noqa: E501

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

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

        local_var_params = locals()

        all_params = ['check_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')

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

        collection_formats = {}

        path_params = {}
        if 'check_id' in local_var_params:
            path_params['check_id'] = local_var_params['check_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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/checks/{check_id}/reports', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ReportsList',  # 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 list_webhooks(self, **kwargs):  # noqa: E501
        """List webhooks  # noqa: E501

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

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

    def list_webhooks_with_http_info(self, **kwargs):  # noqa: E501
        """List webhooks  # noqa: E501

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

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

        local_var_params = locals()

        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')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method list_webhooks" % key
                )
            local_var_params[key] = val
        del local_var_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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/webhooks', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='WebhooksList',  # 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 restore_applicant(self, applicant_id, **kwargs):  # noqa: E501
        """Restore Applicant  # noqa: E501

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

        :param async_req bool
        :param str applicant_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.restore_applicant_with_http_info(applicant_id, **kwargs)  # noqa: E501
        else:
            (data) = self.restore_applicant_with_http_info(applicant_id, **kwargs)  # noqa: E501
            return data

    def restore_applicant_with_http_info(self, applicant_id, **kwargs):  # noqa: E501
        """Restore Applicant  # noqa: E501

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

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

        local_var_params = locals()

        all_params = ['applicant_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')

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

        collection_formats = {}

        path_params = {}
        if 'applicant_id' in local_var_params:
            path_params['applicant_id'] = local_var_params['applicant_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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/applicants/{applicant_id}/restore', '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=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 resume_check(self, check_id, **kwargs):  # noqa: E501
        """Resume a Check  # noqa: E501

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

        :param async_req bool
        :param str check_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.resume_check_with_http_info(check_id, **kwargs)  # noqa: E501
        else:
            (data) = self.resume_check_with_http_info(check_id, **kwargs)  # noqa: E501
            return data

    def resume_check_with_http_info(self, check_id, **kwargs):  # noqa: E501
        """Resume a Check  # noqa: E501

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

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

        local_var_params = locals()

        all_params = ['check_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')

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

        collection_formats = {}

        path_params = {}
        if 'check_id' in local_var_params:
            path_params['check_id'] = local_var_params['check_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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/checks/{check_id}/resume', '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=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 resume_report(self, check_id, report_id, **kwargs):  # noqa: E501
        """This endpoint is for resuming individual paused reports.  # noqa: E501

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

        :param async_req bool
        :param str check_id: (required)
        :param str report_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.resume_report_with_http_info(check_id, report_id, **kwargs)  # noqa: E501
        else:
            (data) = self.resume_report_with_http_info(check_id, report_id, **kwargs)  # noqa: E501
            return data

    def resume_report_with_http_info(self, check_id, report_id, **kwargs):  # noqa: E501
        """This endpoint is for resuming individual paused reports.  # noqa: E501

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

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

        local_var_params = locals()

        all_params = ['check_id', 'report_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')

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

        collection_formats = {}

        path_params = {}
        if 'check_id' in local_var_params:
            path_params['check_id'] = local_var_params['check_id']  # noqa: E501
        if 'report_id' in local_var_params:
            path_params['report_id'] = local_var_params['report_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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/checks/{check_id}/reports/{report_id}/resume', '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=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_applicant(self, applicant_id, applicant, **kwargs):  # noqa: E501
        """Update Applicant  # noqa: E501

        Allows updating of an applicant’s information before any checks are created. - Partial updates - Addresses and ID numbers present will replace existing ones - Same applicant validations to create applicant   # 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_applicant(applicant_id, applicant, async_req=True)
        >>> result = thread.get()

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

    def update_applicant_with_http_info(self, applicant_id, applicant, **kwargs):  # noqa: E501
        """Update Applicant  # noqa: E501

        Allows updating of an applicant’s information before any checks are created. - Partial updates - Addresses and ID numbers present will replace existing ones - Same applicant validations to create applicant   # 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_applicant_with_http_info(applicant_id, applicant, async_req=True)
        >>> result = thread.get()

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

        local_var_params = locals()

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'applicant' in local_var_params:
            body_params = local_var_params['applicant']
        # 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 = ['Token']  # noqa: E501

        return self.api_client.call_api(
            '/applicants/{applicant_id}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Applicant',  # 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 upload_document(self, applicant_id, type, file, **kwargs):  # noqa: E501
        """Upload a document  # noqa: E501

        Documents are uploaded using this endpoint. Along with the file upload the relevant document type must be specified. Documents must be uploaded as a multipart form. The valid file types are: jpg, png and pdf. The file size must be between 2KB and 3MB.   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.upload_document(applicant_id, type, file, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str applicant_id: (required)
        :param str type: The type of document. (required)
        :param file file: The file to be uploaded. (required)
        :param str side: Either the `front` or `back` of the document.
        :return: Document
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.upload_document_with_http_info(applicant_id, type, file, **kwargs)  # noqa: E501
        else:
            (data) = self.upload_document_with_http_info(applicant_id, type, file, **kwargs)  # noqa: E501
            return data

    def upload_document_with_http_info(self, applicant_id, type, file, **kwargs):  # noqa: E501
        """Upload a document  # noqa: E501

        Documents are uploaded using this endpoint. Along with the file upload the relevant document type must be specified. Documents must be uploaded as a multipart form. The valid file types are: jpg, png and pdf. The file size must be between 2KB and 3MB.   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.upload_document_with_http_info(applicant_id, type, file, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str applicant_id: (required)
        :param str type: The type of document. (required)
        :param file file: The file to be uploaded. (required)
        :param str side: Either the `front` or `back` of the document.
        :return: Document
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['applicant_id', 'type', 'file', 'side']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'type' in local_var_params:
            form_params.append(('type', local_var_params['type']))  # noqa: E501
        if 'side' in local_var_params:
            form_params.append(('side', local_var_params['side']))  # noqa: E501
        if 'file' in local_var_params:
            local_var_files['file'] = local_var_params['file']  # noqa: E501

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

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

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

        return self.api_client.call_api(
            '/applicants/{applicant_id}/documents', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Document',  # 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 upload_live_photo(self, applicant_id, file, **kwargs):  # noqa: E501
        """Upload live photo  # noqa: E501

        You can upload live photos to this endpoint. Like document upload, files must be uploaded as a multipart form. Valid file types are jpg, png and pdf. The file size must be between 32KB and 10MB. Live photos are validated at the point of upload to check that they contain exactly one face. This validation can be disabled by setting the advanced_validation argument to false.   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.upload_live_photo(applicant_id, file, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str applicant_id: (required)
        :param file file: The file to be uploaded. (required)
        :param bool advanced_validation: Validates that the live photo contains exactly one face.
        :return: LivePhoto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.upload_live_photo_with_http_info(applicant_id, file, **kwargs)  # noqa: E501
        else:
            (data) = self.upload_live_photo_with_http_info(applicant_id, file, **kwargs)  # noqa: E501
            return data

    def upload_live_photo_with_http_info(self, applicant_id, file, **kwargs):  # noqa: E501
        """Upload live photo  # noqa: E501

        You can upload live photos to this endpoint. Like document upload, files must be uploaded as a multipart form. Valid file types are jpg, png and pdf. The file size must be between 32KB and 10MB. Live photos are validated at the point of upload to check that they contain exactly one face. This validation can be disabled by setting the advanced_validation argument to false.   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.upload_live_photo_with_http_info(applicant_id, file, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str applicant_id: (required)
        :param file file: The file to be uploaded. (required)
        :param bool advanced_validation: Validates that the live photo contains exactly one face.
        :return: LivePhoto
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['applicant_id', 'file', 'advanced_validation']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'applicant_id' in local_var_params:
            form_params.append(('applicant_id', local_var_params['applicant_id']))  # noqa: E501
        if 'file' in local_var_params:
            local_var_files['file'] = local_var_params['file']  # noqa: E501
        if 'advanced_validation' in local_var_params:
            form_params.append(('advanced_validation', local_var_params['advanced_validation']))  # noqa: E501

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

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

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

        return self.api_client.call_api(
            '/live_photos', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='LivePhoto',  # 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)
