All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.xiaomi.infra.galaxy.sds.thrift.Value Maven / Gradle / Ivy

There is a newer version: 1.3.2
Show newest version
/**
 * Autogenerated by Thrift Compiler (0.9.2)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package com.xiaomi.infra.galaxy.sds.thrift;

import libthrift091.scheme.IScheme;
import libthrift091.scheme.SchemeFactory;
import libthrift091.scheme.StandardScheme;

import libthrift091.scheme.TupleScheme;
import libthrift091.protocol.TTupleProtocol;
import libthrift091.protocol.TProtocolException;
import libthrift091.EncodingUtils;
import libthrift091.TException;
import libthrift091.async.AsyncMethodCallback;
import libthrift091.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
/**
 * 数据值union类型
 */
public class Value extends libthrift091.TUnion {
  private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("Value");
  private static final libthrift091.protocol.TField BOOL_VALUE_FIELD_DESC = new libthrift091.protocol.TField("boolValue", libthrift091.protocol.TType.BOOL, (short)1);
  private static final libthrift091.protocol.TField INT8_VALUE_FIELD_DESC = new libthrift091.protocol.TField("int8Value", libthrift091.protocol.TType.BYTE, (short)2);
  private static final libthrift091.protocol.TField INT16_VALUE_FIELD_DESC = new libthrift091.protocol.TField("int16Value", libthrift091.protocol.TType.I16, (short)3);
  private static final libthrift091.protocol.TField INT32_VALUE_FIELD_DESC = new libthrift091.protocol.TField("int32Value", libthrift091.protocol.TType.I32, (short)4);
  private static final libthrift091.protocol.TField INT64_VALUE_FIELD_DESC = new libthrift091.protocol.TField("int64Value", libthrift091.protocol.TType.I64, (short)5);
  private static final libthrift091.protocol.TField DOUBLE_VALUE_FIELD_DESC = new libthrift091.protocol.TField("doubleValue", libthrift091.protocol.TType.DOUBLE, (short)6);
  private static final libthrift091.protocol.TField STRING_VALUE_FIELD_DESC = new libthrift091.protocol.TField("stringValue", libthrift091.protocol.TType.STRING, (short)7);
  private static final libthrift091.protocol.TField BINARY_VALUE_FIELD_DESC = new libthrift091.protocol.TField("binaryValue", libthrift091.protocol.TType.STRING, (short)8);
  private static final libthrift091.protocol.TField BOOL_SET_VALUE_FIELD_DESC = new libthrift091.protocol.TField("boolSetValue", libthrift091.protocol.TType.LIST, (short)9);
  private static final libthrift091.protocol.TField INT8_SET_VALUE_FIELD_DESC = new libthrift091.protocol.TField("int8SetValue", libthrift091.protocol.TType.LIST, (short)10);
  private static final libthrift091.protocol.TField INT16_SET_VALUE_FIELD_DESC = new libthrift091.protocol.TField("int16SetValue", libthrift091.protocol.TType.LIST, (short)11);
  private static final libthrift091.protocol.TField INT32_SET_VALUE_FIELD_DESC = new libthrift091.protocol.TField("int32SetValue", libthrift091.protocol.TType.LIST, (short)12);
  private static final libthrift091.protocol.TField INT64_SET_VALUE_FIELD_DESC = new libthrift091.protocol.TField("int64SetValue", libthrift091.protocol.TType.LIST, (short)13);
  private static final libthrift091.protocol.TField DOUBLE_SET_VALUE_FIELD_DESC = new libthrift091.protocol.TField("doubleSetValue", libthrift091.protocol.TType.LIST, (short)14);
  private static final libthrift091.protocol.TField STRING_SET_VALUE_FIELD_DESC = new libthrift091.protocol.TField("stringSetValue", libthrift091.protocol.TType.LIST, (short)15);
  private static final libthrift091.protocol.TField BINARY_SET_VALUE_FIELD_DESC = new libthrift091.protocol.TField("binarySetValue", libthrift091.protocol.TType.LIST, (short)16);
  private static final libthrift091.protocol.TField NULL_VALUE_FIELD_DESC = new libthrift091.protocol.TField("nullValue", libthrift091.protocol.TType.BOOL, (short)20);

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements libthrift091.TFieldIdEnum {
    BOOL_VALUE((short)1, "boolValue"),
    INT8_VALUE((short)2, "int8Value"),
    INT16_VALUE((short)3, "int16Value"),
    INT32_VALUE((short)4, "int32Value"),
    INT64_VALUE((short)5, "int64Value"),
    /**
     * 用于FLOAT/DOUBLE类型
     */
    DOUBLE_VALUE((short)6, "doubleValue"),
    STRING_VALUE((short)7, "stringValue"),
    /**
     * 用于BINARY/RAWBINARY类型
     */
    BINARY_VALUE((short)8, "binaryValue"),
    BOOL_SET_VALUE((short)9, "boolSetValue"),
    INT8_SET_VALUE((short)10, "int8SetValue"),
    INT16_SET_VALUE((short)11, "int16SetValue"),
    INT32_SET_VALUE((short)12, "int32SetValue"),
    INT64_SET_VALUE((short)13, "int64SetValue"),
    /**
     * 用于FLOAT/DOUBLE类型集合
     */
    DOUBLE_SET_VALUE((short)14, "doubleSetValue"),
    STRING_SET_VALUE((short)15, "stringSetValue"),
    BINARY_SET_VALUE((short)16, "binarySetValue"),
    /**
     * null,只用于RC_BASIC存储格式
     */
    NULL_VALUE((short)20, "nullValue");

    private static final Map byName = new HashMap();

    static {
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
        byName.put(field.getFieldName(), field);
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 1: // BOOL_VALUE
          return BOOL_VALUE;
        case 2: // INT8_VALUE
          return INT8_VALUE;
        case 3: // INT16_VALUE
          return INT16_VALUE;
        case 4: // INT32_VALUE
          return INT32_VALUE;
        case 5: // INT64_VALUE
          return INT64_VALUE;
        case 6: // DOUBLE_VALUE
          return DOUBLE_VALUE;
        case 7: // STRING_VALUE
          return STRING_VALUE;
        case 8: // BINARY_VALUE
          return BINARY_VALUE;
        case 9: // BOOL_SET_VALUE
          return BOOL_SET_VALUE;
        case 10: // INT8_SET_VALUE
          return INT8_SET_VALUE;
        case 11: // INT16_SET_VALUE
          return INT16_SET_VALUE;
        case 12: // INT32_SET_VALUE
          return INT32_SET_VALUE;
        case 13: // INT64_SET_VALUE
          return INT64_SET_VALUE;
        case 14: // DOUBLE_SET_VALUE
          return DOUBLE_SET_VALUE;
        case 15: // STRING_SET_VALUE
          return STRING_SET_VALUE;
        case 16: // BINARY_SET_VALUE
          return BINARY_SET_VALUE;
        case 20: // NULL_VALUE
          return NULL_VALUE;
        default:
          return null;
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, throwing an exception
     * if it is not found.
     */
    public static _Fields findByThriftIdOrThrow(int fieldId) {
      _Fields fields = findByThriftId(fieldId);
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
      return fields;
    }

    /**
     * Find the _Fields constant that matches name, or null if its not found.
     */
    public static _Fields findByName(String name) {
      return byName.get(name);
    }

    private final short _thriftId;
    private final String _fieldName;

    _Fields(short thriftId, String fieldName) {
      _thriftId = thriftId;
      _fieldName = fieldName;
    }

    public short getThriftFieldId() {
      return _thriftId;
    }

    public String getFieldName() {
      return _fieldName;
    }
  }

  public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
  static {
    Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.BOOL_VALUE, new libthrift091.meta_data.FieldMetaData("boolValue", libthrift091.TFieldRequirementType.OPTIONAL, 
        new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.BOOL)));
    tmpMap.put(_Fields.INT8_VALUE, new libthrift091.meta_data.FieldMetaData("int8Value", libthrift091.TFieldRequirementType.OPTIONAL, 
        new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.BYTE)));
    tmpMap.put(_Fields.INT16_VALUE, new libthrift091.meta_data.FieldMetaData("int16Value", libthrift091.TFieldRequirementType.OPTIONAL, 
        new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I16)));
    tmpMap.put(_Fields.INT32_VALUE, new libthrift091.meta_data.FieldMetaData("int32Value", libthrift091.TFieldRequirementType.OPTIONAL, 
        new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I32)));
    tmpMap.put(_Fields.INT64_VALUE, new libthrift091.meta_data.FieldMetaData("int64Value", libthrift091.TFieldRequirementType.OPTIONAL, 
        new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I64)));
    tmpMap.put(_Fields.DOUBLE_VALUE, new libthrift091.meta_data.FieldMetaData("doubleValue", libthrift091.TFieldRequirementType.OPTIONAL, 
        new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.STRING_VALUE, new libthrift091.meta_data.FieldMetaData("stringValue", libthrift091.TFieldRequirementType.OPTIONAL, 
        new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
    tmpMap.put(_Fields.BINARY_VALUE, new libthrift091.meta_data.FieldMetaData("binaryValue", libthrift091.TFieldRequirementType.OPTIONAL, 
        new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING        , true)));
    tmpMap.put(_Fields.BOOL_SET_VALUE, new libthrift091.meta_data.FieldMetaData("boolSetValue", libthrift091.TFieldRequirementType.OPTIONAL, 
        new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST, 
            new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.BOOL))));
    tmpMap.put(_Fields.INT8_SET_VALUE, new libthrift091.meta_data.FieldMetaData("int8SetValue", libthrift091.TFieldRequirementType.OPTIONAL, 
        new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST, 
            new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.BYTE))));
    tmpMap.put(_Fields.INT16_SET_VALUE, new libthrift091.meta_data.FieldMetaData("int16SetValue", libthrift091.TFieldRequirementType.OPTIONAL, 
        new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST, 
            new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I16))));
    tmpMap.put(_Fields.INT32_SET_VALUE, new libthrift091.meta_data.FieldMetaData("int32SetValue", libthrift091.TFieldRequirementType.OPTIONAL, 
        new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST, 
            new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I32))));
    tmpMap.put(_Fields.INT64_SET_VALUE, new libthrift091.meta_data.FieldMetaData("int64SetValue", libthrift091.TFieldRequirementType.OPTIONAL, 
        new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST, 
            new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I64))));
    tmpMap.put(_Fields.DOUBLE_SET_VALUE, new libthrift091.meta_data.FieldMetaData("doubleSetValue", libthrift091.TFieldRequirementType.OPTIONAL, 
        new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST, 
            new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.DOUBLE))));
    tmpMap.put(_Fields.STRING_SET_VALUE, new libthrift091.meta_data.FieldMetaData("stringSetValue", libthrift091.TFieldRequirementType.OPTIONAL, 
        new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST, 
            new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING))));
    tmpMap.put(_Fields.BINARY_SET_VALUE, new libthrift091.meta_data.FieldMetaData("binarySetValue", libthrift091.TFieldRequirementType.OPTIONAL, 
        new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST, 
            new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING            , true))));
    tmpMap.put(_Fields.NULL_VALUE, new libthrift091.meta_data.FieldMetaData("nullValue", libthrift091.TFieldRequirementType.OPTIONAL, 
        new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.BOOL)));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(Value.class, metaDataMap);
  }

  public Value() {
    super();
  }

  public Value(_Fields setField, Object value) {
    super(setField, value);
  }

  public Value(Value other) {
    super(other);
  }
  public Value deepCopy() {
    return new Value(this);
  }

  public static Value boolValue(boolean value) {
    Value x = new Value();
    x.setBoolValue(value);
    return x;
  }

  public static Value int8Value(byte value) {
    Value x = new Value();
    x.setInt8Value(value);
    return x;
  }

  public static Value int16Value(short value) {
    Value x = new Value();
    x.setInt16Value(value);
    return x;
  }

  public static Value int32Value(int value) {
    Value x = new Value();
    x.setInt32Value(value);
    return x;
  }

  public static Value int64Value(long value) {
    Value x = new Value();
    x.setInt64Value(value);
    return x;
  }

  public static Value doubleValue(double value) {
    Value x = new Value();
    x.setDoubleValue(value);
    return x;
  }

  public static Value stringValue(String value) {
    Value x = new Value();
    x.setStringValue(value);
    return x;
  }

  public static Value binaryValue(ByteBuffer value) {
    Value x = new Value();
    x.setBinaryValue(value);
    return x;
  }

  public static Value binaryValue(byte[] value) {
    Value x = new Value();
    x.setBinaryValue(ByteBuffer.wrap(Arrays.copyOf(value, value.length)));
    return x;
  }

  public static Value boolSetValue(List value) {
    Value x = new Value();
    x.setBoolSetValue(value);
    return x;
  }

  public static Value int8SetValue(List value) {
    Value x = new Value();
    x.setInt8SetValue(value);
    return x;
  }

  public static Value int16SetValue(List value) {
    Value x = new Value();
    x.setInt16SetValue(value);
    return x;
  }

  public static Value int32SetValue(List value) {
    Value x = new Value();
    x.setInt32SetValue(value);
    return x;
  }

  public static Value int64SetValue(List value) {
    Value x = new Value();
    x.setInt64SetValue(value);
    return x;
  }

  public static Value doubleSetValue(List value) {
    Value x = new Value();
    x.setDoubleSetValue(value);
    return x;
  }

  public static Value stringSetValue(List value) {
    Value x = new Value();
    x.setStringSetValue(value);
    return x;
  }

  public static Value binarySetValue(List value) {
    Value x = new Value();
    x.setBinarySetValue(value);
    return x;
  }

  public static Value nullValue(boolean value) {
    Value x = new Value();
    x.setNullValue(value);
    return x;
  }


  @Override
  protected void checkType(_Fields setField, Object value) throws ClassCastException {
    switch (setField) {
      case BOOL_VALUE:
        if (value instanceof Boolean) {
          break;
        }
        throw new ClassCastException("Was expecting value of type Boolean for field 'boolValue', but got " + value.getClass().getSimpleName());
      case INT8_VALUE:
        if (value instanceof Byte) {
          break;
        }
        throw new ClassCastException("Was expecting value of type Byte for field 'int8Value', but got " + value.getClass().getSimpleName());
      case INT16_VALUE:
        if (value instanceof Short) {
          break;
        }
        throw new ClassCastException("Was expecting value of type Short for field 'int16Value', but got " + value.getClass().getSimpleName());
      case INT32_VALUE:
        if (value instanceof Integer) {
          break;
        }
        throw new ClassCastException("Was expecting value of type Integer for field 'int32Value', but got " + value.getClass().getSimpleName());
      case INT64_VALUE:
        if (value instanceof Long) {
          break;
        }
        throw new ClassCastException("Was expecting value of type Long for field 'int64Value', but got " + value.getClass().getSimpleName());
      case DOUBLE_VALUE:
        if (value instanceof Double) {
          break;
        }
        throw new ClassCastException("Was expecting value of type Double for field 'doubleValue', but got " + value.getClass().getSimpleName());
      case STRING_VALUE:
        if (value instanceof String) {
          break;
        }
        throw new ClassCastException("Was expecting value of type String for field 'stringValue', but got " + value.getClass().getSimpleName());
      case BINARY_VALUE:
        if (value instanceof ByteBuffer) {
          break;
        }
        throw new ClassCastException("Was expecting value of type ByteBuffer for field 'binaryValue', but got " + value.getClass().getSimpleName());
      case BOOL_SET_VALUE:
        if (value instanceof List) {
          break;
        }
        throw new ClassCastException("Was expecting value of type List for field 'boolSetValue', but got " + value.getClass().getSimpleName());
      case INT8_SET_VALUE:
        if (value instanceof List) {
          break;
        }
        throw new ClassCastException("Was expecting value of type List for field 'int8SetValue', but got " + value.getClass().getSimpleName());
      case INT16_SET_VALUE:
        if (value instanceof List) {
          break;
        }
        throw new ClassCastException("Was expecting value of type List for field 'int16SetValue', but got " + value.getClass().getSimpleName());
      case INT32_SET_VALUE:
        if (value instanceof List) {
          break;
        }
        throw new ClassCastException("Was expecting value of type List for field 'int32SetValue', but got " + value.getClass().getSimpleName());
      case INT64_SET_VALUE:
        if (value instanceof List) {
          break;
        }
        throw new ClassCastException("Was expecting value of type List for field 'int64SetValue', but got " + value.getClass().getSimpleName());
      case DOUBLE_SET_VALUE:
        if (value instanceof List) {
          break;
        }
        throw new ClassCastException("Was expecting value of type List for field 'doubleSetValue', but got " + value.getClass().getSimpleName());
      case STRING_SET_VALUE:
        if (value instanceof List) {
          break;
        }
        throw new ClassCastException("Was expecting value of type List for field 'stringSetValue', but got " + value.getClass().getSimpleName());
      case BINARY_SET_VALUE:
        if (value instanceof List) {
          break;
        }
        throw new ClassCastException("Was expecting value of type List for field 'binarySetValue', but got " + value.getClass().getSimpleName());
      case NULL_VALUE:
        if (value instanceof Boolean) {
          break;
        }
        throw new ClassCastException("Was expecting value of type Boolean for field 'nullValue', but got " + value.getClass().getSimpleName());
      default:
        throw new IllegalArgumentException("Unknown field id " + setField);
    }
  }

  @Override
  protected Object standardSchemeReadValue(libthrift091.protocol.TProtocol iprot, libthrift091.protocol.TField field) throws libthrift091.TException {
    _Fields setField = _Fields.findByThriftId(field.id);
    if (setField != null) {
      switch (setField) {
        case BOOL_VALUE:
          if (field.type == BOOL_VALUE_FIELD_DESC.type) {
            Boolean boolValue;
            boolValue = iprot.readBool();
            return boolValue;
          } else {
            libthrift091.protocol.TProtocolUtil.skip(iprot, field.type);
            return null;
          }
        case INT8_VALUE:
          if (field.type == INT8_VALUE_FIELD_DESC.type) {
            Byte int8Value;
            int8Value = iprot.readByte();
            return int8Value;
          } else {
            libthrift091.protocol.TProtocolUtil.skip(iprot, field.type);
            return null;
          }
        case INT16_VALUE:
          if (field.type == INT16_VALUE_FIELD_DESC.type) {
            Short int16Value;
            int16Value = iprot.readI16();
            return int16Value;
          } else {
            libthrift091.protocol.TProtocolUtil.skip(iprot, field.type);
            return null;
          }
        case INT32_VALUE:
          if (field.type == INT32_VALUE_FIELD_DESC.type) {
            Integer int32Value;
            int32Value = iprot.readI32();
            return int32Value;
          } else {
            libthrift091.protocol.TProtocolUtil.skip(iprot, field.type);
            return null;
          }
        case INT64_VALUE:
          if (field.type == INT64_VALUE_FIELD_DESC.type) {
            Long int64Value;
            int64Value = iprot.readI64();
            return int64Value;
          } else {
            libthrift091.protocol.TProtocolUtil.skip(iprot, field.type);
            return null;
          }
        case DOUBLE_VALUE:
          if (field.type == DOUBLE_VALUE_FIELD_DESC.type) {
            Double doubleValue;
            doubleValue = iprot.readDouble();
            return doubleValue;
          } else {
            libthrift091.protocol.TProtocolUtil.skip(iprot, field.type);
            return null;
          }
        case STRING_VALUE:
          if (field.type == STRING_VALUE_FIELD_DESC.type) {
            String stringValue;
            stringValue = iprot.readString();
            return stringValue;
          } else {
            libthrift091.protocol.TProtocolUtil.skip(iprot, field.type);
            return null;
          }
        case BINARY_VALUE:
          if (field.type == BINARY_VALUE_FIELD_DESC.type) {
            ByteBuffer binaryValue;
            binaryValue = iprot.readBinary();
            return binaryValue;
          } else {
            libthrift091.protocol.TProtocolUtil.skip(iprot, field.type);
            return null;
          }
        case BOOL_SET_VALUE:
          if (field.type == BOOL_SET_VALUE_FIELD_DESC.type) {
            List boolSetValue;
            {
              libthrift091.protocol.TList _list0 = iprot.readListBegin();
              boolSetValue = new ArrayList(_list0.size);
              boolean _elem1;
              for (int _i2 = 0; _i2 < _list0.size; ++_i2)
              {
                _elem1 = iprot.readBool();
                boolSetValue.add(_elem1);
              }
              iprot.readListEnd();
            }
            return boolSetValue;
          } else {
            libthrift091.protocol.TProtocolUtil.skip(iprot, field.type);
            return null;
          }
        case INT8_SET_VALUE:
          if (field.type == INT8_SET_VALUE_FIELD_DESC.type) {
            List int8SetValue;
            {
              libthrift091.protocol.TList _list3 = iprot.readListBegin();
              int8SetValue = new ArrayList(_list3.size);
              byte _elem4;
              for (int _i5 = 0; _i5 < _list3.size; ++_i5)
              {
                _elem4 = iprot.readByte();
                int8SetValue.add(_elem4);
              }
              iprot.readListEnd();
            }
            return int8SetValue;
          } else {
            libthrift091.protocol.TProtocolUtil.skip(iprot, field.type);
            return null;
          }
        case INT16_SET_VALUE:
          if (field.type == INT16_SET_VALUE_FIELD_DESC.type) {
            List int16SetValue;
            {
              libthrift091.protocol.TList _list6 = iprot.readListBegin();
              int16SetValue = new ArrayList(_list6.size);
              short _elem7;
              for (int _i8 = 0; _i8 < _list6.size; ++_i8)
              {
                _elem7 = iprot.readI16();
                int16SetValue.add(_elem7);
              }
              iprot.readListEnd();
            }
            return int16SetValue;
          } else {
            libthrift091.protocol.TProtocolUtil.skip(iprot, field.type);
            return null;
          }
        case INT32_SET_VALUE:
          if (field.type == INT32_SET_VALUE_FIELD_DESC.type) {
            List int32SetValue;
            {
              libthrift091.protocol.TList _list9 = iprot.readListBegin();
              int32SetValue = new ArrayList(_list9.size);
              int _elem10;
              for (int _i11 = 0; _i11 < _list9.size; ++_i11)
              {
                _elem10 = iprot.readI32();
                int32SetValue.add(_elem10);
              }
              iprot.readListEnd();
            }
            return int32SetValue;
          } else {
            libthrift091.protocol.TProtocolUtil.skip(iprot, field.type);
            return null;
          }
        case INT64_SET_VALUE:
          if (field.type == INT64_SET_VALUE_FIELD_DESC.type) {
            List int64SetValue;
            {
              libthrift091.protocol.TList _list12 = iprot.readListBegin();
              int64SetValue = new ArrayList(_list12.size);
              long _elem13;
              for (int _i14 = 0; _i14 < _list12.size; ++_i14)
              {
                _elem13 = iprot.readI64();
                int64SetValue.add(_elem13);
              }
              iprot.readListEnd();
            }
            return int64SetValue;
          } else {
            libthrift091.protocol.TProtocolUtil.skip(iprot, field.type);
            return null;
          }
        case DOUBLE_SET_VALUE:
          if (field.type == DOUBLE_SET_VALUE_FIELD_DESC.type) {
            List doubleSetValue;
            {
              libthrift091.protocol.TList _list15 = iprot.readListBegin();
              doubleSetValue = new ArrayList(_list15.size);
              double _elem16;
              for (int _i17 = 0; _i17 < _list15.size; ++_i17)
              {
                _elem16 = iprot.readDouble();
                doubleSetValue.add(_elem16);
              }
              iprot.readListEnd();
            }
            return doubleSetValue;
          } else {
            libthrift091.protocol.TProtocolUtil.skip(iprot, field.type);
            return null;
          }
        case STRING_SET_VALUE:
          if (field.type == STRING_SET_VALUE_FIELD_DESC.type) {
            List stringSetValue;
            {
              libthrift091.protocol.TList _list18 = iprot.readListBegin();
              stringSetValue = new ArrayList(_list18.size);
              String _elem19;
              for (int _i20 = 0; _i20 < _list18.size; ++_i20)
              {
                _elem19 = iprot.readString();
                stringSetValue.add(_elem19);
              }
              iprot.readListEnd();
            }
            return stringSetValue;
          } else {
            libthrift091.protocol.TProtocolUtil.skip(iprot, field.type);
            return null;
          }
        case BINARY_SET_VALUE:
          if (field.type == BINARY_SET_VALUE_FIELD_DESC.type) {
            List binarySetValue;
            {
              libthrift091.protocol.TList _list21 = iprot.readListBegin();
              binarySetValue = new ArrayList(_list21.size);
              ByteBuffer _elem22;
              for (int _i23 = 0; _i23 < _list21.size; ++_i23)
              {
                _elem22 = iprot.readBinary();
                binarySetValue.add(_elem22);
              }
              iprot.readListEnd();
            }
            return binarySetValue;
          } else {
            libthrift091.protocol.TProtocolUtil.skip(iprot, field.type);
            return null;
          }
        case NULL_VALUE:
          if (field.type == NULL_VALUE_FIELD_DESC.type) {
            Boolean nullValue;
            nullValue = iprot.readBool();
            return nullValue;
          } else {
            libthrift091.protocol.TProtocolUtil.skip(iprot, field.type);
            return null;
          }
        default:
          throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
      }
    } else {
      libthrift091.protocol.TProtocolUtil.skip(iprot, field.type);
      return null;
    }
  }

  @Override
  protected void standardSchemeWriteValue(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
    switch (setField_) {
      case BOOL_VALUE:
        Boolean boolValue = (Boolean)value_;
        oprot.writeBool(boolValue);
        return;
      case INT8_VALUE:
        Byte int8Value = (Byte)value_;
        oprot.writeByte(int8Value);
        return;
      case INT16_VALUE:
        Short int16Value = (Short)value_;
        oprot.writeI16(int16Value);
        return;
      case INT32_VALUE:
        Integer int32Value = (Integer)value_;
        oprot.writeI32(int32Value);
        return;
      case INT64_VALUE:
        Long int64Value = (Long)value_;
        oprot.writeI64(int64Value);
        return;
      case DOUBLE_VALUE:
        Double doubleValue = (Double)value_;
        oprot.writeDouble(doubleValue);
        return;
      case STRING_VALUE:
        String stringValue = (String)value_;
        oprot.writeString(stringValue);
        return;
      case BINARY_VALUE:
        ByteBuffer binaryValue = (ByteBuffer)value_;
        oprot.writeBinary(binaryValue);
        return;
      case BOOL_SET_VALUE:
        List boolSetValue = (List)value_;
        {
          oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.BOOL, boolSetValue.size()));
          for (boolean _iter24 : boolSetValue)
          {
            oprot.writeBool(_iter24);
          }
          oprot.writeListEnd();
        }
        return;
      case INT8_SET_VALUE:
        List int8SetValue = (List)value_;
        {
          oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.BYTE, int8SetValue.size()));
          for (byte _iter25 : int8SetValue)
          {
            oprot.writeByte(_iter25);
          }
          oprot.writeListEnd();
        }
        return;
      case INT16_SET_VALUE:
        List int16SetValue = (List)value_;
        {
          oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.I16, int16SetValue.size()));
          for (short _iter26 : int16SetValue)
          {
            oprot.writeI16(_iter26);
          }
          oprot.writeListEnd();
        }
        return;
      case INT32_SET_VALUE:
        List int32SetValue = (List)value_;
        {
          oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.I32, int32SetValue.size()));
          for (int _iter27 : int32SetValue)
          {
            oprot.writeI32(_iter27);
          }
          oprot.writeListEnd();
        }
        return;
      case INT64_SET_VALUE:
        List int64SetValue = (List)value_;
        {
          oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.I64, int64SetValue.size()));
          for (long _iter28 : int64SetValue)
          {
            oprot.writeI64(_iter28);
          }
          oprot.writeListEnd();
        }
        return;
      case DOUBLE_SET_VALUE:
        List doubleSetValue = (List)value_;
        {
          oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.DOUBLE, doubleSetValue.size()));
          for (double _iter29 : doubleSetValue)
          {
            oprot.writeDouble(_iter29);
          }
          oprot.writeListEnd();
        }
        return;
      case STRING_SET_VALUE:
        List stringSetValue = (List)value_;
        {
          oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRING, stringSetValue.size()));
          for (String _iter30 : stringSetValue)
          {
            oprot.writeString(_iter30);
          }
          oprot.writeListEnd();
        }
        return;
      case BINARY_SET_VALUE:
        List binarySetValue = (List)value_;
        {
          oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRING, binarySetValue.size()));
          for (ByteBuffer _iter31 : binarySetValue)
          {
            oprot.writeBinary(_iter31);
          }
          oprot.writeListEnd();
        }
        return;
      case NULL_VALUE:
        Boolean nullValue = (Boolean)value_;
        oprot.writeBool(nullValue);
        return;
      default:
        throw new IllegalStateException("Cannot write union with unknown field " + setField_);
    }
  }

  @Override
  protected Object tupleSchemeReadValue(libthrift091.protocol.TProtocol iprot, short fieldID) throws libthrift091.TException {
    _Fields setField = _Fields.findByThriftId(fieldID);
    if (setField != null) {
      switch (setField) {
        case BOOL_VALUE:
          Boolean boolValue;
          boolValue = iprot.readBool();
          return boolValue;
        case INT8_VALUE:
          Byte int8Value;
          int8Value = iprot.readByte();
          return int8Value;
        case INT16_VALUE:
          Short int16Value;
          int16Value = iprot.readI16();
          return int16Value;
        case INT32_VALUE:
          Integer int32Value;
          int32Value = iprot.readI32();
          return int32Value;
        case INT64_VALUE:
          Long int64Value;
          int64Value = iprot.readI64();
          return int64Value;
        case DOUBLE_VALUE:
          Double doubleValue;
          doubleValue = iprot.readDouble();
          return doubleValue;
        case STRING_VALUE:
          String stringValue;
          stringValue = iprot.readString();
          return stringValue;
        case BINARY_VALUE:
          ByteBuffer binaryValue;
          binaryValue = iprot.readBinary();
          return binaryValue;
        case BOOL_SET_VALUE:
          List boolSetValue;
          {
            libthrift091.protocol.TList _list32 = iprot.readListBegin();
            boolSetValue = new ArrayList(_list32.size);
            boolean _elem33;
            for (int _i34 = 0; _i34 < _list32.size; ++_i34)
            {
              _elem33 = iprot.readBool();
              boolSetValue.add(_elem33);
            }
            iprot.readListEnd();
          }
          return boolSetValue;
        case INT8_SET_VALUE:
          List int8SetValue;
          {
            libthrift091.protocol.TList _list35 = iprot.readListBegin();
            int8SetValue = new ArrayList(_list35.size);
            byte _elem36;
            for (int _i37 = 0; _i37 < _list35.size; ++_i37)
            {
              _elem36 = iprot.readByte();
              int8SetValue.add(_elem36);
            }
            iprot.readListEnd();
          }
          return int8SetValue;
        case INT16_SET_VALUE:
          List int16SetValue;
          {
            libthrift091.protocol.TList _list38 = iprot.readListBegin();
            int16SetValue = new ArrayList(_list38.size);
            short _elem39;
            for (int _i40 = 0; _i40 < _list38.size; ++_i40)
            {
              _elem39 = iprot.readI16();
              int16SetValue.add(_elem39);
            }
            iprot.readListEnd();
          }
          return int16SetValue;
        case INT32_SET_VALUE:
          List int32SetValue;
          {
            libthrift091.protocol.TList _list41 = iprot.readListBegin();
            int32SetValue = new ArrayList(_list41.size);
            int _elem42;
            for (int _i43 = 0; _i43 < _list41.size; ++_i43)
            {
              _elem42 = iprot.readI32();
              int32SetValue.add(_elem42);
            }
            iprot.readListEnd();
          }
          return int32SetValue;
        case INT64_SET_VALUE:
          List int64SetValue;
          {
            libthrift091.protocol.TList _list44 = iprot.readListBegin();
            int64SetValue = new ArrayList(_list44.size);
            long _elem45;
            for (int _i46 = 0; _i46 < _list44.size; ++_i46)
            {
              _elem45 = iprot.readI64();
              int64SetValue.add(_elem45);
            }
            iprot.readListEnd();
          }
          return int64SetValue;
        case DOUBLE_SET_VALUE:
          List doubleSetValue;
          {
            libthrift091.protocol.TList _list47 = iprot.readListBegin();
            doubleSetValue = new ArrayList(_list47.size);
            double _elem48;
            for (int _i49 = 0; _i49 < _list47.size; ++_i49)
            {
              _elem48 = iprot.readDouble();
              doubleSetValue.add(_elem48);
            }
            iprot.readListEnd();
          }
          return doubleSetValue;
        case STRING_SET_VALUE:
          List stringSetValue;
          {
            libthrift091.protocol.TList _list50 = iprot.readListBegin();
            stringSetValue = new ArrayList(_list50.size);
            String _elem51;
            for (int _i52 = 0; _i52 < _list50.size; ++_i52)
            {
              _elem51 = iprot.readString();
              stringSetValue.add(_elem51);
            }
            iprot.readListEnd();
          }
          return stringSetValue;
        case BINARY_SET_VALUE:
          List binarySetValue;
          {
            libthrift091.protocol.TList _list53 = iprot.readListBegin();
            binarySetValue = new ArrayList(_list53.size);
            ByteBuffer _elem54;
            for (int _i55 = 0; _i55 < _list53.size; ++_i55)
            {
              _elem54 = iprot.readBinary();
              binarySetValue.add(_elem54);
            }
            iprot.readListEnd();
          }
          return binarySetValue;
        case NULL_VALUE:
          Boolean nullValue;
          nullValue = iprot.readBool();
          return nullValue;
        default:
          throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
      }
    } else {
      throw new TProtocolException("Couldn't find a field with field id " + fieldID);
    }
  }

  @Override
  protected void tupleSchemeWriteValue(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
    switch (setField_) {
      case BOOL_VALUE:
        Boolean boolValue = (Boolean)value_;
        oprot.writeBool(boolValue);
        return;
      case INT8_VALUE:
        Byte int8Value = (Byte)value_;
        oprot.writeByte(int8Value);
        return;
      case INT16_VALUE:
        Short int16Value = (Short)value_;
        oprot.writeI16(int16Value);
        return;
      case INT32_VALUE:
        Integer int32Value = (Integer)value_;
        oprot.writeI32(int32Value);
        return;
      case INT64_VALUE:
        Long int64Value = (Long)value_;
        oprot.writeI64(int64Value);
        return;
      case DOUBLE_VALUE:
        Double doubleValue = (Double)value_;
        oprot.writeDouble(doubleValue);
        return;
      case STRING_VALUE:
        String stringValue = (String)value_;
        oprot.writeString(stringValue);
        return;
      case BINARY_VALUE:
        ByteBuffer binaryValue = (ByteBuffer)value_;
        oprot.writeBinary(binaryValue);
        return;
      case BOOL_SET_VALUE:
        List boolSetValue = (List)value_;
        {
          oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.BOOL, boolSetValue.size()));
          for (boolean _iter56 : boolSetValue)
          {
            oprot.writeBool(_iter56);
          }
          oprot.writeListEnd();
        }
        return;
      case INT8_SET_VALUE:
        List int8SetValue = (List)value_;
        {
          oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.BYTE, int8SetValue.size()));
          for (byte _iter57 : int8SetValue)
          {
            oprot.writeByte(_iter57);
          }
          oprot.writeListEnd();
        }
        return;
      case INT16_SET_VALUE:
        List int16SetValue = (List)value_;
        {
          oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.I16, int16SetValue.size()));
          for (short _iter58 : int16SetValue)
          {
            oprot.writeI16(_iter58);
          }
          oprot.writeListEnd();
        }
        return;
      case INT32_SET_VALUE:
        List int32SetValue = (List)value_;
        {
          oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.I32, int32SetValue.size()));
          for (int _iter59 : int32SetValue)
          {
            oprot.writeI32(_iter59);
          }
          oprot.writeListEnd();
        }
        return;
      case INT64_SET_VALUE:
        List int64SetValue = (List)value_;
        {
          oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.I64, int64SetValue.size()));
          for (long _iter60 : int64SetValue)
          {
            oprot.writeI64(_iter60);
          }
          oprot.writeListEnd();
        }
        return;
      case DOUBLE_SET_VALUE:
        List doubleSetValue = (List)value_;
        {
          oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.DOUBLE, doubleSetValue.size()));
          for (double _iter61 : doubleSetValue)
          {
            oprot.writeDouble(_iter61);
          }
          oprot.writeListEnd();
        }
        return;
      case STRING_SET_VALUE:
        List stringSetValue = (List)value_;
        {
          oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRING, stringSetValue.size()));
          for (String _iter62 : stringSetValue)
          {
            oprot.writeString(_iter62);
          }
          oprot.writeListEnd();
        }
        return;
      case BINARY_SET_VALUE:
        List binarySetValue = (List)value_;
        {
          oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRING, binarySetValue.size()));
          for (ByteBuffer _iter63 : binarySetValue)
          {
            oprot.writeBinary(_iter63);
          }
          oprot.writeListEnd();
        }
        return;
      case NULL_VALUE:
        Boolean nullValue = (Boolean)value_;
        oprot.writeBool(nullValue);
        return;
      default:
        throw new IllegalStateException("Cannot write union with unknown field " + setField_);
    }
  }

  @Override
  protected libthrift091.protocol.TField getFieldDesc(_Fields setField) {
    switch (setField) {
      case BOOL_VALUE:
        return BOOL_VALUE_FIELD_DESC;
      case INT8_VALUE:
        return INT8_VALUE_FIELD_DESC;
      case INT16_VALUE:
        return INT16_VALUE_FIELD_DESC;
      case INT32_VALUE:
        return INT32_VALUE_FIELD_DESC;
      case INT64_VALUE:
        return INT64_VALUE_FIELD_DESC;
      case DOUBLE_VALUE:
        return DOUBLE_VALUE_FIELD_DESC;
      case STRING_VALUE:
        return STRING_VALUE_FIELD_DESC;
      case BINARY_VALUE:
        return BINARY_VALUE_FIELD_DESC;
      case BOOL_SET_VALUE:
        return BOOL_SET_VALUE_FIELD_DESC;
      case INT8_SET_VALUE:
        return INT8_SET_VALUE_FIELD_DESC;
      case INT16_SET_VALUE:
        return INT16_SET_VALUE_FIELD_DESC;
      case INT32_SET_VALUE:
        return INT32_SET_VALUE_FIELD_DESC;
      case INT64_SET_VALUE:
        return INT64_SET_VALUE_FIELD_DESC;
      case DOUBLE_SET_VALUE:
        return DOUBLE_SET_VALUE_FIELD_DESC;
      case STRING_SET_VALUE:
        return STRING_SET_VALUE_FIELD_DESC;
      case BINARY_SET_VALUE:
        return BINARY_SET_VALUE_FIELD_DESC;
      case NULL_VALUE:
        return NULL_VALUE_FIELD_DESC;
      default:
        throw new IllegalArgumentException("Unknown field id " + setField);
    }
  }

  @Override
  protected libthrift091.protocol.TStruct getStructDesc() {
    return STRUCT_DESC;
  }

  @Override
  protected _Fields enumForId(short id) {
    return _Fields.findByThriftIdOrThrow(id);
  }

  public _Fields fieldForId(int fieldId) {
    return _Fields.findByThriftId(fieldId);
  }


  public boolean getBoolValue() {
    if (getSetField() == _Fields.BOOL_VALUE) {
      return (Boolean)getFieldValue();
    } else {
      throw new RuntimeException("Cannot get field 'boolValue' because union is currently set to " + getFieldDesc(getSetField()).name);
    }
  }

  public void setBoolValue(boolean value) {
    setField_ = _Fields.BOOL_VALUE;
    value_ = value;
  }

  public byte getInt8Value() {
    if (getSetField() == _Fields.INT8_VALUE) {
      return (Byte)getFieldValue();
    } else {
      throw new RuntimeException("Cannot get field 'int8Value' because union is currently set to " + getFieldDesc(getSetField()).name);
    }
  }

  public void setInt8Value(byte value) {
    setField_ = _Fields.INT8_VALUE;
    value_ = value;
  }

  public short getInt16Value() {
    if (getSetField() == _Fields.INT16_VALUE) {
      return (Short)getFieldValue();
    } else {
      throw new RuntimeException("Cannot get field 'int16Value' because union is currently set to " + getFieldDesc(getSetField()).name);
    }
  }

  public void setInt16Value(short value) {
    setField_ = _Fields.INT16_VALUE;
    value_ = value;
  }

  public int getInt32Value() {
    if (getSetField() == _Fields.INT32_VALUE) {
      return (Integer)getFieldValue();
    } else {
      throw new RuntimeException("Cannot get field 'int32Value' because union is currently set to " + getFieldDesc(getSetField()).name);
    }
  }

  public void setInt32Value(int value) {
    setField_ = _Fields.INT32_VALUE;
    value_ = value;
  }

  public long getInt64Value() {
    if (getSetField() == _Fields.INT64_VALUE) {
      return (Long)getFieldValue();
    } else {
      throw new RuntimeException("Cannot get field 'int64Value' because union is currently set to " + getFieldDesc(getSetField()).name);
    }
  }

  public void setInt64Value(long value) {
    setField_ = _Fields.INT64_VALUE;
    value_ = value;
  }

  /**
   * 用于FLOAT/DOUBLE类型
   */
  public double getDoubleValue() {
    if (getSetField() == _Fields.DOUBLE_VALUE) {
      return (Double)getFieldValue();
    } else {
      throw new RuntimeException("Cannot get field 'doubleValue' because union is currently set to " + getFieldDesc(getSetField()).name);
    }
  }

  /**
   * 用于FLOAT/DOUBLE类型
   */
  public void setDoubleValue(double value) {
    setField_ = _Fields.DOUBLE_VALUE;
    value_ = value;
  }

  public String getStringValue() {
    if (getSetField() == _Fields.STRING_VALUE) {
      return (String)getFieldValue();
    } else {
      throw new RuntimeException("Cannot get field 'stringValue' because union is currently set to " + getFieldDesc(getSetField()).name);
    }
  }

  public void setStringValue(String value) {
    if (value == null) throw new NullPointerException();
    setField_ = _Fields.STRING_VALUE;
    value_ = value;
  }

  /**
   * 用于BINARY/RAWBINARY类型
   */
  public byte[] getBinaryValue() {
    setBinaryValue(libthrift091.TBaseHelper.rightSize(bufferForBinaryValue()));
    ByteBuffer b = bufferForBinaryValue();
    return b == null ? null : b.array();
  }

  public ByteBuffer bufferForBinaryValue() {
    if (getSetField() == _Fields.BINARY_VALUE) {
      return libthrift091.TBaseHelper.copyBinary((ByteBuffer)getFieldValue());
    } else {
      throw new RuntimeException("Cannot get field 'binaryValue' because union is currently set to " + getFieldDesc(getSetField()).name);
    }
  }

  /**
   * 用于BINARY/RAWBINARY类型
   */
  public void setBinaryValue(byte[] value) {
    setBinaryValue(ByteBuffer.wrap(Arrays.copyOf(value, value.length)));
  }

  public void setBinaryValue(ByteBuffer value) {
    if (value == null) throw new NullPointerException();
    setField_ = _Fields.BINARY_VALUE;
    value_ = value;
  }

  public List getBoolSetValue() {
    if (getSetField() == _Fields.BOOL_SET_VALUE) {
      return (List)getFieldValue();
    } else {
      throw new RuntimeException("Cannot get field 'boolSetValue' because union is currently set to " + getFieldDesc(getSetField()).name);
    }
  }

  public void setBoolSetValue(List value) {
    if (value == null) throw new NullPointerException();
    setField_ = _Fields.BOOL_SET_VALUE;
    value_ = value;
  }

  public List getInt8SetValue() {
    if (getSetField() == _Fields.INT8_SET_VALUE) {
      return (List)getFieldValue();
    } else {
      throw new RuntimeException("Cannot get field 'int8SetValue' because union is currently set to " + getFieldDesc(getSetField()).name);
    }
  }

  public void setInt8SetValue(List value) {
    if (value == null) throw new NullPointerException();
    setField_ = _Fields.INT8_SET_VALUE;
    value_ = value;
  }

  public List getInt16SetValue() {
    if (getSetField() == _Fields.INT16_SET_VALUE) {
      return (List)getFieldValue();
    } else {
      throw new RuntimeException("Cannot get field 'int16SetValue' because union is currently set to " + getFieldDesc(getSetField()).name);
    }
  }

  public void setInt16SetValue(List value) {
    if (value == null) throw new NullPointerException();
    setField_ = _Fields.INT16_SET_VALUE;
    value_ = value;
  }

  public List getInt32SetValue() {
    if (getSetField() == _Fields.INT32_SET_VALUE) {
      return (List)getFieldValue();
    } else {
      throw new RuntimeException("Cannot get field 'int32SetValue' because union is currently set to " + getFieldDesc(getSetField()).name);
    }
  }

  public void setInt32SetValue(List value) {
    if (value == null) throw new NullPointerException();
    setField_ = _Fields.INT32_SET_VALUE;
    value_ = value;
  }

  public List getInt64SetValue() {
    if (getSetField() == _Fields.INT64_SET_VALUE) {
      return (List)getFieldValue();
    } else {
      throw new RuntimeException("Cannot get field 'int64SetValue' because union is currently set to " + getFieldDesc(getSetField()).name);
    }
  }

  public void setInt64SetValue(List value) {
    if (value == null) throw new NullPointerException();
    setField_ = _Fields.INT64_SET_VALUE;
    value_ = value;
  }

  /**
   * 用于FLOAT/DOUBLE类型集合
   */
  public List getDoubleSetValue() {
    if (getSetField() == _Fields.DOUBLE_SET_VALUE) {
      return (List)getFieldValue();
    } else {
      throw new RuntimeException("Cannot get field 'doubleSetValue' because union is currently set to " + getFieldDesc(getSetField()).name);
    }
  }

  /**
   * 用于FLOAT/DOUBLE类型集合
   */
  public void setDoubleSetValue(List value) {
    if (value == null) throw new NullPointerException();
    setField_ = _Fields.DOUBLE_SET_VALUE;
    value_ = value;
  }

  public List getStringSetValue() {
    if (getSetField() == _Fields.STRING_SET_VALUE) {
      return (List)getFieldValue();
    } else {
      throw new RuntimeException("Cannot get field 'stringSetValue' because union is currently set to " + getFieldDesc(getSetField()).name);
    }
  }

  public void setStringSetValue(List value) {
    if (value == null) throw new NullPointerException();
    setField_ = _Fields.STRING_SET_VALUE;
    value_ = value;
  }

  public List getBinarySetValue() {
    if (getSetField() == _Fields.BINARY_SET_VALUE) {
      return (List)getFieldValue();
    } else {
      throw new RuntimeException("Cannot get field 'binarySetValue' because union is currently set to " + getFieldDesc(getSetField()).name);
    }
  }

  public void setBinarySetValue(List value) {
    if (value == null) throw new NullPointerException();
    setField_ = _Fields.BINARY_SET_VALUE;
    value_ = value;
  }

  /**
   * null,只用于RC_BASIC存储格式
   */
  public boolean getNullValue() {
    if (getSetField() == _Fields.NULL_VALUE) {
      return (Boolean)getFieldValue();
    } else {
      throw new RuntimeException("Cannot get field 'nullValue' because union is currently set to " + getFieldDesc(getSetField()).name);
    }
  }

  /**
   * null,只用于RC_BASIC存储格式
   */
  public void setNullValue(boolean value) {
    setField_ = _Fields.NULL_VALUE;
    value_ = value;
  }

  public boolean isSetBoolValue() {
    return setField_ == _Fields.BOOL_VALUE;
  }


  public boolean isSetInt8Value() {
    return setField_ == _Fields.INT8_VALUE;
  }


  public boolean isSetInt16Value() {
    return setField_ == _Fields.INT16_VALUE;
  }


  public boolean isSetInt32Value() {
    return setField_ == _Fields.INT32_VALUE;
  }


  public boolean isSetInt64Value() {
    return setField_ == _Fields.INT64_VALUE;
  }


  public boolean isSetDoubleValue() {
    return setField_ == _Fields.DOUBLE_VALUE;
  }


  public boolean isSetStringValue() {
    return setField_ == _Fields.STRING_VALUE;
  }


  public boolean isSetBinaryValue() {
    return setField_ == _Fields.BINARY_VALUE;
  }


  public boolean isSetBoolSetValue() {
    return setField_ == _Fields.BOOL_SET_VALUE;
  }


  public boolean isSetInt8SetValue() {
    return setField_ == _Fields.INT8_SET_VALUE;
  }


  public boolean isSetInt16SetValue() {
    return setField_ == _Fields.INT16_SET_VALUE;
  }


  public boolean isSetInt32SetValue() {
    return setField_ == _Fields.INT32_SET_VALUE;
  }


  public boolean isSetInt64SetValue() {
    return setField_ == _Fields.INT64_SET_VALUE;
  }


  public boolean isSetDoubleSetValue() {
    return setField_ == _Fields.DOUBLE_SET_VALUE;
  }


  public boolean isSetStringSetValue() {
    return setField_ == _Fields.STRING_SET_VALUE;
  }


  public boolean isSetBinarySetValue() {
    return setField_ == _Fields.BINARY_SET_VALUE;
  }


  public boolean isSetNullValue() {
    return setField_ == _Fields.NULL_VALUE;
  }


  public boolean equals(Object other) {
    if (other instanceof Value) {
      return equals((Value)other);
    } else {
      return false;
    }
  }

  public boolean equals(Value other) {
    return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue());
  }

  @Override
  public int compareTo(Value other) {
    int lastComparison = libthrift091.TBaseHelper.compareTo(getSetField(), other.getSetField());
    if (lastComparison == 0) {
      return libthrift091.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue());
    }
    return lastComparison;
  }


  @Override
  public int hashCode() {
    List list = new ArrayList();
    list.add(this.getClass().getName());
    libthrift091.TFieldIdEnum setField = getSetField();
    if (setField != null) {
      list.add(setField.getThriftFieldId());
      Object value = getFieldValue();
      if (value instanceof libthrift091.TEnum) {
        list.add(((libthrift091.TEnum)getFieldValue()).getValue());
      } else {
        list.add(value);
      }
    }
    return list.hashCode();
  }
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
    try {
      write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
    } catch (libthrift091.TException te) {
      throw new java.io.IOException(te);
    }
  }


  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
    try {
      read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
    } catch (libthrift091.TException te) {
      throw new java.io.IOException(te);
    }
  }


}