package com.friday.tooldriver.constants.smartrpa;


public enum SmartRpaErrorCode {
    CREATE_ROBOT_ERROR("SmartRpaError", "SmartRpa创建机器人失败"),
    DELETE_ROBOT_ERROR("SmartRpaError", "SmartRpa删除机器人失败"),
    QUERY_ROBOT_ERROR("SmartRpaError", "SmartRpa查询机器人失败:根据robotKey未查询到smartRPA机器人"),
    ROBOT_NOT_EXIST("SmartRpaError", "根据robotKey未查询到smartRPA机器人"),
    DISTRIBUTE_LICENSE_ERROR("SmartRpaError", "SmartRpa收发许可失败"),
    INVALID_DISTRIBUTE_LICENSE("SmartRpaError", "SmartRpa收发许可请求无效"),
    INVALID_START_JOB_ARGS("SmartRpaError", "SmartRpa启动流程入参无效"),
    START_JOB_ERROR("SmartRpaError", "SmartRpa启动流程失败"),
    QUERY_JOB_ERROR("SmartRpaError", "SmartRpa查询失败"),
    JOB_NOT_EXIST("SmartRpaError", "根据jobId未查询到smartRPA任务"),
    GET_LICENSE_ACTION_ERROR("SmartRpaError", "获取许可相关指令失败"),
    GET_ROBOT_STATE_SET_ACTION_ERROR("SmartRpaError", "获取机器状态设置相关指令失败"),
    HEARTBEAT_SYNC_ERROR("SmartRpaError", "心跳同步接口异常"),
    ROBOT_MULTI_EXEC_ACTION("SmartRpaError", "机器在等待多执行动作，请及时处理任务状态"),
    INVALID_JOB_STATE_UPDATE_ARGS("SmartRpaError", "任务状态更新入参无效"),
    INVALID_JOB_INPUT_ARGS("SmartRpaError", "任务入参无效"),
    JOB_CANNOT_STOP("SmartRpaError", "当前任务状态无法终止"),
    STOP_JOB_ERROR("SmartRpaError", "SmartRpa终止任务失败"),
    JOB_CANNOT_PAUSE("SmartRpaError", "当前任务状态无法暂停"),
    PAUSE_JOB_ERROR("SmartRpaError", "SmartRpa暂停任务失败"),
    JOB_CANNOT_RESUME("SmartRpaError", "当前任务状态无法恢复"),
    RESUME_JOB_ERROR("SmartRpaError", "SmartRpa恢复任务失败"),
    ACTION_CONFIRM_OVERTIME("SmartRpaError", "指令确认超时"),

    ;

    private String code;
    private String message;

    SmartRpaErrorCode(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);
    }
}
