Subversion Repositories SmartDukaan

Rev

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

  private static final org.apache.thrift.protocol.TField DATE_OF_SALE_FIELD_DESC = new org.apache.thrift.protocol.TField("dateOfSale", org.apache.thrift.protocol.TType.I64, (short)1);
  private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.I64, (short)2);
  private static final org.apache.thrift.protocol.TField TOTAL_ORDER_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("totalOrderCount", org.apache.thrift.protocol.TType.I32, (short)3);
  private static final org.apache.thrift.protocol.TField AMAZON_FBA_INVENTORY_FIELD_DESC = new org.apache.thrift.protocol.TField("amazonFbaInventory", org.apache.thrift.protocol.TType.I64, (short)4);
  private static final org.apache.thrift.protocol.TField IS_OUT_OF_STOCK_FIELD_DESC = new org.apache.thrift.protocol.TField("isOutOfStock", org.apache.thrift.protocol.TType.BOOL, (short)5);
  private static final org.apache.thrift.protocol.TField SALE_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("salePrice", org.apache.thrift.protocol.TType.DOUBLE, (short)6);
  private static final org.apache.thrift.protocol.TField MIN_FBA_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("minFbaPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)7);
  private static final org.apache.thrift.protocol.TField MIN_MFN_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("minMfnPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)8);
  private static final org.apache.thrift.protocol.TField TOTAL_SALE_FIELD_DESC = new org.apache.thrift.protocol.TField("totalSale", org.apache.thrift.protocol.TType.DOUBLE, (short)9);
  private static final org.apache.thrift.protocol.TField PROMOTION_SALE_FIELD_DESC = new org.apache.thrift.protocol.TField("promotionSale", org.apache.thrift.protocol.TType.DOUBLE, (short)10);
  private static final org.apache.thrift.protocol.TField PROMOTION_ORDER_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("promotionOrderCount", org.apache.thrift.protocol.TType.I32, (short)11);
  private static final org.apache.thrift.protocol.TField OUR_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("ourPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)12);
  private static final org.apache.thrift.protocol.TField MIN_FBA_PRICE_SNAPSHOT_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("minFbaPriceSnapshotDate", org.apache.thrift.protocol.TType.I64, (short)13);
  private static final org.apache.thrift.protocol.TField MIN_MFN_PRICE_SNAPSHOT_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("minMfnPriceSnapshotDate", org.apache.thrift.protocol.TType.I64, (short)14);
  private static final org.apache.thrift.protocol.TField OUR_PRICE_SNAPSHOT_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("ourPriceSnapshotDate", org.apache.thrift.protocol.TType.I64, (short)15);
  private static final org.apache.thrift.protocol.TField SALE_PRICE_SNAPSHOT_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("salePriceSnapshotDate", org.apache.thrift.protocol.TType.I64, (short)16);
  private static final org.apache.thrift.protocol.TField FC_LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("fcLocation", org.apache.thrift.protocol.TType.I32, (short)17);
  private static final org.apache.thrift.protocol.TField ASIN_FIELD_DESC = new org.apache.thrift.protocol.TField("asin", org.apache.thrift.protocol.TType.STRING, (short)18);

  private long dateOfSale; // required
  private long item_id; // required
  private int totalOrderCount; // required
  private long amazonFbaInventory; // required
  private boolean isOutOfStock; // required
  private double salePrice; // required
  private double minFbaPrice; // required
  private double minMfnPrice; // required
  private double totalSale; // required
  private double promotionSale; // required
  private int promotionOrderCount; // required
  private double ourPrice; // required
  private long minFbaPriceSnapshotDate; // required
  private long minMfnPriceSnapshotDate; // required
  private long ourPriceSnapshotDate; // required
  private long salePriceSnapshotDate; // required
  private AmazonFCWarehouseLocation fcLocation; // required
  private String asin; // 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 {
    DATE_OF_SALE((short)1, "dateOfSale"),
    ITEM_ID((short)2, "item_id"),
    TOTAL_ORDER_COUNT((short)3, "totalOrderCount"),
    AMAZON_FBA_INVENTORY((short)4, "amazonFbaInventory"),
    IS_OUT_OF_STOCK((short)5, "isOutOfStock"),
    SALE_PRICE((short)6, "salePrice"),
    MIN_FBA_PRICE((short)7, "minFbaPrice"),
    MIN_MFN_PRICE((short)8, "minMfnPrice"),
    TOTAL_SALE((short)9, "totalSale"),
    PROMOTION_SALE((short)10, "promotionSale"),
    PROMOTION_ORDER_COUNT((short)11, "promotionOrderCount"),
    OUR_PRICE((short)12, "ourPrice"),
    MIN_FBA_PRICE_SNAPSHOT_DATE((short)13, "minFbaPriceSnapshotDate"),
    MIN_MFN_PRICE_SNAPSHOT_DATE((short)14, "minMfnPriceSnapshotDate"),
    OUR_PRICE_SNAPSHOT_DATE((short)15, "ourPriceSnapshotDate"),
    SALE_PRICE_SNAPSHOT_DATE((short)16, "salePriceSnapshotDate"),
    /**
     * 
     * @see AmazonFCWarehouseLocation
     */
    FC_LOCATION((short)17, "fcLocation"),
    ASIN((short)18, "asin");

    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: // DATE_OF_SALE
          return DATE_OF_SALE;
        case 2: // ITEM_ID
          return ITEM_ID;
        case 3: // TOTAL_ORDER_COUNT
          return TOTAL_ORDER_COUNT;
        case 4: // AMAZON_FBA_INVENTORY
          return AMAZON_FBA_INVENTORY;
        case 5: // IS_OUT_OF_STOCK
          return IS_OUT_OF_STOCK;
        case 6: // SALE_PRICE
          return SALE_PRICE;
        case 7: // MIN_FBA_PRICE
          return MIN_FBA_PRICE;
        case 8: // MIN_MFN_PRICE
          return MIN_MFN_PRICE;
        case 9: // TOTAL_SALE
          return TOTAL_SALE;
        case 10: // PROMOTION_SALE
          return PROMOTION_SALE;
        case 11: // PROMOTION_ORDER_COUNT
          return PROMOTION_ORDER_COUNT;
        case 12: // OUR_PRICE
          return OUR_PRICE;
        case 13: // MIN_FBA_PRICE_SNAPSHOT_DATE
          return MIN_FBA_PRICE_SNAPSHOT_DATE;
        case 14: // MIN_MFN_PRICE_SNAPSHOT_DATE
          return MIN_MFN_PRICE_SNAPSHOT_DATE;
        case 15: // OUR_PRICE_SNAPSHOT_DATE
          return OUR_PRICE_SNAPSHOT_DATE;
        case 16: // SALE_PRICE_SNAPSHOT_DATE
          return SALE_PRICE_SNAPSHOT_DATE;
        case 17: // FC_LOCATION
          return FC_LOCATION;
        case 18: // ASIN
          return ASIN;
        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 __DATEOFSALE_ISSET_ID = 0;
  private static final int __ITEM_ID_ISSET_ID = 1;
  private static final int __TOTALORDERCOUNT_ISSET_ID = 2;
  private static final int __AMAZONFBAINVENTORY_ISSET_ID = 3;
  private static final int __ISOUTOFSTOCK_ISSET_ID = 4;
  private static final int __SALEPRICE_ISSET_ID = 5;
  private static final int __MINFBAPRICE_ISSET_ID = 6;
  private static final int __MINMFNPRICE_ISSET_ID = 7;
  private static final int __TOTALSALE_ISSET_ID = 8;
  private static final int __PROMOTIONSALE_ISSET_ID = 9;
  private static final int __PROMOTIONORDERCOUNT_ISSET_ID = 10;
  private static final int __OURPRICE_ISSET_ID = 11;
  private static final int __MINFBAPRICESNAPSHOTDATE_ISSET_ID = 12;
  private static final int __MINMFNPRICESNAPSHOTDATE_ISSET_ID = 13;
  private static final int __OURPRICESNAPSHOTDATE_ISSET_ID = 14;
  private static final int __SALEPRICESNAPSHOTDATE_ISSET_ID = 15;
  private BitSet __isset_bit_vector = new BitSet(16);

  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.DATE_OF_SALE, new org.apache.thrift.meta_data.FieldMetaData("dateOfSale", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.TOTAL_ORDER_COUNT, new org.apache.thrift.meta_data.FieldMetaData("totalOrderCount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.AMAZON_FBA_INVENTORY, new org.apache.thrift.meta_data.FieldMetaData("amazonFbaInventory", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.IS_OUT_OF_STOCK, new org.apache.thrift.meta_data.FieldMetaData("isOutOfStock", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.SALE_PRICE, new org.apache.thrift.meta_data.FieldMetaData("salePrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.MIN_FBA_PRICE, new org.apache.thrift.meta_data.FieldMetaData("minFbaPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.MIN_MFN_PRICE, new org.apache.thrift.meta_data.FieldMetaData("minMfnPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.TOTAL_SALE, new org.apache.thrift.meta_data.FieldMetaData("totalSale", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.PROMOTION_SALE, new org.apache.thrift.meta_data.FieldMetaData("promotionSale", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.PROMOTION_ORDER_COUNT, new org.apache.thrift.meta_data.FieldMetaData("promotionOrderCount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.OUR_PRICE, new org.apache.thrift.meta_data.FieldMetaData("ourPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.MIN_FBA_PRICE_SNAPSHOT_DATE, new org.apache.thrift.meta_data.FieldMetaData("minFbaPriceSnapshotDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.MIN_MFN_PRICE_SNAPSHOT_DATE, new org.apache.thrift.meta_data.FieldMetaData("minMfnPriceSnapshotDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.OUR_PRICE_SNAPSHOT_DATE, new org.apache.thrift.meta_data.FieldMetaData("ourPriceSnapshotDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.SALE_PRICE_SNAPSHOT_DATE, new org.apache.thrift.meta_data.FieldMetaData("salePriceSnapshotDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.FC_LOCATION, new org.apache.thrift.meta_data.FieldMetaData("fcLocation", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AmazonFCWarehouseLocation.class)));
    tmpMap.put(_Fields.ASIN, new org.apache.thrift.meta_data.FieldMetaData("asin", 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(AmazonFbaSalesSnapshot.class, metaDataMap);
  }

  public AmazonFbaSalesSnapshot() {
  }

  public AmazonFbaSalesSnapshot(
    long dateOfSale,
    long item_id,
    int totalOrderCount,
    long amazonFbaInventory,
    boolean isOutOfStock,
    double salePrice,
    double minFbaPrice,
    double minMfnPrice,
    double totalSale,
    double promotionSale,
    int promotionOrderCount,
    double ourPrice,
    long minFbaPriceSnapshotDate,
    long minMfnPriceSnapshotDate,
    long ourPriceSnapshotDate,
    long salePriceSnapshotDate,
    AmazonFCWarehouseLocation fcLocation,
    String asin)
  {
    this();
    this.dateOfSale = dateOfSale;
    setDateOfSaleIsSet(true);
    this.item_id = item_id;
    setItem_idIsSet(true);
    this.totalOrderCount = totalOrderCount;
    setTotalOrderCountIsSet(true);
    this.amazonFbaInventory = amazonFbaInventory;
    setAmazonFbaInventoryIsSet(true);
    this.isOutOfStock = isOutOfStock;
    setIsOutOfStockIsSet(true);
    this.salePrice = salePrice;
    setSalePriceIsSet(true);
    this.minFbaPrice = minFbaPrice;
    setMinFbaPriceIsSet(true);
    this.minMfnPrice = minMfnPrice;
    setMinMfnPriceIsSet(true);
    this.totalSale = totalSale;
    setTotalSaleIsSet(true);
    this.promotionSale = promotionSale;
    setPromotionSaleIsSet(true);
    this.promotionOrderCount = promotionOrderCount;
    setPromotionOrderCountIsSet(true);
    this.ourPrice = ourPrice;
    setOurPriceIsSet(true);
    this.minFbaPriceSnapshotDate = minFbaPriceSnapshotDate;
    setMinFbaPriceSnapshotDateIsSet(true);
    this.minMfnPriceSnapshotDate = minMfnPriceSnapshotDate;
    setMinMfnPriceSnapshotDateIsSet(true);
    this.ourPriceSnapshotDate = ourPriceSnapshotDate;
    setOurPriceSnapshotDateIsSet(true);
    this.salePriceSnapshotDate = salePriceSnapshotDate;
    setSalePriceSnapshotDateIsSet(true);
    this.fcLocation = fcLocation;
    this.asin = asin;
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public AmazonFbaSalesSnapshot(AmazonFbaSalesSnapshot other) {
    __isset_bit_vector.clear();
    __isset_bit_vector.or(other.__isset_bit_vector);
    this.dateOfSale = other.dateOfSale;
    this.item_id = other.item_id;
    this.totalOrderCount = other.totalOrderCount;
    this.amazonFbaInventory = other.amazonFbaInventory;
    this.isOutOfStock = other.isOutOfStock;
    this.salePrice = other.salePrice;
    this.minFbaPrice = other.minFbaPrice;
    this.minMfnPrice = other.minMfnPrice;
    this.totalSale = other.totalSale;
    this.promotionSale = other.promotionSale;
    this.promotionOrderCount = other.promotionOrderCount;
    this.ourPrice = other.ourPrice;
    this.minFbaPriceSnapshotDate = other.minFbaPriceSnapshotDate;
    this.minMfnPriceSnapshotDate = other.minMfnPriceSnapshotDate;
    this.ourPriceSnapshotDate = other.ourPriceSnapshotDate;
    this.salePriceSnapshotDate = other.salePriceSnapshotDate;
    if (other.isSetFcLocation()) {
      this.fcLocation = other.fcLocation;
    }
    if (other.isSetAsin()) {
      this.asin = other.asin;
    }
  }

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

  @Override
  public void clear() {
    setDateOfSaleIsSet(false);
    this.dateOfSale = 0;
    setItem_idIsSet(false);
    this.item_id = 0;
    setTotalOrderCountIsSet(false);
    this.totalOrderCount = 0;
    setAmazonFbaInventoryIsSet(false);
    this.amazonFbaInventory = 0;
    setIsOutOfStockIsSet(false);
    this.isOutOfStock = false;
    setSalePriceIsSet(false);
    this.salePrice = 0.0;
    setMinFbaPriceIsSet(false);
    this.minFbaPrice = 0.0;
    setMinMfnPriceIsSet(false);
    this.minMfnPrice = 0.0;
    setTotalSaleIsSet(false);
    this.totalSale = 0.0;
    setPromotionSaleIsSet(false);
    this.promotionSale = 0.0;
    setPromotionOrderCountIsSet(false);
    this.promotionOrderCount = 0;
    setOurPriceIsSet(false);
    this.ourPrice = 0.0;
    setMinFbaPriceSnapshotDateIsSet(false);
    this.minFbaPriceSnapshotDate = 0;
    setMinMfnPriceSnapshotDateIsSet(false);
    this.minMfnPriceSnapshotDate = 0;
    setOurPriceSnapshotDateIsSet(false);
    this.ourPriceSnapshotDate = 0;
    setSalePriceSnapshotDateIsSet(false);
    this.salePriceSnapshotDate = 0;
    this.fcLocation = null;
    this.asin = null;
  }

  public long getDateOfSale() {
    return this.dateOfSale;
  }

  public void setDateOfSale(long dateOfSale) {
    this.dateOfSale = dateOfSale;
    setDateOfSaleIsSet(true);
  }

  public void unsetDateOfSale() {
    __isset_bit_vector.clear(__DATEOFSALE_ISSET_ID);
  }

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

  public void setDateOfSaleIsSet(boolean value) {
    __isset_bit_vector.set(__DATEOFSALE_ISSET_ID, value);
  }

  public long getItem_id() {
    return this.item_id;
  }

  public void setItem_id(long item_id) {
    this.item_id = item_id;
    setItem_idIsSet(true);
  }

  public void unsetItem_id() {
    __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
  }

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

  public void setItem_idIsSet(boolean value) {
    __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
  }

  public int getTotalOrderCount() {
    return this.totalOrderCount;
  }

  public void setTotalOrderCount(int totalOrderCount) {
    this.totalOrderCount = totalOrderCount;
    setTotalOrderCountIsSet(true);
  }

  public void unsetTotalOrderCount() {
    __isset_bit_vector.clear(__TOTALORDERCOUNT_ISSET_ID);
  }

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

  public void setTotalOrderCountIsSet(boolean value) {
    __isset_bit_vector.set(__TOTALORDERCOUNT_ISSET_ID, value);
  }

  public long getAmazonFbaInventory() {
    return this.amazonFbaInventory;
  }

  public void setAmazonFbaInventory(long amazonFbaInventory) {
    this.amazonFbaInventory = amazonFbaInventory;
    setAmazonFbaInventoryIsSet(true);
  }

  public void unsetAmazonFbaInventory() {
    __isset_bit_vector.clear(__AMAZONFBAINVENTORY_ISSET_ID);
  }

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

  public void setAmazonFbaInventoryIsSet(boolean value) {
    __isset_bit_vector.set(__AMAZONFBAINVENTORY_ISSET_ID, value);
  }

  public boolean isIsOutOfStock() {
    return this.isOutOfStock;
  }

  public void setIsOutOfStock(boolean isOutOfStock) {
    this.isOutOfStock = isOutOfStock;
    setIsOutOfStockIsSet(true);
  }

  public void unsetIsOutOfStock() {
    __isset_bit_vector.clear(__ISOUTOFSTOCK_ISSET_ID);
  }

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

  public void setIsOutOfStockIsSet(boolean value) {
    __isset_bit_vector.set(__ISOUTOFSTOCK_ISSET_ID, value);
  }

  public double getSalePrice() {
    return this.salePrice;
  }

  public void setSalePrice(double salePrice) {
    this.salePrice = salePrice;
    setSalePriceIsSet(true);
  }

  public void unsetSalePrice() {
    __isset_bit_vector.clear(__SALEPRICE_ISSET_ID);
  }

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

  public void setSalePriceIsSet(boolean value) {
    __isset_bit_vector.set(__SALEPRICE_ISSET_ID, value);
  }

  public double getMinFbaPrice() {
    return this.minFbaPrice;
  }

  public void setMinFbaPrice(double minFbaPrice) {
    this.minFbaPrice = minFbaPrice;
    setMinFbaPriceIsSet(true);
  }

  public void unsetMinFbaPrice() {
    __isset_bit_vector.clear(__MINFBAPRICE_ISSET_ID);
  }

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

  public void setMinFbaPriceIsSet(boolean value) {
    __isset_bit_vector.set(__MINFBAPRICE_ISSET_ID, value);
  }

  public double getMinMfnPrice() {
    return this.minMfnPrice;
  }

  public void setMinMfnPrice(double minMfnPrice) {
    this.minMfnPrice = minMfnPrice;
    setMinMfnPriceIsSet(true);
  }

  public void unsetMinMfnPrice() {
    __isset_bit_vector.clear(__MINMFNPRICE_ISSET_ID);
  }

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

  public void setMinMfnPriceIsSet(boolean value) {
    __isset_bit_vector.set(__MINMFNPRICE_ISSET_ID, value);
  }

  public double getTotalSale() {
    return this.totalSale;
  }

  public void setTotalSale(double totalSale) {
    this.totalSale = totalSale;
    setTotalSaleIsSet(true);
  }

  public void unsetTotalSale() {
    __isset_bit_vector.clear(__TOTALSALE_ISSET_ID);
  }

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

  public void setTotalSaleIsSet(boolean value) {
    __isset_bit_vector.set(__TOTALSALE_ISSET_ID, value);
  }

  public double getPromotionSale() {
    return this.promotionSale;
  }

  public void setPromotionSale(double promotionSale) {
    this.promotionSale = promotionSale;
    setPromotionSaleIsSet(true);
  }

  public void unsetPromotionSale() {
    __isset_bit_vector.clear(__PROMOTIONSALE_ISSET_ID);
  }

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

  public void setPromotionSaleIsSet(boolean value) {
    __isset_bit_vector.set(__PROMOTIONSALE_ISSET_ID, value);
  }

  public int getPromotionOrderCount() {
    return this.promotionOrderCount;
  }

  public void setPromotionOrderCount(int promotionOrderCount) {
    this.promotionOrderCount = promotionOrderCount;
    setPromotionOrderCountIsSet(true);
  }

  public void unsetPromotionOrderCount() {
    __isset_bit_vector.clear(__PROMOTIONORDERCOUNT_ISSET_ID);
  }

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

  public void setPromotionOrderCountIsSet(boolean value) {
    __isset_bit_vector.set(__PROMOTIONORDERCOUNT_ISSET_ID, value);
  }

  public double getOurPrice() {
    return this.ourPrice;
  }

  public void setOurPrice(double ourPrice) {
    this.ourPrice = ourPrice;
    setOurPriceIsSet(true);
  }

  public void unsetOurPrice() {
    __isset_bit_vector.clear(__OURPRICE_ISSET_ID);
  }

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

  public void setOurPriceIsSet(boolean value) {
    __isset_bit_vector.set(__OURPRICE_ISSET_ID, value);
  }

  public long getMinFbaPriceSnapshotDate() {
    return this.minFbaPriceSnapshotDate;
  }

  public void setMinFbaPriceSnapshotDate(long minFbaPriceSnapshotDate) {
    this.minFbaPriceSnapshotDate = minFbaPriceSnapshotDate;
    setMinFbaPriceSnapshotDateIsSet(true);
  }

  public void unsetMinFbaPriceSnapshotDate() {
    __isset_bit_vector.clear(__MINFBAPRICESNAPSHOTDATE_ISSET_ID);
  }

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

  public void setMinFbaPriceSnapshotDateIsSet(boolean value) {
    __isset_bit_vector.set(__MINFBAPRICESNAPSHOTDATE_ISSET_ID, value);
  }

  public long getMinMfnPriceSnapshotDate() {
    return this.minMfnPriceSnapshotDate;
  }

  public void setMinMfnPriceSnapshotDate(long minMfnPriceSnapshotDate) {
    this.minMfnPriceSnapshotDate = minMfnPriceSnapshotDate;
    setMinMfnPriceSnapshotDateIsSet(true);
  }

  public void unsetMinMfnPriceSnapshotDate() {
    __isset_bit_vector.clear(__MINMFNPRICESNAPSHOTDATE_ISSET_ID);
  }

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

  public void setMinMfnPriceSnapshotDateIsSet(boolean value) {
    __isset_bit_vector.set(__MINMFNPRICESNAPSHOTDATE_ISSET_ID, value);
  }

  public long getOurPriceSnapshotDate() {
    return this.ourPriceSnapshotDate;
  }

  public void setOurPriceSnapshotDate(long ourPriceSnapshotDate) {
    this.ourPriceSnapshotDate = ourPriceSnapshotDate;
    setOurPriceSnapshotDateIsSet(true);
  }

  public void unsetOurPriceSnapshotDate() {
    __isset_bit_vector.clear(__OURPRICESNAPSHOTDATE_ISSET_ID);
  }

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

  public void setOurPriceSnapshotDateIsSet(boolean value) {
    __isset_bit_vector.set(__OURPRICESNAPSHOTDATE_ISSET_ID, value);
  }

  public long getSalePriceSnapshotDate() {
    return this.salePriceSnapshotDate;
  }

  public void setSalePriceSnapshotDate(long salePriceSnapshotDate) {
    this.salePriceSnapshotDate = salePriceSnapshotDate;
    setSalePriceSnapshotDateIsSet(true);
  }

  public void unsetSalePriceSnapshotDate() {
    __isset_bit_vector.clear(__SALEPRICESNAPSHOTDATE_ISSET_ID);
  }

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

  public void setSalePriceSnapshotDateIsSet(boolean value) {
    __isset_bit_vector.set(__SALEPRICESNAPSHOTDATE_ISSET_ID, value);
  }

  /**
   * 
   * @see AmazonFCWarehouseLocation
   */
  public AmazonFCWarehouseLocation getFcLocation() {
    return this.fcLocation;
  }

  /**
   * 
   * @see AmazonFCWarehouseLocation
   */
  public void setFcLocation(AmazonFCWarehouseLocation fcLocation) {
    this.fcLocation = fcLocation;
  }

  public void unsetFcLocation() {
    this.fcLocation = null;
  }

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

  public void setFcLocationIsSet(boolean value) {
    if (!value) {
      this.fcLocation = null;
    }
  }

  public String getAsin() {
    return this.asin;
  }

  public void setAsin(String asin) {
    this.asin = asin;
  }

  public void unsetAsin() {
    this.asin = null;
  }

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

  public void setAsinIsSet(boolean value) {
    if (!value) {
      this.asin = null;
    }
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case DATE_OF_SALE:
      if (value == null) {
        unsetDateOfSale();
      } else {
        setDateOfSale((Long)value);
      }
      break;

    case ITEM_ID:
      if (value == null) {
        unsetItem_id();
      } else {
        setItem_id((Long)value);
      }
      break;

    case TOTAL_ORDER_COUNT:
      if (value == null) {
        unsetTotalOrderCount();
      } else {
        setTotalOrderCount((Integer)value);
      }
      break;

    case AMAZON_FBA_INVENTORY:
      if (value == null) {
        unsetAmazonFbaInventory();
      } else {
        setAmazonFbaInventory((Long)value);
      }
      break;

    case IS_OUT_OF_STOCK:
      if (value == null) {
        unsetIsOutOfStock();
      } else {
        setIsOutOfStock((Boolean)value);
      }
      break;

    case SALE_PRICE:
      if (value == null) {
        unsetSalePrice();
      } else {
        setSalePrice((Double)value);
      }
      break;

    case MIN_FBA_PRICE:
      if (value == null) {
        unsetMinFbaPrice();
      } else {
        setMinFbaPrice((Double)value);
      }
      break;

    case MIN_MFN_PRICE:
      if (value == null) {
        unsetMinMfnPrice();
      } else {
        setMinMfnPrice((Double)value);
      }
      break;

    case TOTAL_SALE:
      if (value == null) {
        unsetTotalSale();
      } else {
        setTotalSale((Double)value);
      }
      break;

    case PROMOTION_SALE:
      if (value == null) {
        unsetPromotionSale();
      } else {
        setPromotionSale((Double)value);
      }
      break;

    case PROMOTION_ORDER_COUNT:
      if (value == null) {
        unsetPromotionOrderCount();
      } else {
        setPromotionOrderCount((Integer)value);
      }
      break;

    case OUR_PRICE:
      if (value == null) {
        unsetOurPrice();
      } else {
        setOurPrice((Double)value);
      }
      break;

    case MIN_FBA_PRICE_SNAPSHOT_DATE:
      if (value == null) {
        unsetMinFbaPriceSnapshotDate();
      } else {
        setMinFbaPriceSnapshotDate((Long)value);
      }
      break;

    case MIN_MFN_PRICE_SNAPSHOT_DATE:
      if (value == null) {
        unsetMinMfnPriceSnapshotDate();
      } else {
        setMinMfnPriceSnapshotDate((Long)value);
      }
      break;

    case OUR_PRICE_SNAPSHOT_DATE:
      if (value == null) {
        unsetOurPriceSnapshotDate();
      } else {
        setOurPriceSnapshotDate((Long)value);
      }
      break;

    case SALE_PRICE_SNAPSHOT_DATE:
      if (value == null) {
        unsetSalePriceSnapshotDate();
      } else {
        setSalePriceSnapshotDate((Long)value);
      }
      break;

    case FC_LOCATION:
      if (value == null) {
        unsetFcLocation();
      } else {
        setFcLocation((AmazonFCWarehouseLocation)value);
      }
      break;

    case ASIN:
      if (value == null) {
        unsetAsin();
      } else {
        setAsin((String)value);
      }
      break;

    }
  }

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

    case ITEM_ID:
      return Long.valueOf(getItem_id());

    case TOTAL_ORDER_COUNT:
      return Integer.valueOf(getTotalOrderCount());

    case AMAZON_FBA_INVENTORY:
      return Long.valueOf(getAmazonFbaInventory());

    case IS_OUT_OF_STOCK:
      return Boolean.valueOf(isIsOutOfStock());

    case SALE_PRICE:
      return Double.valueOf(getSalePrice());

    case MIN_FBA_PRICE:
      return Double.valueOf(getMinFbaPrice());

    case MIN_MFN_PRICE:
      return Double.valueOf(getMinMfnPrice());

    case TOTAL_SALE:
      return Double.valueOf(getTotalSale());

    case PROMOTION_SALE:
      return Double.valueOf(getPromotionSale());

    case PROMOTION_ORDER_COUNT:
      return Integer.valueOf(getPromotionOrderCount());

    case OUR_PRICE:
      return Double.valueOf(getOurPrice());

    case MIN_FBA_PRICE_SNAPSHOT_DATE:
      return Long.valueOf(getMinFbaPriceSnapshotDate());

    case MIN_MFN_PRICE_SNAPSHOT_DATE:
      return Long.valueOf(getMinMfnPriceSnapshotDate());

    case OUR_PRICE_SNAPSHOT_DATE:
      return Long.valueOf(getOurPriceSnapshotDate());

    case SALE_PRICE_SNAPSHOT_DATE:
      return Long.valueOf(getSalePriceSnapshotDate());

    case FC_LOCATION:
      return getFcLocation();

    case ASIN:
      return getAsin();

    }
    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 DATE_OF_SALE:
      return isSetDateOfSale();
    case ITEM_ID:
      return isSetItem_id();
    case TOTAL_ORDER_COUNT:
      return isSetTotalOrderCount();
    case AMAZON_FBA_INVENTORY:
      return isSetAmazonFbaInventory();
    case IS_OUT_OF_STOCK:
      return isSetIsOutOfStock();
    case SALE_PRICE:
      return isSetSalePrice();
    case MIN_FBA_PRICE:
      return isSetMinFbaPrice();
    case MIN_MFN_PRICE:
      return isSetMinMfnPrice();
    case TOTAL_SALE:
      return isSetTotalSale();
    case PROMOTION_SALE:
      return isSetPromotionSale();
    case PROMOTION_ORDER_COUNT:
      return isSetPromotionOrderCount();
    case OUR_PRICE:
      return isSetOurPrice();
    case MIN_FBA_PRICE_SNAPSHOT_DATE:
      return isSetMinFbaPriceSnapshotDate();
    case MIN_MFN_PRICE_SNAPSHOT_DATE:
      return isSetMinMfnPriceSnapshotDate();
    case OUR_PRICE_SNAPSHOT_DATE:
      return isSetOurPriceSnapshotDate();
    case SALE_PRICE_SNAPSHOT_DATE:
      return isSetSalePriceSnapshotDate();
    case FC_LOCATION:
      return isSetFcLocation();
    case ASIN:
      return isSetAsin();
    }
    throw new IllegalStateException();
  }

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

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

    boolean this_present_dateOfSale = true;
    boolean that_present_dateOfSale = true;
    if (this_present_dateOfSale || that_present_dateOfSale) {
      if (!(this_present_dateOfSale && that_present_dateOfSale))
        return false;
      if (this.dateOfSale != that.dateOfSale)
        return false;
    }

    boolean this_present_item_id = true;
    boolean that_present_item_id = true;
    if (this_present_item_id || that_present_item_id) {
      if (!(this_present_item_id && that_present_item_id))
        return false;
      if (this.item_id != that.item_id)
        return false;
    }

    boolean this_present_totalOrderCount = true;
    boolean that_present_totalOrderCount = true;
    if (this_present_totalOrderCount || that_present_totalOrderCount) {
      if (!(this_present_totalOrderCount && that_present_totalOrderCount))
        return false;
      if (this.totalOrderCount != that.totalOrderCount)
        return false;
    }

    boolean this_present_amazonFbaInventory = true;
    boolean that_present_amazonFbaInventory = true;
    if (this_present_amazonFbaInventory || that_present_amazonFbaInventory) {
      if (!(this_present_amazonFbaInventory && that_present_amazonFbaInventory))
        return false;
      if (this.amazonFbaInventory != that.amazonFbaInventory)
        return false;
    }

    boolean this_present_isOutOfStock = true;
    boolean that_present_isOutOfStock = true;
    if (this_present_isOutOfStock || that_present_isOutOfStock) {
      if (!(this_present_isOutOfStock && that_present_isOutOfStock))
        return false;
      if (this.isOutOfStock != that.isOutOfStock)
        return false;
    }

    boolean this_present_salePrice = true;
    boolean that_present_salePrice = true;
    if (this_present_salePrice || that_present_salePrice) {
      if (!(this_present_salePrice && that_present_salePrice))
        return false;
      if (this.salePrice != that.salePrice)
        return false;
    }

    boolean this_present_minFbaPrice = true;
    boolean that_present_minFbaPrice = true;
    if (this_present_minFbaPrice || that_present_minFbaPrice) {
      if (!(this_present_minFbaPrice && that_present_minFbaPrice))
        return false;
      if (this.minFbaPrice != that.minFbaPrice)
        return false;
    }

    boolean this_present_minMfnPrice = true;
    boolean that_present_minMfnPrice = true;
    if (this_present_minMfnPrice || that_present_minMfnPrice) {
      if (!(this_present_minMfnPrice && that_present_minMfnPrice))
        return false;
      if (this.minMfnPrice != that.minMfnPrice)
        return false;
    }

    boolean this_present_totalSale = true;
    boolean that_present_totalSale = true;
    if (this_present_totalSale || that_present_totalSale) {
      if (!(this_present_totalSale && that_present_totalSale))
        return false;
      if (this.totalSale != that.totalSale)
        return false;
    }

    boolean this_present_promotionSale = true;
    boolean that_present_promotionSale = true;
    if (this_present_promotionSale || that_present_promotionSale) {
      if (!(this_present_promotionSale && that_present_promotionSale))
        return false;
      if (this.promotionSale != that.promotionSale)
        return false;
    }

    boolean this_present_promotionOrderCount = true;
    boolean that_present_promotionOrderCount = true;
    if (this_present_promotionOrderCount || that_present_promotionOrderCount) {
      if (!(this_present_promotionOrderCount && that_present_promotionOrderCount))
        return false;
      if (this.promotionOrderCount != that.promotionOrderCount)
        return false;
    }

    boolean this_present_ourPrice = true;
    boolean that_present_ourPrice = true;
    if (this_present_ourPrice || that_present_ourPrice) {
      if (!(this_present_ourPrice && that_present_ourPrice))
        return false;
      if (this.ourPrice != that.ourPrice)
        return false;
    }

    boolean this_present_minFbaPriceSnapshotDate = true;
    boolean that_present_minFbaPriceSnapshotDate = true;
    if (this_present_minFbaPriceSnapshotDate || that_present_minFbaPriceSnapshotDate) {
      if (!(this_present_minFbaPriceSnapshotDate && that_present_minFbaPriceSnapshotDate))
        return false;
      if (this.minFbaPriceSnapshotDate != that.minFbaPriceSnapshotDate)
        return false;
    }

    boolean this_present_minMfnPriceSnapshotDate = true;
    boolean that_present_minMfnPriceSnapshotDate = true;
    if (this_present_minMfnPriceSnapshotDate || that_present_minMfnPriceSnapshotDate) {
      if (!(this_present_minMfnPriceSnapshotDate && that_present_minMfnPriceSnapshotDate))
        return false;
      if (this.minMfnPriceSnapshotDate != that.minMfnPriceSnapshotDate)
        return false;
    }

    boolean this_present_ourPriceSnapshotDate = true;
    boolean that_present_ourPriceSnapshotDate = true;
    if (this_present_ourPriceSnapshotDate || that_present_ourPriceSnapshotDate) {
      if (!(this_present_ourPriceSnapshotDate && that_present_ourPriceSnapshotDate))
        return false;
      if (this.ourPriceSnapshotDate != that.ourPriceSnapshotDate)
        return false;
    }

    boolean this_present_salePriceSnapshotDate = true;
    boolean that_present_salePriceSnapshotDate = true;
    if (this_present_salePriceSnapshotDate || that_present_salePriceSnapshotDate) {
      if (!(this_present_salePriceSnapshotDate && that_present_salePriceSnapshotDate))
        return false;
      if (this.salePriceSnapshotDate != that.salePriceSnapshotDate)
        return false;
    }

    boolean this_present_fcLocation = true && this.isSetFcLocation();
    boolean that_present_fcLocation = true && that.isSetFcLocation();
    if (this_present_fcLocation || that_present_fcLocation) {
      if (!(this_present_fcLocation && that_present_fcLocation))
        return false;
      if (!this.fcLocation.equals(that.fcLocation))
        return false;
    }

    boolean this_present_asin = true && this.isSetAsin();
    boolean that_present_asin = true && that.isSetAsin();
    if (this_present_asin || that_present_asin) {
      if (!(this_present_asin && that_present_asin))
        return false;
      if (!this.asin.equals(that.asin))
        return false;
    }

    return true;
  }

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

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

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

    lastComparison = Boolean.valueOf(isSetDateOfSale()).compareTo(typedOther.isSetDateOfSale());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDateOfSale()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dateOfSale, typedOther.dateOfSale);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(typedOther.isSetItem_id());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetItem_id()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_id, typedOther.item_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTotalOrderCount()).compareTo(typedOther.isSetTotalOrderCount());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTotalOrderCount()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalOrderCount, typedOther.totalOrderCount);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetAmazonFbaInventory()).compareTo(typedOther.isSetAmazonFbaInventory());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAmazonFbaInventory()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amazonFbaInventory, typedOther.amazonFbaInventory);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetIsOutOfStock()).compareTo(typedOther.isSetIsOutOfStock());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsOutOfStock()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isOutOfStock, typedOther.isOutOfStock);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSalePrice()).compareTo(typedOther.isSetSalePrice());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSalePrice()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.salePrice, typedOther.salePrice);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMinFbaPrice()).compareTo(typedOther.isSetMinFbaPrice());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMinFbaPrice()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.minFbaPrice, typedOther.minFbaPrice);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMinMfnPrice()).compareTo(typedOther.isSetMinMfnPrice());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMinMfnPrice()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.minMfnPrice, typedOther.minMfnPrice);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTotalSale()).compareTo(typedOther.isSetTotalSale());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTotalSale()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalSale, typedOther.totalSale);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPromotionSale()).compareTo(typedOther.isSetPromotionSale());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPromotionSale()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.promotionSale, typedOther.promotionSale);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPromotionOrderCount()).compareTo(typedOther.isSetPromotionOrderCount());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPromotionOrderCount()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.promotionOrderCount, typedOther.promotionOrderCount);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetOurPrice()).compareTo(typedOther.isSetOurPrice());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOurPrice()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ourPrice, typedOther.ourPrice);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMinFbaPriceSnapshotDate()).compareTo(typedOther.isSetMinFbaPriceSnapshotDate());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMinFbaPriceSnapshotDate()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.minFbaPriceSnapshotDate, typedOther.minFbaPriceSnapshotDate);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMinMfnPriceSnapshotDate()).compareTo(typedOther.isSetMinMfnPriceSnapshotDate());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMinMfnPriceSnapshotDate()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.minMfnPriceSnapshotDate, typedOther.minMfnPriceSnapshotDate);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetOurPriceSnapshotDate()).compareTo(typedOther.isSetOurPriceSnapshotDate());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOurPriceSnapshotDate()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ourPriceSnapshotDate, typedOther.ourPriceSnapshotDate);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSalePriceSnapshotDate()).compareTo(typedOther.isSetSalePriceSnapshotDate());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSalePriceSnapshotDate()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.salePriceSnapshotDate, typedOther.salePriceSnapshotDate);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetFcLocation()).compareTo(typedOther.isSetFcLocation());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFcLocation()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fcLocation, typedOther.fcLocation);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetAsin()).compareTo(typedOther.isSetAsin());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAsin()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asin, typedOther.asin);
      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: // DATE_OF_SALE
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.dateOfSale = iprot.readI64();
            setDateOfSaleIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 2: // ITEM_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.item_id = iprot.readI64();
            setItem_idIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 3: // TOTAL_ORDER_COUNT
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.totalOrderCount = iprot.readI32();
            setTotalOrderCountIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 4: // AMAZON_FBA_INVENTORY
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.amazonFbaInventory = iprot.readI64();
            setAmazonFbaInventoryIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 5: // IS_OUT_OF_STOCK
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
            this.isOutOfStock = iprot.readBool();
            setIsOutOfStockIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 6: // SALE_PRICE
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.salePrice = iprot.readDouble();
            setSalePriceIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 7: // MIN_FBA_PRICE
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.minFbaPrice = iprot.readDouble();
            setMinFbaPriceIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 8: // MIN_MFN_PRICE
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.minMfnPrice = iprot.readDouble();
            setMinMfnPriceIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 9: // TOTAL_SALE
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.totalSale = iprot.readDouble();
            setTotalSaleIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 10: // PROMOTION_SALE
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.promotionSale = iprot.readDouble();
            setPromotionSaleIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 11: // PROMOTION_ORDER_COUNT
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.promotionOrderCount = iprot.readI32();
            setPromotionOrderCountIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 12: // OUR_PRICE
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.ourPrice = iprot.readDouble();
            setOurPriceIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 13: // MIN_FBA_PRICE_SNAPSHOT_DATE
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.minFbaPriceSnapshotDate = iprot.readI64();
            setMinFbaPriceSnapshotDateIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 14: // MIN_MFN_PRICE_SNAPSHOT_DATE
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.minMfnPriceSnapshotDate = iprot.readI64();
            setMinMfnPriceSnapshotDateIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 15: // OUR_PRICE_SNAPSHOT_DATE
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.ourPriceSnapshotDate = iprot.readI64();
            setOurPriceSnapshotDateIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 16: // SALE_PRICE_SNAPSHOT_DATE
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.salePriceSnapshotDate = iprot.readI64();
            setSalePriceSnapshotDateIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 17: // FC_LOCATION
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.fcLocation = AmazonFCWarehouseLocation.findByValue(iprot.readI32());
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 18: // ASIN
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.asin = 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(DATE_OF_SALE_FIELD_DESC);
    oprot.writeI64(this.dateOfSale);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
    oprot.writeI64(this.item_id);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(TOTAL_ORDER_COUNT_FIELD_DESC);
    oprot.writeI32(this.totalOrderCount);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(AMAZON_FBA_INVENTORY_FIELD_DESC);
    oprot.writeI64(this.amazonFbaInventory);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(IS_OUT_OF_STOCK_FIELD_DESC);
    oprot.writeBool(this.isOutOfStock);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(SALE_PRICE_FIELD_DESC);
    oprot.writeDouble(this.salePrice);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(MIN_FBA_PRICE_FIELD_DESC);
    oprot.writeDouble(this.minFbaPrice);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(MIN_MFN_PRICE_FIELD_DESC);
    oprot.writeDouble(this.minMfnPrice);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(TOTAL_SALE_FIELD_DESC);
    oprot.writeDouble(this.totalSale);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(PROMOTION_SALE_FIELD_DESC);
    oprot.writeDouble(this.promotionSale);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(PROMOTION_ORDER_COUNT_FIELD_DESC);
    oprot.writeI32(this.promotionOrderCount);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(OUR_PRICE_FIELD_DESC);
    oprot.writeDouble(this.ourPrice);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(MIN_FBA_PRICE_SNAPSHOT_DATE_FIELD_DESC);
    oprot.writeI64(this.minFbaPriceSnapshotDate);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(MIN_MFN_PRICE_SNAPSHOT_DATE_FIELD_DESC);
    oprot.writeI64(this.minMfnPriceSnapshotDate);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(OUR_PRICE_SNAPSHOT_DATE_FIELD_DESC);
    oprot.writeI64(this.ourPriceSnapshotDate);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(SALE_PRICE_SNAPSHOT_DATE_FIELD_DESC);
    oprot.writeI64(this.salePriceSnapshotDate);
    oprot.writeFieldEnd();
    if (this.fcLocation != null) {
      oprot.writeFieldBegin(FC_LOCATION_FIELD_DESC);
      oprot.writeI32(this.fcLocation.getValue());
      oprot.writeFieldEnd();
    }
    if (this.asin != null) {
      oprot.writeFieldBegin(ASIN_FIELD_DESC);
      oprot.writeString(this.asin);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }

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

    sb.append("dateOfSale:");
    sb.append(this.dateOfSale);
    first = false;
    if (!first) sb.append(", ");
    sb.append("item_id:");
    sb.append(this.item_id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("totalOrderCount:");
    sb.append(this.totalOrderCount);
    first = false;
    if (!first) sb.append(", ");
    sb.append("amazonFbaInventory:");
    sb.append(this.amazonFbaInventory);
    first = false;
    if (!first) sb.append(", ");
    sb.append("isOutOfStock:");
    sb.append(this.isOutOfStock);
    first = false;
    if (!first) sb.append(", ");
    sb.append("salePrice:");
    sb.append(this.salePrice);
    first = false;
    if (!first) sb.append(", ");
    sb.append("minFbaPrice:");
    sb.append(this.minFbaPrice);
    first = false;
    if (!first) sb.append(", ");
    sb.append("minMfnPrice:");
    sb.append(this.minMfnPrice);
    first = false;
    if (!first) sb.append(", ");
    sb.append("totalSale:");
    sb.append(this.totalSale);
    first = false;
    if (!first) sb.append(", ");
    sb.append("promotionSale:");
    sb.append(this.promotionSale);
    first = false;
    if (!first) sb.append(", ");
    sb.append("promotionOrderCount:");
    sb.append(this.promotionOrderCount);
    first = false;
    if (!first) sb.append(", ");
    sb.append("ourPrice:");
    sb.append(this.ourPrice);
    first = false;
    if (!first) sb.append(", ");
    sb.append("minFbaPriceSnapshotDate:");
    sb.append(this.minFbaPriceSnapshotDate);
    first = false;
    if (!first) sb.append(", ");
    sb.append("minMfnPriceSnapshotDate:");
    sb.append(this.minMfnPriceSnapshotDate);
    first = false;
    if (!first) sb.append(", ");
    sb.append("ourPriceSnapshotDate:");
    sb.append(this.ourPriceSnapshotDate);
    first = false;
    if (!first) sb.append(", ");
    sb.append("salePriceSnapshotDate:");
    sb.append(this.salePriceSnapshotDate);
    first = false;
    if (!first) sb.append(", ");
    sb.append("fcLocation:");
    if (this.fcLocation == null) {
      sb.append("null");
    } else {
      sb.append(this.fcLocation);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("asin:");
    if (this.asin == null) {
      sb.append("null");
    } else {
      sb.append(this.asin);
    }
    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);
    }
  }

}