from .resources.connect_verify_document import ConnectVerifyDocumentResource
from .resources.connect_verify_document_face import ConnectVerifyDocumentFaceResource, \
    ConnectVerifyDocumentFacePassiveResource, ConnectVerifyDocumentFaceEnhancedResource
from .resources.verify_aml import VerifyAmlResource
from .resources.verify_document import VerifyDocumentResource
from .version import __version__

from .configuration import Configuration
from .requestor import Requestor


class ApiClient(object):
    def __init__(self, configuration: Configuration):
        self._configuration = configuration
        self._requestor = Requestor(configuration)

        self._verify_document = VerifyDocumentResource(self._requestor, self._configuration)
        self._connect_verify_document = ConnectVerifyDocumentResource(self._requestor, self._configuration)
        self._connect_verify_document_face = ConnectVerifyDocumentFaceResource(self._requestor, self._configuration)
        self._connect_verify_document_face_passive = ConnectVerifyDocumentFacePassiveResource(
            self._requestor, self._configuration
        )
        self._connect_verify_document_face_enhanced = ConnectVerifyDocumentFaceEnhancedResource(
            self._requestor, self._configuration
        )
        self._verify_aml = VerifyAmlResource(self._requestor, self._configuration)

    @property
    def version(self) -> str:
        return __version__

    @property
    def requestor(self) -> Requestor:
        return self._requestor

    @property
    def configuration(self) -> Configuration:
        return self._configuration

    @property
    def verify_document(self) -> VerifyDocumentResource:
        return self._verify_document

    @property
    def connect_verify_document(self) -> ConnectVerifyDocumentResource:
        return self._connect_verify_document

    @property
    def connect_verify_document_face(self) -> ConnectVerifyDocumentFaceResource:
        return self._connect_verify_document_face

    @property
    def connect_verify_document_face_passive(self) -> ConnectVerifyDocumentFacePassiveResource:
        return self._connect_verify_document_face_passive

    @property
    def connect_verify_document_face_enhanced(self) -> ConnectVerifyDocumentFaceEnhancedResource:
        return self._connect_verify_document_face_enhanced

    @property
    def verify_aml(self) -> VerifyAmlResource:
        return self._verify_aml

    def __str__(self) -> str:
        return f"{self.requestor}"
