no.nav.sbl.soknadsosialhjelp.soknad.common.JsonKildeSystem 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 JsonKildeSystem {
SYSTEM("system"),
UTDATERT("utdatert");
private final String value;
private final static Map CONSTANTS = new HashMap();
static {
for (JsonKildeSystem c: values()) {
CONSTANTS.put(c.value, c);
}
}
private JsonKildeSystem(String value) {
this.value = value;
}
@Override
public String toString() {
return this.value;
}
@JsonValue
public String value() {
return this.value;
}
@JsonCreator
public static JsonKildeSystem fromValue(String value) {
JsonKildeSystem constant = CONSTANTS.get(value);
if (constant == null) {
throw new IllegalArgumentException(value);
} else {
return constant;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy