Umesh Krishnaswamy | 9b5c59e | 2012-12-27 19:39:51 -0800 | [diff] [blame] | 1 | /** |
| 2 | * Autogenerated by Thrift Compiler (0.7.0) |
| 3 | * |
| 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING |
| 5 | */ |
| 6 | package net.floodlightcontroller.packetstreamer.thrift; |
| 7 | |
| 8 | |
| 9 | import java.util.Map; |
| 10 | import java.util.HashMap; |
| 11 | import org.apache.thrift.TEnum; |
| 12 | |
| 13 | /** |
| 14 | * OFMessage type |
| 15 | * |
| 16 | */ |
| 17 | @SuppressWarnings("all") public enum OFMessageType implements org.apache.thrift.TEnum { |
| 18 | HELLO(0), |
| 19 | ERROR(1), |
| 20 | ECHO_REQUEST(2), |
| 21 | ECHO_REPLY(3), |
| 22 | VENDOR(4), |
| 23 | FEATURES_REQUEST(5), |
| 24 | FEATURES_REPLY(6), |
| 25 | GET_CONFIG_REQUEST(7), |
| 26 | GET_CONFIG_REPLY(8), |
| 27 | SET_CONFIG(9), |
| 28 | PACKET_IN(10), |
| 29 | FLOW_REMOVED(11), |
| 30 | PORT_STATUS(12), |
| 31 | PACKET_OUT(13), |
| 32 | FLOW_MOD(14), |
| 33 | PORT_MOD(15), |
| 34 | STATS_REQUEST(16), |
| 35 | STATS_REPLY(17), |
| 36 | BARRIER_REQUEST(18), |
| 37 | BARRIER_REPLY(19); |
| 38 | |
| 39 | private final int value; |
| 40 | |
| 41 | private OFMessageType(int value) { |
| 42 | this.value = value; |
| 43 | } |
| 44 | |
| 45 | /** |
| 46 | * Get the integer value of this enum value, as defined in the Thrift IDL. |
| 47 | */ |
| 48 | public int getValue() { |
| 49 | return value; |
| 50 | } |
| 51 | |
| 52 | /** |
| 53 | * Find a the enum type by its integer value, as defined in the Thrift IDL. |
| 54 | * @return null if the value is not found. |
| 55 | */ |
| 56 | public static OFMessageType findByValue(int value) { |
| 57 | switch (value) { |
| 58 | case 0: |
| 59 | return HELLO; |
| 60 | case 1: |
| 61 | return ERROR; |
| 62 | case 2: |
| 63 | return ECHO_REQUEST; |
| 64 | case 3: |
| 65 | return ECHO_REPLY; |
| 66 | case 4: |
| 67 | return VENDOR; |
| 68 | case 5: |
| 69 | return FEATURES_REQUEST; |
| 70 | case 6: |
| 71 | return FEATURES_REPLY; |
| 72 | case 7: |
| 73 | return GET_CONFIG_REQUEST; |
| 74 | case 8: |
| 75 | return GET_CONFIG_REPLY; |
| 76 | case 9: |
| 77 | return SET_CONFIG; |
| 78 | case 10: |
| 79 | return PACKET_IN; |
| 80 | case 11: |
| 81 | return FLOW_REMOVED; |
| 82 | case 12: |
| 83 | return PORT_STATUS; |
| 84 | case 13: |
| 85 | return PACKET_OUT; |
| 86 | case 14: |
| 87 | return FLOW_MOD; |
| 88 | case 15: |
| 89 | return PORT_MOD; |
| 90 | case 16: |
| 91 | return STATS_REQUEST; |
| 92 | case 17: |
| 93 | return STATS_REPLY; |
| 94 | case 18: |
| 95 | return BARRIER_REQUEST; |
| 96 | case 19: |
| 97 | return BARRIER_REPLY; |
| 98 | default: |
| 99 | return null; |
| 100 | } |
| 101 | } |
| 102 | } |