package cz.moneta.test.harness.annotations;

import java.util.EnumSet;

public enum Environment {
    DEV("DigDev"),
    TST1("TST1"),
    TST3("TST3"),
    PPE("PPE"),
    EDU("EDU"),
    FVE("FVE"),
    LIVE("LIVE");

    Environment(String jiraAlias) {
        this.jiraAlias = jiraAlias;
    }

    private String jiraAlias;

    public static Environment fromString(String env) {
        return EnumSet.allOf(Environment.class).stream()
                .filter(e -> e.name().equalsIgnoreCase(env))
                .findFirst()
                .orElse(null);
    }

    public String getJiraAlias() {
        return jiraAlias;
    }
}
