Subversion Repositories SmartDukaan

Rev

Rev 19247 | 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;

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

  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)1);
  private static final org.apache.thrift.protocol.TField SHOW_MRP_FLAG_FIELD_DESC = new org.apache.thrift.protocol.TField("showMrpFlag", org.apache.thrift.protocol.TType.BOOL, (short)2);
  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)3);
  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)4);
  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.BOOL, (short)5);
  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)6);
  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)7);
  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)8);
  private static final org.apache.thrift.protocol.TField BRAND_FIELD_DESC = new org.apache.thrift.protocol.TField("brand", org.apache.thrift.protocol.TType.STRING, (short)9);
  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)10);
  private static final org.apache.thrift.protocol.TField MODEL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("model_name", org.apache.thrift.protocol.TType.STRING, (short)11);
  private static final org.apache.thrift.protocol.TField MRP_FIELD_DESC = new org.apache.thrift.protocol.TField("mrp", org.apache.thrift.protocol.TType.DOUBLE, (short)12);
  private static final org.apache.thrift.protocol.TField PRODUCT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("product_name", org.apache.thrift.protocol.TType.STRING, (short)13);
  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)14);
  private static final org.apache.thrift.protocol.TField BRAND_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("brand_id", org.apache.thrift.protocol.TType.I64, (short)15);
  private static final org.apache.thrift.protocol.TField QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.I64, (short)16);
  private static final org.apache.thrift.protocol.TField INTERNAL_RANK_FIELD_DESC = new org.apache.thrift.protocol.TField("internalRank", org.apache.thrift.protocol.TType.I64, (short)17);

  private long item_id; // required
  private boolean showMrpFlag; // required
  private String tagline; // required
  private String offer; // required
  private boolean showNetPrice; // required
  private long category_id; // required
  private long subCategoryId; // required
  private double available_price; // required
  private String brand; // required
  private String identifier; // required
  private String model_name; // required
  private double mrp; // required
  private String product_name; // required
  private String source_product_name; // required
  private long brand_id; // required
  private long quantity; // required
  private long internalRank; // 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 {
    ITEM_ID((short)1, "item_id"),
    SHOW_MRP_FLAG((short)2, "showMrpFlag"),
    TAGLINE((short)3, "tagline"),
    OFFER((short)4, "offer"),
    SHOW_NET_PRICE((short)5, "showNetPrice"),
    CATEGORY_ID((short)6, "category_id"),
    SUB_CATEGORY_ID((short)7, "subCategoryId"),
    AVAILABLE_PRICE((short)8, "available_price"),
    BRAND((short)9, "brand"),
    IDENTIFIER((short)10, "identifier"),
    MODEL_NAME((short)11, "model_name"),
    MRP((short)12, "mrp"),
    PRODUCT_NAME((short)13, "product_name"),
    SOURCE_PRODUCT_NAME((short)14, "source_product_name"),
    BRAND_ID((short)15, "brand_id"),
    QUANTITY((short)16, "quantity"),
    INTERNAL_RANK((short)17, "internalRank");

    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: // ITEM_ID
          return ITEM_ID;
        case 2: // SHOW_MRP_FLAG
          return SHOW_MRP_FLAG;
        case 3: // TAGLINE
          return TAGLINE;
        case 4: // OFFER
          return OFFER;
        case 5: // SHOW_NET_PRICE
          return SHOW_NET_PRICE;
        case 6: // CATEGORY_ID
          return CATEGORY_ID;
        case 7: // SUB_CATEGORY_ID
          return SUB_CATEGORY_ID;
        case 8: // AVAILABLE_PRICE
          return AVAILABLE_PRICE;
        case 9: // BRAND
          return BRAND;
        case 10: // IDENTIFIER
          return IDENTIFIER;
        case 11: // MODEL_NAME
          return MODEL_NAME;
        case 12: // MRP
          return MRP;
        case 13: // PRODUCT_NAME
          return PRODUCT_NAME;
        case 14: // SOURCE_PRODUCT_NAME
          return SOURCE_PRODUCT_NAME;
        case 15: // BRAND_ID
          return BRAND_ID;
        case 16: // QUANTITY
          return QUANTITY;
        case 17: // INTERNAL_RANK
          return INTERNAL_RANK;
        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 __ITEM_ID_ISSET_ID = 0;
  private static final int __SHOWMRPFLAG_ISSET_ID = 1;
  private static final int __SHOWNETPRICE_ISSET_ID = 2;
  private static final int __CATEGORY_ID_ISSET_ID = 3;
  private static final int __SUBCATEGORYID_ISSET_ID = 4;
  private static final int __AVAILABLE_PRICE_ISSET_ID = 5;
  private static final int __MRP_ISSET_ID = 6;
  private static final int __BRAND_ID_ISSET_ID = 7;
  private static final int __QUANTITY_ISSET_ID = 8;
  private static final int __INTERNALRANK_ISSET_ID = 9;
  private BitSet __isset_bit_vector = new BitSet(10);

  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.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.SHOW_MRP_FLAG, new org.apache.thrift.meta_data.FieldMetaData("showMrpFlag", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    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.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.BOOL)));
    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.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.BRAND, new org.apache.thrift.meta_data.FieldMetaData("brand", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    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)));
    tmpMap.put(_Fields.MODEL_NAME, new org.apache.thrift.meta_data.FieldMetaData("model_name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.MRP, new org.apache.thrift.meta_data.FieldMetaData("mrp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.PRODUCT_NAME, new org.apache.thrift.meta_data.FieldMetaData("product_name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    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.BRAND_ID, new org.apache.thrift.meta_data.FieldMetaData("brand_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.INTERNAL_RANK, new org.apache.thrift.meta_data.FieldMetaData("internalRank", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BulkItems.class, metaDataMap);
  }

  public BulkItems() {
  }

  public BulkItems(
    long item_id,
    boolean showMrpFlag,
    String tagline,
    String offer,
    boolean showNetPrice,
    long category_id,
    long subCategoryId,
    double available_price,
    String brand,
    String identifier,
    String model_name,
    double mrp,
    String product_name,
    String source_product_name,
    long brand_id,
    long quantity,
    long internalRank)
  {
    this();
    this.item_id = item_id;
    setItem_idIsSet(true);
    this.showMrpFlag = showMrpFlag;
    setShowMrpFlagIsSet(true);
    this.tagline = tagline;
    this.offer = offer;
    this.showNetPrice = showNetPrice;
    setShowNetPriceIsSet(true);
    this.category_id = category_id;
    setCategory_idIsSet(true);
    this.subCategoryId = subCategoryId;
    setSubCategoryIdIsSet(true);
    this.available_price = available_price;
    setAvailable_priceIsSet(true);
    this.brand = brand;
    this.identifier = identifier;
    this.model_name = model_name;
    this.mrp = mrp;
    setMrpIsSet(true);
    this.product_name = product_name;
    this.source_product_name = source_product_name;
    this.brand_id = brand_id;
    setBrand_idIsSet(true);
    this.quantity = quantity;
    setQuantityIsSet(true);
    this.internalRank = internalRank;
    setInternalRankIsSet(true);
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public BulkItems(BulkItems other) {
    __isset_bit_vector.clear();
    __isset_bit_vector.or(other.__isset_bit_vector);
    this.item_id = other.item_id;
    this.showMrpFlag = other.showMrpFlag;
    if (other.isSetTagline()) {
      this.tagline = other.tagline;
    }
    if (other.isSetOffer()) {
      this.offer = other.offer;
    }
    this.showNetPrice = other.showNetPrice;
    this.category_id = other.category_id;
    this.subCategoryId = other.subCategoryId;
    this.available_price = other.available_price;
    if (other.isSetBrand()) {
      this.brand = other.brand;
    }
    if (other.isSetIdentifier()) {
      this.identifier = other.identifier;
    }
    if (other.isSetModel_name()) {
      this.model_name = other.model_name;
    }
    this.mrp = other.mrp;
    if (other.isSetProduct_name()) {
      this.product_name = other.product_name;
    }
    if (other.isSetSource_product_name()) {
      this.source_product_name = other.source_product_name;
    }
    this.brand_id = other.brand_id;
    this.quantity = other.quantity;
    this.internalRank = other.internalRank;
  }

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

  @Override
  public void clear() {
    setItem_idIsSet(false);
    this.item_id = 0;
    setShowMrpFlagIsSet(false);
    this.showMrpFlag = false;
    this.tagline = null;
    this.offer = null;
    setShowNetPriceIsSet(false);
    this.showNetPrice = false;
    setCategory_idIsSet(false);
    this.category_id = 0;
    setSubCategoryIdIsSet(false);
    this.subCategoryId = 0;
    setAvailable_priceIsSet(false);
    this.available_price = 0.0;
    this.brand = null;
    this.identifier = null;
    this.model_name = null;
    setMrpIsSet(false);
    this.mrp = 0.0;
    this.product_name = null;
    this.source_product_name = null;
    setBrand_idIsSet(false);
    this.brand_id = 0;
    setQuantityIsSet(false);
    this.quantity = 0;
    setInternalRankIsSet(false);
    this.internalRank = 0;
  }

  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 boolean isShowMrpFlag() {
    return this.showMrpFlag;
  }

  public void setShowMrpFlag(boolean showMrpFlag) {
    this.showMrpFlag = showMrpFlag;
    setShowMrpFlagIsSet(true);
  }

  public void unsetShowMrpFlag() {
    __isset_bit_vector.clear(__SHOWMRPFLAG_ISSET_ID);
  }

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

  public void setShowMrpFlagIsSet(boolean value) {
    __isset_bit_vector.set(__SHOWMRPFLAG_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 boolean isShowNetPrice() {
    return this.showNetPrice;
  }

  public void setShowNetPrice(boolean 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 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 getBrand() {
    return this.brand;
  }

  public void setBrand(String brand) {
    this.brand = brand;
  }

  public void unsetBrand() {
    this.brand = null;
  }

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

  public void setBrandIsSet(boolean value) {
    if (!value) {
      this.brand = null;
    }
  }

  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 String getModel_name() {
    return this.model_name;
  }

  public void setModel_name(String model_name) {
    this.model_name = model_name;
  }

  public void unsetModel_name() {
    this.model_name = null;
  }

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

  public void setModel_nameIsSet(boolean value) {
    if (!value) {
      this.model_name = null;
    }
  }

  public double getMrp() {
    return this.mrp;
  }

  public void setMrp(double mrp) {
    this.mrp = mrp;
    setMrpIsSet(true);
  }

  public void unsetMrp() {
    __isset_bit_vector.clear(__MRP_ISSET_ID);
  }

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

  public void setMrpIsSet(boolean value) {
    __isset_bit_vector.set(__MRP_ISSET_ID, value);
  }

  public String getProduct_name() {
    return this.product_name;
  }

  public void setProduct_name(String product_name) {
    this.product_name = product_name;
  }

  public void unsetProduct_name() {
    this.product_name = null;
  }

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

  public void setProduct_nameIsSet(boolean value) {
    if (!value) {
      this.product_name = null;
    }
  }

  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 long getBrand_id() {
    return this.brand_id;
  }

  public void setBrand_id(long brand_id) {
    this.brand_id = brand_id;
    setBrand_idIsSet(true);
  }

  public void unsetBrand_id() {
    __isset_bit_vector.clear(__BRAND_ID_ISSET_ID);
  }

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

  public void setBrand_idIsSet(boolean value) {
    __isset_bit_vector.set(__BRAND_ID_ISSET_ID, value);
  }

  public long getQuantity() {
    return this.quantity;
  }

  public void setQuantity(long quantity) {
    this.quantity = quantity;
    setQuantityIsSet(true);
  }

  public void unsetQuantity() {
    __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
  }

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

  public void setQuantityIsSet(boolean value) {
    __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
  }

  public long getInternalRank() {
    return this.internalRank;
  }

  public void setInternalRank(long internalRank) {
    this.internalRank = internalRank;
    setInternalRankIsSet(true);
  }

  public void unsetInternalRank() {
    __isset_bit_vector.clear(__INTERNALRANK_ISSET_ID);
  }

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

  public void setInternalRankIsSet(boolean value) {
    __isset_bit_vector.set(__INTERNALRANK_ISSET_ID, value);
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case ITEM_ID:
      if (value == null) {
        unsetItem_id();
      } else {
        setItem_id((Long)value);
      }
      break;

    case SHOW_MRP_FLAG:
      if (value == null) {
        unsetShowMrpFlag();
      } else {
        setShowMrpFlag((Boolean)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 SHOW_NET_PRICE:
      if (value == null) {
        unsetShowNetPrice();
      } else {
        setShowNetPrice((Boolean)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 AVAILABLE_PRICE:
      if (value == null) {
        unsetAvailable_price();
      } else {
        setAvailable_price((Double)value);
      }
      break;

    case BRAND:
      if (value == null) {
        unsetBrand();
      } else {
        setBrand((String)value);
      }
      break;

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

    case MODEL_NAME:
      if (value == null) {
        unsetModel_name();
      } else {
        setModel_name((String)value);
      }
      break;

    case MRP:
      if (value == null) {
        unsetMrp();
      } else {
        setMrp((Double)value);
      }
      break;

    case PRODUCT_NAME:
      if (value == null) {
        unsetProduct_name();
      } else {
        setProduct_name((String)value);
      }
      break;

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

    case BRAND_ID:
      if (value == null) {
        unsetBrand_id();
      } else {
        setBrand_id((Long)value);
      }
      break;

    case QUANTITY:
      if (value == null) {
        unsetQuantity();
      } else {
        setQuantity((Long)value);
      }
      break;

    case INTERNAL_RANK:
      if (value == null) {
        unsetInternalRank();
      } else {
        setInternalRank((Long)value);
      }
      break;

    }
  }

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

    case SHOW_MRP_FLAG:
      return Boolean.valueOf(isShowMrpFlag());

    case TAGLINE:
      return getTagline();

    case OFFER:
      return getOffer();

    case SHOW_NET_PRICE:
      return Boolean.valueOf(isShowNetPrice());

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

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

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

    case BRAND:
      return getBrand();

    case IDENTIFIER:
      return getIdentifier();

    case MODEL_NAME:
      return getModel_name();

    case MRP:
      return Double.valueOf(getMrp());

    case PRODUCT_NAME:
      return getProduct_name();

    case SOURCE_PRODUCT_NAME:
      return getSource_product_name();

    case BRAND_ID:
      return Long.valueOf(getBrand_id());

    case QUANTITY:
      return Long.valueOf(getQuantity());

    case INTERNAL_RANK:
      return Long.valueOf(getInternalRank());

    }
    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 ITEM_ID:
      return isSetItem_id();
    case SHOW_MRP_FLAG:
      return isSetShowMrpFlag();
    case TAGLINE:
      return isSetTagline();
    case OFFER:
      return isSetOffer();
    case SHOW_NET_PRICE:
      return isSetShowNetPrice();
    case CATEGORY_ID:
      return isSetCategory_id();
    case SUB_CATEGORY_ID:
      return isSetSubCategoryId();
    case AVAILABLE_PRICE:
      return isSetAvailable_price();
    case BRAND:
      return isSetBrand();
    case IDENTIFIER:
      return isSetIdentifier();
    case MODEL_NAME:
      return isSetModel_name();
    case MRP:
      return isSetMrp();
    case PRODUCT_NAME:
      return isSetProduct_name();
    case SOURCE_PRODUCT_NAME:
      return isSetSource_product_name();
    case BRAND_ID:
      return isSetBrand_id();
    case QUANTITY:
      return isSetQuantity();
    case INTERNAL_RANK:
      return isSetInternalRank();
    }
    throw new IllegalStateException();
  }

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

  public boolean equals(BulkItems that) {
    if (that == null)
      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_showMrpFlag = true;
    boolean that_present_showMrpFlag = true;
    if (this_present_showMrpFlag || that_present_showMrpFlag) {
      if (!(this_present_showMrpFlag && that_present_showMrpFlag))
        return false;
      if (this.showMrpFlag != that.showMrpFlag)
        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_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_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_brand = true && this.isSetBrand();
    boolean that_present_brand = true && that.isSetBrand();
    if (this_present_brand || that_present_brand) {
      if (!(this_present_brand && that_present_brand))
        return false;
      if (!this.brand.equals(that.brand))
        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;
    }

    boolean this_present_model_name = true && this.isSetModel_name();
    boolean that_present_model_name = true && that.isSetModel_name();
    if (this_present_model_name || that_present_model_name) {
      if (!(this_present_model_name && that_present_model_name))
        return false;
      if (!this.model_name.equals(that.model_name))
        return false;
    }

    boolean this_present_mrp = true;
    boolean that_present_mrp = true;
    if (this_present_mrp || that_present_mrp) {
      if (!(this_present_mrp && that_present_mrp))
        return false;
      if (this.mrp != that.mrp)
        return false;
    }

    boolean this_present_product_name = true && this.isSetProduct_name();
    boolean that_present_product_name = true && that.isSetProduct_name();
    if (this_present_product_name || that_present_product_name) {
      if (!(this_present_product_name && that_present_product_name))
        return false;
      if (!this.product_name.equals(that.product_name))
        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_brand_id = true;
    boolean that_present_brand_id = true;
    if (this_present_brand_id || that_present_brand_id) {
      if (!(this_present_brand_id && that_present_brand_id))
        return false;
      if (this.brand_id != that.brand_id)
        return false;
    }

    boolean this_present_quantity = true;
    boolean that_present_quantity = true;
    if (this_present_quantity || that_present_quantity) {
      if (!(this_present_quantity && that_present_quantity))
        return false;
      if (this.quantity != that.quantity)
        return false;
    }

    boolean this_present_internalRank = true;
    boolean that_present_internalRank = true;
    if (this_present_internalRank || that_present_internalRank) {
      if (!(this_present_internalRank && that_present_internalRank))
        return false;
      if (this.internalRank != that.internalRank)
        return false;
    }

    return true;
  }

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

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

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

    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(isSetShowMrpFlag()).compareTo(typedOther.isSetShowMrpFlag());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetShowMrpFlag()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.showMrpFlag, typedOther.showMrpFlag);
      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(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(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(isSetBrand()).compareTo(typedOther.isSetBrand());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBrand()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.brand, typedOther.brand);
      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;
      }
    }
    lastComparison = Boolean.valueOf(isSetModel_name()).compareTo(typedOther.isSetModel_name());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetModel_name()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.model_name, typedOther.model_name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMrp()).compareTo(typedOther.isSetMrp());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMrp()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mrp, typedOther.mrp);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetProduct_name()).compareTo(typedOther.isSetProduct_name());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetProduct_name()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.product_name, typedOther.product_name);
      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(isSetBrand_id()).compareTo(typedOther.isSetBrand_id());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBrand_id()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.brand_id, typedOther.brand_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetQuantity()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetInternalRank()).compareTo(typedOther.isSetInternalRank());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetInternalRank()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.internalRank, typedOther.internalRank);
      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: // 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 2: // SHOW_MRP_FLAG
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
            this.showMrpFlag = iprot.readBool();
            setShowMrpFlagIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 3: // 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 4: // 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 5: // SHOW_NET_PRICE
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
            this.showNetPrice = iprot.readBool();
            setShowNetPriceIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 6: // 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 7: // 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 8: // 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 9: // BRAND
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.brand = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 10: // 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;
        case 11: // MODEL_NAME
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.model_name = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 12: // MRP
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.mrp = iprot.readDouble();
            setMrpIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 13: // PRODUCT_NAME
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.product_name = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 14: // 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 15: // BRAND_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.brand_id = iprot.readI64();
            setBrand_idIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 16: // QUANTITY
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.quantity = iprot.readI64();
            setQuantityIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 17: // INTERNAL_RANK
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.internalRank = iprot.readI64();
            setInternalRankIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        default:
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
      }
      iprot.readFieldEnd();
    }
    iprot.readStructEnd();
    validate();
  }

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

    oprot.writeStructBegin(STRUCT_DESC);
    oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
    oprot.writeI64(this.item_id);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(SHOW_MRP_FLAG_FIELD_DESC);
    oprot.writeBool(this.showMrpFlag);
    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(SHOW_NET_PRICE_FIELD_DESC);
    oprot.writeBool(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();
    oprot.writeFieldBegin(AVAILABLE_PRICE_FIELD_DESC);
    oprot.writeDouble(this.available_price);
    oprot.writeFieldEnd();
    if (this.brand != null) {
      oprot.writeFieldBegin(BRAND_FIELD_DESC);
      oprot.writeString(this.brand);
      oprot.writeFieldEnd();
    }
    if (this.identifier != null) {
      oprot.writeFieldBegin(IDENTIFIER_FIELD_DESC);
      oprot.writeString(this.identifier);
      oprot.writeFieldEnd();
    }
    if (this.model_name != null) {
      oprot.writeFieldBegin(MODEL_NAME_FIELD_DESC);
      oprot.writeString(this.model_name);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(MRP_FIELD_DESC);
    oprot.writeDouble(this.mrp);
    oprot.writeFieldEnd();
    if (this.product_name != null) {
      oprot.writeFieldBegin(PRODUCT_NAME_FIELD_DESC);
      oprot.writeString(this.product_name);
      oprot.writeFieldEnd();
    }
    if (this.source_product_name != null) {
      oprot.writeFieldBegin(SOURCE_PRODUCT_NAME_FIELD_DESC);
      oprot.writeString(this.source_product_name);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(BRAND_ID_FIELD_DESC);
    oprot.writeI64(this.brand_id);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
    oprot.writeI64(this.quantity);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(INTERNAL_RANK_FIELD_DESC);
    oprot.writeI64(this.internalRank);
    oprot.writeFieldEnd();
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }

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

    sb.append("item_id:");
    sb.append(this.item_id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("showMrpFlag:");
    sb.append(this.showMrpFlag);
    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("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("available_price:");
    sb.append(this.available_price);
    first = false;
    if (!first) sb.append(", ");
    sb.append("brand:");
    if (this.brand == null) {
      sb.append("null");
    } else {
      sb.append(this.brand);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("identifier:");
    if (this.identifier == null) {
      sb.append("null");
    } else {
      sb.append(this.identifier);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("model_name:");
    if (this.model_name == null) {
      sb.append("null");
    } else {
      sb.append(this.model_name);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("mrp:");
    sb.append(this.mrp);
    first = false;
    if (!first) sb.append(", ");
    sb.append("product_name:");
    if (this.product_name == null) {
      sb.append("null");
    } else {
      sb.append(this.product_name);
    }
    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("brand_id:");
    sb.append(this.brand_id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("quantity:");
    sb.append(this.quantity);
    first = false;
    if (!first) sb.append(", ");
    sb.append("internalRank:");
    sb.append(this.internalRank);
    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);
    }
  }

}