Subversion Repositories SmartDukaan

Rev

Rev 21844 | 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.purchase;

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

  private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orderId", org.apache.thrift.protocol.TType.I64, (short)1);
  private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)2);
  private static final org.apache.thrift.protocol.TField PRODUCT_GROUP_FIELD_DESC = new org.apache.thrift.protocol.TField("productGroup", org.apache.thrift.protocol.TType.STRING, (short)3);
  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)4);
  private static final org.apache.thrift.protocol.TField MODEL_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("modelNumber", org.apache.thrift.protocol.TType.STRING, (short)5);
  private static final org.apache.thrift.protocol.TField MODEL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("modelName", org.apache.thrift.protocol.TType.STRING, (short)6);
  private static final org.apache.thrift.protocol.TField COLOR_FIELD_DESC = new org.apache.thrift.protocol.TField("color", org.apache.thrift.protocol.TType.STRING, (short)7);
  private static final org.apache.thrift.protocol.TField ITEM_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("itemNumber", org.apache.thrift.protocol.TType.STRING, (short)8);
  private static final org.apache.thrift.protocol.TField QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.DOUBLE, (short)9);
  private static final org.apache.thrift.protocol.TField UNFULFILLED_QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("unfulfilledQuantity", org.apache.thrift.protocol.TType.DOUBLE, (short)10);
  private static final org.apache.thrift.protocol.TField CREATED_AT_FIELD_DESC = new org.apache.thrift.protocol.TField("createdAt", org.apache.thrift.protocol.TType.I64, (short)11);
  private static final org.apache.thrift.protocol.TField UNIT_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("unitPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)12);
  private static final org.apache.thrift.protocol.TField FULFILLED_FIELD_DESC = new org.apache.thrift.protocol.TField("fulfilled", org.apache.thrift.protocol.TType.BOOL, (short)13);
  private static final org.apache.thrift.protocol.TField COD_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("codCount", org.apache.thrift.protocol.TType.I64, (short)14);
  private static final org.apache.thrift.protocol.TField AVAILABLE_QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("availableQuantity", org.apache.thrift.protocol.TType.I64, (short)15);
  private static final org.apache.thrift.protocol.TField RESERVED_QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("reservedQuantity", org.apache.thrift.protocol.TType.I64, (short)16);
  private static final org.apache.thrift.protocol.TField AVG_SALES_FIELD_DESC = new org.apache.thrift.protocol.TField("avgSales", org.apache.thrift.protocol.TType.DOUBLE, (short)17);
  private static final org.apache.thrift.protocol.TField MIN_STOCK_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("minStockLevel", org.apache.thrift.protocol.TType.I64, (short)18);
  private static final org.apache.thrift.protocol.TField NUMBER_OF_DAYS_STOCK_FIELD_DESC = new org.apache.thrift.protocol.TField("numberOfDaysStock", org.apache.thrift.protocol.TType.I64, (short)19);
  private static final org.apache.thrift.protocol.TField SUGGESTED_QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("suggestedQuantity", org.apache.thrift.protocol.TType.I64, (short)20);
  private static final org.apache.thrift.protocol.TField NUMBER_OF_DAYS_IN_STOCK_FIELD_DESC = new org.apache.thrift.protocol.TField("numberOfDaysInStock", org.apache.thrift.protocol.TType.I64, (short)21);
  private static final org.apache.thrift.protocol.TField RTO_ORDERS_FIELD_DESC = new org.apache.thrift.protocol.TField("rtoOrders", org.apache.thrift.protocol.TType.I64, (short)22);
  private static final org.apache.thrift.protocol.TField LAST_XDAYS_SALE_FIELD_DESC = new org.apache.thrift.protocol.TField("lastXdaysSale", org.apache.thrift.protocol.TType.STRING, (short)23);
  private static final org.apache.thrift.protocol.TField PREVIOUSLY_ORDERED_QTY_FIELD_DESC = new org.apache.thrift.protocol.TField("previouslyOrderedQty", org.apache.thrift.protocol.TType.I64, (short)24);
  private static final org.apache.thrift.protocol.TField NLC_FIELD_DESC = new org.apache.thrift.protocol.TField("nlc", org.apache.thrift.protocol.TType.DOUBLE, (short)25);
  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)26);
  private static final org.apache.thrift.protocol.TField NLC_P_FIELD_DESC = new org.apache.thrift.protocol.TField("nlcP", org.apache.thrift.protocol.TType.DOUBLE, (short)27);
  private static final org.apache.thrift.protocol.TField VAT_DIFF_FIELD_DESC = new org.apache.thrift.protocol.TField("vatDiff", org.apache.thrift.protocol.TType.DOUBLE, (short)28);
  private static final org.apache.thrift.protocol.TField IGST_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("igstRate", org.apache.thrift.protocol.TType.DOUBLE, (short)29);
  private static final org.apache.thrift.protocol.TField CGST_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("cgstRate", org.apache.thrift.protocol.TType.DOUBLE, (short)30);
  private static final org.apache.thrift.protocol.TField SGST_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("sgstRate", org.apache.thrift.protocol.TType.DOUBLE, (short)31);
  private static final org.apache.thrift.protocol.TField HSN_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("hsnCode", org.apache.thrift.protocol.TType.STRING, (short)32);
  private static final org.apache.thrift.protocol.TField INVOICE_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("invoicePrice", org.apache.thrift.protocol.TType.DOUBLE, (short)33);
  private static final org.apache.thrift.protocol.TField TP_FIELD_DESC = new org.apache.thrift.protocol.TField("tp", org.apache.thrift.protocol.TType.DOUBLE, (short)34);

  private long orderId; // required
  private long itemId; // required
  private String productGroup; // required
  private String brand; // required
  private String modelNumber; // required
  private String modelName; // required
  private String color; // required
  private String itemNumber; // required
  private double quantity; // required
  private double unfulfilledQuantity; // required
  private long createdAt; // required
  private double unitPrice; // required
  private boolean fulfilled; // required
  private long codCount; // required
  private long availableQuantity; // required
  private long reservedQuantity; // required
  private double avgSales; // required
  private long minStockLevel; // required
  private long numberOfDaysStock; // required
  private long suggestedQuantity; // required
  private long numberOfDaysInStock; // required
  private long rtoOrders; // required
  private String lastXdaysSale; // required
  private long previouslyOrderedQty; // required
  private double nlc; // required
  private double mrp; // required
  private double nlcP; // required
  private double vatDiff; // required
  private double igstRate; // required
  private double cgstRate; // required
  private double sgstRate; // required
  private String hsnCode; // required
  private double invoicePrice; // required
  private double tp; // required

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    ORDER_ID((short)1, "orderId"),
    ITEM_ID((short)2, "itemId"),
    PRODUCT_GROUP((short)3, "productGroup"),
    BRAND((short)4, "brand"),
    MODEL_NUMBER((short)5, "modelNumber"),
    MODEL_NAME((short)6, "modelName"),
    COLOR((short)7, "color"),
    ITEM_NUMBER((short)8, "itemNumber"),
    QUANTITY((short)9, "quantity"),
    UNFULFILLED_QUANTITY((short)10, "unfulfilledQuantity"),
    CREATED_AT((short)11, "createdAt"),
    UNIT_PRICE((short)12, "unitPrice"),
    FULFILLED((short)13, "fulfilled"),
    COD_COUNT((short)14, "codCount"),
    AVAILABLE_QUANTITY((short)15, "availableQuantity"),
    RESERVED_QUANTITY((short)16, "reservedQuantity"),
    AVG_SALES((short)17, "avgSales"),
    MIN_STOCK_LEVEL((short)18, "minStockLevel"),
    NUMBER_OF_DAYS_STOCK((short)19, "numberOfDaysStock"),
    SUGGESTED_QUANTITY((short)20, "suggestedQuantity"),
    NUMBER_OF_DAYS_IN_STOCK((short)21, "numberOfDaysInStock"),
    RTO_ORDERS((short)22, "rtoOrders"),
    LAST_XDAYS_SALE((short)23, "lastXdaysSale"),
    PREVIOUSLY_ORDERED_QTY((short)24, "previouslyOrderedQty"),
    NLC((short)25, "nlc"),
    MRP((short)26, "mrp"),
    NLC_P((short)27, "nlcP"),
    VAT_DIFF((short)28, "vatDiff"),
    IGST_RATE((short)29, "igstRate"),
    CGST_RATE((short)30, "cgstRate"),
    SGST_RATE((short)31, "sgstRate"),
    HSN_CODE((short)32, "hsnCode"),
    INVOICE_PRICE((short)33, "invoicePrice"),
    TP((short)34, "tp");

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

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

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 1: // ORDER_ID
          return ORDER_ID;
        case 2: // ITEM_ID
          return ITEM_ID;
        case 3: // PRODUCT_GROUP
          return PRODUCT_GROUP;
        case 4: // BRAND
          return BRAND;
        case 5: // MODEL_NUMBER
          return MODEL_NUMBER;
        case 6: // MODEL_NAME
          return MODEL_NAME;
        case 7: // COLOR
          return COLOR;
        case 8: // ITEM_NUMBER
          return ITEM_NUMBER;
        case 9: // QUANTITY
          return QUANTITY;
        case 10: // UNFULFILLED_QUANTITY
          return UNFULFILLED_QUANTITY;
        case 11: // CREATED_AT
          return CREATED_AT;
        case 12: // UNIT_PRICE
          return UNIT_PRICE;
        case 13: // FULFILLED
          return FULFILLED;
        case 14: // COD_COUNT
          return COD_COUNT;
        case 15: // AVAILABLE_QUANTITY
          return AVAILABLE_QUANTITY;
        case 16: // RESERVED_QUANTITY
          return RESERVED_QUANTITY;
        case 17: // AVG_SALES
          return AVG_SALES;
        case 18: // MIN_STOCK_LEVEL
          return MIN_STOCK_LEVEL;
        case 19: // NUMBER_OF_DAYS_STOCK
          return NUMBER_OF_DAYS_STOCK;
        case 20: // SUGGESTED_QUANTITY
          return SUGGESTED_QUANTITY;
        case 21: // NUMBER_OF_DAYS_IN_STOCK
          return NUMBER_OF_DAYS_IN_STOCK;
        case 22: // RTO_ORDERS
          return RTO_ORDERS;
        case 23: // LAST_XDAYS_SALE
          return LAST_XDAYS_SALE;
        case 24: // PREVIOUSLY_ORDERED_QTY
          return PREVIOUSLY_ORDERED_QTY;
        case 25: // NLC
          return NLC;
        case 26: // MRP
          return MRP;
        case 27: // NLC_P
          return NLC_P;
        case 28: // VAT_DIFF
          return VAT_DIFF;
        case 29: // IGST_RATE
          return IGST_RATE;
        case 30: // CGST_RATE
          return CGST_RATE;
        case 31: // SGST_RATE
          return SGST_RATE;
        case 32: // HSN_CODE
          return HSN_CODE;
        case 33: // INVOICE_PRICE
          return INVOICE_PRICE;
        case 34: // TP
          return TP;
        default:
          return null;
      }
    }

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

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

    private final short _thriftId;
    private final String _fieldName;

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

    public short getThriftFieldId() {
      return _thriftId;
    }

    public String getFieldName() {
      return _fieldName;
    }
  }

  // isset id assignments
  private static final int __ORDERID_ISSET_ID = 0;
  private static final int __ITEMID_ISSET_ID = 1;
  private static final int __QUANTITY_ISSET_ID = 2;
  private static final int __UNFULFILLEDQUANTITY_ISSET_ID = 3;
  private static final int __CREATEDAT_ISSET_ID = 4;
  private static final int __UNITPRICE_ISSET_ID = 5;
  private static final int __FULFILLED_ISSET_ID = 6;
  private static final int __CODCOUNT_ISSET_ID = 7;
  private static final int __AVAILABLEQUANTITY_ISSET_ID = 8;
  private static final int __RESERVEDQUANTITY_ISSET_ID = 9;
  private static final int __AVGSALES_ISSET_ID = 10;
  private static final int __MINSTOCKLEVEL_ISSET_ID = 11;
  private static final int __NUMBEROFDAYSSTOCK_ISSET_ID = 12;
  private static final int __SUGGESTEDQUANTITY_ISSET_ID = 13;
  private static final int __NUMBEROFDAYSINSTOCK_ISSET_ID = 14;
  private static final int __RTOORDERS_ISSET_ID = 15;
  private static final int __PREVIOUSLYORDEREDQTY_ISSET_ID = 16;
  private static final int __NLC_ISSET_ID = 17;
  private static final int __MRP_ISSET_ID = 18;
  private static final int __NLCP_ISSET_ID = 19;
  private static final int __VATDIFF_ISSET_ID = 20;
  private static final int __IGSTRATE_ISSET_ID = 21;
  private static final int __CGSTRATE_ISSET_ID = 22;
  private static final int __SGSTRATE_ISSET_ID = 23;
  private static final int __INVOICEPRICE_ISSET_ID = 24;
  private static final int __TP_ISSET_ID = 25;
  private BitSet __isset_bit_vector = new BitSet(26);

  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.PRODUCT_GROUP, new org.apache.thrift.meta_data.FieldMetaData("productGroup", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    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.MODEL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("modelNumber", 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("modelName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.COLOR, new org.apache.thrift.meta_data.FieldMetaData("color", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    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.DOUBLE)));
    tmpMap.put(_Fields.UNFULFILLED_QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("unfulfilledQuantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.CREATED_AT, new org.apache.thrift.meta_data.FieldMetaData("createdAt", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.UNIT_PRICE, new org.apache.thrift.meta_data.FieldMetaData("unitPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.FULFILLED, new org.apache.thrift.meta_data.FieldMetaData("fulfilled", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.COD_COUNT, new org.apache.thrift.meta_data.FieldMetaData("codCount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.AVAILABLE_QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("availableQuantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.RESERVED_QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("reservedQuantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.AVG_SALES, new org.apache.thrift.meta_data.FieldMetaData("avgSales", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.MIN_STOCK_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("minStockLevel", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.NUMBER_OF_DAYS_STOCK, new org.apache.thrift.meta_data.FieldMetaData("numberOfDaysStock", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.SUGGESTED_QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("suggestedQuantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.NUMBER_OF_DAYS_IN_STOCK, new org.apache.thrift.meta_data.FieldMetaData("numberOfDaysInStock", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.RTO_ORDERS, new org.apache.thrift.meta_data.FieldMetaData("rtoOrders", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.LAST_XDAYS_SALE, new org.apache.thrift.meta_data.FieldMetaData("lastXdaysSale", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.PREVIOUSLY_ORDERED_QTY, new org.apache.thrift.meta_data.FieldMetaData("previouslyOrderedQty", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.NLC, new org.apache.thrift.meta_data.FieldMetaData("nlc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    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.NLC_P, new org.apache.thrift.meta_data.FieldMetaData("nlcP", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.VAT_DIFF, new org.apache.thrift.meta_data.FieldMetaData("vatDiff", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.IGST_RATE, new org.apache.thrift.meta_data.FieldMetaData("igstRate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.CGST_RATE, new org.apache.thrift.meta_data.FieldMetaData("cgstRate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.SGST_RATE, new org.apache.thrift.meta_data.FieldMetaData("sgstRate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.HSN_CODE, new org.apache.thrift.meta_data.FieldMetaData("hsnCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.INVOICE_PRICE, new org.apache.thrift.meta_data.FieldMetaData("invoicePrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.TP, new org.apache.thrift.meta_data.FieldMetaData("tp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LineItem.class, metaDataMap);
  }

  public LineItem() {
  }

  public LineItem(
    long orderId,
    long itemId,
    String productGroup,
    String brand,
    String modelNumber,
    String modelName,
    String color,
    String itemNumber,
    double quantity,
    double unfulfilledQuantity,
    long createdAt,
    double unitPrice,
    boolean fulfilled,
    long codCount,
    long availableQuantity,
    long reservedQuantity,
    double avgSales,
    long minStockLevel,
    long numberOfDaysStock,
    long suggestedQuantity,
    long numberOfDaysInStock,
    long rtoOrders,
    String lastXdaysSale,
    long previouslyOrderedQty,
    double nlc,
    double mrp,
    double nlcP,
    double vatDiff,
    double igstRate,
    double cgstRate,
    double sgstRate,
    String hsnCode,
    double invoicePrice,
    double tp)
  {
    this();
    this.orderId = orderId;
    setOrderIdIsSet(true);
    this.itemId = itemId;
    setItemIdIsSet(true);
    this.productGroup = productGroup;
    this.brand = brand;
    this.modelNumber = modelNumber;
    this.modelName = modelName;
    this.color = color;
    this.itemNumber = itemNumber;
    this.quantity = quantity;
    setQuantityIsSet(true);
    this.unfulfilledQuantity = unfulfilledQuantity;
    setUnfulfilledQuantityIsSet(true);
    this.createdAt = createdAt;
    setCreatedAtIsSet(true);
    this.unitPrice = unitPrice;
    setUnitPriceIsSet(true);
    this.fulfilled = fulfilled;
    setFulfilledIsSet(true);
    this.codCount = codCount;
    setCodCountIsSet(true);
    this.availableQuantity = availableQuantity;
    setAvailableQuantityIsSet(true);
    this.reservedQuantity = reservedQuantity;
    setReservedQuantityIsSet(true);
    this.avgSales = avgSales;
    setAvgSalesIsSet(true);
    this.minStockLevel = minStockLevel;
    setMinStockLevelIsSet(true);
    this.numberOfDaysStock = numberOfDaysStock;
    setNumberOfDaysStockIsSet(true);
    this.suggestedQuantity = suggestedQuantity;
    setSuggestedQuantityIsSet(true);
    this.numberOfDaysInStock = numberOfDaysInStock;
    setNumberOfDaysInStockIsSet(true);
    this.rtoOrders = rtoOrders;
    setRtoOrdersIsSet(true);
    this.lastXdaysSale = lastXdaysSale;
    this.previouslyOrderedQty = previouslyOrderedQty;
    setPreviouslyOrderedQtyIsSet(true);
    this.nlc = nlc;
    setNlcIsSet(true);
    this.mrp = mrp;
    setMrpIsSet(true);
    this.nlcP = nlcP;
    setNlcPIsSet(true);
    this.vatDiff = vatDiff;
    setVatDiffIsSet(true);
    this.igstRate = igstRate;
    setIgstRateIsSet(true);
    this.cgstRate = cgstRate;
    setCgstRateIsSet(true);
    this.sgstRate = sgstRate;
    setSgstRateIsSet(true);
    this.hsnCode = hsnCode;
    this.invoicePrice = invoicePrice;
    setInvoicePriceIsSet(true);
    this.tp = tp;
    setTpIsSet(true);
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public LineItem(LineItem other) {
    __isset_bit_vector.clear();
    __isset_bit_vector.or(other.__isset_bit_vector);
    this.orderId = other.orderId;
    this.itemId = other.itemId;
    if (other.isSetProductGroup()) {
      this.productGroup = other.productGroup;
    }
    if (other.isSetBrand()) {
      this.brand = other.brand;
    }
    if (other.isSetModelNumber()) {
      this.modelNumber = other.modelNumber;
    }
    if (other.isSetModelName()) {
      this.modelName = other.modelName;
    }
    if (other.isSetColor()) {
      this.color = other.color;
    }
    if (other.isSetItemNumber()) {
      this.itemNumber = other.itemNumber;
    }
    this.quantity = other.quantity;
    this.unfulfilledQuantity = other.unfulfilledQuantity;
    this.createdAt = other.createdAt;
    this.unitPrice = other.unitPrice;
    this.fulfilled = other.fulfilled;
    this.codCount = other.codCount;
    this.availableQuantity = other.availableQuantity;
    this.reservedQuantity = other.reservedQuantity;
    this.avgSales = other.avgSales;
    this.minStockLevel = other.minStockLevel;
    this.numberOfDaysStock = other.numberOfDaysStock;
    this.suggestedQuantity = other.suggestedQuantity;
    this.numberOfDaysInStock = other.numberOfDaysInStock;
    this.rtoOrders = other.rtoOrders;
    if (other.isSetLastXdaysSale()) {
      this.lastXdaysSale = other.lastXdaysSale;
    }
    this.previouslyOrderedQty = other.previouslyOrderedQty;
    this.nlc = other.nlc;
    this.mrp = other.mrp;
    this.nlcP = other.nlcP;
    this.vatDiff = other.vatDiff;
    this.igstRate = other.igstRate;
    this.cgstRate = other.cgstRate;
    this.sgstRate = other.sgstRate;
    if (other.isSetHsnCode()) {
      this.hsnCode = other.hsnCode;
    }
    this.invoicePrice = other.invoicePrice;
    this.tp = other.tp;
  }

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

  @Override
  public void clear() {
    setOrderIdIsSet(false);
    this.orderId = 0;
    setItemIdIsSet(false);
    this.itemId = 0;
    this.productGroup = null;
    this.brand = null;
    this.modelNumber = null;
    this.modelName = null;
    this.color = null;
    this.itemNumber = null;
    setQuantityIsSet(false);
    this.quantity = 0.0;
    setUnfulfilledQuantityIsSet(false);
    this.unfulfilledQuantity = 0.0;
    setCreatedAtIsSet(false);
    this.createdAt = 0;
    setUnitPriceIsSet(false);
    this.unitPrice = 0.0;
    setFulfilledIsSet(false);
    this.fulfilled = false;
    setCodCountIsSet(false);
    this.codCount = 0;
    setAvailableQuantityIsSet(false);
    this.availableQuantity = 0;
    setReservedQuantityIsSet(false);
    this.reservedQuantity = 0;
    setAvgSalesIsSet(false);
    this.avgSales = 0.0;
    setMinStockLevelIsSet(false);
    this.minStockLevel = 0;
    setNumberOfDaysStockIsSet(false);
    this.numberOfDaysStock = 0;
    setSuggestedQuantityIsSet(false);
    this.suggestedQuantity = 0;
    setNumberOfDaysInStockIsSet(false);
    this.numberOfDaysInStock = 0;
    setRtoOrdersIsSet(false);
    this.rtoOrders = 0;
    this.lastXdaysSale = null;
    setPreviouslyOrderedQtyIsSet(false);
    this.previouslyOrderedQty = 0;
    setNlcIsSet(false);
    this.nlc = 0.0;
    setMrpIsSet(false);
    this.mrp = 0.0;
    setNlcPIsSet(false);
    this.nlcP = 0.0;
    setVatDiffIsSet(false);
    this.vatDiff = 0.0;
    setIgstRateIsSet(false);
    this.igstRate = 0.0;
    setCgstRateIsSet(false);
    this.cgstRate = 0.0;
    setSgstRateIsSet(false);
    this.sgstRate = 0.0;
    this.hsnCode = null;
    setInvoicePriceIsSet(false);
    this.invoicePrice = 0.0;
    setTpIsSet(false);
    this.tp = 0.0;
  }

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

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

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

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

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

  public long getItemId() {
    return this.itemId;
  }

  public void setItemId(long itemId) {
    this.itemId = itemId;
    setItemIdIsSet(true);
  }

  public void unsetItemId() {
    __isset_bit_vector.clear(__ITEMID_ISSET_ID);
  }

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

  public void setItemIdIsSet(boolean value) {
    __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
  }

  public String getProductGroup() {
    return this.productGroup;
  }

  public void setProductGroup(String productGroup) {
    this.productGroup = productGroup;
  }

  public void unsetProductGroup() {
    this.productGroup = null;
  }

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

  public void setProductGroupIsSet(boolean value) {
    if (!value) {
      this.productGroup = null;
    }
  }

  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 getModelNumber() {
    return this.modelNumber;
  }

  public void setModelNumber(String modelNumber) {
    this.modelNumber = modelNumber;
  }

  public void unsetModelNumber() {
    this.modelNumber = null;
  }

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

  public void setModelNumberIsSet(boolean value) {
    if (!value) {
      this.modelNumber = null;
    }
  }

  public String getModelName() {
    return this.modelName;
  }

  public void setModelName(String modelName) {
    this.modelName = modelName;
  }

  public void unsetModelName() {
    this.modelName = null;
  }

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

  public void setModelNameIsSet(boolean value) {
    if (!value) {
      this.modelName = null;
    }
  }

  public String getColor() {
    return this.color;
  }

  public void setColor(String color) {
    this.color = color;
  }

  public void unsetColor() {
    this.color = null;
  }

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

  public void setColorIsSet(boolean value) {
    if (!value) {
      this.color = null;
    }
  }

  public String getItemNumber() {
    return this.itemNumber;
  }

  public void setItemNumber(String itemNumber) {
    this.itemNumber = itemNumber;
  }

  public void unsetItemNumber() {
    this.itemNumber = null;
  }

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

  public void setItemNumberIsSet(boolean value) {
    if (!value) {
      this.itemNumber = null;
    }
  }

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

  public void setQuantity(double 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 double getUnfulfilledQuantity() {
    return this.unfulfilledQuantity;
  }

  public void setUnfulfilledQuantity(double unfulfilledQuantity) {
    this.unfulfilledQuantity = unfulfilledQuantity;
    setUnfulfilledQuantityIsSet(true);
  }

  public void unsetUnfulfilledQuantity() {
    __isset_bit_vector.clear(__UNFULFILLEDQUANTITY_ISSET_ID);
  }

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

  public void setUnfulfilledQuantityIsSet(boolean value) {
    __isset_bit_vector.set(__UNFULFILLEDQUANTITY_ISSET_ID, value);
  }

  public long getCreatedAt() {
    return this.createdAt;
  }

  public void setCreatedAt(long createdAt) {
    this.createdAt = createdAt;
    setCreatedAtIsSet(true);
  }

  public void unsetCreatedAt() {
    __isset_bit_vector.clear(__CREATEDAT_ISSET_ID);
  }

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

  public void setCreatedAtIsSet(boolean value) {
    __isset_bit_vector.set(__CREATEDAT_ISSET_ID, value);
  }

  public double getUnitPrice() {
    return this.unitPrice;
  }

  public void setUnitPrice(double unitPrice) {
    this.unitPrice = unitPrice;
    setUnitPriceIsSet(true);
  }

  public void unsetUnitPrice() {
    __isset_bit_vector.clear(__UNITPRICE_ISSET_ID);
  }

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

  public void setUnitPriceIsSet(boolean value) {
    __isset_bit_vector.set(__UNITPRICE_ISSET_ID, value);
  }

  public boolean isFulfilled() {
    return this.fulfilled;
  }

  public void setFulfilled(boolean fulfilled) {
    this.fulfilled = fulfilled;
    setFulfilledIsSet(true);
  }

  public void unsetFulfilled() {
    __isset_bit_vector.clear(__FULFILLED_ISSET_ID);
  }

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

  public void setFulfilledIsSet(boolean value) {
    __isset_bit_vector.set(__FULFILLED_ISSET_ID, value);
  }

  public long getCodCount() {
    return this.codCount;
  }

  public void setCodCount(long codCount) {
    this.codCount = codCount;
    setCodCountIsSet(true);
  }

  public void unsetCodCount() {
    __isset_bit_vector.clear(__CODCOUNT_ISSET_ID);
  }

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

  public void setCodCountIsSet(boolean value) {
    __isset_bit_vector.set(__CODCOUNT_ISSET_ID, value);
  }

  public long getAvailableQuantity() {
    return this.availableQuantity;
  }

  public void setAvailableQuantity(long availableQuantity) {
    this.availableQuantity = availableQuantity;
    setAvailableQuantityIsSet(true);
  }

  public void unsetAvailableQuantity() {
    __isset_bit_vector.clear(__AVAILABLEQUANTITY_ISSET_ID);
  }

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

  public void setAvailableQuantityIsSet(boolean value) {
    __isset_bit_vector.set(__AVAILABLEQUANTITY_ISSET_ID, value);
  }

  public long getReservedQuantity() {
    return this.reservedQuantity;
  }

  public void setReservedQuantity(long reservedQuantity) {
    this.reservedQuantity = reservedQuantity;
    setReservedQuantityIsSet(true);
  }

  public void unsetReservedQuantity() {
    __isset_bit_vector.clear(__RESERVEDQUANTITY_ISSET_ID);
  }

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

  public void setReservedQuantityIsSet(boolean value) {
    __isset_bit_vector.set(__RESERVEDQUANTITY_ISSET_ID, value);
  }

  public double getAvgSales() {
    return this.avgSales;
  }

  public void setAvgSales(double avgSales) {
    this.avgSales = avgSales;
    setAvgSalesIsSet(true);
  }

  public void unsetAvgSales() {
    __isset_bit_vector.clear(__AVGSALES_ISSET_ID);
  }

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

  public void setAvgSalesIsSet(boolean value) {
    __isset_bit_vector.set(__AVGSALES_ISSET_ID, value);
  }

  public long getMinStockLevel() {
    return this.minStockLevel;
  }

  public void setMinStockLevel(long minStockLevel) {
    this.minStockLevel = minStockLevel;
    setMinStockLevelIsSet(true);
  }

  public void unsetMinStockLevel() {
    __isset_bit_vector.clear(__MINSTOCKLEVEL_ISSET_ID);
  }

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

  public void setMinStockLevelIsSet(boolean value) {
    __isset_bit_vector.set(__MINSTOCKLEVEL_ISSET_ID, value);
  }

  public long getNumberOfDaysStock() {
    return this.numberOfDaysStock;
  }

  public void setNumberOfDaysStock(long numberOfDaysStock) {
    this.numberOfDaysStock = numberOfDaysStock;
    setNumberOfDaysStockIsSet(true);
  }

  public void unsetNumberOfDaysStock() {
    __isset_bit_vector.clear(__NUMBEROFDAYSSTOCK_ISSET_ID);
  }

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

  public void setNumberOfDaysStockIsSet(boolean value) {
    __isset_bit_vector.set(__NUMBEROFDAYSSTOCK_ISSET_ID, value);
  }

  public long getSuggestedQuantity() {
    return this.suggestedQuantity;
  }

  public void setSuggestedQuantity(long suggestedQuantity) {
    this.suggestedQuantity = suggestedQuantity;
    setSuggestedQuantityIsSet(true);
  }

  public void unsetSuggestedQuantity() {
    __isset_bit_vector.clear(__SUGGESTEDQUANTITY_ISSET_ID);
  }

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

  public void setSuggestedQuantityIsSet(boolean value) {
    __isset_bit_vector.set(__SUGGESTEDQUANTITY_ISSET_ID, value);
  }

  public long getNumberOfDaysInStock() {
    return this.numberOfDaysInStock;
  }

  public void setNumberOfDaysInStock(long numberOfDaysInStock) {
    this.numberOfDaysInStock = numberOfDaysInStock;
    setNumberOfDaysInStockIsSet(true);
  }

  public void unsetNumberOfDaysInStock() {
    __isset_bit_vector.clear(__NUMBEROFDAYSINSTOCK_ISSET_ID);
  }

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

  public void setNumberOfDaysInStockIsSet(boolean value) {
    __isset_bit_vector.set(__NUMBEROFDAYSINSTOCK_ISSET_ID, value);
  }

  public long getRtoOrders() {
    return this.rtoOrders;
  }

  public void setRtoOrders(long rtoOrders) {
    this.rtoOrders = rtoOrders;
    setRtoOrdersIsSet(true);
  }

  public void unsetRtoOrders() {
    __isset_bit_vector.clear(__RTOORDERS_ISSET_ID);
  }

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

  public void setRtoOrdersIsSet(boolean value) {
    __isset_bit_vector.set(__RTOORDERS_ISSET_ID, value);
  }

  public String getLastXdaysSale() {
    return this.lastXdaysSale;
  }

  public void setLastXdaysSale(String lastXdaysSale) {
    this.lastXdaysSale = lastXdaysSale;
  }

  public void unsetLastXdaysSale() {
    this.lastXdaysSale = null;
  }

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

  public void setLastXdaysSaleIsSet(boolean value) {
    if (!value) {
      this.lastXdaysSale = null;
    }
  }

  public long getPreviouslyOrderedQty() {
    return this.previouslyOrderedQty;
  }

  public void setPreviouslyOrderedQty(long previouslyOrderedQty) {
    this.previouslyOrderedQty = previouslyOrderedQty;
    setPreviouslyOrderedQtyIsSet(true);
  }

  public void unsetPreviouslyOrderedQty() {
    __isset_bit_vector.clear(__PREVIOUSLYORDEREDQTY_ISSET_ID);
  }

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

  public void setPreviouslyOrderedQtyIsSet(boolean value) {
    __isset_bit_vector.set(__PREVIOUSLYORDEREDQTY_ISSET_ID, value);
  }

  public double getNlc() {
    return this.nlc;
  }

  public void setNlc(double nlc) {
    this.nlc = nlc;
    setNlcIsSet(true);
  }

  public void unsetNlc() {
    __isset_bit_vector.clear(__NLC_ISSET_ID);
  }

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

  public void setNlcIsSet(boolean value) {
    __isset_bit_vector.set(__NLC_ISSET_ID, value);
  }

  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 double getNlcP() {
    return this.nlcP;
  }

  public void setNlcP(double nlcP) {
    this.nlcP = nlcP;
    setNlcPIsSet(true);
  }

  public void unsetNlcP() {
    __isset_bit_vector.clear(__NLCP_ISSET_ID);
  }

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

  public void setNlcPIsSet(boolean value) {
    __isset_bit_vector.set(__NLCP_ISSET_ID, value);
  }

  public double getVatDiff() {
    return this.vatDiff;
  }

  public void setVatDiff(double vatDiff) {
    this.vatDiff = vatDiff;
    setVatDiffIsSet(true);
  }

  public void unsetVatDiff() {
    __isset_bit_vector.clear(__VATDIFF_ISSET_ID);
  }

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

  public void setVatDiffIsSet(boolean value) {
    __isset_bit_vector.set(__VATDIFF_ISSET_ID, value);
  }

  public double getIgstRate() {
    return this.igstRate;
  }

  public void setIgstRate(double igstRate) {
    this.igstRate = igstRate;
    setIgstRateIsSet(true);
  }

  public void unsetIgstRate() {
    __isset_bit_vector.clear(__IGSTRATE_ISSET_ID);
  }

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

  public void setIgstRateIsSet(boolean value) {
    __isset_bit_vector.set(__IGSTRATE_ISSET_ID, value);
  }

  public double getCgstRate() {
    return this.cgstRate;
  }

  public void setCgstRate(double cgstRate) {
    this.cgstRate = cgstRate;
    setCgstRateIsSet(true);
  }

  public void unsetCgstRate() {
    __isset_bit_vector.clear(__CGSTRATE_ISSET_ID);
  }

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

  public void setCgstRateIsSet(boolean value) {
    __isset_bit_vector.set(__CGSTRATE_ISSET_ID, value);
  }

  public double getSgstRate() {
    return this.sgstRate;
  }

  public void setSgstRate(double sgstRate) {
    this.sgstRate = sgstRate;
    setSgstRateIsSet(true);
  }

  public void unsetSgstRate() {
    __isset_bit_vector.clear(__SGSTRATE_ISSET_ID);
  }

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

  public void setSgstRateIsSet(boolean value) {
    __isset_bit_vector.set(__SGSTRATE_ISSET_ID, value);
  }

  public String getHsnCode() {
    return this.hsnCode;
  }

  public void setHsnCode(String hsnCode) {
    this.hsnCode = hsnCode;
  }

  public void unsetHsnCode() {
    this.hsnCode = null;
  }

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

  public void setHsnCodeIsSet(boolean value) {
    if (!value) {
      this.hsnCode = null;
    }
  }

  public double getInvoicePrice() {
    return this.invoicePrice;
  }

  public void setInvoicePrice(double invoicePrice) {
    this.invoicePrice = invoicePrice;
    setInvoicePriceIsSet(true);
  }

  public void unsetInvoicePrice() {
    __isset_bit_vector.clear(__INVOICEPRICE_ISSET_ID);
  }

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

  public void setInvoicePriceIsSet(boolean value) {
    __isset_bit_vector.set(__INVOICEPRICE_ISSET_ID, value);
  }

  public double getTp() {
    return this.tp;
  }

  public void setTp(double tp) {
    this.tp = tp;
    setTpIsSet(true);
  }

  public void unsetTp() {
    __isset_bit_vector.clear(__TP_ISSET_ID);
  }

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

  public void setTpIsSet(boolean value) {
    __isset_bit_vector.set(__TP_ISSET_ID, value);
  }

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

    case ITEM_ID:
      if (value == null) {
        unsetItemId();
      } else {
        setItemId((Long)value);
      }
      break;

    case PRODUCT_GROUP:
      if (value == null) {
        unsetProductGroup();
      } else {
        setProductGroup((String)value);
      }
      break;

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

    case MODEL_NUMBER:
      if (value == null) {
        unsetModelNumber();
      } else {
        setModelNumber((String)value);
      }
      break;

    case MODEL_NAME:
      if (value == null) {
        unsetModelName();
      } else {
        setModelName((String)value);
      }
      break;

    case COLOR:
      if (value == null) {
        unsetColor();
      } else {
        setColor((String)value);
      }
      break;

    case ITEM_NUMBER:
      if (value == null) {
        unsetItemNumber();
      } else {
        setItemNumber((String)value);
      }
      break;

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

    case UNFULFILLED_QUANTITY:
      if (value == null) {
        unsetUnfulfilledQuantity();
      } else {
        setUnfulfilledQuantity((Double)value);
      }
      break;

    case CREATED_AT:
      if (value == null) {
        unsetCreatedAt();
      } else {
        setCreatedAt((Long)value);
      }
      break;

    case UNIT_PRICE:
      if (value == null) {
        unsetUnitPrice();
      } else {
        setUnitPrice((Double)value);
      }
      break;

    case FULFILLED:
      if (value == null) {
        unsetFulfilled();
      } else {
        setFulfilled((Boolean)value);
      }
      break;

    case COD_COUNT:
      if (value == null) {
        unsetCodCount();
      } else {
        setCodCount((Long)value);
      }
      break;

    case AVAILABLE_QUANTITY:
      if (value == null) {
        unsetAvailableQuantity();
      } else {
        setAvailableQuantity((Long)value);
      }
      break;

    case RESERVED_QUANTITY:
      if (value == null) {
        unsetReservedQuantity();
      } else {
        setReservedQuantity((Long)value);
      }
      break;

    case AVG_SALES:
      if (value == null) {
        unsetAvgSales();
      } else {
        setAvgSales((Double)value);
      }
      break;

    case MIN_STOCK_LEVEL:
      if (value == null) {
        unsetMinStockLevel();
      } else {
        setMinStockLevel((Long)value);
      }
      break;

    case NUMBER_OF_DAYS_STOCK:
      if (value == null) {
        unsetNumberOfDaysStock();
      } else {
        setNumberOfDaysStock((Long)value);
      }
      break;

    case SUGGESTED_QUANTITY:
      if (value == null) {
        unsetSuggestedQuantity();
      } else {
        setSuggestedQuantity((Long)value);
      }
      break;

    case NUMBER_OF_DAYS_IN_STOCK:
      if (value == null) {
        unsetNumberOfDaysInStock();
      } else {
        setNumberOfDaysInStock((Long)value);
      }
      break;

    case RTO_ORDERS:
      if (value == null) {
        unsetRtoOrders();
      } else {
        setRtoOrders((Long)value);
      }
      break;

    case LAST_XDAYS_SALE:
      if (value == null) {
        unsetLastXdaysSale();
      } else {
        setLastXdaysSale((String)value);
      }
      break;

    case PREVIOUSLY_ORDERED_QTY:
      if (value == null) {
        unsetPreviouslyOrderedQty();
      } else {
        setPreviouslyOrderedQty((Long)value);
      }
      break;

    case NLC:
      if (value == null) {
        unsetNlc();
      } else {
        setNlc((Double)value);
      }
      break;

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

    case NLC_P:
      if (value == null) {
        unsetNlcP();
      } else {
        setNlcP((Double)value);
      }
      break;

    case VAT_DIFF:
      if (value == null) {
        unsetVatDiff();
      } else {
        setVatDiff((Double)value);
      }
      break;

    case IGST_RATE:
      if (value == null) {
        unsetIgstRate();
      } else {
        setIgstRate((Double)value);
      }
      break;

    case CGST_RATE:
      if (value == null) {
        unsetCgstRate();
      } else {
        setCgstRate((Double)value);
      }
      break;

    case SGST_RATE:
      if (value == null) {
        unsetSgstRate();
      } else {
        setSgstRate((Double)value);
      }
      break;

    case HSN_CODE:
      if (value == null) {
        unsetHsnCode();
      } else {
        setHsnCode((String)value);
      }
      break;

    case INVOICE_PRICE:
      if (value == null) {
        unsetInvoicePrice();
      } else {
        setInvoicePrice((Double)value);
      }
      break;

    case TP:
      if (value == null) {
        unsetTp();
      } else {
        setTp((Double)value);
      }
      break;

    }
  }

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

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

    case PRODUCT_GROUP:
      return getProductGroup();

    case BRAND:
      return getBrand();

    case MODEL_NUMBER:
      return getModelNumber();

    case MODEL_NAME:
      return getModelName();

    case COLOR:
      return getColor();

    case ITEM_NUMBER:
      return getItemNumber();

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

    case UNFULFILLED_QUANTITY:
      return Double.valueOf(getUnfulfilledQuantity());

    case CREATED_AT:
      return Long.valueOf(getCreatedAt());

    case UNIT_PRICE:
      return Double.valueOf(getUnitPrice());

    case FULFILLED:
      return Boolean.valueOf(isFulfilled());

    case COD_COUNT:
      return Long.valueOf(getCodCount());

    case AVAILABLE_QUANTITY:
      return Long.valueOf(getAvailableQuantity());

    case RESERVED_QUANTITY:
      return Long.valueOf(getReservedQuantity());

    case AVG_SALES:
      return Double.valueOf(getAvgSales());

    case MIN_STOCK_LEVEL:
      return Long.valueOf(getMinStockLevel());

    case NUMBER_OF_DAYS_STOCK:
      return Long.valueOf(getNumberOfDaysStock());

    case SUGGESTED_QUANTITY:
      return Long.valueOf(getSuggestedQuantity());

    case NUMBER_OF_DAYS_IN_STOCK:
      return Long.valueOf(getNumberOfDaysInStock());

    case RTO_ORDERS:
      return Long.valueOf(getRtoOrders());

    case LAST_XDAYS_SALE:
      return getLastXdaysSale();

    case PREVIOUSLY_ORDERED_QTY:
      return Long.valueOf(getPreviouslyOrderedQty());

    case NLC:
      return Double.valueOf(getNlc());

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

    case NLC_P:
      return Double.valueOf(getNlcP());

    case VAT_DIFF:
      return Double.valueOf(getVatDiff());

    case IGST_RATE:
      return Double.valueOf(getIgstRate());

    case CGST_RATE:
      return Double.valueOf(getCgstRate());

    case SGST_RATE:
      return Double.valueOf(getSgstRate());

    case HSN_CODE:
      return getHsnCode();

    case INVOICE_PRICE:
      return Double.valueOf(getInvoicePrice());

    case TP:
      return Double.valueOf(getTp());

    }
    throw new IllegalStateException();
  }

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

    switch (field) {
    case ORDER_ID:
      return isSetOrderId();
    case ITEM_ID:
      return isSetItemId();
    case PRODUCT_GROUP:
      return isSetProductGroup();
    case BRAND:
      return isSetBrand();
    case MODEL_NUMBER:
      return isSetModelNumber();
    case MODEL_NAME:
      return isSetModelName();
    case COLOR:
      return isSetColor();
    case ITEM_NUMBER:
      return isSetItemNumber();
    case QUANTITY:
      return isSetQuantity();
    case UNFULFILLED_QUANTITY:
      return isSetUnfulfilledQuantity();
    case CREATED_AT:
      return isSetCreatedAt();
    case UNIT_PRICE:
      return isSetUnitPrice();
    case FULFILLED:
      return isSetFulfilled();
    case COD_COUNT:
      return isSetCodCount();
    case AVAILABLE_QUANTITY:
      return isSetAvailableQuantity();
    case RESERVED_QUANTITY:
      return isSetReservedQuantity();
    case AVG_SALES:
      return isSetAvgSales();
    case MIN_STOCK_LEVEL:
      return isSetMinStockLevel();
    case NUMBER_OF_DAYS_STOCK:
      return isSetNumberOfDaysStock();
    case SUGGESTED_QUANTITY:
      return isSetSuggestedQuantity();
    case NUMBER_OF_DAYS_IN_STOCK:
      return isSetNumberOfDaysInStock();
    case RTO_ORDERS:
      return isSetRtoOrders();
    case LAST_XDAYS_SALE:
      return isSetLastXdaysSale();
    case PREVIOUSLY_ORDERED_QTY:
      return isSetPreviouslyOrderedQty();
    case NLC:
      return isSetNlc();
    case MRP:
      return isSetMrp();
    case NLC_P:
      return isSetNlcP();
    case VAT_DIFF:
      return isSetVatDiff();
    case IGST_RATE:
      return isSetIgstRate();
    case CGST_RATE:
      return isSetCgstRate();
    case SGST_RATE:
      return isSetSgstRate();
    case HSN_CODE:
      return isSetHsnCode();
    case INVOICE_PRICE:
      return isSetInvoicePrice();
    case TP:
      return isSetTp();
    }
    throw new IllegalStateException();
  }

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

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

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

    boolean this_present_itemId = true;
    boolean that_present_itemId = true;
    if (this_present_itemId || that_present_itemId) {
      if (!(this_present_itemId && that_present_itemId))
        return false;
      if (this.itemId != that.itemId)
        return false;
    }

    boolean this_present_productGroup = true && this.isSetProductGroup();
    boolean that_present_productGroup = true && that.isSetProductGroup();
    if (this_present_productGroup || that_present_productGroup) {
      if (!(this_present_productGroup && that_present_productGroup))
        return false;
      if (!this.productGroup.equals(that.productGroup))
        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_modelNumber = true && this.isSetModelNumber();
    boolean that_present_modelNumber = true && that.isSetModelNumber();
    if (this_present_modelNumber || that_present_modelNumber) {
      if (!(this_present_modelNumber && that_present_modelNumber))
        return false;
      if (!this.modelNumber.equals(that.modelNumber))
        return false;
    }

    boolean this_present_modelName = true && this.isSetModelName();
    boolean that_present_modelName = true && that.isSetModelName();
    if (this_present_modelName || that_present_modelName) {
      if (!(this_present_modelName && that_present_modelName))
        return false;
      if (!this.modelName.equals(that.modelName))
        return false;
    }

    boolean this_present_color = true && this.isSetColor();
    boolean that_present_color = true && that.isSetColor();
    if (this_present_color || that_present_color) {
      if (!(this_present_color && that_present_color))
        return false;
      if (!this.color.equals(that.color))
        return false;
    }

    boolean this_present_itemNumber = true && this.isSetItemNumber();
    boolean that_present_itemNumber = true && that.isSetItemNumber();
    if (this_present_itemNumber || that_present_itemNumber) {
      if (!(this_present_itemNumber && that_present_itemNumber))
        return false;
      if (!this.itemNumber.equals(that.itemNumber))
        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_unfulfilledQuantity = true;
    boolean that_present_unfulfilledQuantity = true;
    if (this_present_unfulfilledQuantity || that_present_unfulfilledQuantity) {
      if (!(this_present_unfulfilledQuantity && that_present_unfulfilledQuantity))
        return false;
      if (this.unfulfilledQuantity != that.unfulfilledQuantity)
        return false;
    }

    boolean this_present_createdAt = true;
    boolean that_present_createdAt = true;
    if (this_present_createdAt || that_present_createdAt) {
      if (!(this_present_createdAt && that_present_createdAt))
        return false;
      if (this.createdAt != that.createdAt)
        return false;
    }

    boolean this_present_unitPrice = true;
    boolean that_present_unitPrice = true;
    if (this_present_unitPrice || that_present_unitPrice) {
      if (!(this_present_unitPrice && that_present_unitPrice))
        return false;
      if (this.unitPrice != that.unitPrice)
        return false;
    }

    boolean this_present_fulfilled = true;
    boolean that_present_fulfilled = true;
    if (this_present_fulfilled || that_present_fulfilled) {
      if (!(this_present_fulfilled && that_present_fulfilled))
        return false;
      if (this.fulfilled != that.fulfilled)
        return false;
    }

    boolean this_present_codCount = true;
    boolean that_present_codCount = true;
    if (this_present_codCount || that_present_codCount) {
      if (!(this_present_codCount && that_present_codCount))
        return false;
      if (this.codCount != that.codCount)
        return false;
    }

    boolean this_present_availableQuantity = true;
    boolean that_present_availableQuantity = true;
    if (this_present_availableQuantity || that_present_availableQuantity) {
      if (!(this_present_availableQuantity && that_present_availableQuantity))
        return false;
      if (this.availableQuantity != that.availableQuantity)
        return false;
    }

    boolean this_present_reservedQuantity = true;
    boolean that_present_reservedQuantity = true;
    if (this_present_reservedQuantity || that_present_reservedQuantity) {
      if (!(this_present_reservedQuantity && that_present_reservedQuantity))
        return false;
      if (this.reservedQuantity != that.reservedQuantity)
        return false;
    }

    boolean this_present_avgSales = true;
    boolean that_present_avgSales = true;
    if (this_present_avgSales || that_present_avgSales) {
      if (!(this_present_avgSales && that_present_avgSales))
        return false;
      if (this.avgSales != that.avgSales)
        return false;
    }

    boolean this_present_minStockLevel = true;
    boolean that_present_minStockLevel = true;
    if (this_present_minStockLevel || that_present_minStockLevel) {
      if (!(this_present_minStockLevel && that_present_minStockLevel))
        return false;
      if (this.minStockLevel != that.minStockLevel)
        return false;
    }

    boolean this_present_numberOfDaysStock = true;
    boolean that_present_numberOfDaysStock = true;
    if (this_present_numberOfDaysStock || that_present_numberOfDaysStock) {
      if (!(this_present_numberOfDaysStock && that_present_numberOfDaysStock))
        return false;
      if (this.numberOfDaysStock != that.numberOfDaysStock)
        return false;
    }

    boolean this_present_suggestedQuantity = true;
    boolean that_present_suggestedQuantity = true;
    if (this_present_suggestedQuantity || that_present_suggestedQuantity) {
      if (!(this_present_suggestedQuantity && that_present_suggestedQuantity))
        return false;
      if (this.suggestedQuantity != that.suggestedQuantity)
        return false;
    }

    boolean this_present_numberOfDaysInStock = true;
    boolean that_present_numberOfDaysInStock = true;
    if (this_present_numberOfDaysInStock || that_present_numberOfDaysInStock) {
      if (!(this_present_numberOfDaysInStock && that_present_numberOfDaysInStock))
        return false;
      if (this.numberOfDaysInStock != that.numberOfDaysInStock)
        return false;
    }

    boolean this_present_rtoOrders = true;
    boolean that_present_rtoOrders = true;
    if (this_present_rtoOrders || that_present_rtoOrders) {
      if (!(this_present_rtoOrders && that_present_rtoOrders))
        return false;
      if (this.rtoOrders != that.rtoOrders)
        return false;
    }

    boolean this_present_lastXdaysSale = true && this.isSetLastXdaysSale();
    boolean that_present_lastXdaysSale = true && that.isSetLastXdaysSale();
    if (this_present_lastXdaysSale || that_present_lastXdaysSale) {
      if (!(this_present_lastXdaysSale && that_present_lastXdaysSale))
        return false;
      if (!this.lastXdaysSale.equals(that.lastXdaysSale))
        return false;
    }

    boolean this_present_previouslyOrderedQty = true;
    boolean that_present_previouslyOrderedQty = true;
    if (this_present_previouslyOrderedQty || that_present_previouslyOrderedQty) {
      if (!(this_present_previouslyOrderedQty && that_present_previouslyOrderedQty))
        return false;
      if (this.previouslyOrderedQty != that.previouslyOrderedQty)
        return false;
    }

    boolean this_present_nlc = true;
    boolean that_present_nlc = true;
    if (this_present_nlc || that_present_nlc) {
      if (!(this_present_nlc && that_present_nlc))
        return false;
      if (this.nlc != that.nlc)
        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_nlcP = true;
    boolean that_present_nlcP = true;
    if (this_present_nlcP || that_present_nlcP) {
      if (!(this_present_nlcP && that_present_nlcP))
        return false;
      if (this.nlcP != that.nlcP)
        return false;
    }

    boolean this_present_vatDiff = true;
    boolean that_present_vatDiff = true;
    if (this_present_vatDiff || that_present_vatDiff) {
      if (!(this_present_vatDiff && that_present_vatDiff))
        return false;
      if (this.vatDiff != that.vatDiff)
        return false;
    }

    boolean this_present_igstRate = true;
    boolean that_present_igstRate = true;
    if (this_present_igstRate || that_present_igstRate) {
      if (!(this_present_igstRate && that_present_igstRate))
        return false;
      if (this.igstRate != that.igstRate)
        return false;
    }

    boolean this_present_cgstRate = true;
    boolean that_present_cgstRate = true;
    if (this_present_cgstRate || that_present_cgstRate) {
      if (!(this_present_cgstRate && that_present_cgstRate))
        return false;
      if (this.cgstRate != that.cgstRate)
        return false;
    }

    boolean this_present_sgstRate = true;
    boolean that_present_sgstRate = true;
    if (this_present_sgstRate || that_present_sgstRate) {
      if (!(this_present_sgstRate && that_present_sgstRate))
        return false;
      if (this.sgstRate != that.sgstRate)
        return false;
    }

    boolean this_present_hsnCode = true && this.isSetHsnCode();
    boolean that_present_hsnCode = true && that.isSetHsnCode();
    if (this_present_hsnCode || that_present_hsnCode) {
      if (!(this_present_hsnCode && that_present_hsnCode))
        return false;
      if (!this.hsnCode.equals(that.hsnCode))
        return false;
    }

    boolean this_present_invoicePrice = true;
    boolean that_present_invoicePrice = true;
    if (this_present_invoicePrice || that_present_invoicePrice) {
      if (!(this_present_invoicePrice && that_present_invoicePrice))
        return false;
      if (this.invoicePrice != that.invoicePrice)
        return false;
    }

    boolean this_present_tp = true;
    boolean that_present_tp = true;
    if (this_present_tp || that_present_tp) {
      if (!(this_present_tp && that_present_tp))
        return false;
      if (this.tp != that.tp)
        return false;
    }

    return true;
  }

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

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

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

    lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOrderId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetItemId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetProductGroup()).compareTo(typedOther.isSetProductGroup());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetProductGroup()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.productGroup, typedOther.productGroup);
      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(isSetModelNumber()).compareTo(typedOther.isSetModelNumber());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetModelNumber()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modelNumber, typedOther.modelNumber);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetModelName()).compareTo(typedOther.isSetModelName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetModelName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modelName, typedOther.modelName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetColor()).compareTo(typedOther.isSetColor());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetColor()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.color, typedOther.color);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetItemNumber()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
      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(isSetUnfulfilledQuantity()).compareTo(typedOther.isSetUnfulfilledQuantity());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUnfulfilledQuantity()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unfulfilledQuantity, typedOther.unfulfilledQuantity);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCreatedAt()).compareTo(typedOther.isSetCreatedAt());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCreatedAt()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdAt, typedOther.createdAt);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUnitPrice()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetFulfilled()).compareTo(typedOther.isSetFulfilled());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFulfilled()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilled, typedOther.fulfilled);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCodCount()).compareTo(typedOther.isSetCodCount());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCodCount()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.codCount, typedOther.codCount);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetAvailableQuantity()).compareTo(typedOther.isSetAvailableQuantity());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAvailableQuantity()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.availableQuantity, typedOther.availableQuantity);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetReservedQuantity()).compareTo(typedOther.isSetReservedQuantity());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetReservedQuantity()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reservedQuantity, typedOther.reservedQuantity);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetAvgSales()).compareTo(typedOther.isSetAvgSales());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAvgSales()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.avgSales, typedOther.avgSales);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMinStockLevel()).compareTo(typedOther.isSetMinStockLevel());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMinStockLevel()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.minStockLevel, typedOther.minStockLevel);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetNumberOfDaysStock()).compareTo(typedOther.isSetNumberOfDaysStock());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNumberOfDaysStock()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numberOfDaysStock, typedOther.numberOfDaysStock);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSuggestedQuantity()).compareTo(typedOther.isSetSuggestedQuantity());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSuggestedQuantity()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.suggestedQuantity, typedOther.suggestedQuantity);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetNumberOfDaysInStock()).compareTo(typedOther.isSetNumberOfDaysInStock());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNumberOfDaysInStock()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numberOfDaysInStock, typedOther.numberOfDaysInStock);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetRtoOrders()).compareTo(typedOther.isSetRtoOrders());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRtoOrders()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rtoOrders, typedOther.rtoOrders);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetLastXdaysSale()).compareTo(typedOther.isSetLastXdaysSale());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLastXdaysSale()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastXdaysSale, typedOther.lastXdaysSale);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPreviouslyOrderedQty()).compareTo(typedOther.isSetPreviouslyOrderedQty());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPreviouslyOrderedQty()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.previouslyOrderedQty, typedOther.previouslyOrderedQty);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetNlc()).compareTo(typedOther.isSetNlc());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNlc()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nlc, typedOther.nlc);
      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(isSetNlcP()).compareTo(typedOther.isSetNlcP());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNlcP()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nlcP, typedOther.nlcP);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetVatDiff()).compareTo(typedOther.isSetVatDiff());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetVatDiff()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vatDiff, typedOther.vatDiff);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetIgstRate()).compareTo(typedOther.isSetIgstRate());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIgstRate()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.igstRate, typedOther.igstRate);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCgstRate()).compareTo(typedOther.isSetCgstRate());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCgstRate()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cgstRate, typedOther.cgstRate);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSgstRate()).compareTo(typedOther.isSetSgstRate());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSgstRate()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sgstRate, typedOther.sgstRate);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetHsnCode()).compareTo(typedOther.isSetHsnCode());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetHsnCode()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hsnCode, typedOther.hsnCode);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetInvoicePrice()).compareTo(typedOther.isSetInvoicePrice());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetInvoicePrice()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoicePrice, typedOther.invoicePrice);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTp()).compareTo(typedOther.isSetTp());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTp()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tp, typedOther.tp);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

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

  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    org.apache.thrift.protocol.TField field;
    iprot.readStructBegin();
    while (true)
    {
      field = iprot.readFieldBegin();
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
        break;
      }
      switch (field.id) {
        case 1: // ORDER_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.orderId = iprot.readI64();
            setOrderIdIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 2: // ITEM_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.itemId = iprot.readI64();
            setItemIdIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 3: // PRODUCT_GROUP
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.productGroup = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 4: // 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 5: // MODEL_NUMBER
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.modelNumber = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 6: // MODEL_NAME
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.modelName = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 7: // COLOR
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.color = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 8: // ITEM_NUMBER
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.itemNumber = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 9: // QUANTITY
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.quantity = iprot.readDouble();
            setQuantityIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 10: // UNFULFILLED_QUANTITY
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.unfulfilledQuantity = iprot.readDouble();
            setUnfulfilledQuantityIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 11: // CREATED_AT
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.createdAt = iprot.readI64();
            setCreatedAtIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 12: // UNIT_PRICE
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.unitPrice = iprot.readDouble();
            setUnitPriceIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 13: // FULFILLED
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
            this.fulfilled = iprot.readBool();
            setFulfilledIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 14: // COD_COUNT
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.codCount = iprot.readI64();
            setCodCountIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 15: // AVAILABLE_QUANTITY
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.availableQuantity = iprot.readI64();
            setAvailableQuantityIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 16: // RESERVED_QUANTITY
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.reservedQuantity = iprot.readI64();
            setReservedQuantityIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 17: // AVG_SALES
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.avgSales = iprot.readDouble();
            setAvgSalesIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 18: // MIN_STOCK_LEVEL
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.minStockLevel = iprot.readI64();
            setMinStockLevelIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 19: // NUMBER_OF_DAYS_STOCK
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.numberOfDaysStock = iprot.readI64();
            setNumberOfDaysStockIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 20: // SUGGESTED_QUANTITY
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.suggestedQuantity = iprot.readI64();
            setSuggestedQuantityIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 21: // NUMBER_OF_DAYS_IN_STOCK
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.numberOfDaysInStock = iprot.readI64();
            setNumberOfDaysInStockIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 22: // RTO_ORDERS
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.rtoOrders = iprot.readI64();
            setRtoOrdersIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 23: // LAST_XDAYS_SALE
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.lastXdaysSale = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 24: // PREVIOUSLY_ORDERED_QTY
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.previouslyOrderedQty = iprot.readI64();
            setPreviouslyOrderedQtyIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 25: // NLC
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.nlc = iprot.readDouble();
            setNlcIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 26: // 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 27: // NLC_P
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.nlcP = iprot.readDouble();
            setNlcPIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 28: // VAT_DIFF
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.vatDiff = iprot.readDouble();
            setVatDiffIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 29: // IGST_RATE
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.igstRate = iprot.readDouble();
            setIgstRateIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 30: // CGST_RATE
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.cgstRate = iprot.readDouble();
            setCgstRateIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 31: // SGST_RATE
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.sgstRate = iprot.readDouble();
            setSgstRateIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 32: // HSN_CODE
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.hsnCode = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 33: // INVOICE_PRICE
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.invoicePrice = iprot.readDouble();
            setInvoicePriceIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 34: // TP
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
            this.tp = iprot.readDouble();
            setTpIsSet(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(ORDER_ID_FIELD_DESC);
    oprot.writeI64(this.orderId);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
    oprot.writeI64(this.itemId);
    oprot.writeFieldEnd();
    if (this.productGroup != null) {
      oprot.writeFieldBegin(PRODUCT_GROUP_FIELD_DESC);
      oprot.writeString(this.productGroup);
      oprot.writeFieldEnd();
    }
    if (this.brand != null) {
      oprot.writeFieldBegin(BRAND_FIELD_DESC);
      oprot.writeString(this.brand);
      oprot.writeFieldEnd();
    }
    if (this.modelNumber != null) {
      oprot.writeFieldBegin(MODEL_NUMBER_FIELD_DESC);
      oprot.writeString(this.modelNumber);
      oprot.writeFieldEnd();
    }
    if (this.modelName != null) {
      oprot.writeFieldBegin(MODEL_NAME_FIELD_DESC);
      oprot.writeString(this.modelName);
      oprot.writeFieldEnd();
    }
    if (this.color != null) {
      oprot.writeFieldBegin(COLOR_FIELD_DESC);
      oprot.writeString(this.color);
      oprot.writeFieldEnd();
    }
    if (this.itemNumber != null) {
      oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
      oprot.writeString(this.itemNumber);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
    oprot.writeDouble(this.quantity);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(UNFULFILLED_QUANTITY_FIELD_DESC);
    oprot.writeDouble(this.unfulfilledQuantity);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(CREATED_AT_FIELD_DESC);
    oprot.writeI64(this.createdAt);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);
    oprot.writeDouble(this.unitPrice);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(FULFILLED_FIELD_DESC);
    oprot.writeBool(this.fulfilled);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(COD_COUNT_FIELD_DESC);
    oprot.writeI64(this.codCount);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(AVAILABLE_QUANTITY_FIELD_DESC);
    oprot.writeI64(this.availableQuantity);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(RESERVED_QUANTITY_FIELD_DESC);
    oprot.writeI64(this.reservedQuantity);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(AVG_SALES_FIELD_DESC);
    oprot.writeDouble(this.avgSales);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(MIN_STOCK_LEVEL_FIELD_DESC);
    oprot.writeI64(this.minStockLevel);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(NUMBER_OF_DAYS_STOCK_FIELD_DESC);
    oprot.writeI64(this.numberOfDaysStock);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(SUGGESTED_QUANTITY_FIELD_DESC);
    oprot.writeI64(this.suggestedQuantity);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(NUMBER_OF_DAYS_IN_STOCK_FIELD_DESC);
    oprot.writeI64(this.numberOfDaysInStock);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(RTO_ORDERS_FIELD_DESC);
    oprot.writeI64(this.rtoOrders);
    oprot.writeFieldEnd();
    if (this.lastXdaysSale != null) {
      oprot.writeFieldBegin(LAST_XDAYS_SALE_FIELD_DESC);
      oprot.writeString(this.lastXdaysSale);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(PREVIOUSLY_ORDERED_QTY_FIELD_DESC);
    oprot.writeI64(this.previouslyOrderedQty);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(NLC_FIELD_DESC);
    oprot.writeDouble(this.nlc);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(MRP_FIELD_DESC);
    oprot.writeDouble(this.mrp);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(NLC_P_FIELD_DESC);
    oprot.writeDouble(this.nlcP);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(VAT_DIFF_FIELD_DESC);
    oprot.writeDouble(this.vatDiff);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(IGST_RATE_FIELD_DESC);
    oprot.writeDouble(this.igstRate);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(CGST_RATE_FIELD_DESC);
    oprot.writeDouble(this.cgstRate);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(SGST_RATE_FIELD_DESC);
    oprot.writeDouble(this.sgstRate);
    oprot.writeFieldEnd();
    if (this.hsnCode != null) {
      oprot.writeFieldBegin(HSN_CODE_FIELD_DESC);
      oprot.writeString(this.hsnCode);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(INVOICE_PRICE_FIELD_DESC);
    oprot.writeDouble(this.invoicePrice);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(TP_FIELD_DESC);
    oprot.writeDouble(this.tp);
    oprot.writeFieldEnd();
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }

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

    sb.append("orderId:");
    sb.append(this.orderId);
    first = false;
    if (!first) sb.append(", ");
    sb.append("itemId:");
    sb.append(this.itemId);
    first = false;
    if (!first) sb.append(", ");
    sb.append("productGroup:");
    if (this.productGroup == null) {
      sb.append("null");
    } else {
      sb.append(this.productGroup);
    }
    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("modelNumber:");
    if (this.modelNumber == null) {
      sb.append("null");
    } else {
      sb.append(this.modelNumber);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("modelName:");
    if (this.modelName == null) {
      sb.append("null");
    } else {
      sb.append(this.modelName);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("color:");
    if (this.color == null) {
      sb.append("null");
    } else {
      sb.append(this.color);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("itemNumber:");
    if (this.itemNumber == null) {
      sb.append("null");
    } else {
      sb.append(this.itemNumber);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("quantity:");
    sb.append(this.quantity);
    first = false;
    if (!first) sb.append(", ");
    sb.append("unfulfilledQuantity:");
    sb.append(this.unfulfilledQuantity);
    first = false;
    if (!first) sb.append(", ");
    sb.append("createdAt:");
    sb.append(this.createdAt);
    first = false;
    if (!first) sb.append(", ");
    sb.append("unitPrice:");
    sb.append(this.unitPrice);
    first = false;
    if (!first) sb.append(", ");
    sb.append("fulfilled:");
    sb.append(this.fulfilled);
    first = false;
    if (!first) sb.append(", ");
    sb.append("codCount:");
    sb.append(this.codCount);
    first = false;
    if (!first) sb.append(", ");
    sb.append("availableQuantity:");
    sb.append(this.availableQuantity);
    first = false;
    if (!first) sb.append(", ");
    sb.append("reservedQuantity:");
    sb.append(this.reservedQuantity);
    first = false;
    if (!first) sb.append(", ");
    sb.append("avgSales:");
    sb.append(this.avgSales);
    first = false;
    if (!first) sb.append(", ");
    sb.append("minStockLevel:");
    sb.append(this.minStockLevel);
    first = false;
    if (!first) sb.append(", ");
    sb.append("numberOfDaysStock:");
    sb.append(this.numberOfDaysStock);
    first = false;
    if (!first) sb.append(", ");
    sb.append("suggestedQuantity:");
    sb.append(this.suggestedQuantity);
    first = false;
    if (!first) sb.append(", ");
    sb.append("numberOfDaysInStock:");
    sb.append(this.numberOfDaysInStock);
    first = false;
    if (!first) sb.append(", ");
    sb.append("rtoOrders:");
    sb.append(this.rtoOrders);
    first = false;
    if (!first) sb.append(", ");
    sb.append("lastXdaysSale:");
    if (this.lastXdaysSale == null) {
      sb.append("null");
    } else {
      sb.append(this.lastXdaysSale);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("previouslyOrderedQty:");
    sb.append(this.previouslyOrderedQty);
    first = false;
    if (!first) sb.append(", ");
    sb.append("nlc:");
    sb.append(this.nlc);
    first = false;
    if (!first) sb.append(", ");
    sb.append("mrp:");
    sb.append(this.mrp);
    first = false;
    if (!first) sb.append(", ");
    sb.append("nlcP:");
    sb.append(this.nlcP);
    first = false;
    if (!first) sb.append(", ");
    sb.append("vatDiff:");
    sb.append(this.vatDiff);
    first = false;
    if (!first) sb.append(", ");
    sb.append("igstRate:");
    sb.append(this.igstRate);
    first = false;
    if (!first) sb.append(", ");
    sb.append("cgstRate:");
    sb.append(this.cgstRate);
    first = false;
    if (!first) sb.append(", ");
    sb.append("sgstRate:");
    sb.append(this.sgstRate);
    first = false;
    if (!first) sb.append(", ");
    sb.append("hsnCode:");
    if (this.hsnCode == null) {
      sb.append("null");
    } else {
      sb.append(this.hsnCode);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("invoicePrice:");
    sb.append(this.invoicePrice);
    first = false;
    if (!first) sb.append(", ");
    sb.append("tp:");
    sb.append(this.tp);
    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);
    }
  }

}