ff83c6bfce5b8b9493eae175726cb784f7a2cb86
[openflowjava.git] / simple-client / src / main / java / org / opendaylight / openflowjava / protocol / impl / clients / EventType.java
1
2 package org.opendaylight.openflowjava.protocol.impl.clients;
3
4 import javax.xml.bind.annotation.XmlEnum;
5 import javax.xml.bind.annotation.XmlEnumValue;
6 import javax.xml.bind.annotation.XmlType;
7
8
9 /**
10  * <p>Java class for eventType.
11  */
12 @XmlType(name = "eventType")
13 @XmlEnum
14 public enum EventType {
15
16     @XmlEnumValue("sleepEvent")
17     SLEEP_EVENT("sleepEvent"),
18     @XmlEnumValue("waitForMessageEvent")
19     WAIT_FOR_MESSAGE_EVENT("waitForMessageEvent"),
20     @XmlEnumValue("sendEvent")
21     SEND_EVENT("sendEvent");
22     private final String value;
23
24     EventType(String v) {
25         value = v;
26     }
27
28     public String value() {
29         return value;
30     }
31
32     public static EventType fromValue(String v) {
33         for (EventType c: EventType.values()) {
34             if (c.value.equals(v)) {
35                 return c;
36             }
37         }
38         throw new IllegalArgumentException(v);
39     }
40
41 }