From c121d65bb33a42c324b746f6dc5300aee68487dd Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 9 Jun 2015 18:57:14 +0200 Subject: Unified thrift definitions for master and satellite --- .../org/openslx/bwlp/thrift/iface/ShareMode.java | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/main/java/org/openslx/bwlp/thrift/iface/ShareMode.java (limited to 'src/main/java/org/openslx/bwlp/thrift/iface/ShareMode.java') diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ShareMode.java b/src/main/java/org/openslx/bwlp/thrift/iface/ShareMode.java new file mode 100644 index 0000000..668d513 --- /dev/null +++ b/src/main/java/org/openslx/bwlp/thrift/iface/ShareMode.java @@ -0,0 +1,48 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.openslx.bwlp.thrift.iface; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum ShareMode implements org.apache.thrift.TEnum { + LOCAL(0), + PUBLISH(1), + DOWNLOAD(2); + + private final int value; + + private ShareMode(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static ShareMode findByValue(int value) { + switch (value) { + case 0: + return LOCAL; + case 1: + return PUBLISH; + case 2: + return DOWNLOAD; + default: + return null; + } + } +} -- cgit v1.2.3-55-g7522