package com.dexorder.flink.kafka;

import java.util.HashMap;
import java.util.Map;

/**
 * Configuration for a Kafka topic.
 */
public class TopicConfig {
    private String name;
    private int partitions;
    private int replication;
    private Map<String, String> config;

    public TopicConfig() {
        this.config = new HashMap<>();
    }

    public String getName() {
        return name;
    }

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

    public int getPartitions() {
        return partitions;
    }

    public void setPartitions(int partitions) {
        this.partitions = partitions;
    }

    public int getReplication() {
        return replication;
    }

    public void setReplication(int replication) {
        this.replication = replication;
    }

    public Map<String, String> getConfig() {
        return config;
    }

    public void setConfig(Map<String, String> config) {
        this.config = config;
    }

    @Override
    public String toString() {
        return "TopicConfig{" +
                "name='" + name + '\'' +
                ", partitions=" + partitions +
                ", replication=" + replication +
                ", config=" + config +
                '}';
    }
}
