package com.lanyuanxiaoyao.service.common.entity;

import java.io.Serializable;
import java.util.List;

/**
 * 配置表项
 *
 * @author ZhangJiacheng
 * @version 0.0.1
 * @date 2021-11-30
 */
public class TableMeta implements Serializable {
    private String alias;
    private String source;
    private String schema;
    private String table;
    private String type;
    private List<FieldMeta> primaryKeys;
    private List<FieldMeta> partitionKeys;
    private HudiMeta hudi;
    private List<FieldMeta> fields;
    private String filterField;
    private List<String> filterValues;
    private FilterType filterType;
    private String topic;
    private String pulsarAddress;
    private YarnMeta syncYarn;
    private YarnMeta compactionYarn;
    private String partitionField;
    private ConfigMeta config;
    private JobMeta job;
    private ConnectionMeta connection;
    private Integer priority;
    private SourceType sourceType;
    private List<String> tags;
    private Integer version;

    public TableMeta() {
    }

    public TableMeta(Builder builder) {
        this.alias = builder.alias;
        this.source = builder.source;
        this.schema = builder.schema;
        this.table = builder.table;
        this.type = builder.type;
        this.primaryKeys = builder.primaryKeys;
        this.partitionKeys = builder.partitionKeys;
        this.hudi = builder.hudi;
        this.fields = builder.fields;
        this.filterField = builder.filterField;
        this.filterValues = builder.filterValues;
        this.filterType = builder.filterType;
        this.topic = builder.topic;
        this.pulsarAddress = builder.pulsarAddress;
        this.syncYarn = builder.syncYarn;
        this.compactionYarn = builder.compactionYarn;
        this.partitionField = builder.partitionField;
        this.config = builder.config;
        this.job = builder.job;
        this.connection = builder.connection;
        this.priority = builder.priority;
        this.sourceType = builder.sourceType;
        this.tags = builder.tags;
        this.version = builder.version;
    }

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

    public String getAlias() {
        return alias;
    }

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

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getSchema() {
        return schema;
    }

    public void setSchema(String schema) {
        this.schema = schema;
    }

    public String getTable() {
        return table;
    }

    public void setTable(String table) {
        this.table = table;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public List<FieldMeta> getPrimaryKeys() {
        return primaryKeys;
    }

    public void setPrimaryKeys(List<FieldMeta> primaryKeys) {
        this.primaryKeys = primaryKeys;
    }

    public List<FieldMeta> getPartitionKeys() {
        return partitionKeys;
    }

    public void setPartitionKeys(List<FieldMeta> partitionKeys) {
        this.partitionKeys = partitionKeys;
    }

    public HudiMeta getHudi() {
        return hudi;
    }

    public void setHudi(HudiMeta hudi) {
        this.hudi = hudi;
    }

    public List<FieldMeta> getFields() {
        return fields;
    }

    public void setFields(List<FieldMeta> fields) {
        this.fields = fields;
    }

    public String getFilterField() {
        return filterField;
    }

    public void setFilterField(String filterField) {
        this.filterField = filterField;
    }

    public List<String> getFilterValues() {
        return filterValues;
    }

    public void setFilterValues(List<String> filterValues) {
        this.filterValues = filterValues;
    }

    public FilterType getFilterType() {
        return filterType;
    }

    public void setFilterType(FilterType filterType) {
        this.filterType = filterType;
    }

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }

    public String getPulsarAddress() {
        return pulsarAddress;
    }

    public void setPulsarAddress(String pulsarAddress) {
        this.pulsarAddress = pulsarAddress;
    }

    public YarnMeta getSyncYarn() {
        return syncYarn;
    }

    public void setSyncYarn(YarnMeta syncYarn) {
        this.syncYarn = syncYarn;
    }

    public YarnMeta getCompactionYarn() {
        return compactionYarn;
    }

    public void setCompactionYarn(YarnMeta compactionYarn) {
        this.compactionYarn = compactionYarn;
    }

    public String getPartitionField() {
        return partitionField;
    }

    public void setPartitionField(String partitionField) {
        this.partitionField = partitionField;
    }

    public ConfigMeta getConfig() {
        return config;
    }

    public void setConfig(ConfigMeta config) {
        this.config = config;
    }

    public JobMeta getJob() {
        return job;
    }

    public void setJob(JobMeta job) {
        this.job = job;
    }

    public ConnectionMeta getConnection() {
        return connection;
    }

    public void setConnection(ConnectionMeta connection) {
        this.connection = connection;
    }

    public Integer getPriority() {
        return priority;
    }

    public void setPriority(Integer priority) {
        this.priority = priority;
    }

    public SourceType getSourceType() {
        return sourceType;
    }

    public void setSourceType(SourceType sourceType) {
        this.sourceType = sourceType;
    }

    public List<String> getTags() {
        return tags;
    }

