Integrate OpenFlowJava into OpenFlowPlugin build
[openflowplugin.git] / samples / simple-client / src / main / java / org / opendaylight / openflowjava / protocol / impl / clients / EventType.java
1 /*
2  * Copyright (c) 2017 Pantheon Technologies s.r.o. and others. All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.openflowjava.protocol.impl.clients;
9
10 import javax.xml.bind.annotation.XmlEnum;
11 import javax.xml.bind.annotation.XmlEnumValue;
12 import javax.xml.bind.annotation.XmlType;
13
14
15 /**
16  * <p>Java class for eventType.
17  */
18 @XmlType(name = "eventType")
19 @XmlEnum
20 public enum EventType {
21
22     @XmlEnumValue("sleepEvent")
23     SLEEP_EVENT("sleepEvent"),
24     @XmlEnumValue("waitForMessageEvent")
25     WAIT_FOR_MESSAGE_EVENT("waitForMessageEvent"),
26     @XmlEnumValue("sendEvent")
27     SEND_EVENT("sendEvent");
28     private final String value;
29
30     EventType(String v) {
31         value = v;
32     }
33
34     public String value() {
35         return value;
36     }
37
38     public static EventType fromValue(String v) {
39         for (EventType c: EventType.values()) {
40             if (c.value.equals(v)) {
41                 return c;
42             }
43         }
44         throw new IllegalArgumentException(v);
45     }
46
47 }