View Javadoc

1   //
2   // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
3   // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
4   // Any modifications to this file will be lost upon recompilation of the source schema. 
5   // Generated on: 2013.02.13 at 08:27:16 PM CET 
6   //
7   
8   
9   package net.sf.snmpadaptor4j.core.mapping.jaxb;
10  
11  import javax.xml.bind.annotation.XmlEnum;
12  import javax.xml.bind.annotation.XmlEnumValue;
13  import javax.xml.bind.annotation.XmlType;
14  
15  
16  /**
17   * <p>Java class for GenericTrapCode.
18   * 
19   * <p>The following schema fragment specifies the expected content contained within this class.
20   * <p>
21   * <pre>
22   * &lt;simpleType name="GenericTrapCode">
23   *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
24   *     &lt;enumeration value="coldStart"/>
25   *     &lt;enumeration value="warmStart"/>
26   *     &lt;enumeration value="linkDown"/>
27   *     &lt;enumeration value="linkUp"/>
28   *     &lt;enumeration value="authenticationFailure"/>
29   *     &lt;enumeration value="egpNeighborLoss"/>
30   *   &lt;/restriction>
31   * &lt;/simpleType>
32   * </pre>
33   * 
34   */
35  @XmlType(name = "GenericTrapCode")
36  @XmlEnum
37  public enum GenericTrapCode {
38  
39      @XmlEnumValue("coldStart")
40      COLD_START("coldStart"),
41      @XmlEnumValue("warmStart")
42      WARM_START("warmStart"),
43      @XmlEnumValue("linkDown")
44      LINK_DOWN("linkDown"),
45      @XmlEnumValue("linkUp")
46      LINK_UP("linkUp"),
47      @XmlEnumValue("authenticationFailure")
48      AUTHENTICATION_FAILURE("authenticationFailure"),
49      @XmlEnumValue("egpNeighborLoss")
50      EGP_NEIGHBOR_LOSS("egpNeighborLoss");
51      private final String value;
52  
53      GenericTrapCode(String v) {
54          value = v;
55      }
56  
57      public String value() {
58          return value;
59      }
60  
61      public static GenericTrapCode fromValue(String v) {
62          for (GenericTrapCode c: GenericTrapCode.values()) {
63              if (c.value.equals(v)) {
64                  return c;
65              }
66          }
67          throw new IllegalArgumentException(v);
68      }
69  
70  }