package com.lanyuanxiaoyao.service.configuration.entity.flink;

import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
import org.eclipse.collections.api.map.ImmutableMap;

/**
 * Flink Config
 *
 * @author lanyuanxiaoyao
 * @date 2023-05-04
 */
public final class FlinkConfig {
    @JsonProperty(value = "flink-version", access = JsonProperty.Access.WRITE_ONLY)
    private String flinkVersion;
    @JsonProperty(value = "flink-revision", access = JsonProperty.Access.WRITE_ONLY)
    private String flinkRevision;
    private ImmutableMap<String, Object> features;

    public FlinkConfig() {
    }

    public FlinkConfig(String flinkVersion, String flinkRevision, ImmutableMap<String, Object> features) {
        this.flinkVersion = flinkVersion;
        this.flinkRevision = flinkRevision;
        this.features = features;
    }

    public String getFlinkVersion() {
        return flinkVersion;
    }

    public String getFlinkRevision() {
        return flinkRevision;
    }

    public ImmutableMap<String, Object> getFeatures() {
        return features;
    }

    @Override
    public String toString() {
        return "FlinkConfig{" +
                "flinkVersion='" + flinkVersion + '\'' +
                ", flinkRevision='" + flinkRevision + '\'' +
                ", features=" + features +
                '}';
    }
}
