from enum import Enum


class ExportErrorMessages(Enum):
    """
        The following class holds ENUMS with error messages that can occur during running saas_migration_export.py script
    """
    FAILED_TO_CREATE_FILE = "failed to create file please check the file path and permissions"
    FAILED_TO_COPY_FILE = "failed to copy file please check the source and destination file paths and permissions"
    FAILED_TO_CREATE_DIRECTORY = "failed to create directory please check the directory path and permissions"
    FAILED_TO_REMOVE_DIRECTORY = "failed to remove directory please check the directory path and permissions"
    FAILED_TO_RETRIEVE_EM_VERSION = "failed to retrieve EM version please check the EM_HOME environment variable"
    FAILED_TO_CREATE_EM_VERSION_FILE = "failed to create em_version.txt file"
    FAILED_TO_CREATE_EXPORT_SCRIPT_VERSION_FILE = "failed to create ExportScriptVersion.txt file please check the directory path and permissions"
    FAILED_TO_CREATE_EXPORT_FOR_SAAS_TAR_GZ_FILE = "failed to create EMExportForSaaS.tar.gz file please check the directory path and permissions"
    FAILED_TO_CREATE_CTM_PACKAGE_TAR_GZ_FILE = "failed to create ctm-package.tar.gz file please check the directory path and permissions"
    FAILED_TO_ENCRYPT_DB_ENC_KEY_FILE = "failed on encryption process to create db_enc_key.txt_exp please check the directory path and permissions"
    FAILED_TO_READ_KEY_FILE = "failed to read {} file please check the file path and permissions"
    INSTALLED_VERSION_FILE_NOT_FOUND = "installed-versions.txt file is missing please check the directory path and permissions"
    EM_HOME_ENV_VARIABLE_IS_MISSING = "EM_HOME environment variable is missing please check the environment variables"
    HOME_ENV_VARIABLE_IS_MISSING = "HOME environment variable is missing please check the environment variables"
    KEY_FILE_IS_MISSING = "{} file is missing"
    RUNNING_EM_UTIL_EXPORT_FAILED = "running em util export failed"
    FAILED_TO_VERIFY_ARCHIVE_ADDON = "failed to verify if WA AddOn is Active please check the EM_HOME environment variable"
    FAILED_TO_CREATE_AAPI_CLI_ENV = "failed to add AAPI CLI environment please check the environment variables"
    FAILED_TO_GET_ARCHIVE_RULES_VIA_AAPI = "failed to get archive rules via config API"
    FAILED_TO_LOGIN_AAPI_CLI_ENV = "failed to login AAPI CLI environment please check the environment variables"
    FAILED_TO_CREATE_ARCHIVE_RULES_FILE = "failed to create the archive rules file"
    AAPI_CREDENTIALS_NOT_SUPPLIED = "AAPI Credentials not supplied in order to get access to archive rules. (you can skip archive rules export using flag --skip_archive_rules=true)"
    