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.order;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 PmsaSearchFilter implements org.apache.thrift.TBase<PmsaSearchFilter, PmsaSearchFilter._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PmsaSearchFilter");private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);private static final org.apache.thrift.protocol.TField PHONE_FIELD_DESC = new org.apache.thrift.protocol.TField("phone", org.apache.thrift.protocol.TType.STRING, (short)2);private static final org.apache.thrift.protocol.TField EMAIL_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("emailId", org.apache.thrift.protocol.TType.STRING, (short)3);private static final org.apache.thrift.protocol.TField CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("code", org.apache.thrift.protocol.TType.STRING, (short)4);private static final org.apache.thrift.protocol.TField ACTIVATED_FIELD_DESC = new org.apache.thrift.protocol.TField("activated", org.apache.thrift.protocol.TType.BOOL, (short)5);private static final org.apache.thrift.protocol.TField L1_EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("l1_email", org.apache.thrift.protocol.TType.STRING, (short)6);private static final org.apache.thrift.protocol.TField L2_EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("l2_email", org.apache.thrift.protocol.TType.STRING, (short)7);private String name; // requiredprivate String phone; // requiredprivate String emailId; // requiredprivate String code; // requiredprivate boolean activated; // requiredprivate String l1_email; // requiredprivate String l2_email; // 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 {NAME((short)1, "name"),PHONE((short)2, "phone"),EMAIL_ID((short)3, "emailId"),CODE((short)4, "code"),ACTIVATED((short)5, "activated"),L1_EMAIL((short)6, "l1_email"),L2_EMAIL((short)7, "l2_email");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: // NAMEreturn NAME;case 2: // PHONEreturn PHONE;case 3: // EMAIL_IDreturn EMAIL_ID;case 4: // CODEreturn CODE;case 5: // ACTIVATEDreturn ACTIVATED;case 6: // L1_EMAILreturn L1_EMAIL;case 7: // L2_EMAILreturn L2_EMAIL;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 __ACTIVATED_ISSET_ID = 0;private BitSet __isset_bit_vector = new BitSet(1);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.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.PHONE, new org.apache.thrift.meta_data.FieldMetaData("phone", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.EMAIL_ID, new org.apache.thrift.meta_data.FieldMetaData("emailId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.CODE, new org.apache.thrift.meta_data.FieldMetaData("code", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.ACTIVATED, new org.apache.thrift.meta_data.FieldMetaData("activated", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));tmpMap.put(_Fields.L1_EMAIL, new org.apache.thrift.meta_data.FieldMetaData("l1_email", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.L2_EMAIL, new org.apache.thrift.meta_data.FieldMetaData("l2_email", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PmsaSearchFilter.class, metaDataMap);}public PmsaSearchFilter() {}public PmsaSearchFilter(String name,String phone,String emailId,String code,boolean activated,String l1_email,String l2_email){this();this.name = name;this.phone = phone;this.emailId = emailId;this.code = code;this.activated = activated;setActivatedIsSet(true);this.l1_email = l1_email;this.l2_email = l2_email;}/*** Performs a deep copy on <i>other</i>.*/public PmsaSearchFilter(PmsaSearchFilter other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);if (other.isSetName()) {this.name = other.name;}if (other.isSetPhone()) {this.phone = other.phone;}if (other.isSetEmailId()) {this.emailId = other.emailId;}if (other.isSetCode()) {this.code = other.code;}this.activated = other.activated;if (other.isSetL1_email()) {this.l1_email = other.l1_email;}if (other.isSetL2_email()) {this.l2_email = other.l2_email;}}public PmsaSearchFilter deepCopy() {return new PmsaSearchFilter(this);}@Overridepublic void clear() {this.name = null;this.phone = null;this.emailId = null;this.code = null;setActivatedIsSet(false);this.activated = false;this.l1_email = null;this.l2_email = null;}public String getName() {return this.name;}public void setName(String name) {this.name = name;}public void unsetName() {this.name = null;}/** Returns true if field name is set (has been assigned a value) and false otherwise */public boolean isSetName() {return this.name != null;}public void setNameIsSet(boolean value) {if (!value) {this.name = null;}}public String getPhone() {return this.phone;}public void setPhone(String phone) {this.phone = phone;}public void unsetPhone() {this.phone = null;}/** Returns true if field phone is set (has been assigned a value) and false otherwise */public boolean isSetPhone() {return this.phone != null;}public void setPhoneIsSet(boolean value) {if (!value) {this.phone = null;}}public String getEmailId() {return this.emailId;}public void setEmailId(String emailId) {this.emailId = emailId;}public void unsetEmailId() {this.emailId = null;}/** Returns true if field emailId is set (has been assigned a value) and false otherwise */public boolean isSetEmailId() {return this.emailId != null;}public void setEmailIdIsSet(boolean value) {if (!value) {this.emailId = null;}}public String getCode() {return this.code;}public void setCode(String code) {this.code = code;}public void unsetCode() {this.code = null;}/** Returns true if field code is set (has been assigned a value) and false otherwise */public boolean isSetCode() {return this.code != null;}public void setCodeIsSet(boolean value) {if (!value) {this.code = null;}}public boolean isActivated() {return this.activated;}public void setActivated(boolean activated) {this.activated = activated;setActivatedIsSet(true);}public void unsetActivated() {__isset_bit_vector.clear(__ACTIVATED_ISSET_ID);}/** Returns true if field activated is set (has been assigned a value) and false otherwise */public boolean isSetActivated() {return __isset_bit_vector.get(__ACTIVATED_ISSET_ID);}public void setActivatedIsSet(boolean value) {__isset_bit_vector.set(__ACTIVATED_ISSET_ID, value);}public String getL1_email() {return this.l1_email;}public void setL1_email(String l1_email) {this.l1_email = l1_email;}public void unsetL1_email() {this.l1_email = null;}/** Returns true if field l1_email is set (has been assigned a value) and false otherwise */public boolean isSetL1_email() {return this.l1_email != null;}public void setL1_emailIsSet(boolean value) {if (!value) {this.l1_email = null;}}public String getL2_email() {return this.l2_email;}public void setL2_email(String l2_email) {this.l2_email = l2_email;}public void unsetL2_email() {this.l2_email = null;}/** Returns true if field l2_email is set (has been assigned a value) and false otherwise */public boolean isSetL2_email() {return this.l2_email != null;}public void setL2_emailIsSet(boolean value) {if (!value) {this.l2_email = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case NAME:if (value == null) {unsetName();} else {setName((String)value);}break;case PHONE:if (value == null) {unsetPhone();} else {setPhone((String)value);}break;case EMAIL_ID:if (value == null) {unsetEmailId();} else {setEmailId((String)value);}break;case CODE:if (value == null) {unsetCode();} else {setCode((String)value);}break;case ACTIVATED:if (value == null) {unsetActivated();} else {setActivated((Boolean)value);}break;case L1_EMAIL:if (value == null) {unsetL1_email();} else {setL1_email((String)value);}break;case L2_EMAIL:if (value == null) {unsetL2_email();} else {setL2_email((String)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case NAME:return getName();case PHONE:return getPhone();case EMAIL_ID:return getEmailId();case CODE:return getCode();case ACTIVATED:return Boolean.valueOf(isActivated());case L1_EMAIL:return getL1_email();case L2_EMAIL:return getL2_email();}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 NAME:return isSetName();case PHONE:return isSetPhone();case EMAIL_ID:return isSetEmailId();case CODE:return isSetCode();case ACTIVATED:return isSetActivated();case L1_EMAIL:return isSetL1_email();case L2_EMAIL:return isSetL2_email();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof PmsaSearchFilter)return this.equals((PmsaSearchFilter)that);return false;}public boolean equals(PmsaSearchFilter that) {if (that == null)return false;boolean this_present_name = true && this.isSetName();boolean that_present_name = true && that.isSetName();if (this_present_name || that_present_name) {if (!(this_present_name && that_present_name))return false;if (!this.name.equals(that.name))return false;}boolean this_present_phone = true && this.isSetPhone();boolean that_present_phone = true && that.isSetPhone();if (this_present_phone || that_present_phone) {if (!(this_present_phone && that_present_phone))return false;if (!this.phone.equals(that.phone))return false;}boolean this_present_emailId = true && this.isSetEmailId();boolean that_present_emailId = true && that.isSetEmailId();if (this_present_emailId || that_present_emailId) {if (!(this_present_emailId && that_present_emailId))return false;if (!this.emailId.equals(that.emailId))return false;}boolean this_present_code = true && this.isSetCode();boolean that_present_code = true && that.isSetCode();if (this_present_code || that_present_code) {if (!(this_present_code && that_present_code))return false;if (!this.code.equals(that.code))return false;}boolean this_present_activated = true;boolean that_present_activated = true;if (this_present_activated || that_present_activated) {if (!(this_present_activated && that_present_activated))return false;if (this.activated != that.activated)return false;}boolean this_present_l1_email = true && this.isSetL1_email();boolean that_present_l1_email = true && that.isSetL1_email();if (this_present_l1_email || that_present_l1_email) {if (!(this_present_l1_email && that_present_l1_email))return false;if (!this.l1_email.equals(that.l1_email))return false;}boolean this_present_l2_email = true && this.isSetL2_email();boolean that_present_l2_email = true && that.isSetL2_email();if (this_present_l2_email || that_present_l2_email) {if (!(this_present_l2_email && that_present_l2_email))return false;if (!this.l2_email.equals(that.l2_email))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(PmsaSearchFilter other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;PmsaSearchFilter typedOther = (PmsaSearchFilter)other;lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());if (lastComparison != 0) {return lastComparison;}if (isSetName()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetPhone()).compareTo(typedOther.isSetPhone());if (lastComparison != 0) {return lastComparison;}if (isSetPhone()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.phone, typedOther.phone);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetEmailId()).compareTo(typedOther.isSetEmailId());if (lastComparison != 0) {return lastComparison;}if (isSetEmailId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.emailId, typedOther.emailId);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetCode()).compareTo(typedOther.isSetCode());if (lastComparison != 0) {return lastComparison;}if (isSetCode()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.code, typedOther.code);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetActivated()).compareTo(typedOther.isSetActivated());if (lastComparison != 0) {return lastComparison;}if (isSetActivated()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activated, typedOther.activated);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetL1_email()).compareTo(typedOther.isSetL1_email());if (lastComparison != 0) {return lastComparison;}if (isSetL1_email()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.l1_email, typedOther.l1_email);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetL2_email()).compareTo(typedOther.isSetL2_email());if (lastComparison != 0) {return lastComparison;}if (isSetL2_email()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.l2_email, typedOther.l2_email);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: // NAMEif (field.type == org.apache.thrift.protocol.TType.STRING) {this.name = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 2: // PHONEif (field.type == org.apache.thrift.protocol.TType.STRING) {this.phone = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 3: // EMAIL_IDif (field.type == org.apache.thrift.protocol.TType.STRING) {this.emailId = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 4: // CODEif (field.type == org.apache.thrift.protocol.TType.STRING) {this.code = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 5: // ACTIVATEDif (field.type == org.apache.thrift.protocol.TType.BOOL) {this.activated = iprot.readBool();setActivatedIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 6: // L1_EMAILif (field.type == org.apache.thrift.protocol.TType.STRING) {this.l1_email = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 7: // L2_EMAILif (field.type == org.apache.thrift.protocol.TType.STRING) {this.l2_email = iprot.readString();} 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);if (this.name != null) {oprot.writeFieldBegin(NAME_FIELD_DESC);oprot.writeString(this.name);oprot.writeFieldEnd();}if (this.phone != null) {oprot.writeFieldBegin(PHONE_FIELD_DESC);oprot.writeString(this.phone);oprot.writeFieldEnd();}if (this.emailId != null) {oprot.writeFieldBegin(EMAIL_ID_FIELD_DESC);oprot.writeString(this.emailId);oprot.writeFieldEnd();}if (this.code != null) {oprot.writeFieldBegin(CODE_FIELD_DESC);oprot.writeString(this.code);oprot.writeFieldEnd();}oprot.writeFieldBegin(ACTIVATED_FIELD_DESC);oprot.writeBool(this.activated);oprot.writeFieldEnd();if (this.l1_email != null) {oprot.writeFieldBegin(L1_EMAIL_FIELD_DESC);oprot.writeString(this.l1_email);oprot.writeFieldEnd();}if (this.l2_email != null) {oprot.writeFieldBegin(L2_EMAIL_FIELD_DESC);oprot.writeString(this.l2_email);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("PmsaSearchFilter(");boolean first = true;sb.append("name:");if (this.name == null) {sb.append("null");} else {sb.append(this.name);}first = false;if (!first) sb.append(", ");sb.append("phone:");if (this.phone == null) {sb.append("null");} else {sb.append(this.phone);}first = false;if (!first) sb.append(", ");sb.append("emailId:");if (this.emailId == null) {sb.append("null");} else {sb.append(this.emailId);}first = false;if (!first) sb.append(", ");sb.append("code:");if (this.code == null) {sb.append("null");} else {sb.append(this.code);}first = false;if (!first) sb.append(", ");sb.append("activated:");sb.append(this.activated);first = false;if (!first) sb.append(", ");sb.append("l1_email:");if (this.l1_email == null) {sb.append("null");} else {sb.append(this.l1_email);}first = false;if (!first) sb.append(", ");sb.append("l2_email:");if (this.l2_email == null) {sb.append("null");} else {sb.append(this.l2_email);}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);}}}