org.xipki.ca.certprofile.x509.jaxb.TripleState Maven / Gradle / Ivy
The newest version!
package org.xipki.ca.certprofile.x509.jaxb;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* Java class for tripleState.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <simpleType name="tripleState">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="required"/>
* <enumeration value="optional"/>
* <enumeration value="forbidden"/>
* </restriction>
* </simpleType>
*
*
*/
@XmlType(name = "tripleState")
@XmlEnum
public enum TripleState {
@XmlEnumValue("required")
REQUIRED("required"),
@XmlEnumValue("optional")
OPTIONAL("optional"),
@XmlEnumValue("forbidden")
FORBIDDEN("forbidden");
private final String value;
TripleState(String v) {
value = v;
}
public String value() {
return value;
}
public static TripleState fromValue(String v) {
for (TripleState c: TripleState.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}