package com.inspect.patrol.model;

import com.inspect.patrol.contants.PtzControlEnum;
import lombok.Getter;

import java.io.Serializable;

@Getter
public class PtzModel implements Serializable {
    private String patrolDeviceCode;
    private PtzControlEnum ptzControlType;
    private String channelCode;
    private String code;
    private String speed;
    private String portraitSpeed;
    private String serial;
    private String command;

    public void setChannelCode(String channelCode) {
        this.code = this.channelCode = channelCode;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public void setPortraitSpeed(String portraitSpeed) {
        this.portraitSpeed = portraitSpeed;
    }

    public void setSpeed(String speed) {
        this.portraitSpeed = this.speed = speed;
    }

    public void setCommand(String command) {
        this.command = command;
    }

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

    public void setPtzControlType(PtzControlEnum ptzControlType) {
        this.ptzControlType = ptzControlType;
        this.command = ptzControlType.getValue();
    }

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