package com.lanyuanxiaoyao.service.check.configuration;

import java.util.List;
import java.util.Map;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @author lanyuanxiaoyao
 * @date 2024-02-23
 */
@Configuration
@ConfigurationProperties("checker.pulsar")
@ConditionalOnProperty(value = "checker.pulsar.enabled", matchIfMissing = true)
public class PulsarConfigurationProperties {
    private Boolean enabled = true;
    private Map<String, List<String>> testTopics;

    public Boolean getEnabled() {
        return enabled;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }

    public Map<String, List<String>> getTestTopics() {
        return testTopics;
    }

    public void setTestTopics(Map<String, List<String>> testTopics) {
        this.testTopics = testTopics;
    }

    @Override
    public String toString() {
        return "PulsarConfigurationProperties{" +
               "enabled=" + enabled +
               ", testTopics=" + testTopics +
               '}';
    }
}
