package net.northking.cctp.mobile.driver.entity;

import java.util.Map;

/**
 * @author : yineng.huang
 * @date : 2024/4/16 20:12
 */
public class CmdAutomationRequest {

    private String cmd;

    private String serial;

    private String stepToken;

    private Map<String, Object> data;

    public static CmdAutomationRequest builder(String cmd, String tokenId,Map<String, Object> param){
        return newRequest().cmd(cmd)
                .withToken(tokenId)
                .withData(param);
    }

    public CmdAutomationRequest withData(Map<String, Object> data) {
        this.data = data;
        return this;
    }

    private CmdAutomationRequest withToken(String stepToken) {
        this.stepToken = stepToken;
        return this;
    }

    private static CmdAutomationRequest newRequest(){
        return new CmdAutomationRequest();
    }

    private CmdAutomationRequest cmd(String cmd){
        this.cmd = cmd;
        return this;
    }

    public String getCmd() {
        return cmd;
    }

    public void setCmd(String cmd) {
        this.cmd = cmd;
    }

    public String getSerial() {
        return serial;
    }

    public void setSerial(String serial) {
        this.serial = serial;
    }

    public Map<String, Object> getData() {
        return data;
    }

    public void setData(Map<String, Object> data) {
        this.data = data;
    }

    public String getStepToken() {
        return stepToken;
    }

    public void setStepToken(String stepToken) {
        this.stepToken = stepToken;
    }
}
