Rev 7967 | 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.order;import java.util.*;public class HotspotServiceMatrix implements org.apache.thrift.TBase<HotspotServiceMatrix, HotspotServiceMatrix._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HotspotServiceMatrix");private static final org.apache.thrift.protocol.TField STORE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("storeId", org.apache.thrift.protocol.TType.I64, (short) 1);private static final org.apache.thrift.protocol.TField HOTSPOT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("hotspotId", org.apache.thrift.protocol.TType.STRING, (short) 2);private static final org.apache.thrift.protocol.TField PICKUP_FROM_STORE_SERVICE_FIELD_DESC = new org.apache.thrift.protocol.TField("pickupFromStoreService", org.apache.thrift.protocol.TType.BOOL, (short) 3);private static final org.apache.thrift.protocol.TField STORE_WEBSITE_SERVICE_FIELD_DESC = new org.apache.thrift.protocol.TField("storeWebsiteService", org.apache.thrift.protocol.TType.BOOL, (short) 4);private static final org.apache.thrift.protocol.TField RECHARGE_SERVICE_FIELD_DESC = new org.apache.thrift.protocol.TField("rechargeService", org.apache.thrift.protocol.TType.BOOL, (short) 5);private long storeId; // requiredprivate String hotspotId; // requiredprivate boolean pickupFromStoreService; // requiredprivate boolean storeWebsiteService; // requiredprivate boolean rechargeService; // 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 {STORE_ID((short) 1, "storeId"),HOTSPOT_ID((short) 2, "hotspotId"),PICKUP_FROM_STORE_SERVICE((short) 3, "pickupFromStoreService"),STORE_WEBSITE_SERVICE((short) 4, "storeWebsiteService"),RECHARGE_SERVICE((short) 5, "rechargeService");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: // STORE_IDreturn STORE_ID;case 2: // HOTSPOT_IDreturn HOTSPOT_ID;case 3: // PICKUP_FROM_STORE_SERVICEreturn PICKUP_FROM_STORE_SERVICE;case 4: // STORE_WEBSITE_SERVICEreturn STORE_WEBSITE_SERVICE;case 5: // RECHARGE_SERVICEreturn RECHARGE_SERVICE;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 __STOREID_ISSET_ID = 0;private static final int __PICKUPFROMSTORESERVICE_ISSET_ID = 1;private static final int __STOREWEBSITESERVICE_ISSET_ID = 2;private static final int __RECHARGESERVICE_ISSET_ID = 3;private BitSet __isset_bit_vector = new BitSet(4);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.STORE_ID, new org.apache.thrift.meta_data.FieldMetaData("storeId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.HOTSPOT_ID, new org.apache.thrift.meta_data.FieldMetaData("hotspotId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.PICKUP_FROM_STORE_SERVICE, new org.apache.thrift.meta_data.FieldMetaData("pickupFromStoreService", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));tmpMap.put(_Fields.STORE_WEBSITE_SERVICE, new org.apache.thrift.meta_data.FieldMetaData("storeWebsiteService", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));tmpMap.put(_Fields.RECHARGE_SERVICE, new org.apache.thrift.meta_data.FieldMetaData("rechargeService", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HotspotServiceMatrix.class, metaDataMap);}public HotspotServiceMatrix() {}public HotspotServiceMatrix(long storeId,String hotspotId,boolean pickupFromStoreService,boolean storeWebsiteService,boolean rechargeService) {this();this.storeId = storeId;setStoreIdIsSet(true);this.hotspotId = hotspotId;this.pickupFromStoreService = pickupFromStoreService;setPickupFromStoreServiceIsSet(true);this.storeWebsiteService = storeWebsiteService;setStoreWebsiteServiceIsSet(true);this.rechargeService = rechargeService;setRechargeServiceIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public HotspotServiceMatrix(HotspotServiceMatrix other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.storeId = other.storeId;if (other.isSetHotspotId()) {this.hotspotId = other.hotspotId;}this.pickupFromStoreService = other.pickupFromStoreService;this.storeWebsiteService = other.storeWebsiteService;this.rechargeService = other.rechargeService;}public HotspotServiceMatrix deepCopy() {return new HotspotServiceMatrix(this);}@Overridepublic void clear() {setStoreIdIsSet(false);this.storeId = 0;this.hotspotId = null;setPickupFromStoreServiceIsSet(false);this.pickupFromStoreService = false;setStoreWebsiteServiceIsSet(false);this.storeWebsiteService = false;setRechargeServiceIsSet(false);this.rechargeService = false;}public long getStoreId() {return this.storeId;}public void setStoreId(long storeId) {this.storeId = storeId;setStoreIdIsSet(true);}public void unsetStoreId() {__isset_bit_vector.clear(__STOREID_ISSET_ID);}/** Returns true if field storeId is set (has been assigned a value) and false otherwise */public boolean isSetStoreId() {return __isset_bit_vector.get(__STOREID_ISSET_ID);}public void setStoreIdIsSet(boolean value) {__isset_bit_vector.set(__STOREID_ISSET_ID, value);}public String getHotspotId() {return this.hotspotId;}public void setHotspotId(String hotspotId) {this.hotspotId = hotspotId;}public void unsetHotspotId() {this.hotspotId = null;}/** Returns true if field hotspotId is set (has been assigned a value) and false otherwise */public boolean isSetHotspotId() {return this.hotspotId != null;}public void setHotspotIdIsSet(boolean value) {if (!value) {this.hotspotId = null;}}public boolean isPickupFromStoreService() {return this.pickupFromStoreService;}public void setPickupFromStoreService(boolean pickupFromStoreService) {this.pickupFromStoreService = pickupFromStoreService;setPickupFromStoreServiceIsSet(true);}public void unsetPickupFromStoreService() {__isset_bit_vector.clear(__PICKUPFROMSTORESERVICE_ISSET_ID);}/** Returns true if field pickupFromStoreService is set (has been assigned a value) and false otherwise */public boolean isSetPickupFromStoreService() {return __isset_bit_vector.get(__PICKUPFROMSTORESERVICE_ISSET_ID);}public void setPickupFromStoreServiceIsSet(boolean value) {__isset_bit_vector.set(__PICKUPFROMSTORESERVICE_ISSET_ID, value);}public boolean isStoreWebsiteService() {return this.storeWebsiteService;}public void setStoreWebsiteService(boolean storeWebsiteService) {this.storeWebsiteService = storeWebsiteService;setStoreWebsiteServiceIsSet(true);}public void unsetStoreWebsiteService() {__isset_bit_vector.clear(__STOREWEBSITESERVICE_ISSET_ID);}/** Returns true if field storeWebsiteService is set (has been assigned a value) and false otherwise */public boolean isSetStoreWebsiteService() {return __isset_bit_vector.get(__STOREWEBSITESERVICE_ISSET_ID);}public void setStoreWebsiteServiceIsSet(boolean value) {__isset_bit_vector.set(__STOREWEBSITESERVICE_ISSET_ID, value);}public boolean isRechargeService() {return this.rechargeService;}public void setRechargeService(boolean rechargeService) {this.rechargeService = rechargeService;setRechargeServiceIsSet(true);}public void unsetRechargeService() {__isset_bit_vector.clear(__RECHARGESERVICE_ISSET_ID);}/** Returns true if field rechargeService is set (has been assigned a value) and false otherwise */public boolean isSetRechargeService() {return __isset_bit_vector.get(__RECHARGESERVICE_ISSET_ID);}public void setRechargeServiceIsSet(boolean value) {__isset_bit_vector.set(__RECHARGESERVICE_ISSET_ID, value);}public void setFieldValue(_Fields field, Object value) {switch (field) {case STORE_ID:if (value == null) {unsetStoreId();} else {setStoreId((Long)value);}break;case HOTSPOT_ID:if (value == null) {unsetHotspotId();} else {setHotspotId((String)value);}break;case PICKUP_FROM_STORE_SERVICE:if (value == null) {unsetPickupFromStoreService();} else {setPickupFromStoreService((Boolean)value);}break;case STORE_WEBSITE_SERVICE:if (value == null) {unsetStoreWebsiteService();} else {setStoreWebsiteService((Boolean)value);}break;case RECHARGE_SERVICE:if (value == null) {unsetRechargeService();} else {setRechargeService((Boolean)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case STORE_ID:return Long.valueOf(getStoreId());case HOTSPOT_ID:return getHotspotId();case PICKUP_FROM_STORE_SERVICE:return Boolean.valueOf(isPickupFromStoreService());case STORE_WEBSITE_SERVICE:return Boolean.valueOf(isStoreWebsiteService());case RECHARGE_SERVICE:return Boolean.valueOf(isRechargeService());}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 STORE_ID:return isSetStoreId();case HOTSPOT_ID:return isSetHotspotId();case PICKUP_FROM_STORE_SERVICE:return isSetPickupFromStoreService();case STORE_WEBSITE_SERVICE:return isSetStoreWebsiteService();case RECHARGE_SERVICE:return isSetRechargeService();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof HotspotServiceMatrix)return this.equals((HotspotServiceMatrix) that);return false;}public boolean equals(HotspotServiceMatrix that) {if (that == null)return false;boolean this_present_storeId = true;boolean that_present_storeId = true;if (this_present_storeId || that_present_storeId) {if (!(this_present_storeId && that_present_storeId))return false;if (this.storeId != that.storeId)return false;}boolean this_present_hotspotId = true && this.isSetHotspotId();boolean that_present_hotspotId = true && that.isSetHotspotId();if (this_present_hotspotId || that_present_hotspotId) {if (!(this_present_hotspotId && that_present_hotspotId))return false;if (!this.hotspotId.equals(that.hotspotId))return false;}boolean this_present_pickupFromStoreService = true;boolean that_present_pickupFromStoreService = true;if (this_present_pickupFromStoreService || that_present_pickupFromStoreService) {if (!(this_present_pickupFromStoreService && that_present_pickupFromStoreService))return false;if (this.pickupFromStoreService != that.pickupFromStoreService)return false;}boolean this_present_storeWebsiteService = true;boolean that_present_storeWebsiteService = true;if (this_present_storeWebsiteService || that_present_storeWebsiteService) {if (!(this_present_storeWebsiteService && that_present_storeWebsiteService))return false;if (this.storeWebsiteService != that.storeWebsiteService)return false;}boolean this_present_rechargeService = true;boolean that_present_rechargeService = true;if (this_present_rechargeService || that_present_rechargeService) {if (!(this_present_rechargeService && that_present_rechargeService))return false;if (this.rechargeService != that.rechargeService)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(HotspotServiceMatrix other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;HotspotServiceMatrix typedOther = (HotspotServiceMatrix) other;lastComparison = Boolean.valueOf(isSetStoreId()).compareTo(typedOther.isSetStoreId());if (lastComparison != 0) {return lastComparison;}if (isSetStoreId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storeId, typedOther.storeId);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetHotspotId()).compareTo(typedOther.isSetHotspotId());if (lastComparison != 0) {return lastComparison;}if (isSetHotspotId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hotspotId, typedOther.hotspotId);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetPickupFromStoreService()).compareTo(typedOther.isSetPickupFromStoreService());if (lastComparison != 0) {return lastComparison;}if (isSetPickupFromStoreService()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pickupFromStoreService, typedOther.pickupFromStoreService);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetStoreWebsiteService()).compareTo(typedOther.isSetStoreWebsiteService());if (lastComparison != 0) {return lastComparison;}if (isSetStoreWebsiteService()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storeWebsiteService, typedOther.storeWebsiteService);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetRechargeService()).compareTo(typedOther.isSetRechargeService());if (lastComparison != 0) {return lastComparison;}if (isSetRechargeService()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rechargeService, typedOther.rechargeService);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: // STORE_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.storeId = iprot.readI64();setStoreIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 2: // HOTSPOT_IDif (field.type == org.apache.thrift.protocol.TType.STRING) {this.hotspotId = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 3: // PICKUP_FROM_STORE_SERVICEif (field.type == org.apache.thrift.protocol.TType.BOOL) {this.pickupFromStoreService = iprot.readBool();setPickupFromStoreServiceIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 4: // STORE_WEBSITE_SERVICEif (field.type == org.apache.thrift.protocol.TType.BOOL) {this.storeWebsiteService = iprot.readBool();setStoreWebsiteServiceIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 5: // RECHARGE_SERVICEif (field.type == org.apache.thrift.protocol.TType.BOOL) {this.rechargeService = iprot.readBool();setRechargeServiceIsSet(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(STORE_ID_FIELD_DESC);oprot.writeI64(this.storeId);oprot.writeFieldEnd();if (this.hotspotId != null) {oprot.writeFieldBegin(HOTSPOT_ID_FIELD_DESC);oprot.writeString(this.hotspotId);oprot.writeFieldEnd();}oprot.writeFieldBegin(PICKUP_FROM_STORE_SERVICE_FIELD_DESC);oprot.writeBool(this.pickupFromStoreService);oprot.writeFieldEnd();oprot.writeFieldBegin(STORE_WEBSITE_SERVICE_FIELD_DESC);oprot.writeBool(this.storeWebsiteService);oprot.writeFieldEnd();oprot.writeFieldBegin(RECHARGE_SERVICE_FIELD_DESC);oprot.writeBool(this.rechargeService);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("HotspotServiceMatrix(");boolean first = true;sb.append("storeId:");sb.append(this.storeId);first = false;if (!first) sb.append(", ");sb.append("hotspotId:");if (this.hotspotId == null) {sb.append("null");} else {sb.append(this.hotspotId);}first = false;if (!first) sb.append(", ");sb.append("pickupFromStoreService:");sb.append(this.pickupFromStoreService);first = false;if (!first) sb.append(", ");sb.append("storeWebsiteService:");sb.append(this.storeWebsiteService);first = false;if (!first) sb.append(", ");sb.append("rechargeService:");sb.append(this.rechargeService);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);}}}