Rev 6736 | Blame | Compare with Previous | Last modification | View Log | RSS feed
/*** Autogenerated by Thrift Compiler (0.7.0)** DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING*/package in.shop2020.model.v1.user;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 Cart implements org.apache.thrift.TBase<Cart, Cart._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Cart");private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);private static final org.apache.thrift.protocol.TField LINES_FIELD_DESC = new org.apache.thrift.protocol.TField("lines", org.apache.thrift.protocol.TType.LIST, (short)2);private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.I32, (short)3);private static final org.apache.thrift.protocol.TField CREATED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("createdOn", org.apache.thrift.protocol.TType.I64, (short)4);private static final org.apache.thrift.protocol.TField UPDATED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedOn", org.apache.thrift.protocol.TType.I64, (short)5);private static final org.apache.thrift.protocol.TField CHECKED_OUT_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("checkedOutOn", org.apache.thrift.protocol.TType.I64, (short)6);private static final org.apache.thrift.protocol.TField ADDRESS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("addressId", org.apache.thrift.protocol.TType.I64, (short)7);private static final org.apache.thrift.protocol.TField TOTAL_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("totalPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)8);private static final org.apache.thrift.protocol.TField DISCOUNTED_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("discountedPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)9);private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)10);private static final org.apache.thrift.protocol.TField PICKUP_STORE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("pickupStoreId", org.apache.thrift.protocol.TType.I64, (short)11);private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)12);private static final org.apache.thrift.protocol.TField WALLET_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("wallet_amount", org.apache.thrift.protocol.TType.DOUBLE, (short)13);private long id; // requiredprivate List<Line> lines; // requiredprivate CartStatus status; // requiredprivate long createdOn; // requiredprivate long updatedOn; // requiredprivate long checkedOutOn; // requiredprivate long addressId; // requiredprivate double totalPrice; // requiredprivate double discountedPrice; // requiredprivate String couponCode; // requiredprivate long pickupStoreId; // requiredprivate String message; // requiredprivate double wallet_amount; // required/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements org.apache.thrift.TFieldIdEnum {ID((short)1, "id"),LINES((short)2, "lines"),/**** @see CartStatus*/STATUS((short)3, "status"),CREATED_ON((short)4, "createdOn"),UPDATED_ON((short)5, "updatedOn"),CHECKED_OUT_ON((short)6, "checkedOutOn"),ADDRESS_ID((short)7, "addressId"),TOTAL_PRICE((short)8, "totalPrice"),DISCOUNTED_PRICE((short)9, "discountedPrice"),COUPON_CODE((short)10, "couponCode"),PICKUP_STORE_ID((short)11, "pickupStoreId"),MESSAGE((short)12, "message"),WALLET_AMOUNT((short)13, "wallet_amount");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: // IDreturn ID;case 2: // LINESreturn LINES;case 3: // STATUSreturn STATUS;case 4: // CREATED_ONreturn CREATED_ON;case 5: // UPDATED_ONreturn UPDATED_ON;case 6: // CHECKED_OUT_ONreturn CHECKED_OUT_ON;case 7: // ADDRESS_IDreturn ADDRESS_ID;case 8: // TOTAL_PRICEreturn TOTAL_PRICE;case 9: // DISCOUNTED_PRICEreturn DISCOUNTED_PRICE;case 10: // COUPON_CODEreturn COUPON_CODE;case 11: // PICKUP_STORE_IDreturn PICKUP_STORE_ID;case 12: // MESSAGEreturn MESSAGE;case 13: // WALLET_AMOUNTreturn WALLET_AMOUNT;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 assignmentsprivate static final int __ID_ISSET_ID = 0;private static final int __CREATEDON_ISSET_ID = 1;private static final int __UPDATEDON_ISSET_ID = 2;private static final int __CHECKEDOUTON_ISSET_ID = 3;private static final int __ADDRESSID_ISSET_ID = 4;private static final int __TOTALPRICE_ISSET_ID = 5;private static final int __DISCOUNTEDPRICE_ISSET_ID = 6;private static final int __PICKUPSTOREID_ISSET_ID = 7;private static final int __WALLET_AMOUNT_ISSET_ID = 8;private BitSet __isset_bit_vector = new BitSet(9);public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.LINES, new org.apache.thrift.meta_data.FieldMetaData("lines", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Line.class))));tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, CartStatus.class)));tmpMap.put(_Fields.CREATED_ON, new org.apache.thrift.meta_data.FieldMetaData("createdOn", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.UPDATED_ON, new org.apache.thrift.meta_data.FieldMetaData("updatedOn", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.CHECKED_OUT_ON, new org.apache.thrift.meta_data.FieldMetaData("checkedOutOn", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.ADDRESS_ID, new org.apache.thrift.meta_data.FieldMetaData("addressId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.TOTAL_PRICE, new org.apache.thrift.meta_data.FieldMetaData("totalPrice", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));tmpMap.put(_Fields.DISCOUNTED_PRICE, new org.apache.thrift.meta_data.FieldMetaData("discountedPrice", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.PICKUP_STORE_ID, new org.apache.thrift.meta_data.FieldMetaData("pickupStoreId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.WALLET_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("wallet_amount", 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(Cart.class, metaDataMap);}public Cart() {}public Cart(long id,List<Line> lines,CartStatus status,long createdOn,long updatedOn,long checkedOutOn,long addressId,double totalPrice,double discountedPrice,String couponCode,long pickupStoreId,String message,double wallet_amount){this();this.id = id;setIdIsSet(true);this.lines = lines;this.status = status;this.createdOn = createdOn;setCreatedOnIsSet(true);this.updatedOn = updatedOn;setUpdatedOnIsSet(true);this.checkedOutOn = checkedOutOn;setCheckedOutOnIsSet(true);this.addressId = addressId;setAddressIdIsSet(true);this.totalPrice = totalPrice;setTotalPriceIsSet(true);this.discountedPrice = discountedPrice;setDiscountedPriceIsSet(true);this.couponCode = couponCode;this.pickupStoreId = pickupStoreId;setPickupStoreIdIsSet(true);this.message = message;this.wallet_amount = wallet_amount;setWallet_amountIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public Cart(Cart other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.id = other.id;if (other.isSetLines()) {List<Line> __this__lines = new ArrayList<Line>();for (Line other_element : other.lines) {__this__lines.add(new Line(other_element));}this.lines = __this__lines;}if (other.isSetStatus()) {this.status = other.status;}this.createdOn = other.createdOn;this.updatedOn = other.updatedOn;this.checkedOutOn = other.checkedOutOn;this.addressId = other.addressId;this.totalPrice = other.totalPrice;this.discountedPrice = other.discountedPrice;if (other.isSetCouponCode()) {this.couponCode = other.couponCode;}this.pickupStoreId = other.pickupStoreId;if (other.isSetMessage()) {this.message = other.message;}this.wallet_amount = other.wallet_amount;}public Cart deepCopy() {return new Cart(this);}@Overridepublic void clear() {setIdIsSet(false);this.id = 0;this.lines = null;this.status = null;setCreatedOnIsSet(false);this.createdOn = 0;setUpdatedOnIsSet(false);this.updatedOn = 0;setCheckedOutOnIsSet(false);this.checkedOutOn = 0;setAddressIdIsSet(false);this.addressId = 0;setTotalPriceIsSet(false);this.totalPrice = 0.0;setDiscountedPriceIsSet(false);this.discountedPrice = 0.0;this.couponCode = null;setPickupStoreIdIsSet(false);this.pickupStoreId = 0;this.message = null;setWallet_amountIsSet(false);this.wallet_amount = 0.0;}public long getId() {return this.id;}public void setId(long id) {this.id = id;setIdIsSet(true);}public void unsetId() {__isset_bit_vector.clear(__ID_ISSET_ID);}/** Returns true if field id is set (has been assigned a value) and false otherwise */public boolean isSetId() {return __isset_bit_vector.get(__ID_ISSET_ID);}public void setIdIsSet(boolean value) {__isset_bit_vector.set(__ID_ISSET_ID, value);}public int getLinesSize() {return (this.lines == null) ? 0 : this.lines.size();}public java.util.Iterator<Line> getLinesIterator() {return (this.lines == null) ? null : this.lines.iterator();}public void addToLines(Line elem) {if (this.lines == null) {this.lines = new ArrayList<Line>();}this.lines.add(elem);}public List<Line> getLines() {return this.lines;}public void setLines(List<Line> lines) {this.lines = lines;}public void unsetLines() {this.lines = null;}/** Returns true if field lines is set (has been assigned a value) and false otherwise */public boolean isSetLines() {return this.lines != null;}public void setLinesIsSet(boolean value) {if (!value) {this.lines = null;}}/**** @see CartStatus*/public CartStatus getStatus() {return this.status;}/**** @see CartStatus*/public void setStatus(CartStatus status) {this.status = status;}public void unsetStatus() {this.status = null;}/** Returns true if field status is set (has been assigned a value) and false otherwise */public boolean isSetStatus() {return this.status != null;}public void setStatusIsSet(boolean value) {if (!value) {this.status = null;}}public long getCreatedOn() {return this.createdOn;}public void setCreatedOn(long createdOn) {this.createdOn = createdOn;setCreatedOnIsSet(true);}public void unsetCreatedOn() {__isset_bit_vector.clear(__CREATEDON_ISSET_ID);}/** Returns true if field createdOn is set (has been assigned a value) and false otherwise */public boolean isSetCreatedOn() {return __isset_bit_vector.get(__CREATEDON_ISSET_ID);}public void setCreatedOnIsSet(boolean value) {__isset_bit_vector.set(__CREATEDON_ISSET_ID, value);}public long getUpdatedOn() {return this.updatedOn;}public void setUpdatedOn(long updatedOn) {this.updatedOn = updatedOn;setUpdatedOnIsSet(true);}public void unsetUpdatedOn() {__isset_bit_vector.clear(__UPDATEDON_ISSET_ID);}/** Returns true if field updatedOn is set (has been assigned a value) and false otherwise */public boolean isSetUpdatedOn() {return __isset_bit_vector.get(__UPDATEDON_ISSET_ID);}public void setUpdatedOnIsSet(boolean value) {__isset_bit_vector.set(__UPDATEDON_ISSET_ID, value);}public long getCheckedOutOn() {return this.checkedOutOn;}public void setCheckedOutOn(long checkedOutOn) {this.checkedOutOn = checkedOutOn;setCheckedOutOnIsSet(true);}public void unsetCheckedOutOn() {__isset_bit_vector.clear(__CHECKEDOUTON_ISSET_ID);}/** Returns true if field checkedOutOn is set (has been assigned a value) and false otherwise */public boolean isSetCheckedOutOn() {return __isset_bit_vector.get(__CHECKEDOUTON_ISSET_ID);}public void setCheckedOutOnIsSet(boolean value) {__isset_bit_vector.set(__CHECKEDOUTON_ISSET_ID, value);}public long getAddressId() {return this.addressId;}public void setAddressId(long addressId) {this.addressId = addressId;setAddressIdIsSet(true);}public void unsetAddressId() {__isset_bit_vector.clear(__ADDRESSID_ISSET_ID);}/** Returns true if field addressId is set (has been assigned a value) and false otherwise */public boolean isSetAddressId() {return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);}public void setAddressIdIsSet(boolean value) {__isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);}public double getTotalPrice() {return this.totalPrice;}public void setTotalPrice(double totalPrice) {this.totalPrice = totalPrice;setTotalPriceIsSet(true);}public void unsetTotalPrice() {__isset_bit_vector.clear(__TOTALPRICE_ISSET_ID);}/** Returns true if field totalPrice is set (has been assigned a value) and false otherwise */public boolean isSetTotalPrice() {return __isset_bit_vector.get(__TOTALPRICE_ISSET_ID);}public void setTotalPriceIsSet(boolean value) {__isset_bit_vector.set(__TOTALPRICE_ISSET_ID, value);}public double getDiscountedPrice() {return this.discountedPrice;}public void setDiscountedPrice(double discountedPrice) {this.discountedPrice = discountedPrice;setDiscountedPriceIsSet(true);}public void unsetDiscountedPrice() {__isset_bit_vector.clear(__DISCOUNTEDPRICE_ISSET_ID);}/** Returns true if field discountedPrice is set (has been assigned a value) and false otherwise */public boolean isSetDiscountedPrice() {return __isset_bit_vector.get(__DISCOUNTEDPRICE_ISSET_ID);}public void setDiscountedPriceIsSet(boolean value) {__isset_bit_vector.set(__DISCOUNTEDPRICE_ISSET_ID, value);}public String getCouponCode() {return this.couponCode;}public void setCouponCode(String couponCode) {this.couponCode = couponCode;}public void unsetCouponCode() {this.couponCode = null;}/** Returns true if field couponCode is set (has been assigned a value) and false otherwise */public boolean isSetCouponCode() {return this.couponCode != null;}public void setCouponCodeIsSet(boolean value) {if (!value) {this.couponCode = null;}}public long getPickupStoreId() {return this.pickupStoreId;}public void setPickupStoreId(long pickupStoreId) {this.pickupStoreId = pickupStoreId;setPickupStoreIdIsSet(true);}public void unsetPickupStoreId() {__isset_bit_vector.clear(__PICKUPSTOREID_ISSET_ID);}/** Returns true if field pickupStoreId is set (has been assigned a value) and false otherwise */public boolean isSetPickupStoreId() {return __isset_bit_vector.get(__PICKUPSTOREID_ISSET_ID);}public void setPickupStoreIdIsSet(boolean value) {__isset_bit_vector.set(__PICKUPSTOREID_ISSET_ID, value);}public String getMessage() {return this.message;}public void setMessage(String message) {this.message = message;}public void unsetMessage() {this.message = null;}/** Returns true if field message is set (has been assigned a value) and false otherwise */public boolean isSetMessage() {return this.message != null;}public void setMessageIsSet(boolean value) {if (!value) {this.message = null;}}public double getWallet_amount() {return this.wallet_amount;}public void setWallet_amount(double wallet_amount) {this.wallet_amount = wallet_amount;setWallet_amountIsSet(true);}public void unsetWallet_amount() {__isset_bit_vector.clear(__WALLET_AMOUNT_ISSET_ID);}/** Returns true if field wallet_amount is set (has been assigned a value) and false otherwise */public boolean isSetWallet_amount() {return __isset_bit_vector.get(__WALLET_AMOUNT_ISSET_ID);}public void setWallet_amountIsSet(boolean value) {__isset_bit_vector.set(__WALLET_AMOUNT_ISSET_ID, value);}public void setFieldValue(_Fields field, Object value) {switch (field) {case ID:if (value == null) {unsetId();} else {setId((Long)value);}break;case LINES:if (value == null) {unsetLines();} else {setLines((List<Line>)value);}break;case STATUS:if (value == null) {unsetStatus();} else {setStatus((CartStatus)value);}break;case CREATED_ON:if (value == null) {unsetCreatedOn();} else {setCreatedOn((Long)value);}break;case UPDATED_ON:if (value == null) {unsetUpdatedOn();} else {setUpdatedOn((Long)value);}break;case CHECKED_OUT_ON:if (value == null) {unsetCheckedOutOn();} else {setCheckedOutOn((Long)value);}break;case ADDRESS_ID:if (value == null) {unsetAddressId();} else {setAddressId((Long)value);}break;case TOTAL_PRICE:if (value == null) {unsetTotalPrice();} else {setTotalPrice((Double)value);}break;case DISCOUNTED_PRICE:if (value == null) {unsetDiscountedPrice();} else {setDiscountedPrice((Double)value);}break;case COUPON_CODE:if (value == null) {unsetCouponCode();} else {setCouponCode((String)value);}break;case PICKUP_STORE_ID:if (value == null) {unsetPickupStoreId();} else {setPickupStoreId((Long)value);}break;case MESSAGE:if (value == null) {unsetMessage();} else {setMessage((String)value);}break;case WALLET_AMOUNT:if (value == null) {unsetWallet_amount();} else {setWallet_amount((Double)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case ID:return Long.valueOf(getId());case LINES:return getLines();case STATUS:return getStatus();case CREATED_ON:return Long.valueOf(getCreatedOn());case UPDATED_ON:return Long.valueOf(getUpdatedOn());case CHECKED_OUT_ON:return Long.valueOf(getCheckedOutOn());case ADDRESS_ID:return Long.valueOf(getAddressId());case TOTAL_PRICE:return Double.valueOf(getTotalPrice());case DISCOUNTED_PRICE:return Double.valueOf(getDiscountedPrice());case COUPON_CODE:return getCouponCode();case PICKUP_STORE_ID:return Long.valueOf(getPickupStoreId());case MESSAGE:return getMessage();case WALLET_AMOUNT:return Double.valueOf(getWallet_amount());}throw new IllegalStateException();}/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */public boolean isSet(_Fields field) {if (field == null) {throw new IllegalArgumentException();}switch (field) {case ID:return isSetId();case LINES:return isSetLines();case STATUS:return isSetStatus();case CREATED_ON:return isSetCreatedOn();case UPDATED_ON:return isSetUpdatedOn();case CHECKED_OUT_ON:return isSetCheckedOutOn();case ADDRESS_ID:return isSetAddressId();case TOTAL_PRICE:return isSetTotalPrice();case DISCOUNTED_PRICE:return isSetDiscountedPrice();case COUPON_CODE:return isSetCouponCode();case PICKUP_STORE_ID:return isSetPickupStoreId();case MESSAGE:return isSetMessage();case WALLET_AMOUNT:return isSetWallet_amount();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof Cart)return this.equals((Cart)that);return false;}public boolean equals(Cart that) {if (that == null)return false;boolean this_present_id = true;boolean that_present_id = true;if (this_present_id || that_present_id) {if (!(this_present_id && that_present_id))return false;if (this.id != that.id)return false;}boolean this_present_lines = true && this.isSetLines();boolean that_present_lines = true && that.isSetLines();if (this_present_lines || that_present_lines) {if (!(this_present_lines && that_present_lines))return false;if (!this.lines.equals(that.lines))return false;}boolean this_present_status = true && this.isSetStatus();boolean that_present_status = true && that.isSetStatus();if (this_present_status || that_present_status) {if (!(this_present_status && that_present_status))return false;if (!this.status.equals(that.status))return false;}boolean this_present_createdOn = true;boolean that_present_createdOn = true;if (this_present_createdOn || that_present_createdOn) {if (!(this_present_createdOn && that_present_createdOn))return false;if (this.createdOn != that.createdOn)return false;}boolean this_present_updatedOn = true;boolean that_present_updatedOn = true;if (this_present_updatedOn || that_present_updatedOn) {if (!(this_present_updatedOn && that_present_updatedOn))return false;if (this.updatedOn != that.updatedOn)return false;}boolean this_present_checkedOutOn = true;boolean that_present_checkedOutOn = true;if (this_present_checkedOutOn || that_present_checkedOutOn) {if (!(this_present_checkedOutOn && that_present_checkedOutOn))return false;if (this.checkedOutOn != that.checkedOutOn)return false;}boolean this_present_addressId = true;boolean that_present_addressId = true;if (this_present_addressId || that_present_addressId) {if (!(this_present_addressId && that_present_addressId))return false;if (this.addressId != that.addressId)return false;}boolean this_present_totalPrice = true;boolean that_present_totalPrice = true;if (this_present_totalPrice || that_present_totalPrice) {if (!(this_present_totalPrice && that_present_totalPrice))return false;if (this.totalPrice != that.totalPrice)return false;}boolean this_present_discountedPrice = true;boolean that_present_discountedPrice = true;if (this_present_discountedPrice || that_present_discountedPrice) {if (!(this_present_discountedPrice && that_present_discountedPrice))return false;if (this.discountedPrice != that.discountedPrice)return false;}boolean this_present_couponCode = true && this.isSetCouponCode();boolean that_present_couponCode = true && that.isSetCouponCode();if (this_present_couponCode || that_present_couponCode) {if (!(this_present_couponCode && that_present_couponCode))return false;if (!this.couponCode.equals(that.couponCode))return false;}boolean this_present_pickupStoreId = true;boolean that_present_pickupStoreId = true;if (this_present_pickupStoreId || that_present_pickupStoreId) {if (!(this_present_pickupStoreId && that_present_pickupStoreId))return false;if (this.pickupStoreId != that.pickupStoreId)return false;}boolean this_present_message = true && this.isSetMessage();boolean that_present_message = true && that.isSetMessage();if (this_present_message || that_present_message) {if (!(this_present_message && that_present_message))return false;if (!this.message.equals(that.message))return false;}boolean this_present_wallet_amount = true;boolean that_present_wallet_amount = true;if (this_present_wallet_amount || that_present_wallet_amount) {if (!(this_present_wallet_amount && that_present_wallet_amount))return false;if (this.wallet_amount != that.wallet_amount)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(Cart other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;Cart typedOther = (Cart)other;lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());if (lastComparison != 0) {return lastComparison;}if (isSetId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetLines()).compareTo(typedOther.isSetLines());if (lastComparison != 0) {return lastComparison;}if (isSetLines()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lines, typedOther.lines);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());if (lastComparison != 0) {return lastComparison;}if (isSetStatus()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetCreatedOn()).compareTo(typedOther.isSetCreatedOn());if (lastComparison != 0) {return lastComparison;}if (isSetCreatedOn()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdOn, typedOther.createdOn);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetUpdatedOn()).compareTo(typedOther.isSetUpdatedOn());if (lastComparison != 0) {return lastComparison;}if (isSetUpdatedOn()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedOn, typedOther.updatedOn);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetCheckedOutOn()).compareTo(typedOther.isSetCheckedOutOn());if (lastComparison != 0) {return lastComparison;}if (isSetCheckedOutOn()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.checkedOutOn, typedOther.checkedOutOn);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(typedOther.isSetAddressId());if (lastComparison != 0) {return lastComparison;}if (isSetAddressId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addressId, typedOther.addressId);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetTotalPrice()).compareTo(typedOther.isSetTotalPrice());if (lastComparison != 0) {return lastComparison;}if (isSetTotalPrice()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalPrice, typedOther.totalPrice);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetDiscountedPrice()).compareTo(typedOther.isSetDiscountedPrice());if (lastComparison != 0) {return lastComparison;}if (isSetDiscountedPrice()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.discountedPrice, typedOther.discountedPrice);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());if (lastComparison != 0) {return lastComparison;}if (isSetCouponCode()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetPickupStoreId()).compareTo(typedOther.isSetPickupStoreId());if (lastComparison != 0) {return lastComparison;}if (isSetPickupStoreId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pickupStoreId, typedOther.pickupStoreId);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage());if (lastComparison != 0) {return lastComparison;}if (isSetMessage()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetWallet_amount()).compareTo(typedOther.isSetWallet_amount());if (lastComparison != 0) {return lastComparison;}if (isSetWallet_amount()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wallet_amount, typedOther.wallet_amount);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: // IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.id = iprot.readI64();setIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 2: // LINESif (field.type == org.apache.thrift.protocol.TType.LIST) {{org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();this.lines = new ArrayList<Line>(_list8.size);for (int _i9 = 0; _i9 < _list8.size; ++_i9){Line _elem10; // required_elem10 = new Line();_elem10.read(iprot);this.lines.add(_elem10);}iprot.readListEnd();}} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 3: // STATUSif (field.type == org.apache.thrift.protocol.TType.I32) {this.status = CartStatus.findByValue(iprot.readI32());} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 4: // CREATED_ONif (field.type == org.apache.thrift.protocol.TType.I64) {this.createdOn = iprot.readI64();setCreatedOnIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 5: // UPDATED_ONif (field.type == org.apache.thrift.protocol.TType.I64) {this.updatedOn = iprot.readI64();setUpdatedOnIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 6: // CHECKED_OUT_ONif (field.type == org.apache.thrift.protocol.TType.I64) {this.checkedOutOn = iprot.readI64();setCheckedOutOnIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 7: // ADDRESS_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.addressId = iprot.readI64();setAddressIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 8: // TOTAL_PRICEif (field.type == org.apache.thrift.protocol.TType.DOUBLE) {this.totalPrice = iprot.readDouble();setTotalPriceIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 9: // DISCOUNTED_PRICEif (field.type == org.apache.thrift.protocol.TType.DOUBLE) {this.discountedPrice = iprot.readDouble();setDiscountedPriceIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 10: // COUPON_CODEif (field.type == org.apache.thrift.protocol.TType.STRING) {this.couponCode = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 11: // PICKUP_STORE_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.pickupStoreId = iprot.readI64();setPickupStoreIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 12: // MESSAGEif (field.type == org.apache.thrift.protocol.TType.STRING) {this.message = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 13: // WALLET_AMOUNTif (field.type == org.apache.thrift.protocol.TType.DOUBLE) {this.wallet_amount = iprot.readDouble();setWallet_amountIsSet(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(ID_FIELD_DESC);oprot.writeI64(this.id);oprot.writeFieldEnd();if (this.lines != null) {oprot.writeFieldBegin(LINES_FIELD_DESC);{oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.lines.size()));for (Line _iter11 : this.lines){_iter11.write(oprot);}oprot.writeListEnd();}oprot.writeFieldEnd();}if (this.status != null) {oprot.writeFieldBegin(STATUS_FIELD_DESC);oprot.writeI32(this.status.getValue());oprot.writeFieldEnd();}oprot.writeFieldBegin(CREATED_ON_FIELD_DESC);oprot.writeI64(this.createdOn);oprot.writeFieldEnd();oprot.writeFieldBegin(UPDATED_ON_FIELD_DESC);oprot.writeI64(this.updatedOn);oprot.writeFieldEnd();oprot.writeFieldBegin(CHECKED_OUT_ON_FIELD_DESC);oprot.writeI64(this.checkedOutOn);oprot.writeFieldEnd();oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);oprot.writeI64(this.addressId);oprot.writeFieldEnd();oprot.writeFieldBegin(TOTAL_PRICE_FIELD_DESC);oprot.writeDouble(this.totalPrice);oprot.writeFieldEnd();oprot.writeFieldBegin(DISCOUNTED_PRICE_FIELD_DESC);oprot.writeDouble(this.discountedPrice);oprot.writeFieldEnd();if (this.couponCode != null) {oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);oprot.writeString(this.couponCode);oprot.writeFieldEnd();}oprot.writeFieldBegin(PICKUP_STORE_ID_FIELD_DESC);oprot.writeI64(this.pickupStoreId);oprot.writeFieldEnd();if (this.message != null) {oprot.writeFieldBegin(MESSAGE_FIELD_DESC);oprot.writeString(this.message);oprot.writeFieldEnd();}oprot.writeFieldBegin(WALLET_AMOUNT_FIELD_DESC);oprot.writeDouble(this.wallet_amount);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("Cart(");boolean first = true;sb.append("id:");sb.append(this.id);first = false;if (!first) sb.append(", ");sb.append("lines:");if (this.lines == null) {sb.append("null");} else {sb.append(this.lines);}first = false;if (!first) sb.append(", ");sb.append("status:");if (this.status == null) {sb.append("null");} else {sb.append(this.status);}first = false;if (!first) sb.append(", ");sb.append("createdOn:");sb.append(this.createdOn);first = false;if (!first) sb.append(", ");sb.append("updatedOn:");sb.append(this.updatedOn);first = false;if (!first) sb.append(", ");sb.append("checkedOutOn:");sb.append(this.checkedOutOn);first = false;if (!first) sb.append(", ");sb.append("addressId:");sb.append(this.addressId);first = false;if (!first) sb.append(", ");sb.append("totalPrice:");sb.append(this.totalPrice);first = false;if (!first) sb.append(", ");sb.append("discountedPrice:");sb.append(this.discountedPrice);first = false;if (!first) sb.append(", ");sb.append("couponCode:");if (this.couponCode == null) {sb.append("null");} else {sb.append(this.couponCode);}first = false;if (!first) sb.append(", ");sb.append("pickupStoreId:");sb.append(this.pickupStoreId);first = false;if (!first) sb.append(", ");sb.append("message:");if (this.message == null) {sb.append("null");} else {sb.append(this.message);}first = false;if (!first) sb.append(", ");sb.append("wallet_amount:");sb.append(this.wallet_amount);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);}}}