Subversion Repositories SmartDukaan

Rev

Rev 6000 | Rev 6048 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

/**
 * Autogenerated by Thrift Compiler (0.7.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 */
package in.shop2020.model.v1.order;

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 org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class RechargeOrder implements org.apache.thrift.TBase<RechargeOrder, RechargeOrder._Fields>, java.io.Serializable, Cloneable {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RechargeOrder");

  private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
  private static final org.apache.thrift.protocol.TField DISPLAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("displayId", org.apache.thrift.protocol.TType.STRING, (short)2);
  private static final org.apache.thrift.protocol.TField TOTAL_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("totalAmount", org.apache.thrift.protocol.TType.I64, (short)3);
  private static final org.apache.thrift.protocol.TField WALLET_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("walletAmount", org.apache.thrift.protocol.TType.I64, (short)4);
  private static final org.apache.thrift.protocol.TField TRANSACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionId", org.apache.thrift.protocol.TType.I64, (short)5);
  private static final org.apache.thrift.protocol.TField INVOICE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("invoiceNumber", org.apache.thrift.protocol.TType.STRING, (short)6);
  private static final org.apache.thrift.protocol.TField ORDER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("orderType", org.apache.thrift.protocol.TType.I32, (short)7);
  private static final org.apache.thrift.protocol.TField OPERATOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("operatorId", org.apache.thrift.protocol.TType.I64, (short)8);
  private static final org.apache.thrift.protocol.TField RECHARGE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("rechargeType", org.apache.thrift.protocol.TType.I32, (short)9);
  private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.I32, (short)10);
  private static final org.apache.thrift.protocol.TField DEVICE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("deviceNumber", org.apache.thrift.protocol.TType.STRING, (short)11);
  private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)12);
  private static final org.apache.thrift.protocol.TField USER_EMAIL_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userEmailId", org.apache.thrift.protocol.TType.STRING, (short)13);
  private static final org.apache.thrift.protocol.TField CREATION_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTimestamp", org.apache.thrift.protocol.TType.I64, (short)14);

  private long id; // required
  private String displayId; // required
  private long totalAmount; // required
  private long walletAmount; // required
  private long transactionId; // required
  private String invoiceNumber; // required
  private OrderType orderType; // required
  private long operatorId; // required
  private RechargeType rechargeType; // required
  private RechargeOrderStatus status; // required
  private String deviceNumber; // required
  private long userId; // required
  private String userEmailId; // required
  private long creationTimestamp; // required

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    ID((short)1, "id"),
    DISPLAY_ID((short)2, "displayId"),
    TOTAL_AMOUNT((short)3, "totalAmount"),
    WALLET_AMOUNT((short)4, "walletAmount"),
    TRANSACTION_ID((short)5, "transactionId"),
    INVOICE_NUMBER((short)6, "invoiceNumber"),
    /**
     * 
     * @see OrderType
     */
    ORDER_TYPE((short)7, "orderType"),
    OPERATOR_ID((short)8, "operatorId"),
    /**
     * 
     * @see RechargeType
     */
    RECHARGE_TYPE((short)9, "rechargeType"),
    /**
     * 
     * @see RechargeOrderStatus
     */
    STATUS((short)10, "status"),
    DEVICE_NUMBER((short)11, "deviceNumber"),
    USER_ID((short)12, "userId"),
    USER_EMAIL_ID((short)13, "userEmailId"),
    CREATION_TIMESTAMP((short)14, "creationTimestamp");

    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

    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: // ID
          return ID;
        case 2: // DISPLAY_ID
          return DISPLAY_ID;
        case 3: // TOTAL_AMOUNT
          return TOTAL_AMOUNT;
        case 4: // WALLET_AMOUNT
          return WALLET_AMOUNT;
        case 5: // TRANSACTION_ID
          return TRANSACTION_ID;
        case 6: // INVOICE_NUMBER
          return INVOICE_NUMBER;
        case 7: // ORDER_TYPE
          return ORDER_TYPE;
        case 8: // OPERATOR_ID
          return OPERATOR_ID;
        case 9: // RECHARGE_TYPE
          return RECHARGE_TYPE;
        case 10: // STATUS
          return STATUS;
        case 11: // DEVICE_NUMBER
          return DEVICE_NUMBER;
        case 12: // USER_ID
          return USER_ID;
        case 13: // USER_EMAIL_ID
          return USER_EMAIL_ID;
        case 14: // CREATION_TIMESTAMP
          return CREATION_TIMESTAMP;
        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;
    }
  }

  // isset id assignments
  private static final int __ID_ISSET_ID = 0;
  private static final int __TOTALAMOUNT_ISSET_ID = 1;
  private static final int __WALLETAMOUNT_ISSET_ID = 2;
  private static final int __TRANSACTIONID_ISSET_ID = 3;
  private static final int __OPERATORID_ISSET_ID = 4;
  private static final int __USERID_ISSET_ID = 5;
  private static final int __CREATIONTIMESTAMP_ISSET_ID = 6;
  private BitSet __isset_bit_vector = new BitSet(7);

  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.DISPLAY_ID, new org.apache.thrift.meta_data.FieldMetaData("displayId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.TOTAL_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("totalAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.WALLET_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("walletAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.TRANSACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.ORDER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("orderType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, OrderType.class)));
    tmpMap.put(_Fields.OPERATOR_ID, new org.apache.thrift.meta_data.FieldMetaData("operatorId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.RECHARGE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("rechargeType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, RechargeType.class)));
    tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, RechargeOrderStatus.class)));
    tmpMap.put(_Fields.DEVICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("deviceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.USER_EMAIL_ID, new org.apache.thrift.meta_data.FieldMetaData("userEmailId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.CREATION_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("creationTimestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RechargeOrder.class, metaDataMap);
  }

  public RechargeOrder() {
  }

  public RechargeOrder(
    long id,
    String displayId,
    long totalAmount,
    long walletAmount,
    long transactionId,
    String invoiceNumber,
    OrderType orderType,
    long operatorId,
    RechargeType rechargeType,
    RechargeOrderStatus status,
    String deviceNumber,
    long userId,
    String userEmailId,
    long creationTimestamp)
  {
    this();
    this.id = id;
    setIdIsSet(true);
    this.displayId = displayId;
    this.totalAmount = totalAmount;
    setTotalAmountIsSet(true);
    this.walletAmount = walletAmount;
    setWalletAmountIsSet(true);
    this.transactionId = transactionId;
    setTransactionIdIsSet(true);
    this.invoiceNumber = invoiceNumber;
    this.orderType = orderType;
    this.operatorId = operatorId;
    setOperatorIdIsSet(true);
    this.rechargeType = rechargeType;
    this.status = status;
    this.deviceNumber = deviceNumber;
    this.userId = userId;
    setUserIdIsSet(true);
    this.userEmailId = userEmailId;
    this.creationTimestamp = creationTimestamp;
    setCreationTimestampIsSet(true);
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public RechargeOrder(RechargeOrder other) {
    __isset_bit_vector.clear();
    __isset_bit_vector.or(other.__isset_bit_vector);
    this.id = other.id;
    if (other.isSetDisplayId()) {
      this.displayId = other.displayId;
    }
    this.totalAmount = other.totalAmount;
    this.walletAmount = other.walletAmount;
    this.transactionId = other.transactionId;
    if (other.isSetInvoiceNumber()) {
      this.invoiceNumber = other.invoiceNumber;
    }
    if (other.isSetOrderType()) {
      this.orderType = other.orderType;
    }
    this.operatorId = other.operatorId;
    if (other.isSetRechargeType()) {
      this.rechargeType = other.rechargeType;
    }
    if (other.isSetStatus()) {
      this.status = other.status;
    }
    if (other.isSetDeviceNumber()) {
      this.deviceNumber = other.deviceNumber;
    }
    this.userId = other.userId;
    if (other.isSetUserEmailId()) {
      this.userEmailId = other.userEmailId;
    }
    this.creationTimestamp = other.creationTimestamp;
  }

  public RechargeOrder deepCopy() {
    return new RechargeOrder(this);
  }

  @Override
  public void clear() {
    setIdIsSet(false);
    this.id = 0;
    this.displayId = null;
    setTotalAmountIsSet(false);
    this.totalAmount = 0;
    setWalletAmountIsSet(false);
    this.walletAmount = 0;
    setTransactionIdIsSet(false);
    this.transactionId = 0;
    this.invoiceNumber = null;
    this.orderType = null;
    setOperatorIdIsSet(false);
    this.operatorId = 0;
    this.rechargeType = null;
    this.status = null;
    this.deviceNumber = null;
    setUserIdIsSet(false);
    this.userId = 0;
    this.userEmailId = null;
    setCreationTimestampIsSet(false);
    this.creationTimestamp = 0;
  }

  public long getId() {
    return this.id;
  }

  public void setId(long id) {
    this.id = id;
    setIdIsSet(true);
  }

  public void unsetId() {
    __isset_bit_vector.clear(__ID_ISSET_ID);
  }

  /** Returns true if field id is set (has been assigned a value) and false otherwise */
  public boolean isSetId() {
    return __isset_bit_vector.get(__ID_ISSET_ID);
  }

  public void setIdIsSet(boolean value) {
    __isset_bit_vector.set(__ID_ISSET_ID, value);
  }

  public String getDisplayId() {
    return this.displayId;
  }

  public void setDisplayId(String displayId) {
    this.displayId = displayId;
  }

  public void unsetDisplayId() {
    this.displayId = null;
  }

  /** Returns true if field displayId is set (has been assigned a value) and false otherwise */
  public boolean isSetDisplayId() {
    return this.displayId != null;
  }

  public void setDisplayIdIsSet(boolean value) {
    if (!value) {
      this.displayId = null;
    }
  }

  public long getTotalAmount() {
    return this.totalAmount;
  }

  public void setTotalAmount(long totalAmount) {
    this.totalAmount = totalAmount;
    setTotalAmountIsSet(true);
  }

  public void unsetTotalAmount() {
    __isset_bit_vector.clear(__TOTALAMOUNT_ISSET_ID);
  }

  /** Returns true if field totalAmount is set (has been assigned a value) and false otherwise */
  public boolean isSetTotalAmount() {
    return __isset_bit_vector.get(__TOTALAMOUNT_ISSET_ID);
  }

  public void setTotalAmountIsSet(boolean value) {
    __isset_bit_vector.set(__TOTALAMOUNT_ISSET_ID, value);
  }

  public long getWalletAmount() {
    return this.walletAmount;
  }

  public void setWalletAmount(long walletAmount) {
    this.walletAmount = walletAmount;
    setWalletAmountIsSet(true);
  }

  public void unsetWalletAmount() {
    __isset_bit_vector.clear(__WALLETAMOUNT_ISSET_ID);
  }

  /** Returns true if field walletAmount is set (has been assigned a value) and false otherwise */
  public boolean isSetWalletAmount() {
    return __isset_bit_vector.get(__WALLETAMOUNT_ISSET_ID);
  }

  public void setWalletAmountIsSet(boolean value) {
    __isset_bit_vector.set(__WALLETAMOUNT_ISSET_ID, value);
  }

  public long getTransactionId() {
    return this.transactionId;
  }

  public void setTransactionId(long transactionId) {
    this.transactionId = transactionId;
    setTransactionIdIsSet(true);
  }

  public void unsetTransactionId() {
    __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
  }

  /** Returns true if field transactionId is set (has been assigned a value) and false otherwise */
  public boolean isSetTransactionId() {
    return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
  }

  public void setTransactionIdIsSet(boolean value) {
    __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
  }

  public String getInvoiceNumber() {
    return this.invoiceNumber;
  }

  public void setInvoiceNumber(String invoiceNumber) {
    this.invoiceNumber = invoiceNumber;
  }

  public void unsetInvoiceNumber() {
    this.invoiceNumber = null;
  }

  /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
  public boolean isSetInvoiceNumber() {
    return this.invoiceNumber != null;
  }

  public void setInvoiceNumberIsSet(boolean value) {
    if (!value) {
      this.invoiceNumber = null;
    }
  }

  /**
   * 
   * @see OrderType
   */
  public OrderType getOrderType() {
    return this.orderType;
  }

  /**
   * 
   * @see OrderType
   */
  public void setOrderType(OrderType orderType) {
    this.orderType = orderType;
  }

  public void unsetOrderType() {
    this.orderType = null;
  }

  /** Returns true if field orderType is set (has been assigned a value) and false otherwise */
  public boolean isSetOrderType() {
    return this.orderType != null;
  }

  public void setOrderTypeIsSet(boolean value) {
    if (!value) {
      this.orderType = null;
    }
  }

  public long getOperatorId() {
    return this.operatorId;
  }

  public void setOperatorId(long operatorId) {
    this.operatorId = operatorId;
    setOperatorIdIsSet(true);
  }

  public void unsetOperatorId() {
    __isset_bit_vector.clear(__OPERATORID_ISSET_ID);
  }

  /** Returns true if field operatorId is set (has been assigned a value) and false otherwise */
  public boolean isSetOperatorId() {
    return __isset_bit_vector.get(__OPERATORID_ISSET_ID);
  }

  public void setOperatorIdIsSet(boolean value) {
    __isset_bit_vector.set(__OPERATORID_ISSET_ID, value);
  }

  /**
   * 
   * @see RechargeType
   */
  public RechargeType getRechargeType() {
    return this.rechargeType;
  }

  /**
   * 
   * @see RechargeType
   */
  public void setRechargeType(RechargeType rechargeType) {
    this.rechargeType = rechargeType;
  }

  public void unsetRechargeType() {
    this.rechargeType = null;
  }

  /** Returns true if field rechargeType is set (has been assigned a value) and false otherwise */
  public boolean isSetRechargeType() {
    return this.rechargeType != null;
  }

  public void setRechargeTypeIsSet(boolean value) {
    if (!value) {
      this.rechargeType = null;
    }
  }

  /**
   * 
   * @see RechargeOrderStatus
   */
  public RechargeOrderStatus getStatus() {
    return this.status;
  }

  /**
   * 
   * @see RechargeOrderStatus
   */
  public void setStatus(RechargeOrderStatus status) {
    this.status = status;
  }

  public void unsetStatus() {
    this.status = null;
  }

  /** Returns true if field status is set (has been assigned a value) and false otherwise */
  public boolean isSetStatus() {
    return this.status != null;
  }

  public void setStatusIsSet(boolean value) {
    if (!value) {
      this.status = null;
    }
  }

  public String getDeviceNumber() {
    return this.deviceNumber;
  }

  public void setDeviceNumber(String deviceNumber) {
    this.deviceNumber = deviceNumber;
  }

  public void unsetDeviceNumber() {
    this.deviceNumber = null;
  }

  /** Returns true if field deviceNumber is set (has been assigned a value) and false otherwise */
  public boolean isSetDeviceNumber() {
    return this.deviceNumber != null;
  }

  public void setDeviceNumberIsSet(boolean value) {
    if (!value) {
      this.deviceNumber = null;
    }
  }

  public long getUserId() {
    return this.userId;
  }

  public void setUserId(long userId) {
    this.userId = userId;
    setUserIdIsSet(true);
  }

  public void unsetUserId() {
    __isset_bit_vector.clear(__USERID_ISSET_ID);
  }

  /** Returns true if field userId is set (has been assigned a value) and false otherwise */
  public boolean isSetUserId() {
    return __isset_bit_vector.get(__USERID_ISSET_ID);
  }

  public void setUserIdIsSet(boolean value) {
    __isset_bit_vector.set(__USERID_ISSET_ID, value);
  }

  public String getUserEmailId() {
    return this.userEmailId;
  }

  public void setUserEmailId(String userEmailId) {
    this.userEmailId = userEmailId;
  }

  public void unsetUserEmailId() {
    this.userEmailId = null;
  }

  /** Returns true if field userEmailId is set (has been assigned a value) and false otherwise */
  public boolean isSetUserEmailId() {
    return this.userEmailId != null;
  }

  public void setUserEmailIdIsSet(boolean value) {
    if (!value) {
      this.userEmailId = null;
    }
  }

  public long getCreationTimestamp() {
    return this.creationTimestamp;
  }

  public void setCreationTimestamp(long creationTimestamp) {
    this.creationTimestamp = creationTimestamp;
    setCreationTimestampIsSet(true);
  }

  public void unsetCreationTimestamp() {
    __isset_bit_vector.clear(__CREATIONTIMESTAMP_ISSET_ID);
  }

  /** Returns true if field creationTimestamp is set (has been assigned a value) and false otherwise */
  public boolean isSetCreationTimestamp() {
    return __isset_bit_vector.get(__CREATIONTIMESTAMP_ISSET_ID);
  }

  public void setCreationTimestampIsSet(boolean value) {
    __isset_bit_vector.set(__CREATIONTIMESTAMP_ISSET_ID, value);
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case ID:
      if (value == null) {
        unsetId();
      } else {
        setId((Long)value);
      }
      break;

    case DISPLAY_ID:
      if (value == null) {
        unsetDisplayId();
      } else {
        setDisplayId((String)value);
      }
      break;

    case TOTAL_AMOUNT:
      if (value == null) {
        unsetTotalAmount();
      } else {
        setTotalAmount((Long)value);
      }
      break;

    case WALLET_AMOUNT:
      if (value == null) {
        unsetWalletAmount();
      } else {
        setWalletAmount((Long)value);
      }
      break;

    case TRANSACTION_ID:
      if (value == null) {
        unsetTransactionId();
      } else {
        setTransactionId((Long)value);
      }
      break;

    case INVOICE_NUMBER:
      if (value == null) {
        unsetInvoiceNumber();
      } else {
        setInvoiceNumber((String)value);
      }
      break;

    case ORDER_TYPE:
      if (value == null) {
        unsetOrderType();
      } else {
        setOrderType((OrderType)value);
      }
      break;

    case OPERATOR_ID:
      if (value == null) {
        unsetOperatorId();
      } else {
        setOperatorId((Long)value);
      }
      break;

    case RECHARGE_TYPE:
      if (value == null) {
        unsetRechargeType();
      } else {
        setRechargeType((RechargeType)value);
      }
      break;

    case STATUS:
      if (value == null) {
        unsetStatus();
      } else {
        setStatus((RechargeOrderStatus)value);
      }
      break;

    case DEVICE_NUMBER:
      if (value == null) {
        unsetDeviceNumber();
      } else {
        setDeviceNumber((String)value);
      }
      break;

    case USER_ID:
      if (value == null) {
        unsetUserId();
      } else {
        setUserId((Long)value);
      }
      break;

    case USER_EMAIL_ID:
      if (value == null) {
        unsetUserEmailId();
      } else {
        setUserEmailId((String)value);
      }
      break;

    case CREATION_TIMESTAMP:
      if (value == null) {
        unsetCreationTimestamp();
      } else {
        setCreationTimestamp((Long)value);
      }
      break;

    }
  }

  public Object getFieldValue(_Fields field) {
    switch (field) {
    case ID:
      return Long.valueOf(getId());

    case DISPLAY_ID:
      return getDisplayId();

    case TOTAL_AMOUNT:
      return Long.valueOf(getTotalAmount());

    case WALLET_AMOUNT:
      return Long.valueOf(getWalletAmount());

    case TRANSACTION_ID:
      return Long.valueOf(getTransactionId());

    case INVOICE_NUMBER:
      return getInvoiceNumber();

    case ORDER_TYPE:
      return getOrderType();

    case OPERATOR_ID:
      return Long.valueOf(getOperatorId());

    case RECHARGE_TYPE:
      return getRechargeType();

    case STATUS:
      return getStatus();

    case DEVICE_NUMBER:
      return getDeviceNumber();

    case USER_ID:
      return Long.valueOf(getUserId());

    case USER_EMAIL_ID:
      return getUserEmailId();

    case CREATION_TIMESTAMP:
      return Long.valueOf(getCreationTimestamp());

    }
    throw new IllegalStateException();
  }

  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
  public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case ID:
      return isSetId();
    case DISPLAY_ID:
      return isSetDisplayId();
    case TOTAL_AMOUNT:
      return isSetTotalAmount();
    case WALLET_AMOUNT:
      return isSetWalletAmount();
    case TRANSACTION_ID:
      return isSetTransactionId();
    case INVOICE_NUMBER:
      return isSetInvoiceNumber();
    case ORDER_TYPE:
      return isSetOrderType();
    case OPERATOR_ID:
      return isSetOperatorId();
    case RECHARGE_TYPE:
      return isSetRechargeType();
    case STATUS:
      return isSetStatus();
    case DEVICE_NUMBER:
      return isSetDeviceNumber();
    case USER_ID:
      return isSetUserId();
    case USER_EMAIL_ID:
      return isSetUserEmailId();
    case CREATION_TIMESTAMP:
      return isSetCreationTimestamp();
    }
    throw new IllegalStateException();
  }

  @Override
  public boolean equals(Object that) {
    if (that == null)
      return false;
    if (that instanceof RechargeOrder)
      return this.equals((RechargeOrder)that);
    return false;
  }

  public boolean equals(RechargeOrder that) {
    if (that == null)
      return false;

    boolean this_present_id = true;
    boolean that_present_id = true;
    if (this_present_id || that_present_id) {
      if (!(this_present_id && that_present_id))
        return false;
      if (this.id != that.id)
        return false;
    }

    boolean this_present_displayId = true && this.isSetDisplayId();
    boolean that_present_displayId = true && that.isSetDisplayId();
    if (this_present_displayId || that_present_displayId) {
      if (!(this_present_displayId && that_present_displayId))
        return false;
      if (!this.displayId.equals(that.displayId))
        return false;
    }

    boolean this_present_totalAmount = true;
    boolean that_present_totalAmount = true;
    if (this_present_totalAmount || that_present_totalAmount) {
      if (!(this_present_totalAmount && that_present_totalAmount))
        return false;
      if (this.totalAmount != that.totalAmount)
        return false;
    }

    boolean this_present_walletAmount = true;
    boolean that_present_walletAmount = true;
    if (this_present_walletAmount || that_present_walletAmount) {
      if (!(this_present_walletAmount && that_present_walletAmount))
        return false;
      if (this.walletAmount != that.walletAmount)
        return false;
    }

    boolean this_present_transactionId = true;
    boolean that_present_transactionId = true;
    if (this_present_transactionId || that_present_transactionId) {
      if (!(this_present_transactionId && that_present_transactionId))
        return false;
      if (this.transactionId != that.transactionId)
        return false;
    }

    boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
    boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
    if (this_present_invoiceNumber || that_present_invoiceNumber) {
      if (!(this_present_invoiceNumber && that_present_invoiceNumber))
        return false;
      if (!this.invoiceNumber.equals(that.invoiceNumber))
        return false;
    }

    boolean this_present_orderType = true && this.isSetOrderType();
    boolean that_present_orderType = true && that.isSetOrderType();
    if (this_present_orderType || that_present_orderType) {
      if (!(this_present_orderType && that_present_orderType))
        return false;
      if (!this.orderType.equals(that.orderType))
        return false;
    }

    boolean this_present_operatorId = true;
    boolean that_present_operatorId = true;
    if (this_present_operatorId || that_present_operatorId) {
      if (!(this_present_operatorId && that_present_operatorId))
        return false;
      if (this.operatorId != that.operatorId)
        return false;
    }

    boolean this_present_rechargeType = true && this.isSetRechargeType();
    boolean that_present_rechargeType = true && that.isSetRechargeType();
    if (this_present_rechargeType || that_present_rechargeType) {
      if (!(this_present_rechargeType && that_present_rechargeType))
        return false;
      if (!this.rechargeType.equals(that.rechargeType))
        return false;
    }

    boolean this_present_status = true && this.isSetStatus();
    boolean that_present_status = true && that.isSetStatus();
    if (this_present_status || that_present_status) {
      if (!(this_present_status && that_present_status))
        return false;
      if (!this.status.equals(that.status))
        return false;
    }

    boolean this_present_deviceNumber = true && this.isSetDeviceNumber();
    boolean that_present_deviceNumber = true && that.isSetDeviceNumber();
    if (this_present_deviceNumber || that_present_deviceNumber) {
      if (!(this_present_deviceNumber && that_present_deviceNumber))
        return false;
      if (!this.deviceNumber.equals(that.deviceNumber))
        return false;
    }

    boolean this_present_userId = true;
    boolean that_present_userId = true;
    if (this_present_userId || that_present_userId) {
      if (!(this_present_userId && that_present_userId))
        return false;
      if (this.userId != that.userId)
        return false;
    }

    boolean this_present_userEmailId = true && this.isSetUserEmailId();
    boolean that_present_userEmailId = true && that.isSetUserEmailId();
    if (this_present_userEmailId || that_present_userEmailId) {
      if (!(this_present_userEmailId && that_present_userEmailId))
        return false;
      if (!this.userEmailId.equals(that.userEmailId))
        return false;
    }

    boolean this_present_creationTimestamp = true;
    boolean that_present_creationTimestamp = true;
    if (this_present_creationTimestamp || that_present_creationTimestamp) {
      if (!(this_present_creationTimestamp && that_present_creationTimestamp))
        return false;
      if (this.creationTimestamp != that.creationTimestamp)
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    return 0;
  }

  public int compareTo(RechargeOrder other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;
    RechargeOrder typedOther = (RechargeOrder)other;

    lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetDisplayId()).compareTo(typedOther.isSetDisplayId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDisplayId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.displayId, typedOther.displayId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTotalAmount()).compareTo(typedOther.isSetTotalAmount());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTotalAmount()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalAmount, typedOther.totalAmount);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetWalletAmount()).compareTo(typedOther.isSetWalletAmount());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetWalletAmount()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.walletAmount, typedOther.walletAmount);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(typedOther.isSetTransactionId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTransactionId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionId, typedOther.transactionId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetInvoiceNumber()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetOrderType()).compareTo(typedOther.isSetOrderType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOrderType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderType, typedOther.orderType);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetOperatorId()).compareTo(typedOther.isSetOperatorId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOperatorId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operatorId, typedOther.operatorId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetRechargeType()).compareTo(typedOther.isSetRechargeType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRechargeType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rechargeType, typedOther.rechargeType);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStatus()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetDeviceNumber()).compareTo(typedOther.isSetDeviceNumber());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDeviceNumber()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deviceNumber, typedOther.deviceNumber);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUserId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetUserEmailId()).compareTo(typedOther.isSetUserEmailId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUserEmailId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userEmailId, typedOther.userEmailId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCreationTimestamp()).compareTo(typedOther.isSetCreationTimestamp());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCreationTimestamp()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationTimestamp, typedOther.creationTimestamp);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

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

  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    org.apache.thrift.protocol.TField field;
    iprot.readStructBegin();
    while (true)
    {
      field = iprot.readFieldBegin();
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
        break;
      }
      switch (field.id) {
        case 1: // ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.id = iprot.readI64();
            setIdIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 2: // DISPLAY_ID
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.displayId = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 3: // TOTAL_AMOUNT
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.totalAmount = iprot.readI64();
            setTotalAmountIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 4: // WALLET_AMOUNT
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.walletAmount = iprot.readI64();
            setWalletAmountIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 5: // TRANSACTION_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.transactionId = iprot.readI64();
            setTransactionIdIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 6: // INVOICE_NUMBER
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.invoiceNumber = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 7: // ORDER_TYPE
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.orderType = OrderType.findByValue(iprot.readI32());
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 8: // OPERATOR_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.operatorId = iprot.readI64();
            setOperatorIdIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 9: // RECHARGE_TYPE
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.rechargeType = RechargeType.findByValue(iprot.readI32());
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 10: // STATUS
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.status = RechargeOrderStatus.findByValue(iprot.readI32());
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 11: // DEVICE_NUMBER
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.deviceNumber = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 12: // USER_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.userId = iprot.readI64();
            setUserIdIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 13: // USER_EMAIL_ID
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.userEmailId = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 14: // CREATION_TIMESTAMP
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.creationTimestamp = iprot.readI64();
            setCreationTimestampIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        default:
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
      }
      iprot.readFieldEnd();
    }
    iprot.readStructEnd();
    validate();
  }

  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    validate();

    oprot.writeStructBegin(STRUCT_DESC);
    oprot.writeFieldBegin(ID_FIELD_DESC);
    oprot.writeI64(this.id);
    oprot.writeFieldEnd();
    if (this.displayId != null) {
      oprot.writeFieldBegin(DISPLAY_ID_FIELD_DESC);
      oprot.writeString(this.displayId);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(TOTAL_AMOUNT_FIELD_DESC);
    oprot.writeI64(this.totalAmount);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(WALLET_AMOUNT_FIELD_DESC);
    oprot.writeI64(this.walletAmount);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
    oprot.writeI64(this.transactionId);
    oprot.writeFieldEnd();
    if (this.invoiceNumber != null) {
      oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
      oprot.writeString(this.invoiceNumber);
      oprot.writeFieldEnd();
    }
    if (this.orderType != null) {
      oprot.writeFieldBegin(ORDER_TYPE_FIELD_DESC);
      oprot.writeI32(this.orderType.getValue());
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(OPERATOR_ID_FIELD_DESC);
    oprot.writeI64(this.operatorId);
    oprot.writeFieldEnd();
    if (this.rechargeType != null) {
      oprot.writeFieldBegin(RECHARGE_TYPE_FIELD_DESC);
      oprot.writeI32(this.rechargeType.getValue());
      oprot.writeFieldEnd();
    }
    if (this.status != null) {
      oprot.writeFieldBegin(STATUS_FIELD_DESC);
      oprot.writeI32(this.status.getValue());
      oprot.writeFieldEnd();
    }
    if (this.deviceNumber != null) {
      oprot.writeFieldBegin(DEVICE_NUMBER_FIELD_DESC);
      oprot.writeString(this.deviceNumber);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(USER_ID_FIELD_DESC);
    oprot.writeI64(this.userId);
    oprot.writeFieldEnd();
    if (this.userEmailId != null) {
      oprot.writeFieldBegin(USER_EMAIL_ID_FIELD_DESC);
      oprot.writeString(this.userEmailId);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(CREATION_TIMESTAMP_FIELD_DESC);
    oprot.writeI64(this.creationTimestamp);
    oprot.writeFieldEnd();
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder("RechargeOrder(");
    boolean first = true;

    sb.append("id:");
    sb.append(this.id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("displayId:");
    if (this.displayId == null) {
      sb.append("null");
    } else {
      sb.append(this.displayId);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("totalAmount:");
    sb.append(this.totalAmount);
    first = false;
    if (!first) sb.append(", ");
    sb.append("walletAmount:");
    sb.append(this.walletAmount);
    first = false;
    if (!first) sb.append(", ");
    sb.append("transactionId:");
    sb.append(this.transactionId);
    first = false;
    if (!first) sb.append(", ");
    sb.append("invoiceNumber:");
    if (this.invoiceNumber == null) {
      sb.append("null");
    } else {
      sb.append(this.invoiceNumber);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("orderType:");
    if (this.orderType == null) {
      sb.append("null");
    } else {
      sb.append(this.orderType);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("operatorId:");
    sb.append(this.operatorId);
    first = false;
    if (!first) sb.append(", ");
    sb.append("rechargeType:");
    if (this.rechargeType == null) {
      sb.append("null");
    } else {
      sb.append(this.rechargeType);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("status:");
    if (this.status == null) {
      sb.append("null");
    } else {
      sb.append(this.status);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("deviceNumber:");
    if (this.deviceNumber == null) {
      sb.append("null");
    } else {
      sb.append(this.deviceNumber);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("userId:");
    sb.append(this.userId);
    first = false;
    if (!first) sb.append(", ");
    sb.append("userEmailId:");
    if (this.userEmailId == null) {
      sb.append("null");
    } else {
      sb.append(this.userEmailId);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("creationTimestamp:");
    sb.append(this.creationTimestamp);
    first = false;
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
  }

  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
    try {
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
    try {
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
      __isset_bit_vector = new BitSet(1);
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

}