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.logistics;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 DeliveryEstimateAndCosting implements org.apache.thrift.TBase<DeliveryEstimateAndCosting, DeliveryEstimateAndCosting._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DeliveryEstimateAndCosting");private static final org.apache.thrift.protocol.TField LOGISTICS_PROVIDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("logistics_provider_id", org.apache.thrift.protocol.TType.I64, (short)1);private static final org.apache.thrift.protocol.TField PINCODE_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 DELIVERY_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("deliveryTime", org.apache.thrift.protocol.TType.I64, (short)3);private static final org.apache.thrift.protocol.TField DELIVERY_DELAY_FIELD_DESC = new org.apache.thrift.protocol.TField("delivery_delay", org.apache.thrift.protocol.TType.I64, (short)4);private static final org.apache.thrift.protocol.TField COD_ALLOWED_FIELD_DESC = new org.apache.thrift.protocol.TField("codAllowed", org.apache.thrift.protocol.TType.BOOL, (short)5);private static final org.apache.thrift.protocol.TField OTG_AVAILABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("otgAvailable", org.apache.thrift.protocol.TType.BOOL, (short)6);private static final org.apache.thrift.protocol.TField LOGISTICS_COST_FIELD_DESC = new org.apache.thrift.protocol.TField("logisticsCost", org.apache.thrift.protocol.TType.DOUBLE, (short)7);private static final org.apache.thrift.protocol.TField COD_COLLECTION_CHARGES_FIELD_DESC = new org.apache.thrift.protocol.TField("codCollectionCharges", org.apache.thrift.protocol.TType.DOUBLE, (short)8);private static final org.apache.thrift.protocol.TField SHIPPING_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("shippingTime", org.apache.thrift.protocol.TType.I64, (short)9);private long logistics_provider_id; // requiredprivate String pincode; // requiredprivate long deliveryTime; // requiredprivate long delivery_delay; // requiredprivate boolean codAllowed; // requiredprivate boolean otgAvailable; // requiredprivate double logisticsCost; // requiredprivate double codCollectionCharges; // requiredprivate long shippingTime; // 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 {LOGISTICS_PROVIDER_ID((short)1, "logistics_provider_id"),PINCODE((short)2, "pincode"),DELIVERY_TIME((short)3, "deliveryTime"),DELIVERY_DELAY((short)4, "delivery_delay"),COD_ALLOWED((short)5, "codAllowed"),OTG_AVAILABLE((short)6, "otgAvailable"),LOGISTICS_COST((short)7, "logisticsCost"),COD_COLLECTION_CHARGES((short)8, "codCollectionCharges"),SHIPPING_TIME((short)9, "shippingTime");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: // LOGISTICS_PROVIDER_IDreturn LOGISTICS_PROVIDER_ID;case 2: // PINCODEreturn PINCODE;case 3: // DELIVERY_TIMEreturn DELIVERY_TIME;case 4: // DELIVERY_DELAYreturn DELIVERY_DELAY;case 5: // COD_ALLOWEDreturn COD_ALLOWED;case 6: // OTG_AVAILABLEreturn OTG_AVAILABLE;case 7: // LOGISTICS_COSTreturn LOGISTICS_COST;case 8: // COD_COLLECTION_CHARGESreturn COD_COLLECTION_CHARGES;case 9: // SHIPPING_TIMEreturn SHIPPING_TIME;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 __LOGISTICS_PROVIDER_ID_ISSET_ID = 0;private static final int __DELIVERYTIME_ISSET_ID = 1;private static final int __DELIVERY_DELAY_ISSET_ID = 2;private static final int __CODALLOWED_ISSET_ID = 3;private static final int __OTGAVAILABLE_ISSET_ID = 4;private static final int __LOGISTICSCOST_ISSET_ID = 5;private static final int __CODCOLLECTIONCHARGES_ISSET_ID = 6;private static final int __SHIPPINGTIME_ISSET_ID = 7;private BitSet __isset_bit_vector = new BitSet(8);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.LOGISTICS_PROVIDER_ID, new org.apache.thrift.meta_data.FieldMetaData("logistics_provider_id", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.PINCODE, 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.DELIVERY_TIME, new org.apache.thrift.meta_data.FieldMetaData("deliveryTime", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.DELIVERY_DELAY, new org.apache.thrift.meta_data.FieldMetaData("delivery_delay", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.COD_ALLOWED, new org.apache.thrift.meta_data.FieldMetaData("codAllowed", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));tmpMap.put(_Fields.OTG_AVAILABLE, new org.apache.thrift.meta_data.FieldMetaData("otgAvailable", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));tmpMap.put(_Fields.LOGISTICS_COST, new org.apache.thrift.meta_data.FieldMetaData("logisticsCost", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));tmpMap.put(_Fields.COD_COLLECTION_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("codCollectionCharges", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));tmpMap.put(_Fields.SHIPPING_TIME, new org.apache.thrift.meta_data.FieldMetaData("shippingTime", 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(DeliveryEstimateAndCosting.class, metaDataMap);}public DeliveryEstimateAndCosting() {}public DeliveryEstimateAndCosting(long logistics_provider_id,String pincode,long deliveryTime,long delivery_delay,boolean codAllowed,boolean otgAvailable,double logisticsCost,double codCollectionCharges,long shippingTime){this();this.logistics_provider_id = logistics_provider_id;setLogistics_provider_idIsSet(true);this.pincode = pincode;this.deliveryTime = deliveryTime;setDeliveryTimeIsSet(true);this.delivery_delay = delivery_delay;setDelivery_delayIsSet(true);this.codAllowed = codAllowed;setCodAllowedIsSet(true);this.otgAvailable = otgAvailable;setOtgAvailableIsSet(true);this.logisticsCost = logisticsCost;setLogisticsCostIsSet(true);this.codCollectionCharges = codCollectionCharges;setCodCollectionChargesIsSet(true);this.shippingTime = shippingTime;setShippingTimeIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public DeliveryEstimateAndCosting(DeliveryEstimateAndCosting other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.logistics_provider_id = other.logistics_provider_id;if (other.isSetPincode()) {this.pincode = other.pincode;}this.deliveryTime = other.deliveryTime;this.delivery_delay = other.delivery_delay;this.codAllowed = other.codAllowed;this.otgAvailable = other.otgAvailable;this.logisticsCost = other.logisticsCost;this.codCollectionCharges = other.codCollectionCharges;this.shippingTime = other.shippingTime;}public DeliveryEstimateAndCosting deepCopy() {return new DeliveryEstimateAndCosting(this);}@Overridepublic void clear() {setLogistics_provider_idIsSet(false);this.logistics_provider_id = 0;this.pincode = null;setDeliveryTimeIsSet(false);this.deliveryTime = 0;setDelivery_delayIsSet(false);this.delivery_delay = 0;setCodAllowedIsSet(false);this.codAllowed = false;setOtgAvailableIsSet(false);this.otgAvailable = false;setLogisticsCostIsSet(false);this.logisticsCost = 0.0;setCodCollectionChargesIsSet(false);this.codCollectionCharges = 0.0;setShippingTimeIsSet(false);this.shippingTime = 0;}public long getLogistics_provider_id() {return this.logistics_provider_id;}public void setLogistics_provider_id(long logistics_provider_id) {this.logistics_provider_id = logistics_provider_id;setLogistics_provider_idIsSet(true);}public void unsetLogistics_provider_id() {__isset_bit_vector.clear(__LOGISTICS_PROVIDER_ID_ISSET_ID);}/** Returns true if field logistics_provider_id is set (has been assigned a value) and false otherwise */public boolean isSetLogistics_provider_id() {return __isset_bit_vector.get(__LOGISTICS_PROVIDER_ID_ISSET_ID);}public void setLogistics_provider_idIsSet(boolean value) {__isset_bit_vector.set(__LOGISTICS_PROVIDER_ID_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 getDeliveryTime() {return this.deliveryTime;}public void setDeliveryTime(long deliveryTime) {this.deliveryTime = deliveryTime;setDeliveryTimeIsSet(true);}public void unsetDeliveryTime() {__isset_bit_vector.clear(__DELIVERYTIME_ISSET_ID);}/** Returns true if field deliveryTime is set (has been assigned a value) and false otherwise */public boolean isSetDeliveryTime() {return __isset_bit_vector.get(__DELIVERYTIME_ISSET_ID);}public void setDeliveryTimeIsSet(boolean value) {__isset_bit_vector.set(__DELIVERYTIME_ISSET_ID, value);}public long getDelivery_delay() {return this.delivery_delay;}public void setDelivery_delay(long delivery_delay) {this.delivery_delay = delivery_delay;setDelivery_delayIsSet(true);}public void unsetDelivery_delay() {__isset_bit_vector.clear(__DELIVERY_DELAY_ISSET_ID);}/** Returns true if field delivery_delay is set (has been assigned a value) and false otherwise */public boolean isSetDelivery_delay() {return __isset_bit_vector.get(__DELIVERY_DELAY_ISSET_ID);}public void setDelivery_delayIsSet(boolean value) {__isset_bit_vector.set(__DELIVERY_DELAY_ISSET_ID, value);}public boolean isCodAllowed() {return this.codAllowed;}public void setCodAllowed(boolean codAllowed) {this.codAllowed = codAllowed;setCodAllowedIsSet(true);}public void unsetCodAllowed() {__isset_bit_vector.clear(__CODALLOWED_ISSET_ID);}/** Returns true if field codAllowed is set (has been assigned a value) and false otherwise */public boolean isSetCodAllowed() {return __isset_bit_vector.get(__CODALLOWED_ISSET_ID);}public void setCodAllowedIsSet(boolean value) {__isset_bit_vector.set(__CODALLOWED_ISSET_ID, value);}public boolean isOtgAvailable() {return this.otgAvailable;}public void setOtgAvailable(boolean otgAvailable) {this.otgAvailable = otgAvailable;setOtgAvailableIsSet(true);}public void unsetOtgAvailable() {__isset_bit_vector.clear(__OTGAVAILABLE_ISSET_ID);}/** Returns true if field otgAvailable is set (has been assigned a value) and false otherwise */public boolean isSetOtgAvailable() {return __isset_bit_vector.get(__OTGAVAILABLE_ISSET_ID);}public void setOtgAvailableIsSet(boolean value) {__isset_bit_vector.set(__OTGAVAILABLE_ISSET_ID, value);}public double getLogisticsCost() {return this.logisticsCost;}public void setLogisticsCost(double logisticsCost) {this.logisticsCost = logisticsCost;setLogisticsCostIsSet(true);}public void unsetLogisticsCost() {__isset_bit_vector.clear(__LOGISTICSCOST_ISSET_ID);}/** Returns true if field logisticsCost is set (has been assigned a value) and false otherwise */public boolean isSetLogisticsCost() {return __isset_bit_vector.get(__LOGISTICSCOST_ISSET_ID);}public void setLogisticsCostIsSet(boolean value) {__isset_bit_vector.set(__LOGISTICSCOST_ISSET_ID, value);}public double getCodCollectionCharges() {return this.codCollectionCharges;}public void setCodCollectionCharges(double codCollectionCharges) {this.codCollectionCharges = codCollectionCharges;setCodCollectionChargesIsSet(true);}public void unsetCodCollectionCharges() {__isset_bit_vector.clear(__CODCOLLECTIONCHARGES_ISSET_ID);}/** Returns true if field codCollectionCharges is set (has been assigned a value) and false otherwise */public boolean isSetCodCollectionCharges() {return __isset_bit_vector.get(__CODCOLLECTIONCHARGES_ISSET_ID);}public void setCodCollectionChargesIsSet(boolean value) {__isset_bit_vector.set(__CODCOLLECTIONCHARGES_ISSET_ID, value);}public long getShippingTime() {return this.shippingTime;}public void setShippingTime(long shippingTime) {this.shippingTime = shippingTime;setShippingTimeIsSet(true);}public void unsetShippingTime() {__isset_bit_vector.clear(__SHIPPINGTIME_ISSET_ID);}/** Returns true if field shippingTime is set (has been assigned a value) and false otherwise */public boolean isSetShippingTime() {return __isset_bit_vector.get(__SHIPPINGTIME_ISSET_ID);}public void setShippingTimeIsSet(boolean value) {__isset_bit_vector.set(__SHIPPINGTIME_ISSET_ID, value);}public void setFieldValue(_Fields field, Object value) {switch (field) {case LOGISTICS_PROVIDER_ID:if (value == null) {unsetLogistics_provider_id();} else {setLogistics_provider_id((Long)value);}break;case PINCODE:if (value == null) {unsetPincode();} else {setPincode((String)value);}break;case DELIVERY_TIME:if (value == null) {unsetDeliveryTime();} else {setDeliveryTime((Long)value);}break;case DELIVERY_DELAY:if (value == null) {unsetDelivery_delay();} else {setDelivery_delay((Long)value);}break;case COD_ALLOWED:if (value == null) {unsetCodAllowed();} else {setCodAllowed((Boolean)value);}break;case OTG_AVAILABLE:if (value == null) {unsetOtgAvailable();} else {setOtgAvailable((Boolean)value);}break;case LOGISTICS_COST:if (value == null) {unsetLogisticsCost();} else {setLogisticsCost((Double)value);}break;case COD_COLLECTION_CHARGES:if (value == null) {unsetCodCollectionCharges();} else {setCodCollectionCharges((Double)value);}break;case SHIPPING_TIME:if (value == null) {unsetShippingTime();} else {setShippingTime((Long)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case LOGISTICS_PROVIDER_ID:return Long.valueOf(getLogistics_provider_id());case PINCODE:return getPincode();case DELIVERY_TIME:return Long.valueOf(getDeliveryTime());case DELIVERY_DELAY:return Long.valueOf(getDelivery_delay());case COD_ALLOWED:return Boolean.valueOf(isCodAllowed());case OTG_AVAILABLE:return Boolean.valueOf(isOtgAvailable());case LOGISTICS_COST:return Double.valueOf(getLogisticsCost());case COD_COLLECTION_CHARGES:return Double.valueOf(getCodCollectionCharges());case SHIPPING_TIME:return Long.valueOf(getShippingTime());}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 LOGISTICS_PROVIDER_ID:return isSetLogistics_provider_id();case PINCODE:return isSetPincode();case DELIVERY_TIME:return isSetDeliveryTime();case DELIVERY_DELAY:return isSetDelivery_delay();case COD_ALLOWED:return isSetCodAllowed();case OTG_AVAILABLE:return isSetOtgAvailable();case LOGISTICS_COST:return isSetLogisticsCost();case COD_COLLECTION_CHARGES:return isSetCodCollectionCharges();case SHIPPING_TIME:return isSetShippingTime();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof DeliveryEstimateAndCosting)return this.equals((DeliveryEstimateAndCosting)that);return false;}public boolean equals(DeliveryEstimateAndCosting that) {if (that == null)return false;boolean this_present_logistics_provider_id = true;boolean that_present_logistics_provider_id = true;if (this_present_logistics_provider_id || that_present_logistics_provider_id) {if (!(this_present_logistics_provider_id && that_present_logistics_provider_id))return false;if (this.logistics_provider_id != that.logistics_provider_id)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_deliveryTime = true;boolean that_present_deliveryTime = true;if (this_present_deliveryTime || that_present_deliveryTime) {if (!(this_present_deliveryTime && that_present_deliveryTime))return false;if (this.deliveryTime != that.deliveryTime)return false;}boolean this_present_delivery_delay = true;boolean that_present_delivery_delay = true;if (this_present_delivery_delay || that_present_delivery_delay) {if (!(this_present_delivery_delay && that_present_delivery_delay))return false;if (this.delivery_delay != that.delivery_delay)return false;}boolean this_present_codAllowed = true;boolean that_present_codAllowed = true;if (this_present_codAllowed || that_present_codAllowed) {if (!(this_present_codAllowed && that_present_codAllowed))return false;if (this.codAllowed != that.codAllowed)return false;}boolean this_present_otgAvailable = true;boolean that_present_otgAvailable = true;if (this_present_otgAvailable || that_present_otgAvailable) {if (!(this_present_otgAvailable && that_present_otgAvailable))return false;if (this.otgAvailable != that.otgAvailable)return false;}boolean this_present_logisticsCost = true;boolean that_present_logisticsCost = true;if (this_present_logisticsCost || that_present_logisticsCost) {if (!(this_present_logisticsCost && that_present_logisticsCost))return false;if (this.logisticsCost != that.logisticsCost)return false;}boolean this_present_codCollectionCharges = true;boolean that_present_codCollectionCharges = true;if (this_present_codCollectionCharges || that_present_codCollectionCharges) {if (!(this_present_codCollectionCharges && that_present_codCollectionCharges))return false;if (this.codCollectionCharges != that.codCollectionCharges)return false;}boolean this_present_shippingTime = true;boolean that_present_shippingTime = true;if (this_present_shippingTime || that_present_shippingTime) {if (!(this_present_shippingTime && that_present_shippingTime))return false;if (this.shippingTime != that.shippingTime)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(DeliveryEstimateAndCosting other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;DeliveryEstimateAndCosting typedOther = (DeliveryEstimateAndCosting)other;lastComparison = Boolean.valueOf(isSetLogistics_provider_id()).compareTo(typedOther.isSetLogistics_provider_id());if (lastComparison != 0) {return lastComparison;}if (isSetLogistics_provider_id()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logistics_provider_id, typedOther.logistics_provider_id);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(isSetDeliveryTime()).compareTo(typedOther.isSetDeliveryTime());if (lastComparison != 0) {return lastComparison;}if (isSetDeliveryTime()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deliveryTime, typedOther.deliveryTime);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetDelivery_delay()).compareTo(typedOther.isSetDelivery_delay());if (lastComparison != 0) {return lastComparison;}if (isSetDelivery_delay()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delivery_delay, typedOther.delivery_delay);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetCodAllowed()).compareTo(typedOther.isSetCodAllowed());if (lastComparison != 0) {return lastComparison;}if (isSetCodAllowed()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.codAllowed, typedOther.codAllowed);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetOtgAvailable()).compareTo(typedOther.isSetOtgAvailable());if (lastComparison != 0) {return lastComparison;}if (isSetOtgAvailable()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.otgAvailable, typedOther.otgAvailable);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetLogisticsCost()).compareTo(typedOther.isSetLogisticsCost());if (lastComparison != 0) {return lastComparison;}if (isSetLogisticsCost()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logisticsCost, typedOther.logisticsCost);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetCodCollectionCharges()).compareTo(typedOther.isSetCodCollectionCharges());if (lastComparison != 0) {return lastComparison;}if (isSetCodCollectionCharges()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.codCollectionCharges, typedOther.codCollectionCharges);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetShippingTime()).compareTo(typedOther.isSetShippingTime());if (lastComparison != 0) {return lastComparison;}if (isSetShippingTime()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shippingTime, typedOther.shippingTime);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: // LOGISTICS_PROVIDER_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.logistics_provider_id = iprot.readI64();setLogistics_provider_idIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 2: // PINCODEif (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: // DELIVERY_TIMEif (field.type == org.apache.thrift.protocol.TType.I64) {this.deliveryTime = iprot.readI64();setDeliveryTimeIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 4: // DELIVERY_DELAYif (field.type == org.apache.thrift.protocol.TType.I64) {this.delivery_delay = iprot.readI64();setDelivery_delayIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 5: // COD_ALLOWEDif (field.type == org.apache.thrift.protocol.TType.BOOL) {this.codAllowed = iprot.readBool();setCodAllowedIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 6: // OTG_AVAILABLEif (field.type == org.apache.thrift.protocol.TType.BOOL) {this.otgAvailable = iprot.readBool();setOtgAvailableIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 7: // LOGISTICS_COSTif (field.type == org.apache.thrift.protocol.TType.DOUBLE) {this.logisticsCost = iprot.readDouble();setLogisticsCostIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 8: // COD_COLLECTION_CHARGESif (field.type == org.apache.thrift.protocol.TType.DOUBLE) {this.codCollectionCharges = iprot.readDouble();setCodCollectionChargesIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 9: // SHIPPING_TIMEif (field.type == org.apache.thrift.protocol.TType.I64) {this.shippingTime = iprot.readI64();setShippingTimeIsSet(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(LOGISTICS_PROVIDER_ID_FIELD_DESC);oprot.writeI64(this.logistics_provider_id);oprot.writeFieldEnd();if (this.pincode != null) {oprot.writeFieldBegin(PINCODE_FIELD_DESC);oprot.writeString(this.pincode);oprot.writeFieldEnd();}oprot.writeFieldBegin(DELIVERY_TIME_FIELD_DESC);oprot.writeI64(this.deliveryTime);oprot.writeFieldEnd();oprot.writeFieldBegin(DELIVERY_DELAY_FIELD_DESC);oprot.writeI64(this.delivery_delay);oprot.writeFieldEnd();oprot.writeFieldBegin(COD_ALLOWED_FIELD_DESC);oprot.writeBool(this.codAllowed);oprot.writeFieldEnd();oprot.writeFieldBegin(OTG_AVAILABLE_FIELD_DESC);oprot.writeBool(this.otgAvailable);oprot.writeFieldEnd();oprot.writeFieldBegin(LOGISTICS_COST_FIELD_DESC);oprot.writeDouble(this.logisticsCost);oprot.writeFieldEnd();oprot.writeFieldBegin(COD_COLLECTION_CHARGES_FIELD_DESC);oprot.writeDouble(this.codCollectionCharges);oprot.writeFieldEnd();oprot.writeFieldBegin(SHIPPING_TIME_FIELD_DESC);oprot.writeI64(this.shippingTime);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("DeliveryEstimateAndCosting(");boolean first = true;sb.append("logistics_provider_id:");sb.append(this.logistics_provider_id);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("deliveryTime:");sb.append(this.deliveryTime);first = false;if (!first) sb.append(", ");sb.append("delivery_delay:");sb.append(this.delivery_delay);first = false;if (!first) sb.append(", ");sb.append("codAllowed:");sb.append(this.codAllowed);first = false;if (!first) sb.append(", ");sb.append("otgAvailable:");sb.append(this.otgAvailable);first = false;if (!first) sb.append(", ");sb.append("logisticsCost:");sb.append(this.logisticsCost);first = false;if (!first) sb.append(", ");sb.append("codCollectionCharges:");sb.append(this.codCollectionCharges);first = false;if (!first) sb.append(", ");sb.append("shippingTime:");sb.append(this.shippingTime);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);}}}