package com.platform.plugs.live.rpcEntity;/**
 * Created by TROY on 2019/5/24.
 */

import com.aliyun.vod.upload.impl.VoDProgressListener;
import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author TROY
 * @version V1.0
 * @ClassName: LiveUploadVideo
 * @Description: TODO
 * @date 2019/5/24 14:33
 */
@Data
@AllArgsConstructor
public class LiveUploadVideo {
	/**
	 * 否是开启断点续传, 默认断点续传功能关闭。当网络不稳定或者程序崩溃时，再次发起相同上传请求，可以继续未完成的上传任务，适用于超时3000秒仍不能上传完成的大文件。
	 注意: 断点续传开启后，会在上传过程中将上传位置写入本地磁盘文件，影响文件上传速度，请您根据实际情况选择是否开启
	 */
	private Boolean enableCheckpoint;
	/**
	 * 是否显示水印(可选)，指定模板组ID时，根据模板组配置确定是否显示水印
	 */
	private Boolean	isShowWaterMark;
	/**
	 * 视频分类ID(可选)
	 */
	private Long cateId;
	/**
	 * 视频标签,多个用逗号分隔(可选)
	 */
	private String tags;
	/**
	 * 视频描述(可选)
	 */
	private String description;
	/**
	 * 封面图片(可选)
	 */
	private String coverURL;
	/**
	 * 模板组ID(可选)
	 */
	private String templateGroupId;
	/**
	 * 工作流ID(可选)
	 */
	private String workflowId;
	/**
	 * 开启默认上传进度回调
	 */
	private Boolean printProgress;
	/**
	 * 设置自定义上传进度回调 (必须继承 VoDProgressListener)
	 */
	private VoDProgressListener progressListener;

	public static class Builder {

		private Boolean enableCheckpoint;
		private Boolean	isShowWaterMark;
		private Long cateId;
		private String tags;
		private String description;
		private String coverURL;
		private String templateGroupId;
		private String workflowId;
		private Boolean printProgress;
		private VoDProgressListener progressListener;

		public Builder enableCheckpoint(Boolean value) {
			enableCheckpoint = value;
			return this;
		}
		public Builder isShowWaterMark(Boolean value) {
			isShowWaterMark = value;
			return this;
		}
		public Builder cateId(Long value) {
			cateId = value;
			return this;
		}
		public Builder tags(String value) {
			tags = value;
			return this;
		}
		public Builder description(String value) {
			description = value;
			return this;
		}
		public Builder coverURL(String value) {
			coverURL = value;
			return this;
		}
		public Builder templateGroupId(String value) {
			templateGroupId = value;
			return this;
		}
		public Builder workflowId(String value) {
			workflowId = value;
			return this;
		}
		public Builder printProgress(Boolean value) {
			printProgress = value;
			return this;
		}
		public Builder progressListener(VoDProgressListener value) {
			progressListener = value;
			return this;
		}
		public LiveUploadVideo build() {
			return new LiveUploadVideo(this);
		}
	}

	private LiveUploadVideo(Builder builder) {
		this.enableCheckpoint = builder.enableCheckpoint;
		this.isShowWaterMark = builder.isShowWaterMark;
		this.cateId = builder.cateId;
		this.tags = builder.tags;
		this.description = builder.description;
		this.coverURL = builder.coverURL;
		this.templateGroupId = builder.templateGroupId;
		this.workflowId = builder.workflowId;
		this.printProgress = builder.printProgress;
		this.progressListener = builder.progressListener;
	}

}
