Blame | 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.inventory;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 ItemPincodeAvailability implements org.apache.thrift.TBase<ItemPincodeAvailability, ItemPincodeAvailability._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ItemPincodeAvailability");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)1);private static final org.apache.thrift.protocol.TField PIN_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("pinCode", org.apache.thrift.protocol.TType.STRING, (short)2);private static final org.apache.thrift.protocol.TField VAT_QTY_FIELD_DESC = new org.apache.thrift.protocol.TField("vatQty", org.apache.thrift.protocol.TType.I64, (short)3);private static final org.apache.thrift.protocol.TField TOTAL_QTY_FIELD_DESC = new org.apache.thrift.protocol.TField("totalQty", org.apache.thrift.protocol.TType.I64, (short)4);private static final org.apache.thrift.protocol.TField MIN_DELIVERY_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("minDeliveryDate", org.apache.thrift.protocol.TType.I64, (short)5);private static final org.apache.thrift.protocol.TField MAX_DELIVERY_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("maxDeliveryDate", org.apache.thrift.protocol.TType.I64, (short)6);private long itemId; // requiredprivate String pinCode; // requiredprivate long vatQty; // requiredprivate long totalQty; // requiredprivate long minDeliveryDate; // requiredprivate long maxDeliveryDate; // required/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements org.apache.thrift.TFieldIdEnum {ITEM_ID((short)1, "itemId"),PIN_CODE((short)2, "pinCode"),VAT_QTY((short)3, "vatQty"),TOTAL_QTY((short)4, "totalQty"),MIN_DELIVERY_DATE((short)5, "minDeliveryDate"),MAX_DELIVERY_DATE((short)6, "maxDeliveryDate");private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {switch(fieldId) {case 1: // ITEM_IDreturn ITEM_ID;case 2: // PIN_CODEreturn PIN_CODE;case 3: // VAT_QTYreturn VAT_QTY;case 4: // TOTAL_QTYreturn TOTAL_QTY;case 5: // MIN_DELIVERY_DATEreturn MIN_DELIVERY_DATE;case 6: // MAX_DELIVERY_DATEreturn MAX_DELIVERY_DATE;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 __ITEMID_ISSET_ID = 0;private static final int __VATQTY_ISSET_ID = 1;private static final int __TOTALQTY_ISSET_ID = 2;private static final int __MINDELIVERYDATE_ISSET_ID = 3;private static final int __MAXDELIVERYDATE_ISSET_ID = 4;private BitSet __isset_bit_vector = new BitSet(5);public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.PIN_CODE, new org.apache.thrift.meta_data.FieldMetaData("pinCode", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.VAT_QTY, new org.apache.thrift.meta_data.FieldMetaData("vatQty", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.TOTAL_QTY, new org.apache.thrift.meta_data.FieldMetaData("totalQty", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.MIN_DELIVERY_DATE, new org.apache.thrift.meta_data.FieldMetaData("minDeliveryDate", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.MAX_DELIVERY_DATE, new org.apache.thrift.meta_data.FieldMetaData("maxDeliveryDate", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ItemPincodeAvailability.class, metaDataMap);}public ItemPincodeAvailability() {}public ItemPincodeAvailability(long itemId,String pinCode,long vatQty,long totalQty,long minDeliveryDate,long maxDeliveryDate){this();this.itemId = itemId;setItemIdIsSet(true);this.pinCode = pinCode;this.vatQty = vatQty;setVatQtyIsSet(true);this.totalQty = totalQty;setTotalQtyIsSet(true);this.minDeliveryDate = minDeliveryDate;setMinDeliveryDateIsSet(true);this.maxDeliveryDate = maxDeliveryDate;setMaxDeliveryDateIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public ItemPincodeAvailability(ItemPincodeAvailability other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.itemId = other.itemId;if (other.isSetPinCode()) {this.pinCode = other.pinCode;}this.vatQty = other.vatQty;this.totalQty = other.totalQty;this.minDeliveryDate = other.minDeliveryDate;this.maxDeliveryDate = other.maxDeliveryDate;}public ItemPincodeAvailability deepCopy() {return new ItemPincodeAvailability(this);}@Overridepublic void clear() {setItemIdIsSet(false);this.itemId = 0;this.pinCode = null;setVatQtyIsSet(false);this.vatQty = 0;setTotalQtyIsSet(false);this.totalQty = 0;setMinDeliveryDateIsSet(false);this.minDeliveryDate = 0;setMaxDeliveryDateIsSet(false);this.maxDeliveryDate = 0;}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 getPinCode() {return this.pinCode;}public void setPinCode(String pinCode) {this.pinCode = pinCode;}public void unsetPinCode() {this.pinCode = null;}/** Returns true if field pinCode is set (has been assigned a value) and false otherwise */public boolean isSetPinCode() {return this.pinCode != null;}public void setPinCodeIsSet(boolean value) {if (!value) {this.pinCode = null;}}public long getVatQty() {return this.vatQty;}public void setVatQty(long vatQty) {this.vatQty = vatQty;setVatQtyIsSet(true);}public void unsetVatQty() {__isset_bit_vector.clear(__VATQTY_ISSET_ID);}/** Returns true if field vatQty is set (has been assigned a value) and false otherwise */public boolean isSetVatQty() {return __isset_bit_vector.get(__VATQTY_ISSET_ID);}public void setVatQtyIsSet(boolean value) {__isset_bit_vector.set(__VATQTY_ISSET_ID, value);}public long getTotalQty() {return this.totalQty;}public void setTotalQty(long totalQty) {this.totalQty = totalQty;setTotalQtyIsSet(true);}public void unsetTotalQty() {__isset_bit_vector.clear(__TOTALQTY_ISSET_ID);}/** Returns true if field totalQty is set (has been assigned a value) and false otherwise */public boolean isSetTotalQty() {return __isset_bit_vector.get(__TOTALQTY_ISSET_ID);}public void setTotalQtyIsSet(boolean value) {__isset_bit_vector.set(__TOTALQTY_ISSET_ID, value);}public long getMinDeliveryDate() {return this.minDeliveryDate;}public void setMinDeliveryDate(long minDeliveryDate) {this.minDeliveryDate = minDeliveryDate;setMinDeliveryDateIsSet(true);}public void unsetMinDeliveryDate() {__isset_bit_vector.clear(__MINDELIVERYDATE_ISSET_ID);}/** Returns true if field minDeliveryDate is set (has been assigned a value) and false otherwise */public boolean isSetMinDeliveryDate() {return __isset_bit_vector.get(__MINDELIVERYDATE_ISSET_ID);}public void setMinDeliveryDateIsSet(boolean value) {__isset_bit_vector.set(__MINDELIVERYDATE_ISSET_ID, value);}public long getMaxDeliveryDate() {return this.maxDeliveryDate;}public void setMaxDeliveryDate(long maxDeliveryDate) {this.maxDeliveryDate = maxDeliveryDate;setMaxDeliveryDateIsSet(true);}public void unsetMaxDeliveryDate() {__isset_bit_vector.clear(__MAXDELIVERYDATE_ISSET_ID);}/** Returns true if field maxDeliveryDate is set (has been assigned a value) and false otherwise */public boolean isSetMaxDeliveryDate() {return __isset_bit_vector.get(__MAXDELIVERYDATE_ISSET_ID);}public void setMaxDeliveryDateIsSet(boolean value) {__isset_bit_vector.set(__MAXDELIVERYDATE_ISSET_ID, value);}public void setFieldValue(_Fields field, Object value) {switch (field) {case ITEM_ID:if (value == null) {unsetItemId();} else {setItemId((Long)value);}break;case PIN_CODE:if (value == null) {unsetPinCode();} else {setPinCode((String)value);}break;case VAT_QTY:if (value == null) {unsetVatQty();} else {setVatQty((Long)value);}break;case TOTAL_QTY:if (value == null) {unsetTotalQty();} else {setTotalQty((Long)value);}break;case MIN_DELIVERY_DATE:if (value == null) {unsetMinDeliveryDate();} else {setMinDeliveryDate((Long)value);}break;case MAX_DELIVERY_DATE:if (value == null) {unsetMaxDeliveryDate();} else {setMaxDeliveryDate((Long)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case ITEM_ID:return Long.valueOf(getItemId());case PIN_CODE:return getPinCode();case VAT_QTY:return Long.valueOf(getVatQty());case TOTAL_QTY:return Long.valueOf(getTotalQty());case MIN_DELIVERY_DATE:return Long.valueOf(getMinDeliveryDate());case MAX_DELIVERY_DATE:return Long.valueOf(getMaxDeliveryDate());}throw new IllegalStateException();}/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */public boolean isSet(_Fields field) {if (field == null) {throw new IllegalArgumentException();}switch (field) {case ITEM_ID:return isSetItemId();case PIN_CODE:return isSetPinCode();case VAT_QTY:return isSetVatQty();case TOTAL_QTY:return isSetTotalQty();case MIN_DELIVERY_DATE:return isSetMinDeliveryDate();case MAX_DELIVERY_DATE:return isSetMaxDeliveryDate();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof ItemPincodeAvailability)return this.equals((ItemPincodeAvailability)that);return false;}public boolean equals(ItemPincodeAvailability that) {if (that == null)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_pinCode = true && this.isSetPinCode();boolean that_present_pinCode = true && that.isSetPinCode();if (this_present_pinCode || that_present_pinCode) {if (!(this_present_pinCode && that_present_pinCode))return false;if (!this.pinCode.equals(that.pinCode))return false;}boolean this_present_vatQty = true;boolean that_present_vatQty = true;if (this_present_vatQty || that_present_vatQty) {if (!(this_present_vatQty && that_present_vatQty))return false;if (this.vatQty != that.vatQty)return false;}boolean this_present_totalQty = true;boolean that_present_totalQty = true;if (this_present_totalQty || that_present_totalQty) {if (!(this_present_totalQty && that_present_totalQty))return false;if (this.totalQty != that.totalQty)return false;}boolean this_present_minDeliveryDate = true;boolean that_present_minDeliveryDate = true;if (this_present_minDeliveryDate || that_present_minDeliveryDate) {if (!(this_present_minDeliveryDate && that_present_minDeliveryDate))return false;if (this.minDeliveryDate != that.minDeliveryDate)return false;}boolean this_present_maxDeliveryDate = true;boolean that_present_maxDeliveryDate = true;if (this_present_maxDeliveryDate || that_present_maxDeliveryDate) {if (!(this_present_maxDeliveryDate && that_present_maxDeliveryDate))return false;if (this.maxDeliveryDate != that.maxDeliveryDate)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(ItemPincodeAvailability other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;ItemPincodeAvailability typedOther = (ItemPincodeAvailability)other;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(isSetPinCode()).compareTo(typedOther.isSetPinCode());if (lastComparison != 0) {return lastComparison;}if (isSetPinCode()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pinCode, typedOther.pinCode);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetVatQty()).compareTo(typedOther.isSetVatQty());if (lastComparison != 0) {return lastComparison;}if (isSetVatQty()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vatQty, typedOther.vatQty);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetTotalQty()).compareTo(typedOther.isSetTotalQty());if (lastComparison != 0) {return lastComparison;}if (isSetTotalQty()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalQty, typedOther.totalQty);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetMinDeliveryDate()).compareTo(typedOther.isSetMinDeliveryDate());if (lastComparison != 0) {return lastComparison;}if (isSetMinDeliveryDate()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.minDeliveryDate, typedOther.minDeliveryDate);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetMaxDeliveryDate()).compareTo(typedOther.isSetMaxDeliveryDate());if (lastComparison != 0) {return lastComparison;}if (isSetMaxDeliveryDate()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxDeliveryDate, typedOther.maxDeliveryDate);if (lastComparison != 0) {return lastComparison;}}return 0;}public _Fields fieldForId(int fieldId) {return _Fields.findByThriftId(fieldId);}public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 1: // ITEM_IDif (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 2: // PIN_CODEif (field.type == org.apache.thrift.protocol.TType.STRING) {this.pinCode = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 3: // VAT_QTYif (field.type == org.apache.thrift.protocol.TType.I64) {this.vatQty = iprot.readI64();setVatQtyIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 4: // TOTAL_QTYif (field.type == org.apache.thrift.protocol.TType.I64) {this.totalQty = iprot.readI64();setTotalQtyIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 5: // MIN_DELIVERY_DATEif (field.type == org.apache.thrift.protocol.TType.I64) {this.minDeliveryDate = iprot.readI64();setMinDeliveryDateIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 6: // MAX_DELIVERY_DATEif (field.type == org.apache.thrift.protocol.TType.I64) {this.maxDeliveryDate = iprot.readI64();setMaxDeliveryDateIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {validate();oprot.writeStructBegin(STRUCT_DESC);oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);oprot.writeI64(this.itemId);oprot.writeFieldEnd();if (this.pinCode != null) {oprot.writeFieldBegin(PIN_CODE_FIELD_DESC);oprot.writeString(this.pinCode);oprot.writeFieldEnd();}oprot.writeFieldBegin(VAT_QTY_FIELD_DESC);oprot.writeI64(this.vatQty);oprot.writeFieldEnd();oprot.writeFieldBegin(TOTAL_QTY_FIELD_DESC);oprot.writeI64(this.totalQty);oprot.writeFieldEnd();oprot.writeFieldBegin(MIN_DELIVERY_DATE_FIELD_DESC);oprot.writeI64(this.minDeliveryDate);oprot.writeFieldEnd();oprot.writeFieldBegin(MAX_DELIVERY_DATE_FIELD_DESC);oprot.writeI64(this.maxDeliveryDate);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("ItemPincodeAvailability(");boolean first = true;sb.append("itemId:");sb.append(this.itemId);first = false;if (!first) sb.append(", ");sb.append("pinCode:");if (this.pinCode == null) {sb.append("null");} else {sb.append(this.pinCode);}first = false;if (!first) sb.append(", ");sb.append("vatQty:");sb.append(this.vatQty);first = false;if (!first) sb.append(", ");sb.append("totalQty:");sb.append(this.totalQty);first = false;if (!first) sb.append(", ");sb.append("minDeliveryDate:");sb.append(this.minDeliveryDate);first = false;if (!first) sb.append(", ");sb.append("maxDeliveryDate:");sb.append(this.maxDeliveryDate);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);}}}