Rev 553 | Rev 3430 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
/*** Autogenerated by Thrift** 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.util.Arrays;import org.slf4j.Logger;import org.slf4j.LoggerFactory;import org.apache.thrift.*;import org.apache.thrift.meta_data.*;import org.apache.thrift.protocol.*;/*** Address*/public class Address implements TBase<Address._Fields>, java.io.Serializable, Cloneable, Comparable<Address> {private static final TStruct STRUCT_DESC = new TStruct("Address");private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);private static final TField LINE1_FIELD_DESC = new TField("line1", TType.STRING, (short)2);private static final TField LINE2_FIELD_DESC = new TField("line2", TType.STRING, (short)3);private static final TField LANDMARK_FIELD_DESC = new TField("landmark", TType.STRING, (short)4);private static final TField CITY_FIELD_DESC = new TField("city", TType.STRING, (short)5);private static final TField STATE_FIELD_DESC = new TField("state", TType.STRING, (short)6);private static final TField PIN_FIELD_DESC = new TField("pin", TType.STRING, (short)7);private static final TField COUNTRY_FIELD_DESC = new TField("country", TType.STRING, (short)8);private static final TField ENABLED_FIELD_DESC = new TField("enabled", TType.BOOL, (short)9);private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)10);private static final TField ADDED_ON_FIELD_DESC = new TField("addedOn", TType.I64, (short)11);private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)12);private static final TField PHONE_FIELD_DESC = new TField("phone", TType.STRING, (short)13);private long id;private String line1;private String line2;private String landmark;private String city;private String state;private String pin;private String country;private boolean enabled;private AddressType type;private long addedOn;private String name;private String phone;/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements TFieldIdEnum {ID((short)1, "id"),LINE1((short)2, "line1"),LINE2((short)3, "line2"),LANDMARK((short)4, "landmark"),CITY((short)5, "city"),STATE((short)6, "state"),PIN((short)7, "pin"),COUNTRY((short)8, "country"),ENABLED((short)9, "enabled"),/**** @see AddressType*/TYPE((short)10, "type"),ADDED_ON((short)11, "addedOn"),NAME((short)12, "name"),PHONE((short)13, "phone");private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byId.put((int)field._thriftId, field);byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {return byId.get(fieldId);}/*** 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 __ENABLED_ISSET_ID = 1;private static final int __ADDEDON_ISSET_ID = 2;private BitSet __isset_bit_vector = new BitSet(3);public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.LINE1, new FieldMetaData("line1", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRING)));put(_Fields.LINE2, new FieldMetaData("line2", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRING)));put(_Fields.LANDMARK, new FieldMetaData("landmark", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRING)));put(_Fields.CITY, new FieldMetaData("city", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRING)));put(_Fields.STATE, new FieldMetaData("state", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRING)));put(_Fields.PIN, new FieldMetaData("pin", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRING)));put(_Fields.COUNTRY, new FieldMetaData("country", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRING)));put(_Fields.ENABLED, new FieldMetaData("enabled", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.BOOL)));put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT,new EnumMetaData(TType.ENUM, AddressType.class)));put(_Fields.ADDED_ON, new FieldMetaData("addedOn", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRING)));put(_Fields.PHONE, new FieldMetaData("phone", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRING)));}});static {FieldMetaData.addStructMetaDataMap(Address.class, metaDataMap);}public Address() {}public Address(long id,String line1,String line2,String landmark,String city,String state,String pin,String country,boolean enabled,AddressType type,long addedOn,String name,String phone){this();this.id = id;setIdIsSet(true);this.line1 = line1;this.line2 = line2;this.landmark = landmark;this.city = city;this.state = state;this.pin = pin;this.country = country;this.enabled = enabled;setEnabledIsSet(true);this.type = type;this.addedOn = addedOn;setAddedOnIsSet(true);this.name = name;this.phone = phone;}/*** Performs a deep copy on <i>other</i>.*/public Address(Address other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.id = other.id;if (other.isSetLine1()) {this.line1 = other.line1;}if (other.isSetLine2()) {this.line2 = other.line2;}if (other.isSetLandmark()) {this.landmark = other.landmark;}if (other.isSetCity()) {this.city = other.city;}if (other.isSetState()) {this.state = other.state;}if (other.isSetPin()) {this.pin = other.pin;}if (other.isSetCountry()) {this.country = other.country;}this.enabled = other.enabled;if (other.isSetType()) {this.type = other.type;}this.addedOn = other.addedOn;if (other.isSetName()) {this.name = other.name;}if (other.isSetPhone()) {this.phone = other.phone;}}public Address deepCopy() {return new Address(this);}@Deprecatedpublic Address clone() {return new Address(this);}public long getId() {return this.id;}public Address setId(long id) {this.id = id;setIdIsSet(true);return this;}public void unsetId() {__isset_bit_vector.clear(__ID_ISSET_ID);}/** Returns true if field id is set (has been asigned 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 String getLine1() {return this.line1;}public Address setLine1(String line1) {this.line1 = line1;return this;}public void unsetLine1() {this.line1 = null;}/** Returns true if field line1 is set (has been asigned a value) and false otherwise */public boolean isSetLine1() {return this.line1 != null;}public void setLine1IsSet(boolean value) {if (!value) {this.line1 = null;}}public String getLine2() {return this.line2;}public Address setLine2(String line2) {this.line2 = line2;return this;}public void unsetLine2() {this.line2 = null;}/** Returns true if field line2 is set (has been asigned a value) and false otherwise */public boolean isSetLine2() {return this.line2 != null;}public void setLine2IsSet(boolean value) {if (!value) {this.line2 = null;}}public String getLandmark() {return this.landmark;}public Address setLandmark(String landmark) {this.landmark = landmark;return this;}public void unsetLandmark() {this.landmark = null;}/** Returns true if field landmark is set (has been asigned a value) and false otherwise */public boolean isSetLandmark() {return this.landmark != null;}public void setLandmarkIsSet(boolean value) {if (!value) {this.landmark = null;}}public String getCity() {return this.city;}public Address setCity(String city) {this.city = city;return this;}public void unsetCity() {this.city = null;}/** Returns true if field city is set (has been asigned a value) and false otherwise */public boolean isSetCity() {return this.city != null;}public void setCityIsSet(boolean value) {if (!value) {this.city = null;}}public String getState() {return this.state;}public Address setState(String state) {this.state = state;return this;}public void unsetState() {this.state = null;}/** Returns true if field state is set (has been asigned a value) and false otherwise */public boolean isSetState() {return this.state != null;}public void setStateIsSet(boolean value) {if (!value) {this.state = null;}}public String getPin() {return this.pin;}public Address setPin(String pin) {this.pin = pin;return this;}public void unsetPin() {this.pin = null;}/** Returns true if field pin is set (has been asigned a value) and false otherwise */public boolean isSetPin() {return this.pin != null;}public void setPinIsSet(boolean value) {if (!value) {this.pin = null;}}public String getCountry() {return this.country;}public Address setCountry(String country) {this.country = country;return this;}public void unsetCountry() {this.country = null;}/** Returns true if field country is set (has been asigned a value) and false otherwise */public boolean isSetCountry() {return this.country != null;}public void setCountryIsSet(boolean value) {if (!value) {this.country = null;}}public boolean isEnabled() {return this.enabled;}public Address setEnabled(boolean enabled) {this.enabled = enabled;setEnabledIsSet(true);return this;}public void unsetEnabled() {__isset_bit_vector.clear(__ENABLED_ISSET_ID);}/** Returns true if field enabled is set (has been asigned a value) and false otherwise */public boolean isSetEnabled() {return __isset_bit_vector.get(__ENABLED_ISSET_ID);}public void setEnabledIsSet(boolean value) {__isset_bit_vector.set(__ENABLED_ISSET_ID, value);}/**** @see AddressType*/public AddressType getType() {return this.type;}/**** @see AddressType*/public Address setType(AddressType type) {this.type = type;return this;}public void unsetType() {this.type = null;}/** Returns true if field type is set (has been asigned a value) and false otherwise */public boolean isSetType() {return this.type != null;}public void setTypeIsSet(boolean value) {if (!value) {this.type = null;}}public long getAddedOn() {return this.addedOn;}public Address setAddedOn(long addedOn) {this.addedOn = addedOn;setAddedOnIsSet(true);return this;}public void unsetAddedOn() {__isset_bit_vector.clear(__ADDEDON_ISSET_ID);}/** Returns true if field addedOn is set (has been asigned a value) and false otherwise */public boolean isSetAddedOn() {return __isset_bit_vector.get(__ADDEDON_ISSET_ID);}public void setAddedOnIsSet(boolean value) {__isset_bit_vector.set(__ADDEDON_ISSET_ID, value);}public String getName() {return this.name;}public Address setName(String name) {this.name = name;return this;}public void unsetName() {this.name = null;}/** Returns true if field name is set (has been asigned 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 Address setPhone(String phone) {this.phone = phone;return this;}public void unsetPhone() {this.phone = null;}/** Returns true if field phone is set (has been asigned a value) and false otherwise */public boolean isSetPhone() {return this.phone != null;}public void setPhoneIsSet(boolean value) {if (!value) {this.phone = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case ID:if (value == null) {unsetId();} else {setId((Long)value);}break;case LINE1:if (value == null) {unsetLine1();} else {setLine1((String)value);}break;case LINE2:if (value == null) {unsetLine2();} else {setLine2((String)value);}break;case LANDMARK:if (value == null) {unsetLandmark();} else {setLandmark((String)value);}break;case CITY:if (value == null) {unsetCity();} else {setCity((String)value);}break;case STATE:if (value == null) {unsetState();} else {setState((String)value);}break;case PIN:if (value == null) {unsetPin();} else {setPin((String)value);}break;case COUNTRY:if (value == null) {unsetCountry();} else {setCountry((String)value);}break;case ENABLED:if (value == null) {unsetEnabled();} else {setEnabled((Boolean)value);}break;case TYPE:if (value == null) {unsetType();} else {setType((AddressType)value);}break;case ADDED_ON:if (value == null) {unsetAddedOn();} else {setAddedOn((Long)value);}break;case NAME:if (value == null) {unsetName();} else {setName((String)value);}break;case PHONE:if (value == null) {unsetPhone();} else {setPhone((String)value);}break;}}public void setFieldValue(int fieldID, Object value) {setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);}public Object getFieldValue(_Fields field) {switch (field) {case ID:return new Long(getId());case LINE1:return getLine1();case LINE2:return getLine2();case LANDMARK:return getLandmark();case CITY:return getCity();case STATE:return getState();case PIN:return getPin();case COUNTRY:return getCountry();case ENABLED:return new Boolean(isEnabled());case TYPE:return getType();case ADDED_ON:return new Long(getAddedOn());case NAME:return getName();case PHONE:return getPhone();}throw new IllegalStateException();}public Object getFieldValue(int fieldId) {return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));}/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */public boolean isSet(_Fields field) {switch (field) {case ID:return isSetId();case LINE1:return isSetLine1();case LINE2:return isSetLine2();case LANDMARK:return isSetLandmark();case CITY:return isSetCity();case STATE:return isSetState();case PIN:return isSetPin();case COUNTRY:return isSetCountry();case ENABLED:return isSetEnabled();case TYPE:return isSetType();case ADDED_ON:return isSetAddedOn();case NAME:return isSetName();case PHONE:return isSetPhone();}throw new IllegalStateException();}public boolean isSet(int fieldID) {return isSet(_Fields.findByThriftIdOrThrow(fieldID));}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof Address)return this.equals((Address)that);return false;}public boolean equals(Address 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_line1 = true && this.isSetLine1();boolean that_present_line1 = true && that.isSetLine1();if (this_present_line1 || that_present_line1) {if (!(this_present_line1 && that_present_line1))return false;if (!this.line1.equals(that.line1))return false;}boolean this_present_line2 = true && this.isSetLine2();boolean that_present_line2 = true && that.isSetLine2();if (this_present_line2 || that_present_line2) {if (!(this_present_line2 && that_present_line2))return false;if (!this.line2.equals(that.line2))return false;}boolean this_present_landmark = true && this.isSetLandmark();boolean that_present_landmark = true && that.isSetLandmark();if (this_present_landmark || that_present_landmark) {if (!(this_present_landmark && that_present_landmark))return false;if (!this.landmark.equals(that.landmark))return false;}boolean this_present_city = true && this.isSetCity();boolean that_present_city = true && that.isSetCity();if (this_present_city || that_present_city) {if (!(this_present_city && that_present_city))return false;if (!this.city.equals(that.city))return false;}boolean this_present_state = true && this.isSetState();boolean that_present_state = true && that.isSetState();if (this_present_state || that_present_state) {if (!(this_present_state && that_present_state))return false;if (!this.state.equals(that.state))return false;}boolean this_present_pin = true && this.isSetPin();boolean that_present_pin = true && that.isSetPin();if (this_present_pin || that_present_pin) {if (!(this_present_pin && that_present_pin))return false;if (!this.pin.equals(that.pin))return false;}boolean this_present_country = true && this.isSetCountry();boolean that_present_country = true && that.isSetCountry();if (this_present_country || that_present_country) {if (!(this_present_country && that_present_country))return false;if (!this.country.equals(that.country))return false;}boolean this_present_enabled = true;boolean that_present_enabled = true;if (this_present_enabled || that_present_enabled) {if (!(this_present_enabled && that_present_enabled))return false;if (this.enabled != that.enabled)return false;}boolean this_present_type = true && this.isSetType();boolean that_present_type = true && that.isSetType();if (this_present_type || that_present_type) {if (!(this_present_type && that_present_type))return false;if (!this.type.equals(that.type))return false;}boolean this_present_addedOn = true;boolean that_present_addedOn = true;if (this_present_addedOn || that_present_addedOn) {if (!(this_present_addedOn && that_present_addedOn))return false;if (this.addedOn != that.addedOn)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;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(Address other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;Address typedOther = (Address)other;lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(id, typedOther.id);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetLine1()).compareTo(isSetLine1());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(line1, typedOther.line1);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetLine2()).compareTo(isSetLine2());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(line2, typedOther.line2);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetLandmark()).compareTo(isSetLandmark());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(landmark, typedOther.landmark);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetCity()).compareTo(isSetCity());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(city, typedOther.city);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetState()).compareTo(isSetState());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(state, typedOther.state);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetPin()).compareTo(isSetPin());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(pin, typedOther.pin);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetCountry()).compareTo(isSetCountry());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(country, typedOther.country);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetEnabled()).compareTo(isSetEnabled());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(enabled, typedOther.enabled);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(type, typedOther.type);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetAddedOn()).compareTo(isSetAddedOn());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(addedOn, typedOther.addedOn);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetName()).compareTo(isSetName());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(name, typedOther.name);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetPhone()).compareTo(isSetPhone());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(phone, typedOther.phone);if (lastComparison != 0) {return lastComparison;}return 0;}public void read(TProtocol iprot) throws TException {TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == TType.STOP) {break;}_Fields fieldId = _Fields.findByThriftId(field.id);if (fieldId == null) {TProtocolUtil.skip(iprot, field.type);} else {switch (fieldId) {case ID:if (field.type == TType.I64) {this.id = iprot.readI64();setIdIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case LINE1:if (field.type == TType.STRING) {this.line1 = iprot.readString();} else {TProtocolUtil.skip(iprot, field.type);}break;case LINE2:if (field.type == TType.STRING) {this.line2 = iprot.readString();} else {TProtocolUtil.skip(iprot, field.type);}break;case LANDMARK:if (field.type == TType.STRING) {this.landmark = iprot.readString();} else {TProtocolUtil.skip(iprot, field.type);}break;case CITY:if (field.type == TType.STRING) {this.city = iprot.readString();} else {TProtocolUtil.skip(iprot, field.type);}break;case STATE:if (field.type == TType.STRING) {this.state = iprot.readString();} else {TProtocolUtil.skip(iprot, field.type);}break;case PIN:if (field.type == TType.STRING) {this.pin = iprot.readString();} else {TProtocolUtil.skip(iprot, field.type);}break;case COUNTRY:if (field.type == TType.STRING) {this.country = iprot.readString();} else {TProtocolUtil.skip(iprot, field.type);}break;case ENABLED:if (field.type == TType.BOOL) {this.enabled = iprot.readBool();setEnabledIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case TYPE:if (field.type == TType.I32) {this.type = AddressType.findByValue(iprot.readI32());} else {TProtocolUtil.skip(iprot, field.type);}break;case ADDED_ON:if (field.type == TType.I64) {this.addedOn = iprot.readI64();setAddedOnIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case NAME:if (field.type == TType.STRING) {this.name = iprot.readString();} else {TProtocolUtil.skip(iprot, field.type);}break;case PHONE:if (field.type == TType.STRING) {this.phone = iprot.readString();} else {TProtocolUtil.skip(iprot, field.type);}break;}iprot.readFieldEnd();}}iprot.readStructEnd();validate();}public void write(TProtocol oprot) throws TException {validate();oprot.writeStructBegin(STRUCT_DESC);oprot.writeFieldBegin(ID_FIELD_DESC);oprot.writeI64(this.id);oprot.writeFieldEnd();if (this.line1 != null) {oprot.writeFieldBegin(LINE1_FIELD_DESC);oprot.writeString(this.line1);oprot.writeFieldEnd();}if (this.line2 != null) {oprot.writeFieldBegin(LINE2_FIELD_DESC);oprot.writeString(this.line2);oprot.writeFieldEnd();}if (this.landmark != null) {oprot.writeFieldBegin(LANDMARK_FIELD_DESC);oprot.writeString(this.landmark);oprot.writeFieldEnd();}if (this.city != null) {oprot.writeFieldBegin(CITY_FIELD_DESC);oprot.writeString(this.city);oprot.writeFieldEnd();}if (this.state != null) {oprot.writeFieldBegin(STATE_FIELD_DESC);oprot.writeString(this.state);oprot.writeFieldEnd();}if (this.pin != null) {oprot.writeFieldBegin(PIN_FIELD_DESC);oprot.writeString(this.pin);oprot.writeFieldEnd();}if (this.country != null) {oprot.writeFieldBegin(COUNTRY_FIELD_DESC);oprot.writeString(this.country);oprot.writeFieldEnd();}oprot.writeFieldBegin(ENABLED_FIELD_DESC);oprot.writeBool(this.enabled);oprot.writeFieldEnd();if (this.type != null) {oprot.writeFieldBegin(TYPE_FIELD_DESC);oprot.writeI32(this.type.getValue());oprot.writeFieldEnd();}oprot.writeFieldBegin(ADDED_ON_FIELD_DESC);oprot.writeI64(this.addedOn);oprot.writeFieldEnd();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();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("Address(");boolean first = true;sb.append("id:");sb.append(this.id);first = false;if (!first) sb.append(", ");sb.append("line1:");if (this.line1 == null) {sb.append("null");} else {sb.append(this.line1);}first = false;if (!first) sb.append(", ");sb.append("line2:");if (this.line2 == null) {sb.append("null");} else {sb.append(this.line2);}first = false;if (!first) sb.append(", ");sb.append("landmark:");if (this.landmark == null) {sb.append("null");} else {sb.append(this.landmark);}first = false;if (!first) sb.append(", ");sb.append("city:");if (this.city == null) {sb.append("null");} else {sb.append(this.city);}first = false;if (!first) sb.append(", ");sb.append("state:");if (this.state == null) {sb.append("null");} else {sb.append(this.state);}first = false;if (!first) sb.append(", ");sb.append("pin:");if (this.pin == null) {sb.append("null");} else {sb.append(this.pin);}first = false;if (!first) sb.append(", ");sb.append("country:");if (this.country == null) {sb.append("null");} else {sb.append(this.country);}first = false;if (!first) sb.append(", ");sb.append("enabled:");sb.append(this.enabled);first = false;if (!first) sb.append(", ");sb.append("type:");if (this.type == null) {sb.append("null");} else {String type_name = type.name();if (type_name != null) {sb.append(type_name);sb.append(" (");}sb.append(this.type);if (type_name != null) {sb.append(")");}}first = false;if (!first) sb.append(", ");sb.append("addedOn:");sb.append(this.addedOn);first = false;if (!first) sb.append(", ");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;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}