no.nav.sbl.soknadsosialhjelp.soknad.common.JsonKilde Maven / Gradle / Ivy
package no.nav.sbl.soknadsosialhjelp.soknad.common;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
public enum JsonKilde {
BRUKER("bruker"),
SYSTEM("system"),
UTDATERT("utdatert");
private final String value;
private final static Map CONSTANTS = new HashMap();
static {
for (JsonKilde c: values()) {
CONSTANTS.put(c.value, c);
}
}
private JsonKilde(String value) {
this.value = value;
}
@Override
public String toString() {
return this.value;
}
@JsonValue
public String value() {
return this.value;
}
@JsonCreator
public static JsonKilde fromValue(String value) {
JsonKilde constant = CONSTANTS.get(value);
if (constant == null) {
throw new IllegalArgumentException(value);
} else {
return constant;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy