from enum import IntEnum

__all__ = ['IdCloudStatus']


class IdCloudStatus(IntEnum):
    def __new__(cls, value, phrase, description=''):
        obj = int.__new__(cls, value)
        obj._value_ = value

        obj.phrase = phrase
        obj.description = description
        return obj

    # Success <0,0>
    SUCCESS = 0

    # Warning <1000,1999>
    DOCUMENT_DATA_INTEGRITY_ISSUE = 1001
    DOCUMENT_EXPIRED = 1002
    DOCUMENT_SECURITY_CHECK_FAILED = 1003

    # Internal service errors <3000,3999>
    INTERNAL_SERVICE_ERROR = 3000

    # Missing input errors <4000,4299>
    MISSING_INPUT = 4001
    MISSING_USER_ID = 4002
    MISSING_TRANSACTION_DATA = 4003
    MISSING_APPLICATION_ID = 4004
    MISSING_OTP = 4005
    MISSING_DOCUMENT_FOR_VERIFICATION = 4006
    MISSING_FACE_FOR_VERIFICATION = 4007
    MISSING_PERSON_FOR_SEARCH = 4008

    # Invalid input errors <4300,4499>
    INVALID_INPUT = 4301
    INVALID_USER_ID = 4302
    INVALID_AUTHENTICATION_CREDENTIALS = 4303
    INVALID_TRANSACTION_DATA = 4304
    INVALID_APPLICATION_ID = 4305
    INVALID_OTP = 4306
    INVALID_DOCUMENT_FOR_VERIFICATION = 4307
    INVALID_FACE_FOR_VERIFICATION = 4308
    INVALID_PERSON_FOR_SEARCH = 4309
    INVALID_INPUT_DATA_FOR_CHANNEL_SELECTION = 4315
    UNEXPECTED_FACE_DATA_PRESENT = 4316
    UNEXPECTED_FIELD_IN_DOCUMENT_INPUT_PRESENT = 4317
    UNEXPECTED_FIELD_IN_FACE_INPUT_PRESENT = 4318
    UNEXPECTED_FIELD_IN_INPUT_PRESENT = 4319
    INVALID_DOCUMENT_SICE_INPUT = 4320
    INVALID_DOCUMENT_FILE_FORMAT = 4321
    INVALID_ACCOUNT_NUMBER = 4322
    INVALID_USER_ATTRIBUTES = 4323
    INVALID_SECURITY_SEGMENT = 4324
    INVALID_VALUE_FOR_METHOD = 4325
    INVALID_VALUE_FOR_RESULT = 4326
    INVALID_STEPUP_VALUE = 4327
    INVALID_TARGET_VALUE = 4328
    INVALID_CAPTURE_METHOD = 4330
    INVALID_DOCUMENT_TYPE = 4331
    INVALID_DOCUMENT_SIZE = 4332
    INVALID_LEVEL_OF_SENSITIVITY_VALUE = 4333
    INVALID_CLIENT_VALUE = 4334
    INVALID_EVENTS_VALUE = 4335

    # Invalid state errors <4500,4999>
    INVALID_STATE = 4501
    INVALID_USER_STATE = 4502
    USER_REVOKED = 4503
    USER_IS_BLOCKED = 4504
    USER_IS_LOCKED = 4505
    INVALID_DEVICE_STATE = 4506
    DEVICE_IS_REVOKED = 4507
    DEVICE_IS_LOCKED = 4508
    DEVICE_IS_BLOCKED = 4509
    DEVICE_IS_INITIALISED = 4510
    INSUFFICIENT_PRIVILEGES = 4511
    AUTHENTICATION_DENIED_BY_USER = 4512
    UNABLE_TO_VERIFY_DOCUMENT = 4600
    UNABLE_TO_READ_DOCUMENT_MRZ = 4601
    UNABLE_TO_RECOGNISE_DOCUMENT = 4602
    DOCUMENT_QA_NOT_PASSED = 4603
    DOCUMENT_QA_NOT_DONE = 4604
    UNABLE_TO_VERIFY_FACE = 4610
    FACE_MISMATCH = 4611
    FACE_QUALITY_BAD = 4612
    BAD_REQUEST = 4702
    UNABLE_TO_PERFORM_RISK_EVALUATION = 4800
    INVALID_OR_MISSING_VISIT_ID = 4801
    RISK_OPERATION_FAILED = 4802
    PROVIDED_USER_IS_INVALID_OR_DOES_NOT_EXIST = 4803

    # Internal service errors <5000,5999>
    EPS_INTERNAL_SERVER_ERROR = 5000
    EPS_SERVER_IS_UNAVAILABLE = 5001
    CAS_INTERNAL_SERVER_ERROR = 5100
    CAS_SERVER_IS_UNAVAILABLE = 5101
    MSM_INTERNAL_SERVER_ERROR = 5200
    MSM_SERVER_IS_UNAVAILABLE = 5201
    KYC_INTERNAL_SERVER_ERROR = 5300
    KYC_SERVER_IS_UNAVAILABLE = 5301
    KYC_DOCUMENT_INSTANCE_CREATION_FAILED = 5302
    KYC_IMAGE_SUBMISSION_FAILED = 5303
    KYC_UNABLE_TO_SUCESSFULLY_SUBMIT_X_IMAGE = 5304
    KYC_CLASSIFICATION_RETRIEVAL_FAILED = 5305
    KYC_METRICS_RETRIEVAL_FAILED = 5306
    KYC_VERIFICATION_RESULTS_RETRIEVAL_FAILED = 5307
    KYC_ENHANCED_LIVENESS_INTERNAL_SERVER_ERROR = 5331
    KYC_ENHANCED_LIVENESS_CHECK_FAILED = 5332
    KYC_ENHANCED_LIVENESS_PASSED_BUT_FACE_MATCH_FAILED = 5333
    IFP_INTERNAL_SERVER_ERROR = 5400
    IFP_SERVER_IS_UNAVAILABLE = 5401
    FIDO_INTERNAL_SERVER_ERROR = 5500
    FIDO_SERVER_IS_UNAVAILABLE = 5501
    UNKNOWN = 5999
