package com.zd.speaker.domain.vo;

import io.swagger.annotations.ApiModelProperty;

import java.util.List;
import java.util.Optional;

/**
 * 参数类
 */
public class ParamVo {
    @ApiModelProperty(required = false, notes = "任务id, 建议使用UUIDv4生成")
    private String tid;
    @ApiModelProperty(required = true, notes = "number (0~100)设备环境音量、通道音量、任务音量")
    private Integer vol;
    @ApiModelProperty(required = true, notes = "播放路径")
    private List<UrlVo> urls;

    public String getTid() {
        return tid;
    }

    public void setTid(String tid) {
        this.tid = tid;
    }

    public Integer getVol() {
        return vol;
    }

    public void setVol(Integer vol) {
        this.vol = Optional.ofNullable(vol).orElse(80);
    }

    public List<UrlVo> getUrls() {
        return urls;
    }

    public void setUrls(List<UrlVo> urls) {
        this.urls = urls;
    }
}
