org.xipki.ca.certprofile.x509.jaxb.KeyUsageEnum 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 keyUsageEnum.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <simpleType name="keyUsageEnum">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="digitalSignature"/>
* <enumeration value="contentCommitment"/>
* <enumeration value="keyEncipherment"/>
* <enumeration value="dataEncipherment"/>
* <enumeration value="keyAgreement"/>
* <enumeration value="keyCertSign"/>
* <enumeration value="crlSign"/>
* <enumeration value="encipherOnly"/>
* <enumeration value="decipherOnly"/>
* </restriction>
* </simpleType>
*
*
*/
@XmlType(name = "keyUsageEnum")
@XmlEnum
public enum KeyUsageEnum {
@XmlEnumValue("digitalSignature")
DIGITAL_SIGNATURE("digitalSignature"),
@XmlEnumValue("contentCommitment")
CONTENT_COMMITMENT("contentCommitment"),
@XmlEnumValue("keyEncipherment")
KEY_ENCIPHERMENT("keyEncipherment"),
@XmlEnumValue("dataEncipherment")
DATA_ENCIPHERMENT("dataEncipherment"),
@XmlEnumValue("keyAgreement")
KEY_AGREEMENT("keyAgreement"),
@XmlEnumValue("keyCertSign")
KEY_CERT_SIGN("keyCertSign"),
@XmlEnumValue("crlSign")
CRL_SIGN("crlSign"),
@XmlEnumValue("encipherOnly")
ENCIPHER_ONLY("encipherOnly"),
@XmlEnumValue("decipherOnly")
DECIPHER_ONLY("decipherOnly");
private final String value;
KeyUsageEnum(String v) {
value = v;
}
public String value() {
return value;
}
public static KeyUsageEnum fromValue(String v) {
for (KeyUsageEnum c: KeyUsageEnum.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}