com.dell.cpsd.identity.service.api.Classification Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of identity-service-api Show documentation
Show all versions of identity-service-api Show documentation
This repository creates a UUID for any managed element.
The newest version!
package com.dell.cpsd.identity.service.api;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
public enum Classification {
SYSTEM("SYSTEM"),
GROUP("GROUP"),
SUBSYSTEM("SUBSYSTEM"),
DEVICE("DEVICE"),
SUBCOMPONENT("SUBCOMPONENT");
private final String value;
private final static Map CONSTANTS = new HashMap();
static {
for (Classification c: values()) {
CONSTANTS.put(c.value, c);
}
}
private Classification(String value) {
this.value = value;
}
@Override
public String toString() {
return this.value;
}
@JsonValue
public String value() {
return this.value;
}
@JsonCreator
public static Classification fromValue(String value) {
Classification constant = CONSTANTS.get(value);
if (constant == null) {
throw new IllegalArgumentException(value);
} else {
return constant;
}
}
}