package com.lanyuanxiaoyao.service.common.entity;

import java.io.Serializable;

/**
 * 同步压缩状态表类
 *
 * @author ZhangJiacheng
 * @date 2023-04-24
 */
public class SyncState implements Serializable {
    private Long flinkJobId;
    private String alias;
    private String messageId;
    private Long sourceStartTime;
    private Long sourceCheckpointTime;
    private Long sourcePublishTime;
    private Long sourceOperationTime;
    private Long compactionStartTime;
    private Long compactionFinishTime;
    private String compactionApplicationId;
    private String compactionStatus;
    private Long compactionStatusTime;
    private Long compactionLatestOperationTime;

    public SyncState() {
    }

    public SyncState(Builder builder) {
        this.flinkJobId = builder.flinkJobId;
        this.alias = builder.alias;
        this.messageId = builder.messageId;
        this.sourceStartTime = builder.sourceStartTime;
        this.sourceCheckpointTime = builder.sourceCheckpointTime;
        this.sourcePublishTime = builder.sourcePublishTime;
        this.sourceOperationTime = builder.sourceOperationTime;
        this.compactionStartTime = builder.compactionStartTime;
        this.compactionFinishTime = builder.compactionFinishTime;
        this.compactionApplicationId = builder.compactionApplicationId;
        this.compactionStatus = builder.compactionStatus;
        this.compactionStatusTime = builder.compactionStatusTime;
        this.compactionLatestOperationTime = builder.compactionLatestOperationTime;
    }

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

    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 getMessageId() {
        return messageId;
    }

    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    public Long getSourceStartTime() {
        return sourceStartTime;
    }

    public void setSourceStartTime(Long sourceStartTime) {
        this.sourceStartTime = sourceStartTime;
    }

    public Long getSourceCheckpointTime() {
        return sourceCheckpointTime;
    }

    public void setSourceCheckpointTime(Long sourceCheckpointTime) {
        this.sourceCheckpointTime = sourceCheckpointTime;
    }

    public Long getSourcePublishTime() {
        return sourcePublishTime;
    }

    public void setSourcePublishTime(Long sourcePublishTime) {
        this.sourcePublishTime = sourcePublishTime;
    }

    public Long getSourceOperationTime() {
        return sourceOperationTime;
    }

    public void setSourceOperationTime(Long sourceOperationTime) {
        this.sourceOperationTime = sourceOperationTime;
    }

    public Long getCompactionStartTime() {
        return compactionStartTime;
    }

    public void setCompactionStartTime(Long compactionStartTime) {
        this.compactionStartTime = compactionStartTime;
    }

    public Long getCompactionFinishTime() {
        return compactionFinishTime;
    }

    public void setCompactionFinishTime(Long compactionFinishTime) {
        this.compactionFinishTime = compactionFinishTime;
    }

    public String getCompactionApplicationId() {
        return compactionApplicationId;
    }

    public void setCompactionApplicationId(String compactionApplicationId) {
        this.compactionApplicationId = compactionApplicationId;
    }

    public String getCompactionStatus() {
        return compactionStatus;
    }

    public void setCompactionStatus(String compactionStatus) {
        this.compactionStatus = compactionStatus;
    }

    public Long getCompactionStatusTime() {
        return compactionStatusTime;
    }

    public void setCompactionStatusTime(Long compactionStatusTime) {
        this.compactionStatusTime = compactionStatusTime;
    }

    public Long getCompactionLatestOperationTime() {
        return compactionLatestOperationTime;
    }

    public void setCompactionLatestOperationTime(Long compactionLatestOperationTime) {
        this.compactionLatestOperationTime = compactionLatestOperationTime;
    }

    @Override
    public String toString() {
        return "SyncState{" +
                "flinkJobId=" + flinkJobId +
                ", alias='" + alias + '\'' +
                ", messageId='" + messageId + '\'' +
                ", sourceStartTime=" + sourceStartTime +
                ", sourceCheckpointTime=" + sourceCheckpointTime +
                ", sourcePublishTime=" + sourcePublishTime +
                ", sourceOperationTime=" + sourceOperationTime +
                ", compactionStartTime=" + compactionStartTime +
                ", compactionFinishTime=" + compactionFinishTime +
                ", compactionApplicationId='" + compactionApplicationId + '\'' +
                ", compactionStatus='" + compactionStatus + '\'' +
                ", compactionStatusTime=" + compactionStatusTime +
                ", compactionLatestOperationTime=" + compactionLatestOperationTime +
                '}';
    }

    public static final class Builder {
        private Long flinkJobId;
        private String alias;
        private String messageId;
        private Long sourceStartTime;
        private Long sourceCheckpointTime;
        private Long sourcePublishTime;
        private Long sourceOperationTime;
        private Long compactionStartTime;
        private Long compactionFinishTime;
        private String compactionApplicationId;
        private String compactionStatus;
        private Long compactionStatusTime;
        private Long compactionLatestOperationTime;

        private Builder() {
        }

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

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

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

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

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

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

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

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

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

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

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

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

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

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