package com.lanyuanxiaoyao.service.common.entity.compaction;

/**
 * 压缩调度任务
 *
 * @author ZhangJiacheng
 * @date 2022-09-26
 */
public class ScheduleJob {
    private String id;
    private Long flinkJobId;
    private String alias;
    private String batch;
    private String status;
    private String comment;

    public ScheduleJob() {
    }

    public ScheduleJob(String id, Long flinkJobId, String alias, String batch, String status, String comment) {
        this.id = id;
        this.flinkJobId = flinkJobId;
        this.alias = alias;
        this.batch = batch;
        this.status = status;
        this.comment = comment;
    }

    public ScheduleJob(Builder builder) {
        this.id = builder.id;
        this.flinkJobId = builder.flinkJobId;
        this.alias = builder.alias;
        this.batch = builder.batch;
        this.status = builder.status;
        this.comment = builder.comment;
    }

    public static Builder builder() {
        return new Builder();
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Long getFlinkJobId() {
        return flinkJobId;
    }

    public void setFlinkJobId(Long flinkJobId) {
        this.flinkJobId = flinkJobId;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public String getBatch() {
        return batch;
    }

    public void setBatch(String batch) {
        this.batch = batch;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    @Override
    public String toString() {
        return "ScheduleJob{" +
                "id=" + id +
                ", flinkJobId=" + flinkJobId +
                ", alias='" + alias + '\'' +
                '}';
    }

    public static final class Builder {
        private String id;
        private Long flinkJobId;
        private String alias;
        private String batch;
        private String status;
        private String comment;

        private Builder() {
        }

        public Builder id(String id) {
            this.id = id;
            return this;
        }

        public Builder flinkJobId(Long flinkJobId) {
            this.flinkJobId = flinkJobId;
            return this;
        }

        public Builder alias(String alias) {
            this.alias = alias;
            return this;
        }

        public Builder batch(String batch) {
            this.batch = batch;
            return this;
        }

        public Builder status(String status) {
            this.status = status;
            return this;
        }

        public Builder comment(String comment) {
            this.comment = comment;
            return this;
        }

        public ScheduleJob build() {
            return new ScheduleJob(this);
        }
    }
}
