package com.friday.tooldriver.constants.uipath;


public enum UiPathApiErrorCode {
    AUTHENTICATE_ERROR("UiPathApiError", "UiPath认证接口创建token失败"),
    CREATE_FOLDER_ERROR("UiPathApiError", "UiPath创建文件夹失败"),
    GET_FOLDERS_ERROR("UiPathApiError", "UiPath批量查询文件夹失败"),
    GET_FOLDER_ERROR("UiPathApiError", "UiPath查询单个文件夹失败"),
    DELETE_FOLDER_ERROR("UiPathApiError", "UiPath删除单个文件夹失败"),
    UPLOAD_PACKAGE_ERROR("UiPathApiError", "UiPath上传代码包失败"),
    DELETE_PACKAGE_ERROR("UiPathApiError", "UiPath删除代码包失败"),
    DOWNLOAD_PACKAGE_ERROR("UiPathApiError", "UiPath下载代码包失败"),
    RELEASE_PROCESS_ERROR("UiPathApiError", "UiPath流程发布失败"),
    RELEASE_PROCESS_TO_SPECIFIC_VERSION_ERROR("UiPathApiError", "UiPath流程再发布失败"),
    DELETE_RELEASE_ERROR("UiPathApiError", "UiPath删除流程失败"),
    GET_RELEASE_ERROR("UiPathApiError", "UiPath查询单个流程失败"),
    ADD_IDENTITY_USER_ERROR("UiPathApiError", "UiPath创建全局用户失败"),
    ADD_USER_ERROR("UiPathApiError", "UiPath创建用户失败"),
    ASSIGN_USER_ERROR("UiPathApiError", "UiPath用户分配文件夹失败"),
    REMOVE_USER_ERROR("UiPathApiError", "UiPath用户移出文件夹失败"),
    ASSIGN_TEMPLATE_ERROR("UiPathApiError", "UiPath机器模板分配文件夹失败"),
    GET_PROCESS_VERSION_ERROR("UiPathApiError", "UiPath获取流程版本失败"),
    DELETE_USER_ERROR("UiPathApiError", "UiPath删除用户失败"),
    GET_USERS_ERROR("UiPathApiError", "UiPath批量查询用户失败"),
    GET_USER_ERROR("UiPathApiError", "UiPath查询单个用户失败"),
    UPDATE_USER_ERROR("UiPathApiError", "UiPath更新用户失败"),
    GET_GLOBAL_SESSIONS_ERROR("UiPathApiError", "UiPath查询全局用户会话失败"),
    GET_MACHINE_ERROR("UiPathApiError", "UiPath查询机器信息失败"),
    GET_LICENSES_RUNTIME_ERROR("UiPathApiError", "UiPath查询运行时许可失败"),
    LICENSES_RUNTIME_TOGGLE_ERROR("UiPathApiError", "UiPath收发运行时许可失败"),
    GET_LICENSES_ERROR("UiPathApiError", "UiPath查询许可失败"),
    START_JOB_ERROR("UiPathApiError", "UiPath启动任务失败"),
    RESTART_JOB_ERROR("UiPathApiError", "UiPath重启任务失败"),
    RESUME_JOB_ERROR("UiPathApiError", "UiPath恢复任务失败"),
    STOP_JOB_ERROR("UiPathApiError", "UiPath终止任务失败"),
    STOP_JOBS_ERROR("UiPathApiError", "UiPath批量终止任务失败"),
    GET_JOB_ERROR("UiPathApiError", "UiPath查询单个任务失败"),
    GET_JOBS_ERROR("UiPathApiError", "UiPath批量查询任务失败"),
    GET_MACHINE_SESSION_RUNTIME_ERROR("UiPathApiError", "UiPath批量运行时机器会话失败"),
    ;

    private String code;
    private String message;

    UiPathApiErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return this.code;
    }

    public String getMessage() {
        return this.message;
    }

    @Override
    public String toString() {
        return "system code: " + this.code + ", " + this.message;
    }

    public String toString(String ... str){
        return "system code: " + this.code + ", " + this.message + ": " + String.join(", ", str);
    }
}