    public void setTags(List<String> tags) {
        this.tags = tags;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    @Override
    public String toString() {
        return "TableMeta{" +
                "alias='" + alias + '\'' +
                ", source='" + source + '\'' +
                ", schema='" + schema + '\'' +
                ", table='" + table + '\'' +
                ", type='" + type + '\'' +
                ", primaryKeys=" + primaryKeys +
                ", partitionKeys=" + partitionKeys +
                ", hudi=" + hudi +
                ", fields=" + fields +
                ", filterField='" + filterField + '\'' +
                ", filterValues=" + filterValues +
                ", filterType=" + filterType +
                ", topic='" + topic + '\'' +
                ", pulsarAddress='" + pulsarAddress + '\'' +
                ", syncYarn=" + syncYarn +
                ", compactionYarn=" + compactionYarn +
                ", partitionField='" + partitionField + '\'' +
                ", config=" + config +
                ", job=" + job +
                ", connection=" + connection +
                ", priority=" + priority +
                ", sourceType=" + sourceType +
                ", tags=" + tags +
                ", version=" + version +
                '}';
    }

    /**
     * 过滤操作的类型
     */
    public enum FilterType {
        /**
         * 包含
         */
        INCLUDE,
        /**
         * 排除
         */
        EXCLUDE,
        /**
         * 无操作
         */
        NONE,
    }

    public enum SourceType {
        /**
         * UDAL
         */
        UDAL,
        /**
         * TELEPG
         */
        TELEPG,
    }

    public static final class Builder {
        private String alias;
        private String source;
        private String schema;
        private String table;
        private String type;
        private List<FieldMeta> primaryKeys;
        private List<FieldMeta> partitionKeys;
        private HudiMeta hudi;
        private List<FieldMeta> fields;
        private String filterField;
        private List<String> filterValues;
        private FilterType filterType;
        private String topic;
        private String pulsarAddress;
        private YarnMeta syncYarn;
        private YarnMeta compactionYarn;
        private String partitionField;
        private ConfigMeta config;
        private JobMeta job;
        private ConnectionMeta connection;
        private Integer priority;
        private SourceType sourceType;
        private List<String> tags;
        private Integer version;

        private Builder() {
        }

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

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

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

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

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

        public Builder primaryKeys(List<FieldMeta> primaryKeys) {
            this.primaryKeys = primaryKeys;
            return this;
        }

        public Builder partitionKeys(List<FieldMeta> partitionKeys) {
            this.partitionKeys = partitionKeys;
            return this;
        }

        public Builder hudi(HudiMeta hudi) {
            this.hudi = hudi;
            return this;
        }

        public Builder fields(List<FieldMeta> fields) {
            this.fields = fields;
            return this;
        }

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

        public Builder filterValues(List<String> filterValues) {
            this.filterValues = filterValues;
            return this;
        }

        public Builder filterType(FilterType filterType) {
            this.filterType = filterType;
            return this;
        }

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

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

        public Builder syncYarn(YarnMeta syncYarn) {
            this.syncYarn = syncYarn;
            return this;
        }

        public Builder compactionYarn(YarnMeta compactionYarn) {
            this.compactionYarn = compactionYarn;
            return this;
        }

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

        public Builder config(ConfigMeta config) {
            this.config = config;
            return this;
        }

        public Builder job(JobMeta job) {
            this.job = job;
            return this;
        }

        public Builder connection(ConnectionMeta connection) {
            this.connection = connection;
            return this;
        }

        public Builder priority(Integer priority) {
            this.priority = priority;
            return this;
        }


        public Builder sourceType(SourceType sourceType) {
            this.sourceType = sourceType;
            return this;
        }

        public Builder tags(List<String> tags) {
            this.tags = tags;
            return this;
        }

        public Builder version(Integer version) {
            this.version = version;
            return this;
        }

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

    public static final class FieldMeta implements Serializable {
        private String name;
        private Integer sequence;
        private String type;
        private Boolean isPrimaryKey;
        private Boolean partitionKey;
        private Long length;
        private Integer scala;

        public FieldMeta() {
        }

        public FieldMeta(Builder builder) {
            this.name = builder.name;
            this.sequence = builder.sequence;
            this.type = builder.type;
            this.isPrimaryKey = builder.isPrimaryKey;
            this.partitionKey = builder.partitionKey;
            this.length = builder.length;
            this.scala = builder.scala;
        }

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

        @Override
        public String toString() {
            return "FieldMeta{" +
                    "name='" + name + '\'' +
                    ", sequence=" + sequence +
                    ", type='" + type + '\'' +
                    ", isPrimaryKey=" + isPrimaryKey +
                    ", partitionKey=" + partitionKey +
                    ", length=" + length +
                    '}';
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Integer getSequence() {
            return sequence;
        }

        public void setSequence(Integer sequence) {
            this.sequence = sequence;
        }

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        public Boolean getPrimaryKey() {
            return isPrimaryKey;
        }

        public void setPrimaryKey(Boolean primaryKey) {
            isPrimaryKey = primaryKey;
        }

        public Boolean getPartitionKey() {
            return partitionKey;
        }

        public void setPartitionKey(Boolean partitionKey) {
            this.partitionKey = partitionKey;
        }

        public Long getLength() {
            return length;
        }

        public void setLength(Long length) {
            this.length = length;
        }

        public Integer getScala() {
            return scala;
        }

        public void setScala(Integer scala) {
            this.scala = scala;
        }

        public static final class Builder {
            private String name;
            private Integer sequence;
            private String type;
            private Boolean isPrimaryKey;
            private Boolean partitionKey;
            private Long length;
            private Integer scala;

            private Builder() {
            }

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

            public Builder sequence(Integer sequence) {
                this.sequence = sequence;
                return this;
            }

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

            public Builder isPrimaryKey(Boolean isPrimaryKey) {
                this.isPrimaryKey = isPrimaryKey;
                return this;
            }

            public Builder partitionKey(Boolean partitionKey) {
                this.partitionKey = partitionKey;
                return this;
            }

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

            public Builder scala(Integer scala) {
                this.scala = scala;
                return this;
            }

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

    public static final class HudiMeta implements Serializable {
        private String targetDataSource;
        private String targetTable;
        private String targetTableType;
        private String targetHdfsPath;
        private Integer sourceTasks;
        private Integer writeTasks;
        private String writeOperation;
        private Integer writeTaskMaxMemory;
        private Integer writeBatchSize;
        private Integer writeRateLimit;
        private Integer bucketIndexNumber;
        private String compactionStrategy;
        private Integer compactionTasks;
        private Integer compactionDeltaCommits;
        private Integer compactionDeltaSeconds;
        private String compactionAsyncEnabled;
        private Integer compactionMaxMemory;
        private String configs;
        private Integer keepFileVersion;
        private Integer keepCommitVersion;

        public HudiMeta() {
        }

        public HudiMeta(Builder builder) {
            this.targetDataSource = builder.targetDataSource;
            this.targetTable = builder.targetTable;
            this.targetTableType = builder.targetTableType;
            this.targetHdfsPath = builder.targetHdfsPath;
            this.sourceTasks = builder.sourceTasks;
            this.writeTasks = builder.writeTasks;
            this.writeOperation = builder.writeOperation;
            this.writeTaskMaxMemory = builder.writeTaskMaxMemory;
            this.writeBatchSize = builder.writeBatchSize;
            this.writeRateLimit = builder.writeRateLimit;
            this.bucketIndexNumber = builder.bucketIndexNumber;
            this.compactionStrategy = builder.compactionStrategy;
            this.compactionTasks = builder.compactionTasks;
            this.compactionDeltaCommits = builder.compactionDeltaCommits;
            this.compactionDeltaSeconds = builder.compactionDeltaSeconds;
            this.compactionAsyncEnabled = builder.compactionAsyncEnabled;
            this.compactionMaxMemory = builder.compactionMaxMemory;
            this.configs = builder.configs;
            this.keepFileVersion = builder.keepFileVersion;
            this.keepCommitVersion = builder.keepCommitVersion;
        }

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

        public String getTargetDataSource() {
            return targetDataSource;
        }

        public void setTargetDataSource(String targetDataSource) {
            this.targetDataSource = targetDataSource;
        }

        public String getTargetTable() {
            return targetTable;
        }

        public void setTargetTable(String targetTable) {
            this.targetTable = targetTable;
        }

        public String getTargetTableType() {
            return targetTableType;
        }

        public void setTargetTableType(String targetTableType) {
            this.targetTableType = targetTableType;
        }

        public String getTargetHdfsPath() {
            return targetHdfsPath;
        }

        public void setTargetHdfsPath(String targetHdfsPath) {
            this.targetHdfsPath = targetHdfsPath;
        }

        public Integer getSourceTasks() {
            return sourceTasks;
        }

        public void setSourceTasks(Integer sourceTasks) {
            this.sourceTasks = sourceTasks;
        }

        public Integer getWriteTasks() {
            return writeTasks;
        }

        public void setWriteTasks(Integer writeTasks) {
            this.writeTasks = writeTasks;
        }

        public String getWriteOperation() {
            return writeOperation;
        }

        public void setWriteOperation(String writeOperation) {
            this.writeOperation = writeOperation;
        }

        public Integer getWriteTaskMaxMemory() {
            return writeTaskMaxMemory;
        }

        public void setWriteTaskMaxMemory(Integer writeTaskMaxMemory) {
            this.writeTaskMaxMemory = writeTaskMaxMemory;
        }

        public Integer getWriteBatchSize() {
            return writeBatchSize;
        }

        public void setWriteBatchSize(Integer writeBatchSize) {
            this.writeBatchSize = writeBatchSize;
        }

        public Integer getWriteRateLimit() {
            return writeRateLimit;
        }

        public void setWriteRateLimit(Integer writeRateLimit) {
            this.writeRateLimit = writeRateLimit;
        }

        public Integer getBucketIndexNumber() {
            return bucketIndexNumber;
        }

        public void setBucketIndexNumber(Integer bucketIndexNumber) {
            this.bucketIndexNumber = bucketIndexNumber;
        }

        public String getCompactionStrategy() {
            return compactionStrategy;
        }

        public void setCompactionStrategy(String compactionStrategy) {
            this.compactionStrategy = compactionStrategy;
        }

        public Integer getCompactionTasks() {
            return compactionTasks;
        }

        public void setCompactionTasks(Integer compactionTasks) {
            this.compactionTasks = compactionTasks;
        }

        public Integer getCompactionDeltaCommits() {
            return compactionDeltaCommits;
        }

        public void setCompactionDeltaCommits(Integer compactionDeltaCommits) {
            this.compactionDeltaCommits = compactionDeltaCommits;
        }

        public Integer getCompactionDeltaSeconds() {
            return compactionDeltaSeconds;
        }

        public void setCompactionDeltaSeconds(Integer compactionDeltaSeconds) {
            this.compactionDeltaSeconds = compactionDeltaSeconds;
        }

        public String getCompactionAsyncEnabled() {
            return compactionAsyncEnabled;
        }

        public void setCompactionAsyncEnabled(String compactionAsyncEnabled) {
            this.compactionAsyncEnabled = compactionAsyncEnabled;
        }

        public Integer getCompactionMaxMemory() {
            return compactionMaxMemory;
        }

        public void setCompactionMaxMemory(Integer compactionMaxMemory) {
            this.compactionMaxMemory = compactionMaxMemory;
        }

        public String getConfigs() {
            return configs;
        }

        public void setConfigs(String configs) {
            this.configs = configs;
        }

        public Integer getKeepFileVersion() {
            return keepFileVersion;
        }

        public void setKeepFileVersion(Integer keepFileVersion) {
            this.keepFileVersion = keepFileVersion;
        }

        public Integer getKeepCommitVersion() {
            return keepCommitVersion;
        }

        public void setKeepCommitVersion(Integer keepCommitVersion) {
            this.keepCommitVersion = keepCommitVersion;
        }

        @Override
        public String toString() {
            return "HudiMeta{" +
                    "targetDataSource='" + targetDataSource + '\'' +
                    ", targetTable='" + targetTable + '\'' +
                    ", targetTableType='" + targetTableType + '\'' +
                    ", targetHdfsPath='" + targetHdfsPath + '\'' +
                    ", sourceTasks=" + sourceTasks +
                    ", writeTasks=" + writeTasks +
                    ", writeOperation='" + writeOperation + '\'' +
                    ", writeTaskMaxMemory=" + writeTaskMaxMemory +
                    ", writeBatchSize=" + writeBatchSize +
                    ", writeRateLimit=" + writeRateLimit +
                    ", bucketIndexNumber=" + bucketIndexNumber +
                    ", compactionStrategy='" + compactionStrategy + '\'' +
                    ", compactionTasks=" + compactionTasks +
                    ", compactionDeltaCommits=" + compactionDeltaCommits +
                    ", compactionDeltaSeconds=" + compactionDeltaSeconds +
                    ", compactionAsyncEnabled='" + compactionAsyncEnabled + '\'' +
                    ", compactionMaxMemory=" + compactionMaxMemory +
                    ", configs='" + configs + '\'' +
                    ", keepFileVersion=" + keepFileVersion +
                    ", keepCommitVersion=" + keepCommitVersion +
                    '}';
        }

        public static final class Builder {
            private String targetDataSource;
            private String targetTable;
            private String targetTableType;
            private String targetHdfsPath;
            private Integer sourceTasks;
            private Integer writeTasks;
            private String writeOperation;
            private Integer writeTaskMaxMemory;
            private Integer writeBatchSize;
            private Integer writeRateLimit;
            private Integer bucketIndexNumber;
            private String compactionStrategy;
            private Integer compactionTasks;
            private Integer compactionDeltaCommits;
            private Integer compactionDeltaSeconds;
            private String compactionAsyncEnabled;
            private Integer compactionMaxMemory;
            private String configs;
            private Integer keepFileVersion;
            private Integer keepCommitVersion;

            private Builder() {
            }

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

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

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

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

            public Builder sourceTasks(Integer sourceTasks) {
                this.sourceTasks = sourceTasks;
                return this;
            }

            public Builder writeTasks(Integer writeTasks) {
                this.writeTasks = writeTasks;
                return this;
            }

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

            public Builder writeTaskMaxMemory(Integer writeTaskMaxMemory) {
                this.writeTaskMaxMemory = writeTaskMaxMemory;
                return this;
            }

            public Builder writeBatchSize(Integer writeBatchSize) {
                this.writeBatchSize = writeBatchSize;
                return this;
            }

            public Builder writeRateLimit(Integer writeRateLimit) {
                this.writeRateLimit = writeRateLimit;
                return this;
            }

            public Builder bucketIndexNumber(Integer bucketIndexNumber) {
                this.bucketIndexNumber = bucketIndexNumber;
                return this;
            }

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

            public Builder compactionTasks(Integer compactionTasks) {
                this.compactionTasks = compactionTasks;
                return this;
            }

            public Builder compactionDeltaCommits(Integer compactionDeltaCommits) {
                this.compactionDeltaCommits = compactionDeltaCommits;
                return this;
            }

            public Builder compactionDeltaSeconds(Integer compactionDeltaSeconds) {
                this.compactionDeltaSeconds = compactionDeltaSeconds;
                return this;
            }

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

            public Builder compactionMaxMemory(Integer compactionMaxMemory) {
                this.compactionMaxMemory = compactionMaxMemory;
                return this;
            }

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

            public Builder keepFileVersion(Integer keepFileVersion) {
                this.keepFileVersion = keepFileVersion;
                return this;
            }

            public Builder keepCommitVersion(Integer keepCommitVersion) {
                this.keepCommitVersion = keepCommitVersion;
                return this;
            }

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

    public static final class YarnMeta implements Serializable {
        private Integer jobManagerMemory;
        private Integer taskManagerMemory;

        public YarnMeta() {
        }

        public YarnMeta(Builder builder) {
            this.jobManagerMemory = builder.jobManagerMemory;
            this.taskManagerMemory = builder.taskManagerMemory;
        }

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

        @Override
        public String toString() {
            return "YarnMeta{" + "jobManagerMemory=" + jobManagerMemory + ", taskManagerMemory=" + taskManagerMemory + '}';
        }

        public Integer getJobManagerMemory() {
            return jobManagerMemory;
        }

        public YarnMeta setJobManagerMemory(Integer jobManagerMemory) {
            this.jobManagerMemory = jobManagerMemory;
            return this;
        }

        public Integer getTaskManagerMemory() {
            return taskManagerMemory;
        }

        public YarnMeta setTaskManagerMemory(Integer taskManagerMemory) {
            this.taskManagerMemory = taskManagerMemory;
            return this;
        }

        public static final class Builder {
            private Integer jobManagerMemory;
            private Integer taskManagerMemory;

            private Builder() {
            }

            public Builder jobManagerMemory(Integer jobManagerMemory) {
                this.jobManagerMemory = jobManagerMemory;
                return this;
            }

            public Builder taskManagerMemory(Integer taskManagerMemory) {
                this.taskManagerMemory = taskManagerMemory;
                return this;
            }

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

    public static final class ConfigMeta implements Serializable {
        private String messageId;
        private String metricPublishUrl;
        private String metricPrometheusUrl;
        private String metricApiUrl;
        private Integer metricPublishDelay;
        private Integer metricPublishPeriod;
        private Integer metricPublishTimeout;
        private Integer metricPublishBatch;
        private String checkpointRootPath;
        private String zookeeperUrl;

        public ConfigMeta() {
        }

        public ConfigMeta(Builder builder) {
            this.messageId = builder.messageId;
            this.metricPublishUrl = builder.metricPublishUrl;
            this.metricPrometheusUrl = builder.metricPrometheusUrl;
            this.metricApiUrl = builder.metricApiUrl;
            this.metricPublishDelay = builder.metricPublishDelay;
            this.metricPublishPeriod = builder.metricPublishPeriod;
            this.metricPublishTimeout = builder.metricPublishTimeout;
            this.metricPublishBatch = builder.metricPublishBatch;
            this.checkpointRootPath = builder.checkpointRootPath;
            this.zookeeperUrl = builder.zookeeperUrl;
        }

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

        public String getMessageId() {
            return messageId;
        }

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

        public String getMetricPublishUrl() {
            return metricPublishUrl;
        }

        public void setMetricPublishUrl(String metricPublishUrl) {
            this.metricPublishUrl = metricPublishUrl;
        }

        public String getMetricPrometheusUrl() {
            return metricPrometheusUrl;
        }

        public void setMetricPrometheusUrl(String metricPrometheusUrl) {
            this.metricPrometheusUrl = metricPrometheusUrl;
        }

        public String getMetricApiUrl() {
            return metricApiUrl;
        }

        public void setMetricApiUrl(String metricApiUrl) {
            this.metricApiUrl = metricApiUrl;
        }

        public Integer getMetricPublishDelay() {
            return metricPublishDelay;
        }

        public void setMetricPublishDelay(Integer metricPublishDelay) {
            this.metricPublishDelay = metricPublishDelay;
        }

        public Integer getMetricPublishPeriod() {
            return metricPublishPeriod;
        }

        public void setMetricPublishPeriod(Integer metricPublishPeriod) {
            this.metricPublishPeriod = metricPublishPeriod;
        }

        public Integer getMetricPublishTimeout() {
            return metricPublishTimeout;
        }

        public void setMetricPublishTimeout(Integer metricPublishTimeout) {
            this.metricPublishTimeout = metricPublishTimeout;
        }

        public Integer getMetricPublishBatch() {
            return metricPublishBatch;
        }

        public void setMetricPublishBatch(Integer metricPublishBatch) {
            this.metricPublishBatch = metricPublishBatch;
        }

        public String getCheckpointRootPath() {
            return checkpointRootPath;
        }

        public void setCheckpointRootPath(String checkpointRootPath) {
            this.checkpointRootPath = checkpointRootPath;
        }

        public String getZookeeperUrl() {
            return zookeeperUrl;
        }

        public void setZookeeperUrl(String zookeeperUrl) {
            this.zookeeperUrl = zookeeperUrl;
        }

        @Override
        public String toString() {
            return "ConfigMeta{" +
                    "messageId='" + messageId + '\'' +
                    ", metricPublishUrl='" + metricPublishUrl + '\'' +
                    ", metricPrometheusUrl='" + metricPrometheusUrl + '\'' +
                    ", metricApiUrl='" + metricApiUrl + '\'' +
                    ", metricPublishDelay=" + metricPublishDelay +
                    ", metricPublishPeriod=" + metricPublishPeriod +
                    ", metricPublishTimeout=" + metricPublishTimeout +
                    ", metricPublishBatch=" + metricPublishBatch +
                    ", checkpointRootPath='" + checkpointRootPath + '\'' +
                    ", zookeeperUrl='" + zookeeperUrl + '\'' +
                    '}';
        }

        public static final class Builder {
            private String messageId;
            private String metricPublishUrl;
            private String metricPrometheusUrl;
            private String metricApiUrl;
            private Integer metricPublishDelay;
            private Integer metricPublishPeriod;
            private Integer metricPublishTimeout;
            private Integer metricPublishBatch;
            private String checkpointRootPath;
            private String zookeeperUrl;

            private Builder() {
            }

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

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

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

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

            public Builder metricPublishDelay(Integer metricPublishDelay) {
                this.metricPublishDelay = metricPublishDelay;
                return this;
            }

            public Builder metricPublishPeriod(Integer metricPublishPeriod) {
                this.metricPublishPeriod = metricPublishPeriod;
                return this;
            }

            public Builder metricPublishTimeout(Integer metricPublishTimeout) {
                this.metricPublishTimeout = metricPublishTimeout;
                return this;
            }

            public Builder metricPublishBatch(Integer metricPublishBatch) {
                this.metricPublishBatch = metricPublishBatch;
                return this;
            }

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

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

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

    public static final class JobMeta implements Serializable {
        private Long id;
        private String name;

        public JobMeta() {
        }

        public JobMeta(Builder builder) {
            this.id = builder.id;
            this.name = builder.name;
        }

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

        public Long getId() {
            return id;
        }

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

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        @Override
        public String toString() {
            return "JobMeta{" +
                    "id=" + id +
                    ", name='" + name + '\'' +
                    '}';
        }

        public static final class Builder {
            private Long id;
            private String name;

            private Builder() {
            }

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

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

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

    public static final class RowMeta implements Serializable {
        private String dsName;
        private String schemaName;
        private String tableName;
        private String tableType;
        private String fieldName;
        private Integer fieldSeq;
        private String fieldType;
        private String primaryKey;
        private String partitionKey;
        private Long length;
        private String tgtDb;
        private String tgtTable;
        private String tgtTableType;
        private String tgtHdfsPath;
        private Integer writeTasks;
        private String writeOperation;
        private Integer writeTaskMaxMemory;
        private Integer writeBatchSize;
        private Integer writeRateLimit;
        private Integer bucketIndexNumber;
        private String compactionStrategy;
        private Integer compactionTasks;
        private Integer compactionDeltaCommits;
        private Integer compactionDeltaSeconds;
        private String compactionAsyncEnabled;
        private Integer compactionMaxMemory;
        private String configs;
        private String filterField;
        private String filterValues;
        private String filterType;
        private String topic;
        private String pulsarAddress;
        private Integer syncJobManagerMemory;
        private Integer syncTaskManagerMemory;
        private Integer compactionJobManagerMemory;
        private Integer compactionTaskManagerMemory;
        private String partitionField;
        private String messageId;
        private String metricPublishUrl;
        private String metricPrometheusUrl;
        private String metricApiUrl;
        private Integer metricPublishDelay;
        private Integer metricPublishPeriod;
        private Integer metricPublishTimeout;
        private Integer metricPublishBatch;
        private Long jobId;
        private String jobName;
        private String checkpointRootPath;
        private Integer sourceTasks;
        private String alias;
        private String connection;
        private Integer priority;
        private String sourceType;
        private Integer keepFileVersion;
        private Integer keepCommitVersion;
        private String tags;
        private String zookeeperUrl;
        private Integer version;
        private Integer scala;

        public RowMeta() {
        }

        public RowMeta(Builder builder) {
            this.dsName = builder.dsName;
            this.schemaName = builder.schemaName;
            this.tableName = builder.tableName;
            this.tableType = builder.tableType;
            this.fieldName = builder.fieldName;
            this.fieldSeq = builder.fieldSeq;
            this.fieldType = builder.fieldType;
            this.primaryKey = builder.primaryKey;
            this.partitionKey = builder.partitionKey;
            this.length = builder.length;
            this.tgtDb = builder.tgtDb;
            this.tgtTable = builder.tgtTable;
            this.tgtTableType = builder.tgtTableType;
            this.tgtHdfsPath = builder.tgtHdfsPath;
            this.writeTasks = builder.writeTasks;
            this.writeOperation = builder.writeOperation;
            this.writeTaskMaxMemory = builder.writeTaskMaxMemory;
            this.writeBatchSize = builder.writeBatchSize;
            this.writeRateLimit = builder.writeRateLimit;
            this.bucketIndexNumber = builder.bucketIndexNumber;
            this.compactionStrategy = builder.compactionStrategy;
            this.compactionTasks = builder.compactionTasks;
            this.compactionDeltaCommits = builder.compactionDeltaCommits;
            this.compactionDeltaSeconds = builder.compactionDeltaSeconds;
            this.compactionAsyncEnabled = builder.compactionAsyncEnabled;
            this.compactionMaxMemory = builder.compactionMaxMemory;
            this.configs = builder.configs;
            this.filterField = builder.filterField;
            this.filterValues = builder.filterValues;
            this.filterType = builder.filterType;
            this.topic = builder.topic;
            this.pulsarAddress = builder.pulsarAddress;
            this.syncJobManagerMemory = builder.syncJobManagerMemory;
            this.syncTaskManagerMemory = builder.syncTaskManagerMemory;
            this.compactionJobManagerMemory = builder.compactionJobManagerMemory;
            this.compactionTaskManagerMemory = builder.compactionTaskManagerMemory;
            this.partitionField = builder.partitionField;
            this.messageId = builder.messageId;
            this.metricPublishUrl = builder.metricPublishUrl;
            this.metricPrometheusUrl = builder.metricPrometheusUrl;
            this.metricApiUrl = builder.metricApiUrl;
            this.metricPublishDelay = builder.metricPublishDelay;
            this.metricPublishPeriod = builder.metricPublishPeriod;
            this.metricPublishTimeout = builder.metricPublishTimeout;
            this.metricPublishBatch = builder.metricPublishBatch;
            this.jobId = builder.jobId;
            this.jobName = builder.jobName;
            this.checkpointRootPath = builder.checkpointRootPath;
            this.sourceTasks = builder.sourceTasks;
            this.alias = builder.alias;
            this.connection = builder.connection;
            this.priority = builder.priority;
            this.sourceType = builder.sourceType;
            this.keepFileVersion = builder.keepFileVersion;
            this.keepCommitVersion = builder.keepCommitVersion;
            this.tags = builder.tags;
            this.zookeeperUrl = builder.zookeeperUrl;
            this.version = builder.version;
            this.scala = builder.scala;
        }

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

        public String getDsName() {
            return dsName;
        }

        public void setDsName(String dsName) {
            this.dsName = dsName;
        }

        public String getSchemaName() {
            return schemaName;
        }

        public void setSchemaName(String schemaName) {
            this.schemaName = schemaName;
        }

        public String getTableName() {
            return tableName;
        }

        public void setTableName(String tableName) {
            this.tableName = tableName;
        }

        public String getTableType() {
            return tableType;
        }

        public void setTableType(String tableType) {
            this.tableType = tableType;
        }

        public String getFieldName() {
            return fieldName;
        }

        public void setFieldName(String fieldName) {
            this.fieldName = fieldName;
        }

        public Integer getFieldSeq() {
            return fieldSeq;
        }

        public void setFieldSeq(Integer fieldSeq) {
            this.fieldSeq = fieldSeq;
        }

        public String getFieldType() {
            return fieldType;
        }

        public void setFieldType(String fieldType) {
            this.fieldType = fieldType;
        }

        public String getPrimaryKey() {
            return primaryKey;
        }

        public void setPrimaryKey(String primaryKey) {
            this.primaryKey = primaryKey;
        }

        public String getPartitionKey() {
            return partitionKey;
        }

        public void setPartitionKey(String partitionKey) {
            this.partitionKey = partitionKey;
        }

        public Long getLength() {
            return length;
        }

        public void setLength(Long length) {
            this.length = length;
        }

        public String getTgtDb() {
            return tgtDb;
        }

        public void setTgtDb(String tgtDb) {
            this.tgtDb = tgtDb;
        }

        public String getTgtTable() {
            return tgtTable;
        }

        public void setTgtTable(String tgtTable) {
            this.tgtTable = tgtTable;
        }

        public String getTgtTableType() {
            return tgtTableType;
        }

        public void setTgtTableType(String tgtTableType) {
            this.tgtTableType = tgtTableType;
        }

        public String getTgtHdfsPath() {
            return tgtHdfsPath;
        }

        public void setTgtHdfsPath(String tgtHdfsPath) {
            this.tgtHdfsPath = tgtHdfsPath;
        }

        public Integer getWriteTasks() {
            return writeTasks;
        }

        public void setWriteTasks(Integer writeTasks) {
            this.writeTasks = writeTasks;
        }

        public String getWriteOperation() {
            return writeOperation;
        }

        public void setWriteOperation(String writeOperation) {
            this.writeOperation = writeOperation;
        }

        public Integer getWriteTaskMaxMemory() {
            return writeTaskMaxMemory;
        }

        public void setWriteTaskMaxMemory(Integer writeTaskMaxMemory) {
            this.writeTaskMaxMemory = writeTaskMaxMemory;
        }

        public Integer getWriteBatchSize() {
            return writeBatchSize;
        }

        public void setWriteBatchSize(Integer writeBatchSize) {
            this.writeBatchSize = writeBatchSize;
        }

        public Integer getWriteRateLimit() {
            return writeRateLimit;
        }

        public void setWriteRateLimit(Integer writeRateLimit) {
            this.writeRateLimit = writeRateLimit;
        }

        public Integer getBucketIndexNumber() {
            return bucketIndexNumber;
        }

        public void setBucketIndexNumber(Integer bucketIndexNumber) {
            this.bucketIndexNumber = bucketIndexNumber;
        }

        public String getCompactionStrategy() {
            return compactionStrategy;
        }

        public void setCompactionStrategy(String compactionStrategy) {
            this.compactionStrategy = compactionStrategy;
        }

        public Integer getCompactionTasks() {
            return compactionTasks;
        }

        public void setCompactionTasks(Integer compactionTasks) {
            this.compactionTasks = compactionTasks;
        }

        public Integer getCompactionDeltaCommits() {
            return compactionDeltaCommits;
        }

        public void setCompactionDeltaCommits(Integer compactionDeltaCommits) {
            this.compactionDeltaCommits = compactionDeltaCommits;
        }

        public Integer getCompactionDeltaSeconds() {
            return compactionDeltaSeconds;
        }

        public void setCompactionDeltaSeconds(Integer compactionDeltaSeconds) {
            this.compactionDeltaSeconds = compactionDeltaSeconds;
        }

        public String getCompactionAsyncEnabled() {
            return compactionAsyncEnabled;
        }

        public void setCompactionAsyncEnabled(String compactionAsyncEnabled) {
            this.compactionAsyncEnabled = compactionAsyncEnabled;
        }

        public Integer getCompactionMaxMemory() {
            return compactionMaxMemory;
        }

        public void setCompactionMaxMemory(Integer compactionMaxMemory) {
            this.compactionMaxMemory = compactionMaxMemory;
        }

        public String getConfigs() {
            return configs;
        }

        public void setConfigs(String configs) {
            this.configs = configs;
        }

        public String getFilterField() {
            return filterField;
        }

        public void setFilterField(String filterField) {
            this.filterField = filterField;
        }

        public String getFilterValues() {
            return filterValues;
        }

        public void setFilterValues(String filterValues) {
            this.filterValues = filterValues;
        }

        public String getFilterType() {
            return filterType;
        }

        public void setFilterType(String filterType) {
            this.filterType = filterType;
        }

        public String getTopic() {
            return topic;
        }

        public void setTopic(String topic) {
            this.topic = topic;
        }

        public String getPulsarAddress() {
            return pulsarAddress;
        }

        public void setPulsarAddress(String pulsarAddress) {
            this.pulsarAddress = pulsarAddress;
        }

        public Integer getSyncJobManagerMemory() {
            return syncJobManagerMemory;
        }

        public void setSyncJobManagerMemory(Integer syncJobManagerMemory) {
            this.syncJobManagerMemory = syncJobManagerMemory;
        }

        public Integer getSyncTaskManagerMemory() {
            return syncTaskManagerMemory;
        }

        public void setSyncTaskManagerMemory(Integer syncTaskManagerMemory) {
            this.syncTaskManagerMemory = syncTaskManagerMemory;
        }

        public Integer getCompactionJobManagerMemory() {
            return compactionJobManagerMemory;
        }

        public void setCompactionJobManagerMemory(Integer compactionJobManagerMemory) {
            this.compactionJobManagerMemory = compactionJobManagerMemory;
        }

        public Integer getCompactionTaskManagerMemory() {
            return compactionTaskManagerMemory;
        }

        public void setCompactionTaskManagerMemory(Integer compactionTaskManagerMemory) {
            this.compactionTaskManagerMemory = compactionTaskManagerMemory;
        }

        public String getPartitionField() {
            return partitionField;
        }

        public void setPartitionField(String partitionField) {
            this.partitionField = partitionField;
        }

        public String getMessageId() {
            return messageId;
        }

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

        public String getMetricPublishUrl() {
            return metricPublishUrl;
        }

        public void setMetricPublishUrl(String metricPublishUrl) {
            this.metricPublishUrl = metricPublishUrl;
        }

        public String getMetricPrometheusUrl() {
            return metricPrometheusUrl;
        }

        public void setMetricPrometheusUrl(String metricPrometheusUrl) {
            this.metricPrometheusUrl = metricPrometheusUrl;
        }

        public String getMetricApiUrl() {
            return metricApiUrl;
        }

        public void setMetricApiUrl(String metricApiUrl) {
            this.metricApiUrl = metricApiUrl;
        }

        public Integer getMetricPublishDelay() {
            return metricPublishDelay;
        }

        public void setMetricPublishDelay(Integer metricPublishDelay) {
            this.metricPublishDelay = metricPublishDelay;
        }

        public Integer getMetricPublishPeriod() {
            return metricPublishPeriod;
        }

        public void setMetricPublishPeriod(Integer metricPublishPeriod) {
            this.metricPublishPeriod = metricPublishPeriod;
        }

        public Integer getMetricPublishTimeout() {
            return metricPublishTimeout;
        }

        public void setMetricPublishTimeout(Integer metricPublishTimeout) {
            this.metricPublishTimeout = metricPublishTimeout;
        }

        public Integer getMetricPublishBatch() {
            return metricPublishBatch;
        }

        public void setMetricPublishBatch(Integer metricPublishBatch) {
            this.metricPublishBatch = metricPublishBatch;
        }

        public Long getJobId() {
            return jobId;
        }

        public void setJobId(Long jobId) {
            this.jobId = jobId;
        }

        public String getJobName() {
            return jobName;
        }

        public void setJobName(String jobName) {
            this.jobName = jobName;
        }

        public String getCheckpointRootPath() {
            return checkpointRootPath;
        }

        public void setCheckpointRootPath(String checkpointRootPath) {
            this.checkpointRootPath = checkpointRootPath;
        }

        public Integer getSourceTasks() {
            return sourceTasks;
        }

        public void setSourceTasks(Integer sourceTasks) {
            this.sourceTasks = sourceTasks;
        }

        public String getAlias() {
            return alias;
        }

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

        public String getConnection() {
            return connection;
        }

        public void setConnection(String connection) {
            this.connection = connection;
        }

        public Integer getPriority() {
            return priority;
        }

        public void setPriority(Integer priority) {
            this.priority = priority;
        }

        public String getSourceType() {
            return sourceType;
        }

        public void setSourceType(String sourceType) {
            this.sourceType = sourceType;
        }

        public Integer getKeepFileVersion() {
            return keepFileVersion;
        }

        public void setKeepFileVersion(Integer keepFileVersion) {
            this.keepFileVersion = keepFileVersion;
        }

        public Integer getKeepCommitVersion() {
            return keepCommitVersion;
        }

        public void setKeepCommitVersion(Integer keepCommitVersion) {
            this.keepCommitVersion = keepCommitVersion;
        }

        public String getTags() {
            return tags;
        }

        public void setTags(String tags) {
            this.tags = tags;
        }

        public String getZookeeperUrl() {
            return zookeeperUrl;
        }

        public void setZookeeperUrl(String zookeeperUrl) {
            this.zookeeperUrl = zookeeperUrl;
        }

        public Integer getVersion() {
            return version;
        }

        public void setVersion(Integer version) {
            this.version = version;
        }

        public Integer getScala() {
            return scala;
        }

        public void setScala(Integer scala) {
            this.scala = scala;
        }

        public static final class Builder {
            private String dsName;
            private String schemaName;
            private String tableName;
            private String tableType;
            private String fieldName;
            private Integer fieldSeq;
            private String fieldType;
            private String primaryKey;
            private String partitionKey;
            private Long length;
            private String tgtDb;
            private String tgtTable;
            private String tgtTableType;
            private String tgtHdfsPath;
            private Integer writeTasks;
            private String writeOperation;
            private Integer writeTaskMaxMemory;
            private Integer writeBatchSize;
            private Integer writeRateLimit;
            private Integer bucketIndexNumber;
            private String compactionStrategy;
            private Integer compactionTasks;
            private Integer compactionDeltaCommits;
            private Integer compactionDeltaSeconds;
            private String compactionAsyncEnabled;
            private Integer compactionMaxMemory;
            private String configs;
            private String filterField;
            private String filterValues;
            private String filterType;
            private String topic;
            private String pulsarAddress;
            private Integer syncJobManagerMemory;
            private Integer syncTaskManagerMemory;
            private Integer compactionJobManagerMemory;
            private Integer compactionTaskManagerMemory;
            private String partitionField;
            private String messageId;
            private String metricPublishUrl;
            private String metricPrometheusUrl;
            private String metricApiUrl;
            private Integer metricPublishDelay;
            private Integer metricPublishPeriod;
            private Integer metricPublishTimeout;
            private Integer metricPublishBatch;
            private Long jobId;
            private String jobName;
            private String checkpointRootPath;
            private Integer sourceTasks;
            private String alias;
            private String connection;
            private Integer priority;
            private String sourceType;
            private Integer keepFileVersion;
            private Integer keepCommitVersion;
            private String tags;
            private String zookeeperUrl;
            private Integer version;
            private Integer scala;

            private Builder() {
            }

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

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

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

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

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

            public Builder fieldSeq(Integer fieldSeq) {
                this.fieldSeq = fieldSeq;
                return this;
            }

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

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

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

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

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

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

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

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

            public Builder writeTasks(Integer writeTasks) {
                this.writeTasks = writeTasks;
                return this;
            }

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

            public Builder writeTaskMaxMemory(Integer writeTaskMaxMemory) {
                this.writeTaskMaxMemory = writeTaskMaxMemory;
                return this;
            }

            public Builder writeBatchSize(Integer writeBatchSize) {
                this.writeBatchSize = writeBatchSize;
                return this;
            }

            public Builder writeRateLimit(Integer writeRateLimit) {
                this.writeRateLimit = writeRateLimit;
                return this;
            }

            public Builder bucketIndexNumber(Integer bucketIndexNumber) {
                this.bucketIndexNumber = bucketIndexNumber;
                return this;
            }

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

            public Builder compactionTasks(Integer compactionTasks) {
                this.compactionTasks = compactionTasks;
                return this;
            }

            public Builder compactionDeltaCommits(Integer compactionDeltaCommits) {
                this.compactionDeltaCommits = compactionDeltaCommits;
                return this;
            }

            public Builder compactionDeltaSeconds(Integer compactionDeltaSeconds) {
                this.compactionDeltaSeconds = compactionDeltaSeconds;
                return this;
            }

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

            public Builder compactionMaxMemory(Integer compactionMaxMemory) {
                this.compactionMaxMemory = compactionMaxMemory;
                return this;
            }

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

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

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

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

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

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

            public Builder syncJobManagerMemory(Integer syncJobManagerMemory) {
                this.syncJobManagerMemory = syncJobManagerMemory;
                return this;
            }

            public Builder syncTaskManagerMemory(Integer syncTaskManagerMemory) {
                this.syncTaskManagerMemory = syncTaskManagerMemory;
                return this;
            }

            public Builder compactionJobManagerMemory(Integer compactionJobManagerMemory) {
                this.compactionJobManagerMemory = compactionJobManagerMemory;
                return this;
            }

            public Builder compactionTaskManagerMemory(Integer compactionTaskManagerMemory) {
                this.compactionTaskManagerMemory = compactionTaskManagerMemory;
                return this;
            }

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

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

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

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

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

            public Builder metricPublishDelay(Integer metricPublishDelay) {
                this.metricPublishDelay = metricPublishDelay;
                return this;
            }

            public Builder metricPublishPeriod(Integer metricPublishPeriod) {
                this.metricPublishPeriod = metricPublishPeriod;
                return this;
            }

            public Builder metricPublishTimeout(Integer metricPublishTimeout) {
                this.metricPublishTimeout = metricPublishTimeout;
                return this;
            }

            public Builder metricPublishBatch(Integer metricPublishBatch) {
                this.metricPublishBatch = metricPublishBatch;
                return this;
            }

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

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

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

            public Builder sourceTasks(Integer sourceTasks) {
                this.sourceTasks = sourceTasks;
                return this;
            }

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

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

            public Builder priority(Integer priority) {
                this.priority = priority;
                return this;
            }

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

            public Builder keepFileVersion(Integer keepFileVersion) {
                this.keepFileVersion = keepFileVersion;
                return this;
            }

            public Builder keepCommitVersion(Integer keepCommitVersion) {
                this.keepCommitVersion = keepCommitVersion;
                return this;
            }

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

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

            public Builder version(Integer version) {
                this.version = version;
                return this;
            }

            public Builder scala(Integer scala) {
                this.scala = scala;
                return this;
            }

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

    public static final class ConnectionMeta implements Serializable {
        /**
         * {
         * "jdbc_url": "8eWr854+ycQhBY8X/Ye/rzxxHBoTscQvLfACZ+8AczHONHl5Vaq92DpRzLDZVNY8seyvheBnS0co0FYC4+B5pFhJrK/ilTB5d9yFY5cOtzT3eAk7n/fEAGaaA/xbP0Ei9NqhgBTsT1UgVfT9j3JkLFtbw5RvCOmOGnOVxriAzI1Q0JALMjBAu9FSxkTg8QYL619rUQEovmL1EJsHejoUPie2VsYbUYI3MAnXBU8d80k5xLjRx+PgLTrk5o1ZERT8uWebhjNFoRhVVZr1hzllFMB2BeFBadLb+yJjQ5brgrQJb7uEhtP1pfG5+Wv0+a5DuFjkLPtOwnWDVPxu9N+jKgUTxuTzWbA5M3JIsH+zNo0J55B86rpiheFv3PhZxrt4RJTZwoh27SjsePtOAYQbmNeSt1zseBYnsH2BAbBlCXU=",
         * "jdbc_driver": "oracle.jdbc.driver.OracleDriver",
         * "jdbc_user": "lnmuI3MYb2eYSAXa+ZpodQ==",
         * "jdbc_password": "N/RLVdGIVRCoBX9yfU//sg=="
         * }
         */
        private String url;
        private String user;
        private String password;
        private String driver;

        public ConnectionMeta() {
        }

        public ConnectionMeta(Builder builder) {
            this.url = builder.url;
            this.user = builder.user;
            this.password = builder.password;
            this.driver = builder.driver;
        }

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

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public String getUser() {
            return user;
        }

        public void setUser(String user) {
            this.user = user;
        }

        public String getPassword() {
            return password;
        }

        public void setPassword(String password) {
            this.password = password;
        }

        public String getDriver() {
            return driver;
        }

        public void setDriver(String driver) {
            this.driver = driver;
        }

        @Override
        public String toString() {
            return "ConnectionMeta{" +
                    "url='" + url + '\'' +
                    ", user='" + user + '\'' +
                    ", password='" + password + '\'' +
                    ", driver='" + driver + '\'' +
                    '}';
        }

        public static final class Builder {
            private String url;
            private String user;
            private String password;
            private String driver;

            private Builder() {
            }

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

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

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

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

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