Rev 896 | 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.test;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.*;public class TestService {public interface Iface {public void sayHello(String message) throws TException;public String getUser(long id) throws TException;public long getAddressId() throws TException;public Address getAddress() throws TException;public void createUser(String name) throws TException;public void closeSession() throws TException;}public static class Client implements Iface {public Client(TProtocol prot){this(prot, prot);}public Client(TProtocol iprot, TProtocol oprot){iprot_ = iprot;oprot_ = oprot;}protected TProtocol iprot_;protected TProtocol oprot_;protected int seqid_;public TProtocol getInputProtocol(){return this.iprot_;}public TProtocol getOutputProtocol(){return this.oprot_;}public void sayHello(String message) throws TException{send_sayHello(message);recv_sayHello();}public void send_sayHello(String message) throws TException{oprot_.writeMessageBegin(new TMessage("sayHello", TMessageType.CALL, seqid_));sayHello_args args = new sayHello_args();args.message = message;args.write(oprot_);oprot_.writeMessageEnd();oprot_.getTransport().flush();}public void recv_sayHello() throws TException{TMessage msg = iprot_.readMessageBegin();if (msg.type == TMessageType.EXCEPTION) {TApplicationException x = TApplicationException.read(iprot_);iprot_.readMessageEnd();throw x;}sayHello_result result = new sayHello_result();result.read(iprot_);iprot_.readMessageEnd();return;}public String getUser(long id) throws TException{send_getUser(id);return recv_getUser();}public void send_getUser(long id) throws TException{oprot_.writeMessageBegin(new TMessage("getUser", TMessageType.CALL, seqid_));getUser_args args = new getUser_args();args.id = id;args.write(oprot_);oprot_.writeMessageEnd();oprot_.getTransport().flush();}public String recv_getUser() throws TException{TMessage msg = iprot_.readMessageBegin();if (msg.type == TMessageType.EXCEPTION) {TApplicationException x = TApplicationException.read(iprot_);iprot_.readMessageEnd();throw x;}getUser_result result = new getUser_result();result.read(iprot_);iprot_.readMessageEnd();if (result.isSetSuccess()) {return result.success;}throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUser failed: unknown result");}public long getAddressId() throws TException{send_getAddressId();return recv_getAddressId();}public void send_getAddressId() throws TException{oprot_.writeMessageBegin(new TMessage("getAddressId", TMessageType.CALL, seqid_));getAddressId_args args = new getAddressId_args();args.write(oprot_);oprot_.writeMessageEnd();oprot_.getTransport().flush();}public long recv_getAddressId() throws TException{TMessage msg = iprot_.readMessageBegin();if (msg.type == TMessageType.EXCEPTION) {TApplicationException x = TApplicationException.read(iprot_);iprot_.readMessageEnd();throw x;}getAddressId_result result = new getAddressId_result();result.read(iprot_);iprot_.readMessageEnd();if (result.isSetSuccess()) {return result.success;}throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAddressId failed: unknown result");}public Address getAddress() throws TException{send_getAddress();return recv_getAddress();}public void send_getAddress() throws TException{oprot_.writeMessageBegin(new TMessage("getAddress", TMessageType.CALL, seqid_));getAddress_args args = new getAddress_args();args.write(oprot_);oprot_.writeMessageEnd();oprot_.getTransport().flush();}public Address recv_getAddress() throws TException{TMessage msg = iprot_.readMessageBegin();if (msg.type == TMessageType.EXCEPTION) {TApplicationException x = TApplicationException.read(iprot_);iprot_.readMessageEnd();throw x;}getAddress_result result = new getAddress_result();result.read(iprot_);iprot_.readMessageEnd();if (result.isSetSuccess()) {return result.success;}throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAddress failed: unknown result");}public void createUser(String name) throws TException{send_createUser(name);recv_createUser();}public void send_createUser(String name) throws TException{oprot_.writeMessageBegin(new TMessage("createUser", TMessageType.CALL, seqid_));createUser_args args = new createUser_args();args.name = name;args.write(oprot_);oprot_.writeMessageEnd();oprot_.getTransport().flush();}public void recv_createUser() throws TException{TMessage msg = iprot_.readMessageBegin();if (msg.type == TMessageType.EXCEPTION) {TApplicationException x = TApplicationException.read(iprot_);iprot_.readMessageEnd();throw x;}createUser_result result = new createUser_result();result.read(iprot_);iprot_.readMessageEnd();return;}public void closeSession() throws TException{send_closeSession();recv_closeSession();}public void send_closeSession() throws TException{oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));closeSession_args args = new closeSession_args();args.write(oprot_);oprot_.writeMessageEnd();oprot_.getTransport().flush();}public void recv_closeSession() throws TException{TMessage msg = iprot_.readMessageBegin();if (msg.type == TMessageType.EXCEPTION) {TApplicationException x = TApplicationException.read(iprot_);iprot_.readMessageEnd();throw x;}closeSession_result result = new closeSession_result();result.read(iprot_);iprot_.readMessageEnd();return;}}public static class Processor implements TProcessor {private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());public Processor(Iface iface){iface_ = iface;processMap_.put("sayHello", new sayHello());processMap_.put("getUser", new getUser());processMap_.put("getAddressId", new getAddressId());processMap_.put("getAddress", new getAddress());processMap_.put("createUser", new createUser());processMap_.put("closeSession", new closeSession());}protected static interface ProcessFunction {public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;}private Iface iface_;protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();public boolean process(TProtocol iprot, TProtocol oprot) throws TException{TMessage msg = iprot.readMessageBegin();ProcessFunction fn = processMap_.get(msg.name);if (fn == null) {TProtocolUtil.skip(iprot, TType.STRUCT);iprot.readMessageEnd();TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));x.write(oprot);oprot.writeMessageEnd();oprot.getTransport().flush();return true;}fn.process(msg.seqid, iprot, oprot);return true;}private class sayHello implements ProcessFunction {public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException{sayHello_args args = new sayHello_args();args.read(iprot);iprot.readMessageEnd();sayHello_result result = new sayHello_result();iface_.sayHello(args.message);oprot.writeMessageBegin(new TMessage("sayHello", TMessageType.REPLY, seqid));result.write(oprot);oprot.writeMessageEnd();oprot.getTransport().flush();}}private class getUser implements ProcessFunction {public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException{getUser_args args = new getUser_args();args.read(iprot);iprot.readMessageEnd();getUser_result result = new getUser_result();result.success = iface_.getUser(args.id);oprot.writeMessageBegin(new TMessage("getUser", TMessageType.REPLY, seqid));result.write(oprot);oprot.writeMessageEnd();oprot.getTransport().flush();}}private class getAddressId implements ProcessFunction {public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException{getAddressId_args args = new getAddressId_args();args.read(iprot);iprot.readMessageEnd();getAddressId_result result = new getAddressId_result();result.success = iface_.getAddressId();result.setSuccessIsSet(true);oprot.writeMessageBegin(new TMessage("getAddressId", TMessageType.REPLY, seqid));result.write(oprot);oprot.writeMessageEnd();oprot.getTransport().flush();}}private class getAddress implements ProcessFunction {public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException{getAddress_args args = new getAddress_args();args.read(iprot);iprot.readMessageEnd();getAddress_result result = new getAddress_result();result.success = iface_.getAddress();oprot.writeMessageBegin(new TMessage("getAddress", TMessageType.REPLY, seqid));result.write(oprot);oprot.writeMessageEnd();oprot.getTransport().flush();}}private class createUser implements ProcessFunction {public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException{createUser_args args = new createUser_args();args.read(iprot);iprot.readMessageEnd();createUser_result result = new createUser_result();iface_.createUser(args.name);oprot.writeMessageBegin(new TMessage("createUser", TMessageType.REPLY, seqid));result.write(oprot);oprot.writeMessageEnd();oprot.getTransport().flush();}}private class closeSession implements ProcessFunction {public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException{closeSession_args args = new closeSession_args();args.read(iprot);iprot.readMessageEnd();closeSession_result result = new closeSession_result();iface_.closeSession();oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));result.write(oprot);oprot.writeMessageEnd();oprot.getTransport().flush();}}}public static class sayHello_args implements TBase<sayHello_args._Fields>, java.io.Serializable, Cloneable, Comparable<sayHello_args> {private static final TStruct STRUCT_DESC = new TStruct("sayHello_args");private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1);private String message;/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements TFieldIdEnum {MESSAGE((short)1, "message");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 assignmentspublic static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRING)));}});static {FieldMetaData.addStructMetaDataMap(sayHello_args.class, metaDataMap);}public sayHello_args() {}public sayHello_args(String message){this();this.message = message;}/*** Performs a deep copy on <i>other</i>.*/public sayHello_args(sayHello_args other) {if (other.isSetMessage()) {this.message = other.message;}}public sayHello_args deepCopy() {return new sayHello_args(this);}@Deprecatedpublic sayHello_args clone() {return new sayHello_args(this);}public String getMessage() {return this.message;}public sayHello_args setMessage(String message) {this.message = message;return this;}public void unsetMessage() {this.message = null;}/** Returns true if field message is set (has been asigned a value) and false otherwise */public boolean isSetMessage() {return this.message != null;}public void setMessageIsSet(boolean value) {if (!value) {this.message = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case MESSAGE:if (value == null) {unsetMessage();} else {setMessage((String)value);}break;}}public void setFieldValue(int fieldID, Object value) {setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);}public Object getFieldValue(_Fields field) {switch (field) {case MESSAGE:return getMessage();}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 MESSAGE:return isSetMessage();}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 sayHello_args)return this.equals((sayHello_args)that);return false;}public boolean equals(sayHello_args that) {if (that == null)return false;boolean this_present_message = true && this.isSetMessage();boolean that_present_message = true && that.isSetMessage();if (this_present_message || that_present_message) {if (!(this_present_message && that_present_message))return false;if (!this.message.equals(that.message))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(sayHello_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;sayHello_args typedOther = (sayHello_args)other;lastComparison = Boolean.valueOf(isSetMessage()).compareTo(isSetMessage());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(message, typedOther.message);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 MESSAGE:if (field.type == TType.STRING) {this.message = 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);if (this.message != null) {oprot.writeFieldBegin(MESSAGE_FIELD_DESC);oprot.writeString(this.message);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("sayHello_args(");boolean first = true;sb.append("message:");if (this.message == null) {sb.append("null");} else {sb.append(this.message);}first = false;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}public static class sayHello_result implements TBase<sayHello_result._Fields>, java.io.Serializable, Cloneable, Comparable<sayHello_result> {private static final TStruct STRUCT_DESC = new TStruct("sayHello_result");/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements TFieldIdEnum {;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;}}public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{}});static {FieldMetaData.addStructMetaDataMap(sayHello_result.class, metaDataMap);}public sayHello_result() {}/*** Performs a deep copy on <i>other</i>.*/public sayHello_result(sayHello_result other) {}public sayHello_result deepCopy() {return new sayHello_result(this);}@Deprecatedpublic sayHello_result clone() {return new sayHello_result(this);}public void setFieldValue(_Fields field, Object value) {switch (field) {}}public void setFieldValue(int fieldID, Object value) {setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);}public Object getFieldValue(_Fields field) {switch (field) {}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) {}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 sayHello_result)return this.equals((sayHello_result)that);return false;}public boolean equals(sayHello_result that) {if (that == null)return false;return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(sayHello_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;sayHello_result typedOther = (sayHello_result)other;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) {}iprot.readFieldEnd();}}iprot.readStructEnd();validate();}public void write(TProtocol oprot) throws TException {oprot.writeStructBegin(STRUCT_DESC);oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("sayHello_result(");boolean first = true;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}public static class getUser_args implements TBase<getUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUser_args> {private static final TStruct STRUCT_DESC = new TStruct("getUser_args");private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);private long id;/** 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");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 BitSet __isset_bit_vector = new BitSet(1);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)));}});static {FieldMetaData.addStructMetaDataMap(getUser_args.class, metaDataMap);}public getUser_args() {}public getUser_args(long id){this();this.id = id;setIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public getUser_args(getUser_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.id = other.id;}public getUser_args deepCopy() {return new getUser_args(this);}@Deprecatedpublic getUser_args clone() {return new getUser_args(this);}public long getId() {return this.id;}public getUser_args 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 void setFieldValue(_Fields field, Object value) {switch (field) {case ID:if (value == null) {unsetId();} else {setId((Long)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());}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();}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 getUser_args)return this.equals((getUser_args)that);return false;}public boolean equals(getUser_args 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;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getUser_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getUser_args typedOther = (getUser_args)other;lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(id, typedOther.id);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;}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();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getUser_args(");boolean first = true;sb.append("id:");sb.append(this.id);first = false;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}public static class getUser_result implements TBase<getUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUser_result> {private static final TStruct STRUCT_DESC = new TStruct("getUser_result");private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);private String success;/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements TFieldIdEnum {SUCCESS((short)0, "success");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 assignmentspublic static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRING)));}});static {FieldMetaData.addStructMetaDataMap(getUser_result.class, metaDataMap);}public getUser_result() {}public getUser_result(String success){this();this.success = success;}/*** Performs a deep copy on <i>other</i>.*/public getUser_result(getUser_result other) {if (other.isSetSuccess()) {this.success = other.success;}}public getUser_result deepCopy() {return new getUser_result(this);}@Deprecatedpublic getUser_result clone() {return new getUser_result(this);}public String getSuccess() {return this.success;}public getUser_result setSuccess(String success) {this.success = success;return this;}public void unsetSuccess() {this.success = null;}/** Returns true if field success is set (has been asigned a value) and false otherwise */public boolean isSetSuccess() {return this.success != null;}public void setSuccessIsSet(boolean value) {if (!value) {this.success = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((String)value);}break;}}public void setFieldValue(int fieldID, Object value) {setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);}public Object getFieldValue(_Fields field) {switch (field) {case SUCCESS:return getSuccess();}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 SUCCESS:return isSetSuccess();}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 getUser_result)return this.equals((getUser_result)that);return false;}public boolean equals(getUser_result that) {if (that == null)return false;boolean this_present_success = true && this.isSetSuccess();boolean that_present_success = true && that.isSetSuccess();if (this_present_success || that_present_success) {if (!(this_present_success && that_present_success))return false;if (!this.success.equals(that.success))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getUser_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getUser_result typedOther = (getUser_result)other;lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(success, typedOther.success);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 SUCCESS:if (field.type == TType.STRING) {this.success = iprot.readString();} else {TProtocolUtil.skip(iprot, field.type);}break;}iprot.readFieldEnd();}}iprot.readStructEnd();validate();}public void write(TProtocol oprot) throws TException {oprot.writeStructBegin(STRUCT_DESC);if (this.isSetSuccess()) {oprot.writeFieldBegin(SUCCESS_FIELD_DESC);oprot.writeString(this.success);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getUser_result(");boolean first = true;sb.append("success:");if (this.success == null) {sb.append("null");} else {sb.append(this.success);}first = false;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}public static class getAddressId_args implements TBase<getAddressId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAddressId_args> {private static final TStruct STRUCT_DESC = new TStruct("getAddressId_args");/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements TFieldIdEnum {;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;}}public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{}});static {FieldMetaData.addStructMetaDataMap(getAddressId_args.class, metaDataMap);}public getAddressId_args() {}/*** Performs a deep copy on <i>other</i>.*/public getAddressId_args(getAddressId_args other) {}public getAddressId_args deepCopy() {return new getAddressId_args(this);}@Deprecatedpublic getAddressId_args clone() {return new getAddressId_args(this);}public void setFieldValue(_Fields field, Object value) {switch (field) {}}public void setFieldValue(int fieldID, Object value) {setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);}public Object getFieldValue(_Fields field) {switch (field) {}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) {}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 getAddressId_args)return this.equals((getAddressId_args)that);return false;}public boolean equals(getAddressId_args that) {if (that == null)return false;return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getAddressId_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getAddressId_args typedOther = (getAddressId_args)other;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) {}iprot.readFieldEnd();}}iprot.readStructEnd();validate();}public void write(TProtocol oprot) throws TException {validate();oprot.writeStructBegin(STRUCT_DESC);oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getAddressId_args(");boolean first = true;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}public static class getAddressId_result implements TBase<getAddressId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAddressId_result> {private static final TStruct STRUCT_DESC = new TStruct("getAddressId_result");private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);private long success;/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements TFieldIdEnum {SUCCESS((short)0, "success");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 __SUCCESS_ISSET_ID = 0;private BitSet __isset_bit_vector = new BitSet(1);public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));}});static {FieldMetaData.addStructMetaDataMap(getAddressId_result.class, metaDataMap);}public getAddressId_result() {}public getAddressId_result(long success){this();this.success = success;setSuccessIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public getAddressId_result(getAddressId_result other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.success = other.success;}public getAddressId_result deepCopy() {return new getAddressId_result(this);}@Deprecatedpublic getAddressId_result clone() {return new getAddressId_result(this);}public long getSuccess() {return this.success;}public getAddressId_result setSuccess(long success) {this.success = success;setSuccessIsSet(true);return this;}public void unsetSuccess() {__isset_bit_vector.clear(__SUCCESS_ISSET_ID);}/** Returns true if field success is set (has been asigned a value) and false otherwise */public boolean isSetSuccess() {return __isset_bit_vector.get(__SUCCESS_ISSET_ID);}public void setSuccessIsSet(boolean value) {__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((Long)value);}break;}}public void setFieldValue(int fieldID, Object value) {setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);}public Object getFieldValue(_Fields field) {switch (field) {case SUCCESS:return new Long(getSuccess());}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 SUCCESS:return isSetSuccess();}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 getAddressId_result)return this.equals((getAddressId_result)that);return false;}public boolean equals(getAddressId_result that) {if (that == null)return false;boolean this_present_success = true;boolean that_present_success = true;if (this_present_success || that_present_success) {if (!(this_present_success && that_present_success))return false;if (this.success != that.success)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getAddressId_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getAddressId_result typedOther = (getAddressId_result)other;lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(success, typedOther.success);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 SUCCESS:if (field.type == TType.I64) {this.success = iprot.readI64();setSuccessIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;}iprot.readFieldEnd();}}iprot.readStructEnd();validate();}public void write(TProtocol oprot) throws TException {oprot.writeStructBegin(STRUCT_DESC);if (this.isSetSuccess()) {oprot.writeFieldBegin(SUCCESS_FIELD_DESC);oprot.writeI64(this.success);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getAddressId_result(");boolean first = true;sb.append("success:");sb.append(this.success);first = false;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}public static class getAddress_args implements TBase<getAddress_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAddress_args> {private static final TStruct STRUCT_DESC = new TStruct("getAddress_args");/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements TFieldIdEnum {;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;}}public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{}});static {FieldMetaData.addStructMetaDataMap(getAddress_args.class, metaDataMap);}public getAddress_args() {}/*** Performs a deep copy on <i>other</i>.*/public getAddress_args(getAddress_args other) {}public getAddress_args deepCopy() {return new getAddress_args(this);}@Deprecatedpublic getAddress_args clone() {return new getAddress_args(this);}public void setFieldValue(_Fields field, Object value) {switch (field) {}}public void setFieldValue(int fieldID, Object value) {setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);}public Object getFieldValue(_Fields field) {switch (field) {}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) {}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 getAddress_args)return this.equals((getAddress_args)that);return false;}public boolean equals(getAddress_args that) {if (that == null)return false;return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getAddress_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getAddress_args typedOther = (getAddress_args)other;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) {}iprot.readFieldEnd();}}iprot.readStructEnd();validate();}public void write(TProtocol oprot) throws TException {validate();oprot.writeStructBegin(STRUCT_DESC);oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getAddress_args(");boolean first = true;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}public static class getAddress_result implements TBase<getAddress_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAddress_result> {private static final TStruct STRUCT_DESC = new TStruct("getAddress_result");private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);private Address success;/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements TFieldIdEnum {SUCCESS((short)0, "success");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 assignmentspublic static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,new StructMetaData(TType.STRUCT, Address.class)));}});static {FieldMetaData.addStructMetaDataMap(getAddress_result.class, metaDataMap);}public getAddress_result() {}public getAddress_result(Address success){this();this.success = success;}/*** Performs a deep copy on <i>other</i>.*/public getAddress_result(getAddress_result other) {if (other.isSetSuccess()) {this.success = new Address(other.success);}}public getAddress_result deepCopy() {return new getAddress_result(this);}@Deprecatedpublic getAddress_result clone() {return new getAddress_result(this);}public Address getSuccess() {return this.success;}public getAddress_result setSuccess(Address success) {this.success = success;return this;}public void unsetSuccess() {this.success = null;}/** Returns true if field success is set (has been asigned a value) and false otherwise */public boolean isSetSuccess() {return this.success != null;}public void setSuccessIsSet(boolean value) {if (!value) {this.success = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((Address)value);}break;}}public void setFieldValue(int fieldID, Object value) {setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);}public Object getFieldValue(_Fields field) {switch (field) {case SUCCESS:return getSuccess();}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 SUCCESS:return isSetSuccess();}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 getAddress_result)return this.equals((getAddress_result)that);return false;}public boolean equals(getAddress_result that) {if (that == null)return false;boolean this_present_success = true && this.isSetSuccess();boolean that_present_success = true && that.isSetSuccess();if (this_present_success || that_present_success) {if (!(this_present_success && that_present_success))return false;if (!this.success.equals(that.success))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getAddress_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getAddress_result typedOther = (getAddress_result)other;lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(success, typedOther.success);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 SUCCESS:if (field.type == TType.STRUCT) {this.success = new Address();this.success.read(iprot);} else {TProtocolUtil.skip(iprot, field.type);}break;}iprot.readFieldEnd();}}iprot.readStructEnd();validate();}public void write(TProtocol oprot) throws TException {oprot.writeStructBegin(STRUCT_DESC);if (this.isSetSuccess()) {oprot.writeFieldBegin(SUCCESS_FIELD_DESC);this.success.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getAddress_result(");boolean first = true;sb.append("success:");if (this.success == null) {sb.append("null");} else {sb.append(this.success);}first = false;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}public static class createUser_args implements TBase<createUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_args> {private static final TStruct STRUCT_DESC = new TStruct("createUser_args");private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1);private String name;/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements TFieldIdEnum {NAME((short)1, "name");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 assignmentspublic static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRING)));}});static {FieldMetaData.addStructMetaDataMap(createUser_args.class, metaDataMap);}public createUser_args() {}public createUser_args(String name){this();this.name = name;}/*** Performs a deep copy on <i>other</i>.*/public createUser_args(createUser_args other) {if (other.isSetName()) {this.name = other.name;}}public createUser_args deepCopy() {return new createUser_args(this);}@Deprecatedpublic createUser_args clone() {return new createUser_args(this);}public String getName() {return this.name;}public createUser_args 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 void setFieldValue(_Fields field, Object value) {switch (field) {case NAME:if (value == null) {unsetName();} else {setName((String)value);}break;}}public void setFieldValue(int fieldID, Object value) {setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);}public Object getFieldValue(_Fields field) {switch (field) {case NAME:return getName();}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 NAME:return isSetName();}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 createUser_args)return this.equals((createUser_args)that);return false;}public boolean equals(createUser_args 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;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(createUser_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;createUser_args typedOther = (createUser_args)other;lastComparison = Boolean.valueOf(isSetName()).compareTo(isSetName());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(name, typedOther.name);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 NAME:if (field.type == TType.STRING) {this.name = 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);if (this.name != null) {oprot.writeFieldBegin(NAME_FIELD_DESC);oprot.writeString(this.name);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("createUser_args(");boolean first = true;sb.append("name:");if (this.name == null) {sb.append("null");} else {sb.append(this.name);}first = false;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}public static class createUser_result implements TBase<createUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_result> {private static final TStruct STRUCT_DESC = new TStruct("createUser_result");/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements TFieldIdEnum {;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;}}public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{}});static {FieldMetaData.addStructMetaDataMap(createUser_result.class, metaDataMap);}public createUser_result() {}/*** Performs a deep copy on <i>other</i>.*/public createUser_result(createUser_result other) {}public createUser_result deepCopy() {return new createUser_result(this);}@Deprecatedpublic createUser_result clone() {return new createUser_result(this);}public void setFieldValue(_Fields field, Object value) {switch (field) {}}public void setFieldValue(int fieldID, Object value) {setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);}public Object getFieldValue(_Fields field) {switch (field) {}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) {}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 createUser_result)return this.equals((createUser_result)that);return false;}public boolean equals(createUser_result that) {if (that == null)return false;return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(createUser_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;createUser_result typedOther = (createUser_result)other;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) {}iprot.readFieldEnd();}}iprot.readStructEnd();validate();}public void write(TProtocol oprot) throws TException {oprot.writeStructBegin(STRUCT_DESC);oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("createUser_result(");boolean first = true;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args> {private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements TFieldIdEnum {;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;}}public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{}});static {FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);}public closeSession_args() {}/*** Performs a deep copy on <i>other</i>.*/public closeSession_args(closeSession_args other) {}public closeSession_args deepCopy() {return new closeSession_args(this);}@Deprecatedpublic closeSession_args clone() {return new closeSession_args(this);}public void setFieldValue(_Fields field, Object value) {switch (field) {}}public void setFieldValue(int fieldID, Object value) {setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);}public Object getFieldValue(_Fields field) {switch (field) {}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) {}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 closeSession_args)return this.equals((closeSession_args)that);return false;}public boolean equals(closeSession_args that) {if (that == null)return false;return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(closeSession_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;closeSession_args typedOther = (closeSession_args)other;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) {}iprot.readFieldEnd();}}iprot.readStructEnd();validate();}public void write(TProtocol oprot) throws TException {validate();oprot.writeStructBegin(STRUCT_DESC);oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("closeSession_args(");boolean first = true;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result> {private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements TFieldIdEnum {;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;}}public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{}});static {FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);}public closeSession_result() {}/*** Performs a deep copy on <i>other</i>.*/public closeSession_result(closeSession_result other) {}public closeSession_result deepCopy() {return new closeSession_result(this);}@Deprecatedpublic closeSession_result clone() {return new closeSession_result(this);}public void setFieldValue(_Fields field, Object value) {switch (field) {}}public void setFieldValue(int fieldID, Object value) {setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);}public Object getFieldValue(_Fields field) {switch (field) {}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) {}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 closeSession_result)return this.equals((closeSession_result)that);return false;}public boolean equals(closeSession_result that) {if (that == null)return false;return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(closeSession_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;closeSession_result typedOther = (closeSession_result)other;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) {}iprot.readFieldEnd();}}iprot.readStructEnd();validate();}public void write(TProtocol oprot) throws TException {oprot.writeStructBegin(STRUCT_DESC);oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("closeSession_result(");boolean first = true;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}}