Subversion Repositories SmartDukaan

Rev

Rev 8241 | 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 EbayOrder implements org.apache.thrift.TBase<EbayOrder, EbayOrder._Fields>, java.io.Serializable, Cloneable {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("EbayOrder");

  private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orderId", org.apache.thrift.protocol.TType.I64, (short)1);
  private static final org.apache.thrift.protocol.TField SALES_RECORD_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("salesRecordNumber", org.apache.thrift.protocol.TType.I64, (short)2);
  private static final org.apache.thrift.protocol.TField PAISA_PAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("paisaPayId", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField EBAY_LISTING_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ebayListingId", org.apache.thrift.protocol.TType.STRING, (short)4);
  private static final org.apache.thrift.protocol.TField SUBSIDY_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("subsidyAmount", org.apache.thrift.protocol.TType.DOUBLE, (short)5);
  private static final org.apache.thrift.protocol.TField EBAY_TXN_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("ebayTxnDate", org.apache.thrift.protocol.TType.I64, (short)6);
  private static final org.apache.thrift.protocol.TField TRANSACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionId", org.apache.thrift.protocol.TType.STRING, (short)7);
  private static final org.apache.thrift.protocol.TField LISTING_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("listingName", org.apache.thrift.protocol.TType.STRING, (short)8);
  private static final org.apache.thrift.protocol.TField LISTING_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("listingPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)9);
  private static final org.apache.thrift.protocol.TField BLUEDART_PAISA_PAY_REF_FIELD_DESC = new org.apache.thrift.protocol.TField("bluedartPaisaPayRef", org.apache.thrift.protocol.TType.STRING, (short)10);

  private long orderId; // required
  private long salesRecordNumber; // required
  private String paisaPayId; // required
  private String ebayListingId; // required
  private double subsidyAmount; // required
  private long ebayTxnDate; // required
  private String transactionId; // required
  private String listingName; // required
  private double listingPrice; // required
  private String bluedartPaisaPayRef; // 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 {
    ORDER_ID((short)1, "orderId"),
    SALES_RECORD_NUMBER((short)2, "salesRecordNumber"),
    PAISA_PAY_ID((short)3, "paisaPayId"),
    EBAY_LISTING_ID((short)4, "ebayListingId"),
    SUBSIDY_AMOUNT((short)5, "subsidyAmount"),
    EBAY_TXN_DATE((short)6, "ebayTxnDate"),
    TRANSACTION_ID((short)7, "transactionId"),
    LISTING_NAME((short)8, "listingName"),
    LISTING_PRICE((short)9, "listingPrice"),
    BLUEDART_PAISA_PAY_REF((short)10, "bluedartPaisaPayRef");

    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: // ORDER_ID
          return ORDER_ID;
        case 2: // SALES_RECORD_NUMBER
          return SALES_RECORD_NUMBER;
        case 3: // PAISA_PAY_ID
          return PAISA_PAY_ID;
        case 4: // EBAY_LISTING_ID
          return EBAY_LISTING_ID;
        case 5: // SUBSIDY_AMOUNT
          return SUBSIDY_AMOUNT;
        case 6: // EBAY_TXN_DATE
          return EBAY_TXN_DATE;
        case 7: // TRANSACTION_ID
          return TRANSACTION_ID;
        case 8: // LISTING_NAME
          return LISTING_NAME;
        case 9: // LISTING_PRICE
          return LISTING_PRICE;
        case 10: // BLUEDART_PAISA_PAY_REF
          return BLUEDART_PAISA_PAY_REF;
        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 __ORDERID_ISSET_ID = 0;
  private static final int __SALESRECORDNUMBER_ISSET_ID = 1;
  private static final int __SUBSIDYAMOUNT_ISSET_ID = 2;
  private static final int __EBAYTXNDATE_ISSET_ID = 3;
  private static final int __LISTINGPRICE_ISSET_ID = 4;
  private BitSet __isset_bit_vector = new BitSet(5);

  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.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.SALES_RECORD_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("salesRecordNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.PAISA_PAY_ID, new org.apache.thrift.meta_data.FieldMetaData("paisaPayId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.EBAY_LISTING_ID, new org.apache.thrift.meta_data.FieldMetaData("ebayListingId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.SUBSIDY_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("subsidyAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.EBAY_TXN_DATE, new org.apache.thrift.meta_data.FieldMetaData("ebayTxnDate", 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.STRING)));
    tmpMap.put(_Fields.LISTING_NAME, new org.apache.thrift.meta_data.FieldMetaData("listingName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.LISTING_PRICE, new org.apache.thrift.meta_data.FieldMetaData("listingPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.BLUEDART_PAISA_PAY_REF, new org.apache.thrift.meta_data.FieldMetaData("bluedartPaisaPayRef", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(EbayOrder.class, metaDataMap);
  }

  public EbayOrder() {
  }

  public EbayOrder(
    long orderId,
    long salesRecordNumber,
    String paisaPayId,
    String ebayListingId,
    double subsidyAmount,
    long ebayTxnDate,
    String transactionId,
    String listingName,
    double listingPrice,
    String bluedartPaisaPayRef)
  {
    this();
    this.orderId = orderId;
    setOrderIdIsSet(true);
    this.salesRecordNumber = salesRecordNumber;
    setSalesRecordNumberIsSet(true);
    this.paisaPayId = paisaPayId;
    this.ebayListingId = ebayListingId;
    this.subsidyAmount = subsidyAmount;
    setSubsidyAmountIsSet(true);
    this.ebayTxnDate = ebayTxnDate;
    setEbayTxnDateIsSet(true);
    this.transactionId = transactionId;
    this.listingName = listingName;
    this.listingPrice = listingPrice;
    setListingPriceIsSet(true);
    this.bluedartPaisaPayRef = bluedartPaisaPayRef;
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public EbayOrder(EbayOrder other) {
    __isset_bit_vector.clear();
    __isset_bit_vector.or(other.__isset_bit_vector);
    this.orderId = other.orderId;
    this.salesRecordNumber = other.salesRecordNumber;
    if (other.isSetPaisaPayId()) {
      this.paisaPayId = other.paisaPayId;
    }
    if (other.isSetEbayListingId()) {
      this.ebayListingId = other.ebayListingId;
    }
    this.subsidyAmount = other.subsidyAmount;
    this.ebayTxnDate = other.ebayTxnDate;
    if (other.isSetTransactionId()) {
      this.transactionId = other.transactionId;
    }
    if (other.isSetListingName()) {
      this.listingName = other.listingName;
    }
    this.listingPrice = other.listingPrice;
    if (other.isSetBluedartPaisaPayRef()) {
      this.bluedartPaisaPayRef = other.bluedartPaisaPayRef;
    }
  }

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

  @Override
  public void clear() {
    setOrderIdIsSet(false);
    this.orderId = 0;
    setSalesRecordNumberIsSet(false);
    this.salesRecordNumber = 0;
    this.paisaPayId = null;
    this.ebayListingId = null;
    setSubsidyAmountIsSet(false);
    this.subsidyAmount = 0.0;
    setEbayTxnDateIsSet(false);
    this.ebayTxnDate = 0;
    this.transactionId = null;
    this.listingName = null;
    setListingPriceIsSet(false);
    this.listingPrice = 0.0;
    this.bluedartPaisaPayRef = null;
  }

  public long getOrderId() {
    return this.orderId;
  }

  public void setOrderId(long orderId) {
    this.orderId = orderId;
    setOrderIdIsSet(true);
  }

  public void unsetOrderId() {
    __isset_bit_vector.clear(__ORDERID_ISSET_ID);
  }

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

  public void setOrderIdIsSet(boolean value) {
    __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
  }

  public long getSalesRecordNumber() {
    return this.salesRecordNumber;
  }

  public void setSalesRecordNumber(long salesRecordNumber) {
    this.salesRecordNumber = salesRecordNumber;
    setSalesRecordNumberIsSet(true);
  }

  public void unsetSalesRecordNumber() {
    __isset_bit_vector.clear(__SALESRECORDNUMBER_ISSET_ID);
  }

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

  public void setSalesRecordNumberIsSet(boolean value) {
    __isset_bit_vector.set(__SALESRECORDNUMBER_ISSET_ID, value);
  }

  public String getPaisaPayId() {
    return this.paisaPayId;
  }

  public void setPaisaPayId(String paisaPayId) {
    this.paisaPayId = paisaPayId;
  }

  public void unsetPaisaPayId() {
    this.paisaPayId = null;
  }

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

  public void setPaisaPayIdIsSet(boolean value) {
    if (!value) {
      this.paisaPayId = null;
    }
  }

  public String getEbayListingId() {
    return this.ebayListingId;
  }

  public void setEbayListingId(String ebayListingId) {
    this.ebayListingId = ebayListingId;
  }

  public void unsetEbayListingId() {
    this.ebayListingId = null;
  }

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

  public void setEbayListingIdIsSet(boolean value) {
    if (!value) {
      this.ebayListingId = null;
    }
  }

  public double getSubsidyAmount() {
    return this.subsidyAmount;
  }

  public void setSubsidyAmount(double subsidyAmount) {
    this.subsidyAmount = subsidyAmount;
    setSubsidyAmountIsSet(true);
  }

  public void unsetSubsidyAmount() {
    __isset_bit_vector.clear(__SUBSIDYAMOUNT_ISSET_ID);
  }

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

  public void setSubsidyAmountIsSet(boolean value) {
    __isset_bit_vector.set(__SUBSIDYAMOUNT_ISSET_ID, value);
  }

  public long getEbayTxnDate() {
    return this.ebayTxnDate;
  }

  public void setEbayTxnDate(long ebayTxnDate) {
    this.ebayTxnDate = ebayTxnDate;
    setEbayTxnDateIsSet(true);
  }

  public void unsetEbayTxnDate() {
    __isset_bit_vector.clear(__EBAYTXNDATE_ISSET_ID);
  }

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

  public void setEbayTxnDateIsSet(boolean value) {
    __isset_bit_vector.set(__EBAYTXNDATE_ISSET_ID, value);
  }

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

  public void setTransactionId(String transactionId) {
    this.transactionId = transactionId;
  }

  public void unsetTransactionId() {
    this.transactionId = null;
  }

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

  public void setTransactionIdIsSet(boolean value) {
    if (!value) {
      this.transactionId = null;
    }
  }

  public String getListingName() {
    return this.listingName;
  }

  public void setListingName(String listingName) {
    this.listingName = listingName;
  }

  public void unsetListingName() {
    this.listingName = null;
  }

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

  public void setListingNameIsSet(boolean value) {
    if (!value) {
      this.listingName = null;
    }
  }

  public double getListingPrice() {
    return this.listingPrice;
  }

  public void setListingPrice(double listingPrice) {
    this.listingPrice = listingPrice;
    setListingPriceIsSet(true);
  }

  public void unsetListingPrice() {
    __isset_bit_vector.clear(__LISTINGPRICE_ISSET_ID);
  }

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

  public void setListingPriceIsSet(boolean value) {
    __isset_bit_vector.set(__LISTINGPRICE_ISSET_ID, value);
  }

  public String getBluedartPaisaPayRef() {
    return this.bluedartPaisaPayRef;
  }

  public void setBluedartPaisaPayRef(String bluedartPaisaPayRef) {
    this.bluedartPaisaPayRef = bluedartPaisaPayRef;
  }

  public void unsetBluedartPaisaPayRef() {
    this.bluedartPaisaPayRef = null;
  }

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

  public void setBluedartPaisaPayRefIsSet(boolean value) {
    if (!value) {
      this.bluedartPaisaPayRef = null;
    }
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case ORDER_ID:
      if (value == null) {
        unsetOrderId();
      } else {
        setOrderId((Long)value);
      }
      break;

    case SALES_RECORD_NUMBER:
      if (value == null) {
        unsetSalesRecordNumber();
      } else {
        setSalesRecordNumber((Long)value);
      }
      break;

    case PAISA_PAY_ID:
      if (value == null) {
        unsetPaisaPayId();
      } else {
        setPaisaPayId((String)value);
      }
      break;

    case EBAY_LISTING_ID:
      if (value == null) {
        unsetEbayListingId();
      } else {
        setEbayListingId((String)value);
      }
      break;

    case SUBSIDY_AMOUNT:
      if (value == null) {
        unsetSubsidyAmount();
      } else {
        setSubsidyAmount((Double)value);
      }
      break;

    case EBAY_TXN_DATE:
      if (value == null) {
        unsetEbayTxnDate();
      } else {
        setEbayTxnDate((Long)value);
      }
      break;

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

    case LISTING_NAME:
      if (value == null) {
        unsetListingName();
      } else {
        setListingName((String)value);
      }
      break;

    case LISTING_PRICE:
      if (value == null) {
        unsetListingPrice();
      } else {
        setListingPrice((Double)value);
      }
      break;

    case BLUEDART_PAISA_PAY_REF:
      if (value == null) {
        unsetBluedartPaisaPayRef();
      } else {
        setBluedartPaisaPayRef((String)value);
      }
      break;

    }
  }

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

    case SALES_RECORD_NUMBER:
      return Long.valueOf(getSalesRecordNumber());

    case PAISA_PAY_ID:
      return getPaisaPayId();

    case EBAY_LISTING_ID:
      return getEbayListingId();

    case SUBSIDY_AMOUNT:
      return Double.valueOf(getSubsidyAmount());

    case EBAY_TXN_DATE:
      return Long.valueOf(getEbayTxnDate());

    case TRANSACTION_ID:
      return getTransactionId();

    case LISTING_NAME:
      return getListingName();

    case LISTING_PRICE:
      return Double.valueOf(getListingPrice());

    case BLUEDART_PAISA_PAY_REF:
      return getBluedartPaisaPayRef();

    }
    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 ORDER_ID:
      return isSetOrderId();
    case SALES_RECORD_NUMBER:
      return isSetSalesRecordNumber();
    case PAISA_PAY_ID:
      return isSetPaisaPayId();
    case EBAY_LISTING_ID:
      return isSetEbayListingId();
    case SUBSIDY_AMOUNT:
      return isSetSubsidyAmount();
    case EBAY_TXN_DATE:
      return isSetEbayTxnDate();
    case TRANSACTION_ID:
      return isSetTransactionId();
    case LISTING_NAME:
      return isSetListingName();
    case LISTING_PRICE:
      return isSetListingPrice();
    case BLUEDART_PAISA_PAY_REF:
      return isSetBluedartPaisaPayRef();
    }
    throw new IllegalStateException();
  }

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

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

    boolean this_present_orderId = true;
    boolean that_present_orderId = true;
    if (this_present_orderId || that_present_orderId) {
      if (!(this_present_orderId && that_present_orderId))
        return false;
      if (this.orderId != that.orderId)
        return false;
    }

    boolean this_present_salesRecordNumber = true;
    boolean that_present_salesRecordNumber = true;
    if (this_present_salesRecordNumber || that_present_salesRecordNumber) {
      if (!(this_present_salesRecordNumber && that_present_salesRecordNumber))
        return false;
      if (this.salesRecordNumber != that.salesRecordNumber)
        return false;
    }

    boolean this_present_paisaPayId = true && this.isSetPaisaPayId();
    boolean that_present_paisaPayId = true && that.isSetPaisaPayId();
    if (this_present_paisaPayId || that_present_paisaPayId) {
      if (!(this_present_paisaPayId && that_present_paisaPayId))
        return false;
      if (!this.paisaPayId.equals(that.paisaPayId))
        return false;
    }

    boolean this_present_ebayListingId = true && this.isSetEbayListingId();
    boolean that_present_ebayListingId = true && that.isSetEbayListingId();
    if (this_present_ebayListingId || that_present_ebayListingId) {
      if (!(this_present_ebayListingId && that_present_ebayListingId))
        return false;
      if (!this.ebayListingId.equals(that.ebayListingId))
        return false;
    }

    boolean this_present_subsidyAmount = true;
    boolean that_present_subsidyAmount = true;
    if (this_present_subsidyAmount || that_present_subsidyAmount) {
      if (!(this_present_subsidyAmount && that_present_subsidyAmount))
        return false;
      if (this.subsidyAmount != that.subsidyAmount)
        return false;
    }

    boolean this_present_ebayTxnDate = true;
    boolean that_present_ebayTxnDate = true;
    if (this_present_ebayTxnDate || that_present_ebayTxnDate) {
      if (!(this_present_ebayTxnDate && that_present_ebayTxnDate))
        return false;
      if (this.ebayTxnDate != that.ebayTxnDate)
        return false;
    }

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

    boolean this_present_listingName = true && this.isSetListingName();
    boolean that_present_listingName = true && that.isSetListingName();
    if (this_present_listingName || that_present_listingName) {
      if (!(this_present_listingName && that_present_listingName))
        return false;
      if (!this.listingName.equals(that.listingName))
        return false;
    }

    boolean this_present_listingPrice = true;
    boolean that_present_listingPrice = true;
    if (this_present_listingPrice || that_present_listingPrice) {
      if (!(this_present_listingPrice && that_present_listingPrice))
        return false;
      if (this.listingPrice != that.listingPrice)
        return false;
    }

    boolean this_present_bluedartPaisaPayRef = true && this.isSetBluedartPaisaPayRef();
    boolean that_present_bluedartPaisaPayRef = true && that.isSetBluedartPaisaPayRef();
    if (this_present_bluedartPaisaPayRef || that_present_bluedartPaisaPayRef) {
      if (!(this_present_bluedartPaisaPayRef && that_present_bluedartPaisaPayRef))
        return false;
      if (!this.bluedartPaisaPayRef.equals(that.bluedartPaisaPayRef))
        return false;
    }

    return true;
  }

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

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

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

    lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOrderId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSalesRecordNumber()).compareTo(typedOther.isSetSalesRecordNumber());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSalesRecordNumber()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.salesRecordNumber, typedOther.salesRecordNumber);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPaisaPayId()).compareTo(typedOther.isSetPaisaPayId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPaisaPayId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paisaPayId, typedOther.paisaPayId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetEbayListingId()).compareTo(typedOther.isSetEbayListingId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEbayListingId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ebayListingId, typedOther.ebayListingId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSubsidyAmount()).compareTo(typedOther.isSetSubsidyAmount());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSubsidyAmount()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.subsidyAmount, typedOther.subsidyAmount);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetEbayTxnDate()).compareTo(typedOther.isSetEbayTxnDate());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEbayTxnDate()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ebayTxnDate, typedOther.ebayTxnDate);
      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(isSetListingName()).compareTo(typedOther.isSetListingName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetListingName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.listingName, typedOther.listingName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetListingPrice()).compareTo(typedOther.isSetListingPrice());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetListingPrice()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.listingPrice, typedOther.listingPrice);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetBluedartPaisaPayRef()).compareTo(typedOther.isSetBluedartPaisaPayRef());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBluedartPaisaPayRef()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bluedartPaisaPayRef, typedOther.bluedartPaisaPayRef);
      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: // ORDER_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.orderId = iprot.readI64();
            setOrderIdIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 2: // SALES_RECORD_NUMBER
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.salesRecordNumber = iprot.readI64();
            setSalesRecordNumberIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 3: // PAISA_PAY_ID
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.paisaPayId = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 4: // EBAY_LISTING_ID
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.ebayListingId = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 5: // SUBSIDY_AMOUNT
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.subsidyAmount = iprot.readDouble();
            setSubsidyAmountIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 6: // EBAY_TXN_DATE
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.ebayTxnDate = iprot.readI64();
            setEbayTxnDateIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 7: // TRANSACTION_ID
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.transactionId = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 8: // LISTING_NAME
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.listingName = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 9: // LISTING_PRICE
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.listingPrice = iprot.readDouble();
            setListingPriceIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 10: // BLUEDART_PAISA_PAY_REF
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.bluedartPaisaPayRef = iprot.readString();
          } 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(ORDER_ID_FIELD_DESC);
    oprot.writeI64(this.orderId);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(SALES_RECORD_NUMBER_FIELD_DESC);
    oprot.writeI64(this.salesRecordNumber);
    oprot.writeFieldEnd();
    if (this.paisaPayId != null) {
      oprot.writeFieldBegin(PAISA_PAY_ID_FIELD_DESC);
      oprot.writeString(this.paisaPayId);
      oprot.writeFieldEnd();
    }
    if (this.ebayListingId != null) {
      oprot.writeFieldBegin(EBAY_LISTING_ID_FIELD_DESC);
      oprot.writeString(this.ebayListingId);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(SUBSIDY_AMOUNT_FIELD_DESC);
    oprot.writeDouble(this.subsidyAmount);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(EBAY_TXN_DATE_FIELD_DESC);
    oprot.writeI64(this.ebayTxnDate);
    oprot.writeFieldEnd();
    if (this.transactionId != null) {
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
      oprot.writeString(this.transactionId);
      oprot.writeFieldEnd();
    }
    if (this.listingName != null) {
      oprot.writeFieldBegin(LISTING_NAME_FIELD_DESC);
      oprot.writeString(this.listingName);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(LISTING_PRICE_FIELD_DESC);
    oprot.writeDouble(this.listingPrice);
    oprot.writeFieldEnd();
    if (this.bluedartPaisaPayRef != null) {
      oprot.writeFieldBegin(BLUEDART_PAISA_PAY_REF_FIELD_DESC);
      oprot.writeString(this.bluedartPaisaPayRef);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }

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

    sb.append("orderId:");
    sb.append(this.orderId);
    first = false;
    if (!first) sb.append(", ");
    sb.append("salesRecordNumber:");
    sb.append(this.salesRecordNumber);
    first = false;
    if (!first) sb.append(", ");
    sb.append("paisaPayId:");
    if (this.paisaPayId == null) {
      sb.append("null");
    } else {
      sb.append(this.paisaPayId);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("ebayListingId:");
    if (this.ebayListingId == null) {
      sb.append("null");
    } else {
      sb.append(this.ebayListingId);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("subsidyAmount:");
    sb.append(this.subsidyAmount);
    first = false;
    if (!first) sb.append(", ");
    sb.append("ebayTxnDate:");
    sb.append(this.ebayTxnDate);
    first = false;
    if (!first) sb.append(", ");
    sb.append("transactionId:");
    if (this.transactionId == null) {
      sb.append("null");
    } else {
      sb.append(this.transactionId);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("listingName:");
    if (this.listingName == null) {
      sb.append("null");
    } else {
      sb.append(this.listingName);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("listingPrice:");
    sb.append(this.listingPrice);
    first = false;
    if (!first) sb.append(", ");
    sb.append("bluedartPaisaPayRef:");
    if (this.bluedartPaisaPayRef == null) {
      sb.append("null");
    } else {
      sb.append(this.bluedartPaisaPayRef);
    }
    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);
    }
  }

}