Subversion Repositories SmartDukaan

Rev

Rev 19317 | 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.dtr;

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;

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

  private static final org.apache.thrift.protocol.TField _ID_FIELD_DESC = new org.apache.thrift.protocol.TField("_id", org.apache.thrift.protocol.TType.I64, (short)1);
  private static final org.apache.thrift.protocol.TField AVAILABLE_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("available_price", org.apache.thrift.protocol.TType.DOUBLE, (short)2);
  private static final org.apache.thrift.protocol.TField MARKET_PLACE_URL_FIELD_DESC = new org.apache.thrift.protocol.TField("marketPlaceUrl", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField IN_STOCK_FIELD_DESC = new org.apache.thrift.protocol.TField("in_stock", org.apache.thrift.protocol.TType.I64, (short)4);
  private static final org.apache.thrift.protocol.TField SOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("source_id", org.apache.thrift.protocol.TType.I64, (short)5);
  private static final org.apache.thrift.protocol.TField SOURCE_PRODUCT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("source_product_name", org.apache.thrift.protocol.TType.STRING, (short)6);
  private static final org.apache.thrift.protocol.TField THUMBNAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("thumbnail", org.apache.thrift.protocol.TType.STRING, (short)7);
  private static final org.apache.thrift.protocol.TField CASH_BACK_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("cash_back_type", org.apache.thrift.protocol.TType.I64, (short)8);
  private static final org.apache.thrift.protocol.TField CASH_BACK_FIELD_DESC = new org.apache.thrift.protocol.TField("cash_back", org.apache.thrift.protocol.TType.DOUBLE, (short)9);
  private static final org.apache.thrift.protocol.TField COUPON_FIELD_DESC = new org.apache.thrift.protocol.TField("coupon", org.apache.thrift.protocol.TType.STRING, (short)10);
  private static final org.apache.thrift.protocol.TField COD_AVAILABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("codAvailable", org.apache.thrift.protocol.TType.I64, (short)11);
  private static final org.apache.thrift.protocol.TField TAGLINE_FIELD_DESC = new org.apache.thrift.protocol.TField("tagline", org.apache.thrift.protocol.TType.STRING, (short)12);
  private static final org.apache.thrift.protocol.TField OFFER_FIELD_DESC = new org.apache.thrift.protocol.TField("offer", org.apache.thrift.protocol.TType.STRING, (short)13);
  private static final org.apache.thrift.protocol.TField GROSS_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("gross_price", org.apache.thrift.protocol.TType.DOUBLE, (short)14);
  private static final org.apache.thrift.protocol.TField CHEAPEST_BULK_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("cheapestBulkPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)15);
  private static final org.apache.thrift.protocol.TField PACK_QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("packQuantity", org.apache.thrift.protocol.TType.I64, (short)16);
  private static final org.apache.thrift.protocol.TField NET_PRICE_AFTER_CASH_BACK_FIELD_DESC = new org.apache.thrift.protocol.TField("netPriceAfterCashBack", org.apache.thrift.protocol.TType.DOUBLE, (short)17);
  private static final org.apache.thrift.protocol.TField SHOW_NET_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("showNetPrice", org.apache.thrift.protocol.TType.I64, (short)18);
  private static final org.apache.thrift.protocol.TField CATEGORY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("category_id", org.apache.thrift.protocol.TType.I64, (short)19);
  private static final org.apache.thrift.protocol.TField SUB_CATEGORY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("subCategoryId", org.apache.thrift.protocol.TType.I64, (short)20);
  private static final org.apache.thrift.protocol.TField IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("identifier", org.apache.thrift.protocol.TType.STRING, (short)21);

  private long _id; // required
  private double available_price; // required
  private String marketPlaceUrl; // required
  private long in_stock; // required
  private long source_id; // required
  private String source_product_name; // required
  private String thumbnail; // required
  private long cash_back_type; // required
  private double cash_back; // required
  private String coupon; // required
  private long codAvailable; // required
  private String tagline; // required
  private String offer; // required
  private double gross_price; // required
  private double cheapestBulkPrice; // required
  private long packQuantity; // required
  private double netPriceAfterCashBack; // required
  private long showNetPrice; // required
  private long category_id; // required
  private long subCategoryId; // required
  private String identifier; // required

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    _ID((short)1, "_id"),
    AVAILABLE_PRICE((short)2, "available_price"),
    MARKET_PLACE_URL((short)3, "marketPlaceUrl"),
    IN_STOCK((short)4, "in_stock"),
    SOURCE_ID((short)5, "source_id"),
    SOURCE_PRODUCT_NAME((short)6, "source_product_name"),
    THUMBNAIL((short)7, "thumbnail"),
    CASH_BACK_TYPE((short)8, "cash_back_type"),
    CASH_BACK((short)9, "cash_back"),
    COUPON((short)10, "coupon"),
    COD_AVAILABLE((short)11, "codAvailable"),
    TAGLINE((short)12, "tagline"),
    OFFER((short)13, "offer"),
    GROSS_PRICE((short)14, "gross_price"),
    CHEAPEST_BULK_PRICE((short)15, "cheapestBulkPrice"),
    PACK_QUANTITY((short)16, "packQuantity"),
    NET_PRICE_AFTER_CASH_BACK((short)17, "netPriceAfterCashBack"),
    SHOW_NET_PRICE((short)18, "showNetPrice"),
    CATEGORY_ID((short)19, "category_id"),
    SUB_CATEGORY_ID((short)20, "subCategoryId"),
    IDENTIFIER((short)21, "identifier");

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

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

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 1: // _ID
          return _ID;
        case 2: // AVAILABLE_PRICE
          return AVAILABLE_PRICE;
        case 3: // MARKET_PLACE_URL
          return MARKET_PLACE_URL;
        case 4: // IN_STOCK
          return IN_STOCK;
        case 5: // SOURCE_ID
          return SOURCE_ID;
        case 6: // SOURCE_PRODUCT_NAME
          return SOURCE_PRODUCT_NAME;
        case 7: // THUMBNAIL
          return THUMBNAIL;
        case 8: // CASH_BACK_TYPE
          return CASH_BACK_TYPE;
        case 9: // CASH_BACK
          return CASH_BACK;
        case 10: // COUPON
          return COUPON;
        case 11: // COD_AVAILABLE
          return COD_AVAILABLE;
        case 12: // TAGLINE
          return TAGLINE;
        case 13: // OFFER
          return OFFER;
        case 14: // GROSS_PRICE
          return GROSS_PRICE;
        case 15: // CHEAPEST_BULK_PRICE
          return CHEAPEST_BULK_PRICE;
        case 16: // PACK_QUANTITY
          return PACK_QUANTITY;
        case 17: // NET_PRICE_AFTER_CASH_BACK
          return NET_PRICE_AFTER_CASH_BACK;
        case 18: // SHOW_NET_PRICE
          return SHOW_NET_PRICE;
        case 19: // CATEGORY_ID
          return CATEGORY_ID;
        case 20: // SUB_CATEGORY_ID
          return SUB_CATEGORY_ID;
        case 21: // IDENTIFIER
          return IDENTIFIER;
        default:
          return null;
      }
    }

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

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

    private final short _thriftId;
    private final String _fieldName;

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

    public short getThriftFieldId() {
      return _thriftId;
    }

    public String getFieldName() {
      return _fieldName;
    }
  }

  // isset id assignments
  private static final int ___ID_ISSET_ID = 0;
  private static final int __AVAILABLE_PRICE_ISSET_ID = 1;
  private static final int __IN_STOCK_ISSET_ID = 2;
  private static final int __SOURCE_ID_ISSET_ID = 3;
  private static final int __CASH_BACK_TYPE_ISSET_ID = 4;
  private static final int __CASH_BACK_ISSET_ID = 5;
  private static final int __CODAVAILABLE_ISSET_ID = 6;
  private static final int __GROSS_PRICE_ISSET_ID = 7;
  private static final int __CHEAPESTBULKPRICE_ISSET_ID = 8;
  private static final int __PACKQUANTITY_ISSET_ID = 9;
  private static final int __NETPRICEAFTERCASHBACK_ISSET_ID = 10;
  private static final int __SHOWNETPRICE_ISSET_ID = 11;
  private static final int __CATEGORY_ID_ISSET_ID = 12;
  private static final int __SUBCATEGORYID_ISSET_ID = 13;
  private BitSet __isset_bit_vector = new BitSet(14);

  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields._ID, new org.apache.thrift.meta_data.FieldMetaData("_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.AVAILABLE_PRICE, new org.apache.thrift.meta_data.FieldMetaData("available_price", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.MARKET_PLACE_URL, new org.apache.thrift.meta_data.FieldMetaData("marketPlaceUrl", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.IN_STOCK, new org.apache.thrift.meta_data.FieldMetaData("in_stock", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.SOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("source_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.SOURCE_PRODUCT_NAME, new org.apache.thrift.meta_data.FieldMetaData("source_product_name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.THUMBNAIL, new org.apache.thrift.meta_data.FieldMetaData("thumbnail", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.CASH_BACK_TYPE, new org.apache.thrift.meta_data.FieldMetaData("cash_back_type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.CASH_BACK, new org.apache.thrift.meta_data.FieldMetaData("cash_back", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.COUPON, new org.apache.thrift.meta_data.FieldMetaData("coupon", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.COD_AVAILABLE, new org.apache.thrift.meta_data.FieldMetaData("codAvailable", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.TAGLINE, new org.apache.thrift.meta_data.FieldMetaData("tagline", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.OFFER, new org.apache.thrift.meta_data.FieldMetaData("offer", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.GROSS_PRICE, new org.apache.thrift.meta_data.FieldMetaData("gross_price", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.CHEAPEST_BULK_PRICE, new org.apache.thrift.meta_data.FieldMetaData("cheapestBulkPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.PACK_QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("packQuantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.NET_PRICE_AFTER_CASH_BACK, new org.apache.thrift.meta_data.FieldMetaData("netPriceAfterCashBack", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.SHOW_NET_PRICE, new org.apache.thrift.meta_data.FieldMetaData("showNetPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.CATEGORY_ID, new org.apache.thrift.meta_data.FieldMetaData("category_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.SUB_CATEGORY_ID, new org.apache.thrift.meta_data.FieldMetaData("subCategoryId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("identifier", 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(LivePricing.class, metaDataMap);
  }

  public LivePricing() {
  }

  public LivePricing(
    long _id,
    double available_price,
    String marketPlaceUrl,
    long in_stock,
    long source_id,
    String source_product_name,
    String thumbnail,
    long cash_back_type,
    double cash_back,
    String coupon,
    long codAvailable,
    String tagline,
    String offer,
    double gross_price,
    double cheapestBulkPrice,
    long packQuantity,
    double netPriceAfterCashBack,
    long showNetPrice,
    long category_id,
    long subCategoryId,
    String identifier)
  {
    this();
    this._id = _id;
    set_idIsSet(true);
    this.available_price = available_price;
    setAvailable_priceIsSet(true);
    this.marketPlaceUrl = marketPlaceUrl;
    this.in_stock = in_stock;
    setIn_stockIsSet(true);
    this.source_id = source_id;
    setSource_idIsSet(true);
    this.source_product_name = source_product_name;
    this.thumbnail = thumbnail;
    this.cash_back_type = cash_back_type;
    setCash_back_typeIsSet(true);
    this.cash_back = cash_back;
    setCash_backIsSet(true);
    this.coupon = coupon;
    this.codAvailable = codAvailable;
    setCodAvailableIsSet(true);
    this.tagline = tagline;
    this.offer = offer;
    this.gross_price = gross_price;
    setGross_priceIsSet(true);
    this.cheapestBulkPrice = cheapestBulkPrice;
    setCheapestBulkPriceIsSet(true);
    this.packQuantity = packQuantity;
    setPackQuantityIsSet(true);
    this.netPriceAfterCashBack = netPriceAfterCashBack;
    setNetPriceAfterCashBackIsSet(true);
    this.showNetPrice = showNetPrice;
    setShowNetPriceIsSet(true);
    this.category_id = category_id;
    setCategory_idIsSet(true);
    this.subCategoryId = subCategoryId;
    setSubCategoryIdIsSet(true);
    this.identifier = identifier;
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public LivePricing(LivePricing other) {
    __isset_bit_vector.clear();
    __isset_bit_vector.or(other.__isset_bit_vector);
    this._id = other._id;
    this.available_price = other.available_price;
    if (other.isSetMarketPlaceUrl()) {
      this.marketPlaceUrl = other.marketPlaceUrl;
    }
    this.in_stock = other.in_stock;
    this.source_id = other.source_id;
    if (other.isSetSource_product_name()) {
      this.source_product_name = other.source_product_name;
    }
    if (other.isSetThumbnail()) {
      this.thumbnail = other.thumbnail;
    }
    this.cash_back_type = other.cash_back_type;
    this.cash_back = other.cash_back;
    if (other.isSetCoupon()) {
      this.coupon = other.coupon;
    }
    this.codAvailable = other.codAvailable;
    if (other.isSetTagline()) {
      this.tagline = other.tagline;
    }
    if (other.isSetOffer()) {
      this.offer = other.offer;
    }
    this.gross_price = other.gross_price;
    this.cheapestBulkPrice = other.cheapestBulkPrice;
    this.packQuantity = other.packQuantity;
    this.netPriceAfterCashBack = other.netPriceAfterCashBack;
    this.showNetPrice = other.showNetPrice;
    this.category_id = other.category_id;
    this.subCategoryId = other.subCategoryId;
    if (other.isSetIdentifier()) {
      this.identifier = other.identifier;
    }
  }

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

  @Override
  public void clear() {
    set_idIsSet(false);
    this._id = 0;
    setAvailable_priceIsSet(false);
    this.available_price = 0.0;
    this.marketPlaceUrl = null;
    setIn_stockIsSet(false);
    this.in_stock = 0;
    setSource_idIsSet(false);
    this.source_id = 0;
    this.source_product_name = null;
    this.thumbnail = null;
    setCash_back_typeIsSet(false);
    this.cash_back_type = 0;
    setCash_backIsSet(false);
    this.cash_back = 0.0;
    this.coupon = null;
    setCodAvailableIsSet(false);
    this.codAvailable = 0;
    this.tagline = null;
    this.offer = null;
    setGross_priceIsSet(false);
    this.gross_price = 0.0;
    setCheapestBulkPriceIsSet(false);
    this.cheapestBulkPrice = 0.0;
    setPackQuantityIsSet(false);
    this.packQuantity = 0;
    setNetPriceAfterCashBackIsSet(false);
    this.netPriceAfterCashBack = 0.0;
    setShowNetPriceIsSet(false);
    this.showNetPrice = 0;
    setCategory_idIsSet(false);
    this.category_id = 0;
    setSubCategoryIdIsSet(false);
    this.subCategoryId = 0;
    this.identifier = null;
  }

  public long get_id() {
    return this._id;
  }

  public void set_id(long _id) {
    this._id = _id;
    set_idIsSet(true);
  }

  public void unset_id() {
    __isset_bit_vector.clear(___ID_ISSET_ID);
  }

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

  public void set_idIsSet(boolean value) {
    __isset_bit_vector.set(___ID_ISSET_ID, value);
  }

  public double getAvailable_price() {
    return this.available_price;
  }

  public void setAvailable_price(double available_price) {
    this.available_price = available_price;
    setAvailable_priceIsSet(true);
  }

  public void unsetAvailable_price() {
    __isset_bit_vector.clear(__AVAILABLE_PRICE_ISSET_ID);
  }

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

  public void setAvailable_priceIsSet(boolean value) {
    __isset_bit_vector.set(__AVAILABLE_PRICE_ISSET_ID, value);
  }

  public String getMarketPlaceUrl() {
    return this.marketPlaceUrl;
  }

  public void setMarketPlaceUrl(String marketPlaceUrl) {
    this.marketPlaceUrl = marketPlaceUrl;
  }

  public void unsetMarketPlaceUrl() {
    this.marketPlaceUrl = null;
  }

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

  public void setMarketPlaceUrlIsSet(boolean value) {
    if (!value) {
      this.marketPlaceUrl = null;
    }
  }

  public long getIn_stock() {
    return this.in_stock;
  }

  public void setIn_stock(long in_stock) {
    this.in_stock = in_stock;
    setIn_stockIsSet(true);
  }

  public void unsetIn_stock() {
    __isset_bit_vector.clear(__IN_STOCK_ISSET_ID);
  }

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

  public void setIn_stockIsSet(boolean value) {
    __isset_bit_vector.set(__IN_STOCK_ISSET_ID, value);
  }

  public long getSource_id() {
    return this.source_id;
  }

  public void setSource_id(long source_id) {
    this.source_id = source_id;
    setSource_idIsSet(true);
  }

  public void unsetSource_id() {
    __isset_bit_vector.clear(__SOURCE_ID_ISSET_ID);
  }

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

  public void setSource_idIsSet(boolean value) {
    __isset_bit_vector.set(__SOURCE_ID_ISSET_ID, value);
  }

  public String getSource_product_name() {
    return this.source_product_name;
  }

  public void setSource_product_name(String source_product_name) {
    this.source_product_name = source_product_name;
  }

  public void unsetSource_product_name() {
    this.source_product_name = null;
  }

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

  public void setSource_product_nameIsSet(boolean value) {
    if (!value) {
      this.source_product_name = null;
    }
  }

  public String getThumbnail() {
    return this.thumbnail;
  }

  public void setThumbnail(String thumbnail) {
    this.thumbnail = thumbnail;
  }

  public void unsetThumbnail() {
    this.thumbnail = null;
  }

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

  public void setThumbnailIsSet(boolean value) {
    if (!value) {
      this.thumbnail = null;
    }
  }

  public long getCash_back_type() {
    return this.cash_back_type;
  }

  public void setCash_back_type(long cash_back_type) {
    this.cash_back_type = cash_back_type;
    setCash_back_typeIsSet(true);
  }

  public void unsetCash_back_type() {
    __isset_bit_vector.clear(__CASH_BACK_TYPE_ISSET_ID);
  }

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

  public void setCash_back_typeIsSet(boolean value) {
    __isset_bit_vector.set(__CASH_BACK_TYPE_ISSET_ID, value);
  }

  public double getCash_back() {
    return this.cash_back;
  }

  public void setCash_back(double cash_back) {
    this.cash_back = cash_back;
    setCash_backIsSet(true);
  }

  public void unsetCash_back() {
    __isset_bit_vector.clear(__CASH_BACK_ISSET_ID);
  }

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

  public void setCash_backIsSet(boolean value) {
    __isset_bit_vector.set(__CASH_BACK_ISSET_ID, value);
  }

  public String getCoupon() {
    return this.coupon;
  }

  public void setCoupon(String coupon) {
    this.coupon = coupon;
  }

  public void unsetCoupon() {
    this.coupon = null;
  }

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

  public void setCouponIsSet(boolean value) {
    if (!value) {
      this.coupon = null;
    }
  }

  public long getCodAvailable() {
    return this.codAvailable;
  }

  public void setCodAvailable(long codAvailable) {
    this.codAvailable = codAvailable;
    setCodAvailableIsSet(true);
  }

  public void unsetCodAvailable() {
    __isset_bit_vector.clear(__CODAVAILABLE_ISSET_ID);
  }

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

  public void setCodAvailableIsSet(boolean value) {
    __isset_bit_vector.set(__CODAVAILABLE_ISSET_ID, value);
  }

  public String getTagline() {
    return this.tagline;
  }

  public void setTagline(String tagline) {
    this.tagline = tagline;
  }

  public void unsetTagline() {
    this.tagline = null;
  }

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

  public void setTaglineIsSet(boolean value) {
    if (!value) {
      this.tagline = null;
    }
  }

  public String getOffer() {
    return this.offer;
  }

  public void setOffer(String offer) {
    this.offer = offer;
  }

  public void unsetOffer() {
    this.offer = null;
  }

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

  public void setOfferIsSet(boolean value) {
    if (!value) {
      this.offer = null;
    }
  }

  public double getGross_price() {
    return this.gross_price;
  }

  public void setGross_price(double gross_price) {
    this.gross_price = gross_price;
    setGross_priceIsSet(true);
  }

  public void unsetGross_price() {
    __isset_bit_vector.clear(__GROSS_PRICE_ISSET_ID);
  }

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

  public void setGross_priceIsSet(boolean value) {
    __isset_bit_vector.set(__GROSS_PRICE_ISSET_ID, value);
  }

  public double getCheapestBulkPrice() {
    return this.cheapestBulkPrice;
  }

  public void setCheapestBulkPrice(double cheapestBulkPrice) {
    this.cheapestBulkPrice = cheapestBulkPrice;
    setCheapestBulkPriceIsSet(true);
  }

  public void unsetCheapestBulkPrice() {
    __isset_bit_vector.clear(__CHEAPESTBULKPRICE_ISSET_ID);
  }

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

  public void setCheapestBulkPriceIsSet(boolean value) {
    __isset_bit_vector.set(__CHEAPESTBULKPRICE_ISSET_ID, value);
  }

  public long getPackQuantity() {
    return this.packQuantity;
  }

  public void setPackQuantity(long packQuantity) {
    this.packQuantity = packQuantity;
    setPackQuantityIsSet(true);
  }

  public void unsetPackQuantity() {
    __isset_bit_vector.clear(__PACKQUANTITY_ISSET_ID);
  }

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

  public void setPackQuantityIsSet(boolean value) {
    __isset_bit_vector.set(__PACKQUANTITY_ISSET_ID, value);
  }

  public double getNetPriceAfterCashBack() {
    return this.netPriceAfterCashBack;
  }

  public void setNetPriceAfterCashBack(double netPriceAfterCashBack) {
    this.netPriceAfterCashBack = netPriceAfterCashBack;
    setNetPriceAfterCashBackIsSet(true);
  }

  public void unsetNetPriceAfterCashBack() {
    __isset_bit_vector.clear(__NETPRICEAFTERCASHBACK_ISSET_ID);
  }

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

  public void setNetPriceAfterCashBackIsSet(boolean value) {
    __isset_bit_vector.set(__NETPRICEAFTERCASHBACK_ISSET_ID, value);
  }

  public long getShowNetPrice() {
    return this.showNetPrice;
  }

  public void setShowNetPrice(long showNetPrice) {
    this.showNetPrice = showNetPrice;
    setShowNetPriceIsSet(true);
  }

  public void unsetShowNetPrice() {
    __isset_bit_vector.clear(__SHOWNETPRICE_ISSET_ID);
  }

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

  public void setShowNetPriceIsSet(boolean value) {
    __isset_bit_vector.set(__SHOWNETPRICE_ISSET_ID, value);
  }

  public long getCategory_id() {
    return this.category_id;
  }

  public void setCategory_id(long category_id) {
    this.category_id = category_id;
    setCategory_idIsSet(true);
  }

  public void unsetCategory_id() {
    __isset_bit_vector.clear(__CATEGORY_ID_ISSET_ID);
  }

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

  public void setCategory_idIsSet(boolean value) {
    __isset_bit_vector.set(__CATEGORY_ID_ISSET_ID, value);
  }

  public long getSubCategoryId() {
    return this.subCategoryId;
  }

  public void setSubCategoryId(long subCategoryId) {
    this.subCategoryId = subCategoryId;
    setSubCategoryIdIsSet(true);
  }

  public void unsetSubCategoryId() {
    __isset_bit_vector.clear(__SUBCATEGORYID_ISSET_ID);
  }

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

  public void setSubCategoryIdIsSet(boolean value) {
    __isset_bit_vector.set(__SUBCATEGORYID_ISSET_ID, value);
  }

  public String getIdentifier() {
    return this.identifier;
  }

  public void setIdentifier(String identifier) {
    this.identifier = identifier;
  }

  public void unsetIdentifier() {
    this.identifier = null;
  }

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

  public void setIdentifierIsSet(boolean value) {
    if (!value) {
      this.identifier = null;
    }
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case _ID:
      if (value == null) {
        unset_id();
      } else {
        set_id((Long)value);
      }
      break;

    case AVAILABLE_PRICE:
      if (value == null) {
        unsetAvailable_price();
      } else {
        setAvailable_price((Double)value);
      }
      break;

    case MARKET_PLACE_URL:
      if (value == null) {
        unsetMarketPlaceUrl();
      } else {
        setMarketPlaceUrl((String)value);
      }
      break;

    case IN_STOCK:
      if (value == null) {
        unsetIn_stock();
      } else {
        setIn_stock((Long)value);
      }
      break;

    case SOURCE_ID:
      if (value == null) {
        unsetSource_id();
      } else {
        setSource_id((Long)value);
      }
      break;

    case SOURCE_PRODUCT_NAME:
      if (value == null) {
        unsetSource_product_name();
      } else {
        setSource_product_name((String)value);
      }
      break;

    case THUMBNAIL:
      if (value == null) {
        unsetThumbnail();
      } else {
        setThumbnail((String)value);
      }
      break;

    case CASH_BACK_TYPE:
      if (value == null) {
        unsetCash_back_type();
      } else {
        setCash_back_type((Long)value);
      }
      break;

    case CASH_BACK:
      if (value == null) {
        unsetCash_back();
      } else {
        setCash_back((Double)value);
      }
      break;

    case COUPON:
      if (value == null) {
        unsetCoupon();
      } else {
        setCoupon((String)value);
      }
      break;

    case COD_AVAILABLE:
      if (value == null) {
        unsetCodAvailable();
      } else {
        setCodAvailable((Long)value);
      }
      break;

    case TAGLINE:
      if (value == null) {
        unsetTagline();
      } else {
        setTagline((String)value);
      }
      break;

    case OFFER:
      if (value == null) {
        unsetOffer();
      } else {
        setOffer((String)value);
      }
      break;

    case GROSS_PRICE:
      if (value == null) {
        unsetGross_price();
      } else {
        setGross_price((Double)value);
      }
      break;

    case CHEAPEST_BULK_PRICE:
      if (value == null) {
        unsetCheapestBulkPrice();
      } else {
        setCheapestBulkPrice((Double)value);
      }
      break;

    case PACK_QUANTITY:
      if (value == null) {
        unsetPackQuantity();
      } else {
        setPackQuantity((Long)value);
      }
      break;

    case NET_PRICE_AFTER_CASH_BACK:
      if (value == null) {
        unsetNetPriceAfterCashBack();
      } else {
        setNetPriceAfterCashBack((Double)value);
      }
      break;

    case SHOW_NET_PRICE:
      if (value == null) {
        unsetShowNetPrice();
      } else {
        setShowNetPrice((Long)value);
      }
      break;

    case CATEGORY_ID:
      if (value == null) {
        unsetCategory_id();
      } else {
        setCategory_id((Long)value);
      }
      break;

    case SUB_CATEGORY_ID:
      if (value == null) {
        unsetSubCategoryId();
      } else {
        setSubCategoryId((Long)value);
      }
      break;

    case IDENTIFIER:
      if (value == null) {
        unsetIdentifier();
      } else {
        setIdentifier((String)value);
      }
      break;

    }
  }

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

    case AVAILABLE_PRICE:
      return Double.valueOf(getAvailable_price());

    case MARKET_PLACE_URL:
      return getMarketPlaceUrl();

    case IN_STOCK:
      return Long.valueOf(getIn_stock());

    case SOURCE_ID:
      return Long.valueOf(getSource_id());

    case SOURCE_PRODUCT_NAME:
      return getSource_product_name();

    case THUMBNAIL:
      return getThumbnail();

    case CASH_BACK_TYPE:
      return Long.valueOf(getCash_back_type());

    case CASH_BACK:
      return Double.valueOf(getCash_back());

    case COUPON:
      return getCoupon();

    case COD_AVAILABLE:
      return Long.valueOf(getCodAvailable());

    case TAGLINE:
      return getTagline();

    case OFFER:
      return getOffer();

    case GROSS_PRICE:
      return Double.valueOf(getGross_price());

    case CHEAPEST_BULK_PRICE:
      return Double.valueOf(getCheapestBulkPrice());

    case PACK_QUANTITY:
      return Long.valueOf(getPackQuantity());

    case NET_PRICE_AFTER_CASH_BACK:
      return Double.valueOf(getNetPriceAfterCashBack());

    case SHOW_NET_PRICE:
      return Long.valueOf(getShowNetPrice());

    case CATEGORY_ID:
      return Long.valueOf(getCategory_id());

    case SUB_CATEGORY_ID:
      return Long.valueOf(getSubCategoryId());

    case IDENTIFIER:
      return getIdentifier();

    }
    throw new IllegalStateException();
  }

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

    switch (field) {
    case _ID:
      return isSet_id();
    case AVAILABLE_PRICE:
      return isSetAvailable_price();
    case MARKET_PLACE_URL:
      return isSetMarketPlaceUrl();
    case IN_STOCK:
      return isSetIn_stock();
    case SOURCE_ID:
      return isSetSource_id();
    case SOURCE_PRODUCT_NAME:
      return isSetSource_product_name();
    case THUMBNAIL:
      return isSetThumbnail();
    case CASH_BACK_TYPE:
      return isSetCash_back_type();
    case CASH_BACK:
      return isSetCash_back();
    case COUPON:
      return isSetCoupon();
    case COD_AVAILABLE:
      return isSetCodAvailable();
    case TAGLINE:
      return isSetTagline();
    case OFFER:
      return isSetOffer();
    case GROSS_PRICE:
      return isSetGross_price();
    case CHEAPEST_BULK_PRICE:
      return isSetCheapestBulkPrice();
    case PACK_QUANTITY:
      return isSetPackQuantity();
    case NET_PRICE_AFTER_CASH_BACK:
      return isSetNetPriceAfterCashBack();
    case SHOW_NET_PRICE:
      return isSetShowNetPrice();
    case CATEGORY_ID:
      return isSetCategory_id();
    case SUB_CATEGORY_ID:
      return isSetSubCategoryId();
    case IDENTIFIER:
      return isSetIdentifier();
    }
    throw new IllegalStateException();
  }

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

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

    boolean this_present__id = true;
    boolean that_present__id = true;
    if (this_present__id || that_present__id) {
      if (!(this_present__id && that_present__id))
        return false;
      if (this._id != that._id)
        return false;
    }

    boolean this_present_available_price = true;
    boolean that_present_available_price = true;
    if (this_present_available_price || that_present_available_price) {
      if (!(this_present_available_price && that_present_available_price))
        return false;
      if (this.available_price != that.available_price)
        return false;
    }

    boolean this_present_marketPlaceUrl = true && this.isSetMarketPlaceUrl();
    boolean that_present_marketPlaceUrl = true && that.isSetMarketPlaceUrl();
    if (this_present_marketPlaceUrl || that_present_marketPlaceUrl) {
      if (!(this_present_marketPlaceUrl && that_present_marketPlaceUrl))
        return false;
      if (!this.marketPlaceUrl.equals(that.marketPlaceUrl))
        return false;
    }

    boolean this_present_in_stock = true;
    boolean that_present_in_stock = true;
    if (this_present_in_stock || that_present_in_stock) {
      if (!(this_present_in_stock && that_present_in_stock))
        return false;
      if (this.in_stock != that.in_stock)
        return false;
    }

    boolean this_present_source_id = true;
    boolean that_present_source_id = true;
    if (this_present_source_id || that_present_source_id) {
      if (!(this_present_source_id && that_present_source_id))
        return false;
      if (this.source_id != that.source_id)
        return false;
    }

    boolean this_present_source_product_name = true && this.isSetSource_product_name();
    boolean that_present_source_product_name = true && that.isSetSource_product_name();
    if (this_present_source_product_name || that_present_source_product_name) {
      if (!(this_present_source_product_name && that_present_source_product_name))
        return false;
      if (!this.source_product_name.equals(that.source_product_name))
        return false;
    }

    boolean this_present_thumbnail = true && this.isSetThumbnail();
    boolean that_present_thumbnail = true && that.isSetThumbnail();
    if (this_present_thumbnail || that_present_thumbnail) {
      if (!(this_present_thumbnail && that_present_thumbnail))
        return false;
      if (!this.thumbnail.equals(that.thumbnail))
        return false;
    }

    boolean this_present_cash_back_type = true;
    boolean that_present_cash_back_type = true;
    if (this_present_cash_back_type || that_present_cash_back_type) {
      if (!(this_present_cash_back_type && that_present_cash_back_type))
        return false;
      if (this.cash_back_type != that.cash_back_type)
        return false;
    }

    boolean this_present_cash_back = true;
    boolean that_present_cash_back = true;
    if (this_present_cash_back || that_present_cash_back) {
      if (!(this_present_cash_back && that_present_cash_back))
        return false;
      if (this.cash_back != that.cash_back)
        return false;
    }

    boolean this_present_coupon = true && this.isSetCoupon();
    boolean that_present_coupon = true && that.isSetCoupon();
    if (this_present_coupon || that_present_coupon) {
      if (!(this_present_coupon && that_present_coupon))
        return false;
      if (!this.coupon.equals(that.coupon))
        return false;
    }

    boolean this_present_codAvailable = true;
    boolean that_present_codAvailable = true;
    if (this_present_codAvailable || that_present_codAvailable) {
      if (!(this_present_codAvailable && that_present_codAvailable))
        return false;
      if (this.codAvailable != that.codAvailable)
        return false;
    }

    boolean this_present_tagline = true && this.isSetTagline();
    boolean that_present_tagline = true && that.isSetTagline();
    if (this_present_tagline || that_present_tagline) {
      if (!(this_present_tagline && that_present_tagline))
        return false;
      if (!this.tagline.equals(that.tagline))
        return false;
    }

    boolean this_present_offer = true && this.isSetOffer();
    boolean that_present_offer = true && that.isSetOffer();
    if (this_present_offer || that_present_offer) {
      if (!(this_present_offer && that_present_offer))
        return false;
      if (!this.offer.equals(that.offer))
        return false;
    }

    boolean this_present_gross_price = true;
    boolean that_present_gross_price = true;
    if (this_present_gross_price || that_present_gross_price) {
      if (!(this_present_gross_price && that_present_gross_price))
        return false;
      if (this.gross_price != that.gross_price)
        return false;
    }

    boolean this_present_cheapestBulkPrice = true;
    boolean that_present_cheapestBulkPrice = true;
    if (this_present_cheapestBulkPrice || that_present_cheapestBulkPrice) {
      if (!(this_present_cheapestBulkPrice && that_present_cheapestBulkPrice))
        return false;
      if (this.cheapestBulkPrice != that.cheapestBulkPrice)
        return false;
    }

    boolean this_present_packQuantity = true;
    boolean that_present_packQuantity = true;
    if (this_present_packQuantity || that_present_packQuantity) {
      if (!(this_present_packQuantity && that_present_packQuantity))
        return false;
      if (this.packQuantity != that.packQuantity)
        return false;
    }

    boolean this_present_netPriceAfterCashBack = true;
    boolean that_present_netPriceAfterCashBack = true;
    if (this_present_netPriceAfterCashBack || that_present_netPriceAfterCashBack) {
      if (!(this_present_netPriceAfterCashBack && that_present_netPriceAfterCashBack))
        return false;
      if (this.netPriceAfterCashBack != that.netPriceAfterCashBack)
        return false;
    }

    boolean this_present_showNetPrice = true;
    boolean that_present_showNetPrice = true;
    if (this_present_showNetPrice || that_present_showNetPrice) {
      if (!(this_present_showNetPrice && that_present_showNetPrice))
        return false;
      if (this.showNetPrice != that.showNetPrice)
        return false;
    }

    boolean this_present_category_id = true;
    boolean that_present_category_id = true;
    if (this_present_category_id || that_present_category_id) {
      if (!(this_present_category_id && that_present_category_id))
        return false;
      if (this.category_id != that.category_id)
        return false;
    }

    boolean this_present_subCategoryId = true;
    boolean that_present_subCategoryId = true;
    if (this_present_subCategoryId || that_present_subCategoryId) {
      if (!(this_present_subCategoryId && that_present_subCategoryId))
        return false;
      if (this.subCategoryId != that.subCategoryId)
        return false;
    }

    boolean this_present_identifier = true && this.isSetIdentifier();
    boolean that_present_identifier = true && that.isSetIdentifier();
    if (this_present_identifier || that_present_identifier) {
      if (!(this_present_identifier && that_present_identifier))
        return false;
      if (!this.identifier.equals(that.identifier))
        return false;
    }

    return true;
  }

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

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

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

    lastComparison = Boolean.valueOf(isSet_id()).compareTo(typedOther.isSet_id());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSet_id()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this._id, typedOther._id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetAvailable_price()).compareTo(typedOther.isSetAvailable_price());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAvailable_price()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.available_price, typedOther.available_price);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMarketPlaceUrl()).compareTo(typedOther.isSetMarketPlaceUrl());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMarketPlaceUrl()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.marketPlaceUrl, typedOther.marketPlaceUrl);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetIn_stock()).compareTo(typedOther.isSetIn_stock());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIn_stock()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.in_stock, typedOther.in_stock);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSource_id()).compareTo(typedOther.isSetSource_id());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSource_id()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source_id, typedOther.source_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSource_product_name()).compareTo(typedOther.isSetSource_product_name());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSource_product_name()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source_product_name, typedOther.source_product_name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetThumbnail()).compareTo(typedOther.isSetThumbnail());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetThumbnail()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.thumbnail, typedOther.thumbnail);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCash_back_type()).compareTo(typedOther.isSetCash_back_type());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCash_back_type()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cash_back_type, typedOther.cash_back_type);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCash_back()).compareTo(typedOther.isSetCash_back());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCash_back()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cash_back, typedOther.cash_back);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCoupon()).compareTo(typedOther.isSetCoupon());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCoupon()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.coupon, typedOther.coupon);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCodAvailable()).compareTo(typedOther.isSetCodAvailable());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCodAvailable()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.codAvailable, typedOther.codAvailable);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTagline()).compareTo(typedOther.isSetTagline());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTagline()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tagline, typedOther.tagline);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetOffer()).compareTo(typedOther.isSetOffer());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOffer()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.offer, typedOther.offer);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetGross_price()).compareTo(typedOther.isSetGross_price());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetGross_price()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gross_price, typedOther.gross_price);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCheapestBulkPrice()).compareTo(typedOther.isSetCheapestBulkPrice());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCheapestBulkPrice()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cheapestBulkPrice, typedOther.cheapestBulkPrice);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPackQuantity()).compareTo(typedOther.isSetPackQuantity());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPackQuantity()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.packQuantity, typedOther.packQuantity);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetNetPriceAfterCashBack()).compareTo(typedOther.isSetNetPriceAfterCashBack());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNetPriceAfterCashBack()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.netPriceAfterCashBack, typedOther.netPriceAfterCashBack);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetShowNetPrice()).compareTo(typedOther.isSetShowNetPrice());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetShowNetPrice()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.showNetPrice, typedOther.showNetPrice);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCategory_id()).compareTo(typedOther.isSetCategory_id());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCategory_id()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.category_id, typedOther.category_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSubCategoryId()).compareTo(typedOther.isSetSubCategoryId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSubCategoryId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.subCategoryId, typedOther.subCategoryId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetIdentifier()).compareTo(typedOther.isSetIdentifier());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIdentifier()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.identifier, typedOther.identifier);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

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

  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    org.apache.thrift.protocol.TField field;
    iprot.readStructBegin();
    while (true)
    {
      field = iprot.readFieldBegin();
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
        break;
      }
      switch (field.id) {
        case 1: // _ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this._id = iprot.readI64();
            set_idIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 2: // AVAILABLE_PRICE
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.available_price = iprot.readDouble();
            setAvailable_priceIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 3: // MARKET_PLACE_URL
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.marketPlaceUrl = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 4: // IN_STOCK
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.in_stock = iprot.readI64();
            setIn_stockIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 5: // SOURCE_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.source_id = iprot.readI64();
            setSource_idIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 6: // SOURCE_PRODUCT_NAME
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.source_product_name = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 7: // THUMBNAIL
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.thumbnail = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 8: // CASH_BACK_TYPE
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.cash_back_type = iprot.readI64();
            setCash_back_typeIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 9: // CASH_BACK
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.cash_back = iprot.readDouble();
            setCash_backIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 10: // COUPON
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.coupon = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 11: // COD_AVAILABLE
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.codAvailable = iprot.readI64();
            setCodAvailableIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 12: // TAGLINE
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.tagline = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 13: // OFFER
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.offer = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 14: // GROSS_PRICE
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.gross_price = iprot.readDouble();
            setGross_priceIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 15: // CHEAPEST_BULK_PRICE
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.cheapestBulkPrice = iprot.readDouble();
            setCheapestBulkPriceIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 16: // PACK_QUANTITY
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.packQuantity = iprot.readI64();
            setPackQuantityIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 17: // NET_PRICE_AFTER_CASH_BACK
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.netPriceAfterCashBack = iprot.readDouble();
            setNetPriceAfterCashBackIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 18: // SHOW_NET_PRICE
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.showNetPrice = iprot.readI64();
            setShowNetPriceIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 19: // CATEGORY_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.category_id = iprot.readI64();
            setCategory_idIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 20: // SUB_CATEGORY_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.subCategoryId = iprot.readI64();
            setSubCategoryIdIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 21: // IDENTIFIER
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.identifier = 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(_ID_FIELD_DESC);
    oprot.writeI64(this._id);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(AVAILABLE_PRICE_FIELD_DESC);
    oprot.writeDouble(this.available_price);
    oprot.writeFieldEnd();
    if (this.marketPlaceUrl != null) {
      oprot.writeFieldBegin(MARKET_PLACE_URL_FIELD_DESC);
      oprot.writeString(this.marketPlaceUrl);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(IN_STOCK_FIELD_DESC);
    oprot.writeI64(this.in_stock);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(SOURCE_ID_FIELD_DESC);
    oprot.writeI64(this.source_id);
    oprot.writeFieldEnd();
    if (this.source_product_name != null) {
      oprot.writeFieldBegin(SOURCE_PRODUCT_NAME_FIELD_DESC);
      oprot.writeString(this.source_product_name);
      oprot.writeFieldEnd();
    }
    if (this.thumbnail != null) {
      oprot.writeFieldBegin(THUMBNAIL_FIELD_DESC);
      oprot.writeString(this.thumbnail);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(CASH_BACK_TYPE_FIELD_DESC);
    oprot.writeI64(this.cash_back_type);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(CASH_BACK_FIELD_DESC);
    oprot.writeDouble(this.cash_back);
    oprot.writeFieldEnd();
    if (this.coupon != null) {
      oprot.writeFieldBegin(COUPON_FIELD_DESC);
      oprot.writeString(this.coupon);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(COD_AVAILABLE_FIELD_DESC);
    oprot.writeI64(this.codAvailable);
    oprot.writeFieldEnd();
    if (this.tagline != null) {
      oprot.writeFieldBegin(TAGLINE_FIELD_DESC);
      oprot.writeString(this.tagline);
      oprot.writeFieldEnd();
    }
    if (this.offer != null) {
      oprot.writeFieldBegin(OFFER_FIELD_DESC);
      oprot.writeString(this.offer);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(GROSS_PRICE_FIELD_DESC);
    oprot.writeDouble(this.gross_price);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(CHEAPEST_BULK_PRICE_FIELD_DESC);
    oprot.writeDouble(this.cheapestBulkPrice);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(PACK_QUANTITY_FIELD_DESC);
    oprot.writeI64(this.packQuantity);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(NET_PRICE_AFTER_CASH_BACK_FIELD_DESC);
    oprot.writeDouble(this.netPriceAfterCashBack);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(SHOW_NET_PRICE_FIELD_DESC);
    oprot.writeI64(this.showNetPrice);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(CATEGORY_ID_FIELD_DESC);
    oprot.writeI64(this.category_id);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(SUB_CATEGORY_ID_FIELD_DESC);
    oprot.writeI64(this.subCategoryId);
    oprot.writeFieldEnd();
    if (this.identifier != null) {
      oprot.writeFieldBegin(IDENTIFIER_FIELD_DESC);
      oprot.writeString(this.identifier);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }

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

    sb.append("_id:");
    sb.append(this._id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("available_price:");
    sb.append(this.available_price);
    first = false;
    if (!first) sb.append(", ");
    sb.append("marketPlaceUrl:");
    if (this.marketPlaceUrl == null) {
      sb.append("null");
    } else {
      sb.append(this.marketPlaceUrl);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("in_stock:");
    sb.append(this.in_stock);
    first = false;
    if (!first) sb.append(", ");
    sb.append("source_id:");
    sb.append(this.source_id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("source_product_name:");
    if (this.source_product_name == null) {
      sb.append("null");
    } else {
      sb.append(this.source_product_name);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("thumbnail:");
    if (this.thumbnail == null) {
      sb.append("null");
    } else {
      sb.append(this.thumbnail);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("cash_back_type:");
    sb.append(this.cash_back_type);
    first = false;
    if (!first) sb.append(", ");
    sb.append("cash_back:");
    sb.append(this.cash_back);
    first = false;
    if (!first) sb.append(", ");
    sb.append("coupon:");
    if (this.coupon == null) {
      sb.append("null");
    } else {
      sb.append(this.coupon);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("codAvailable:");
    sb.append(this.codAvailable);
    first = false;
    if (!first) sb.append(", ");
    sb.append("tagline:");
    if (this.tagline == null) {
      sb.append("null");
    } else {
      sb.append(this.tagline);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("offer:");
    if (this.offer == null) {
      sb.append("null");
    } else {
      sb.append(this.offer);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("gross_price:");
    sb.append(this.gross_price);
    first = false;
    if (!first) sb.append(", ");
    sb.append("cheapestBulkPrice:");
    sb.append(this.cheapestBulkPrice);
    first = false;
    if (!first) sb.append(", ");
    sb.append("packQuantity:");
    sb.append(this.packQuantity);
    first = false;
    if (!first) sb.append(", ");
    sb.append("netPriceAfterCashBack:");
    sb.append(this.netPriceAfterCashBack);
    first = false;
    if (!first) sb.append(", ");
    sb.append("showNetPrice:");
    sb.append(this.showNetPrice);
    first = false;
    if (!first) sb.append(", ");
    sb.append("category_id:");
    sb.append(this.category_id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("subCategoryId:");
    sb.append(this.subCategoryId);
    first = false;
    if (!first) sb.append(", ");
    sb.append("identifier:");
    if (this.identifier == null) {
      sb.append("null");
    } else {
      sb.append(this.identifier);
    }
    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);
    }
  }

}