Rev 764 | Rev 1629 | 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.payments;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 PaymentService {public interface Iface {/*** For closing the open session in sqlalchemy*/public void closeSession() throws TException;/*** create a new payment and return payment id, throws an exception if gateway is not active*** @param userId* @param amount* @param gatewayId* @param txnId*/public long createPayment(long userId, double amount, long gatewayId, long txnId) throws PaymentException, TException;/*** get payment for user. If status and gateway are null, it is ignored. Same for times as well.*** @param userId* @param fromTime* @param toTime* @param status* @param gatewayId*/public List<Payment> getPaymentsForUser(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, TException;/*** get all payments for user. Gateway is mandatory.*** @param fromTime* @param toTime* @param status* @param gatewayId*/public List<Payment> getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, TException;/*** Get a particular gateway*** @param id*/public PaymentGateway getPaymentGateway(long id) throws PaymentException, TException;/*** Get a particular payment info*** @param id*/public Payment getPayment(long id) throws PaymentException, TException;/*** Get a particular payment for a transaction. Will raise exception.*** @param txnId*/public List<Payment> getPaymentForTxnId(long txnId) throws PaymentException, TException;/*** mark payment successful and store parameters*** @param id* @param gatewayPaymentId* @param sessionId* @param gatewayTxnStatus* @param description* @param gatewayTxnId* @param authCode* @param referenceCode* @param errorCode* @param status* @param attributes*/public boolean updatePaymentDetails(long id, String gatewayPaymentId, String sessionId, String gatewayTxnStatus, String description, String gatewayTxnId, String authCode, String referenceCode, String errorCode, PaymentStatus status, List<Attribute> attributes) throws PaymentException, 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 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 long createPayment(long userId, double amount, long gatewayId, long txnId) throws PaymentException, TException{send_createPayment(userId, amount, gatewayId, txnId);return recv_createPayment();}public void send_createPayment(long userId, double amount, long gatewayId, long txnId) throws TException{oprot_.writeMessageBegin(new TMessage("createPayment", TMessageType.CALL, seqid_));createPayment_args args = new createPayment_args();args.userId = userId;args.amount = amount;args.gatewayId = gatewayId;args.txnId = txnId;args.write(oprot_);oprot_.writeMessageEnd();oprot_.getTransport().flush();}public long recv_createPayment() throws PaymentException, TException{TMessage msg = iprot_.readMessageBegin();if (msg.type == TMessageType.EXCEPTION) {TApplicationException x = TApplicationException.read(iprot_);iprot_.readMessageEnd();throw x;}createPayment_result result = new createPayment_result();result.read(iprot_);iprot_.readMessageEnd();if (result.isSetSuccess()) {return result.success;}if (result.pe != null) {throw result.pe;}throw new TApplicationException(TApplicationException.MISSING_RESULT, "createPayment failed: unknown result");}public List<Payment> getPaymentsForUser(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, TException{send_getPaymentsForUser(userId, fromTime, toTime, status, gatewayId);return recv_getPaymentsForUser();}public void send_getPaymentsForUser(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId) throws TException{oprot_.writeMessageBegin(new TMessage("getPaymentsForUser", TMessageType.CALL, seqid_));getPaymentsForUser_args args = new getPaymentsForUser_args();args.userId = userId;args.fromTime = fromTime;args.toTime = toTime;args.status = status;args.gatewayId = gatewayId;args.write(oprot_);oprot_.writeMessageEnd();oprot_.getTransport().flush();}public List<Payment> recv_getPaymentsForUser() throws PaymentException, TException{TMessage msg = iprot_.readMessageBegin();if (msg.type == TMessageType.EXCEPTION) {TApplicationException x = TApplicationException.read(iprot_);iprot_.readMessageEnd();throw x;}getPaymentsForUser_result result = new getPaymentsForUser_result();result.read(iprot_);iprot_.readMessageEnd();if (result.isSetSuccess()) {return result.success;}if (result.pe != null) {throw result.pe;}throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentsForUser failed: unknown result");}public List<Payment> getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, TException{send_getPayments(fromTime, toTime, status, gatewayId);return recv_getPayments();}public void send_getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId) throws TException{oprot_.writeMessageBegin(new TMessage("getPayments", TMessageType.CALL, seqid_));getPayments_args args = new getPayments_args();args.fromTime = fromTime;args.toTime = toTime;args.status = status;args.gatewayId = gatewayId;args.write(oprot_);oprot_.writeMessageEnd();oprot_.getTransport().flush();}public List<Payment> recv_getPayments() throws PaymentException, TException{TMessage msg = iprot_.readMessageBegin();if (msg.type == TMessageType.EXCEPTION) {TApplicationException x = TApplicationException.read(iprot_);iprot_.readMessageEnd();throw x;}getPayments_result result = new getPayments_result();result.read(iprot_);iprot_.readMessageEnd();if (result.isSetSuccess()) {return result.success;}if (result.pe != null) {throw result.pe;}throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPayments failed: unknown result");}public PaymentGateway getPaymentGateway(long id) throws PaymentException, TException{send_getPaymentGateway(id);return recv_getPaymentGateway();}public void send_getPaymentGateway(long id) throws TException{oprot_.writeMessageBegin(new TMessage("getPaymentGateway", TMessageType.CALL, seqid_));getPaymentGateway_args args = new getPaymentGateway_args();args.id = id;args.write(oprot_);oprot_.writeMessageEnd();oprot_.getTransport().flush();}public PaymentGateway recv_getPaymentGateway() throws PaymentException, TException{TMessage msg = iprot_.readMessageBegin();if (msg.type == TMessageType.EXCEPTION) {TApplicationException x = TApplicationException.read(iprot_);iprot_.readMessageEnd();throw x;}getPaymentGateway_result result = new getPaymentGateway_result();result.read(iprot_);iprot_.readMessageEnd();if (result.isSetSuccess()) {return result.success;}if (result.pe != null) {throw result.pe;}throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentGateway failed: unknown result");}public Payment getPayment(long id) throws PaymentException, TException{send_getPayment(id);return recv_getPayment();}public void send_getPayment(long id) throws TException{oprot_.writeMessageBegin(new TMessage("getPayment", TMessageType.CALL, seqid_));getPayment_args args = new getPayment_args();args.id = id;args.write(oprot_);oprot_.writeMessageEnd();oprot_.getTransport().flush();}public Payment recv_getPayment() throws PaymentException, TException{TMessage msg = iprot_.readMessageBegin();if (msg.type == TMessageType.EXCEPTION) {TApplicationException x = TApplicationException.read(iprot_);iprot_.readMessageEnd();throw x;}getPayment_result result = new getPayment_result();result.read(iprot_);iprot_.readMessageEnd();if (result.isSetSuccess()) {return result.success;}if (result.pe != null) {throw result.pe;}throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPayment failed: unknown result");}public List<Payment> getPaymentForTxnId(long txnId) throws PaymentException, TException{send_getPaymentForTxnId(txnId);return recv_getPaymentForTxnId();}public void send_getPaymentForTxnId(long txnId) throws TException{oprot_.writeMessageBegin(new TMessage("getPaymentForTxnId", TMessageType.CALL, seqid_));getPaymentForTxnId_args args = new getPaymentForTxnId_args();args.txnId = txnId;args.write(oprot_);oprot_.writeMessageEnd();oprot_.getTransport().flush();}public List<Payment> recv_getPaymentForTxnId() throws PaymentException, TException{TMessage msg = iprot_.readMessageBegin();if (msg.type == TMessageType.EXCEPTION) {TApplicationException x = TApplicationException.read(iprot_);iprot_.readMessageEnd();throw x;}getPaymentForTxnId_result result = new getPaymentForTxnId_result();result.read(iprot_);iprot_.readMessageEnd();if (result.isSetSuccess()) {return result.success;}if (result.pe != null) {throw result.pe;}throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentForTxnId failed: unknown result");}public boolean updatePaymentDetails(long id, String gatewayPaymentId, String sessionId, String gatewayTxnStatus, String description, String gatewayTxnId, String authCode, String referenceCode, String errorCode, PaymentStatus status, List<Attribute> attributes) throws PaymentException, TException{send_updatePaymentDetails(id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, attributes);return recv_updatePaymentDetails();}public void send_updatePaymentDetails(long id, String gatewayPaymentId, String sessionId, String gatewayTxnStatus, String description, String gatewayTxnId, String authCode, String referenceCode, String errorCode, PaymentStatus status, List<Attribute> attributes) throws TException{oprot_.writeMessageBegin(new TMessage("updatePaymentDetails", TMessageType.CALL, seqid_));updatePaymentDetails_args args = new updatePaymentDetails_args();args.id = id;args.gatewayPaymentId = gatewayPaymentId;args.sessionId = sessionId;args.gatewayTxnStatus = gatewayTxnStatus;args.description = description;args.gatewayTxnId = gatewayTxnId;args.authCode = authCode;args.referenceCode = referenceCode;args.errorCode = errorCode;args.status = status;args.attributes = attributes;args.write(oprot_);oprot_.writeMessageEnd();oprot_.getTransport().flush();}public boolean recv_updatePaymentDetails() throws PaymentException, TException{TMessage msg = iprot_.readMessageBegin();if (msg.type == TMessageType.EXCEPTION) {TApplicationException x = TApplicationException.read(iprot_);iprot_.readMessageEnd();throw x;}updatePaymentDetails_result result = new updatePaymentDetails_result();result.read(iprot_);iprot_.readMessageEnd();if (result.isSetSuccess()) {return result.success;}if (result.pe != null) {throw result.pe;}throw new TApplicationException(TApplicationException.MISSING_RESULT, "updatePaymentDetails failed: unknown result");}}public static class Processor implements TProcessor {private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());public Processor(Iface iface){iface_ = iface;processMap_.put("closeSession", new closeSession());processMap_.put("createPayment", new createPayment());processMap_.put("getPaymentsForUser", new getPaymentsForUser());processMap_.put("getPayments", new getPayments());processMap_.put("getPaymentGateway", new getPaymentGateway());processMap_.put("getPayment", new getPayment());processMap_.put("getPaymentForTxnId", new getPaymentForTxnId());processMap_.put("updatePaymentDetails", new updatePaymentDetails());}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 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();}}private class createPayment implements ProcessFunction {public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException{createPayment_args args = new createPayment_args();args.read(iprot);iprot.readMessageEnd();createPayment_result result = new createPayment_result();try {result.success = iface_.createPayment(args.userId, args.amount, args.gatewayId, args.txnId);result.setSuccessIsSet(true);} catch (PaymentException pe) {result.pe = pe;} catch (Throwable th) {LOGGER.error("Internal error processing createPayment", th);TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createPayment");oprot.writeMessageBegin(new TMessage("createPayment", TMessageType.EXCEPTION, seqid));x.write(oprot);oprot.writeMessageEnd();oprot.getTransport().flush();return;}oprot.writeMessageBegin(new TMessage("createPayment", TMessageType.REPLY, seqid));result.write(oprot);oprot.writeMessageEnd();oprot.getTransport().flush();}}private class getPaymentsForUser implements ProcessFunction {public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException{getPaymentsForUser_args args = new getPaymentsForUser_args();args.read(iprot);iprot.readMessageEnd();getPaymentsForUser_result result = new getPaymentsForUser_result();try {result.success = iface_.getPaymentsForUser(args.userId, args.fromTime, args.toTime, args.status, args.gatewayId);} catch (PaymentException pe) {result.pe = pe;} catch (Throwable th) {LOGGER.error("Internal error processing getPaymentsForUser", th);TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPaymentsForUser");oprot.writeMessageBegin(new TMessage("getPaymentsForUser", TMessageType.EXCEPTION, seqid));x.write(oprot);oprot.writeMessageEnd();oprot.getTransport().flush();return;}oprot.writeMessageBegin(new TMessage("getPaymentsForUser", TMessageType.REPLY, seqid));result.write(oprot);oprot.writeMessageEnd();oprot.getTransport().flush();}}private class getPayments implements ProcessFunction {public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException{getPayments_args args = new getPayments_args();args.read(iprot);iprot.readMessageEnd();getPayments_result result = new getPayments_result();try {result.success = iface_.getPayments(args.fromTime, args.toTime, args.status, args.gatewayId);} catch (PaymentException pe) {result.pe = pe;} catch (Throwable th) {LOGGER.error("Internal error processing getPayments", th);TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPayments");oprot.writeMessageBegin(new TMessage("getPayments", TMessageType.EXCEPTION, seqid));x.write(oprot);oprot.writeMessageEnd();oprot.getTransport().flush();return;}oprot.writeMessageBegin(new TMessage("getPayments", TMessageType.REPLY, seqid));result.write(oprot);oprot.writeMessageEnd();oprot.getTransport().flush();}}private class getPaymentGateway implements ProcessFunction {public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException{getPaymentGateway_args args = new getPaymentGateway_args();args.read(iprot);iprot.readMessageEnd();getPaymentGateway_result result = new getPaymentGateway_result();try {result.success = iface_.getPaymentGateway(args.id);} catch (PaymentException pe) {result.pe = pe;} catch (Throwable th) {LOGGER.error("Internal error processing getPaymentGateway", th);TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPaymentGateway");oprot.writeMessageBegin(new TMessage("getPaymentGateway", TMessageType.EXCEPTION, seqid));x.write(oprot);oprot.writeMessageEnd();oprot.getTransport().flush();return;}oprot.writeMessageBegin(new TMessage("getPaymentGateway", TMessageType.REPLY, seqid));result.write(oprot);oprot.writeMessageEnd();oprot.getTransport().flush();}}private class getPayment implements ProcessFunction {public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException{getPayment_args args = new getPayment_args();args.read(iprot);iprot.readMessageEnd();getPayment_result result = new getPayment_result();try {result.success = iface_.getPayment(args.id);} catch (PaymentException pe) {result.pe = pe;} catch (Throwable th) {LOGGER.error("Internal error processing getPayment", th);TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPayment");oprot.writeMessageBegin(new TMessage("getPayment", TMessageType.EXCEPTION, seqid));x.write(oprot);oprot.writeMessageEnd();oprot.getTransport().flush();return;}oprot.writeMessageBegin(new TMessage("getPayment", TMessageType.REPLY, seqid));result.write(oprot);oprot.writeMessageEnd();oprot.getTransport().flush();}}private class getPaymentForTxnId implements ProcessFunction {public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException{getPaymentForTxnId_args args = new getPaymentForTxnId_args();args.read(iprot);iprot.readMessageEnd();getPaymentForTxnId_result result = new getPaymentForTxnId_result();try {result.success = iface_.getPaymentForTxnId(args.txnId);} catch (PaymentException pe) {result.pe = pe;} catch (Throwable th) {LOGGER.error("Internal error processing getPaymentForTxnId", th);TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPaymentForTxnId");oprot.writeMessageBegin(new TMessage("getPaymentForTxnId", TMessageType.EXCEPTION, seqid));x.write(oprot);oprot.writeMessageEnd();oprot.getTransport().flush();return;}oprot.writeMessageBegin(new TMessage("getPaymentForTxnId", TMessageType.REPLY, seqid));result.write(oprot);oprot.writeMessageEnd();oprot.getTransport().flush();}}private class updatePaymentDetails implements ProcessFunction {public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException{updatePaymentDetails_args args = new updatePaymentDetails_args();args.read(iprot);iprot.readMessageEnd();updatePaymentDetails_result result = new updatePaymentDetails_result();try {result.success = iface_.updatePaymentDetails(args.id, args.gatewayPaymentId, args.sessionId, args.gatewayTxnStatus, args.description, args.gatewayTxnId, args.authCode, args.referenceCode, args.errorCode, args.status, args.attributes);result.setSuccessIsSet(true);} catch (PaymentException pe) {result.pe = pe;} catch (Throwable th) {LOGGER.error("Internal error processing updatePaymentDetails", th);TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updatePaymentDetails");oprot.writeMessageBegin(new TMessage("updatePaymentDetails", TMessageType.EXCEPTION, seqid));x.write(oprot);oprot.writeMessageEnd();oprot.getTransport().flush();return;}oprot.writeMessageBegin(new TMessage("updatePaymentDetails", TMessageType.REPLY, seqid));result.write(oprot);oprot.writeMessageEnd();oprot.getTransport().flush();}}}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}}public static class createPayment_args implements TBase<createPayment_args._Fields>, java.io.Serializable, Cloneable, Comparable<createPayment_args> {private static final TStruct STRUCT_DESC = new TStruct("createPayment_args");private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);private static final TField AMOUNT_FIELD_DESC = new TField("amount", TType.DOUBLE, (short)2);private static final TField GATEWAY_ID_FIELD_DESC = new TField("gatewayId", TType.I64, (short)3);private static final TField TXN_ID_FIELD_DESC = new TField("txnId", TType.I64, (short)4);private long userId;private double amount;private long gatewayId;private long txnId;/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements TFieldIdEnum {USER_ID((short)1, "userId"),AMOUNT((short)2, "amount"),GATEWAY_ID((short)3, "gatewayId"),TXN_ID((short)4, "txnId");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 __USERID_ISSET_ID = 0;private static final int __AMOUNT_ISSET_ID = 1;private static final int __GATEWAYID_ISSET_ID = 2;private static final int __TXNID_ISSET_ID = 3;private BitSet __isset_bit_vector = new BitSet(4);public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.AMOUNT, new FieldMetaData("amount", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.DOUBLE)));put(_Fields.GATEWAY_ID, new FieldMetaData("gatewayId", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.TXN_ID, new FieldMetaData("txnId", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));}});static {FieldMetaData.addStructMetaDataMap(createPayment_args.class, metaDataMap);}public createPayment_args() {}public createPayment_args(long userId,double amount,long gatewayId,long txnId){this();this.userId = userId;setUserIdIsSet(true);this.amount = amount;setAmountIsSet(true);this.gatewayId = gatewayId;setGatewayIdIsSet(true);this.txnId = txnId;setTxnIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public createPayment_args(createPayment_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.userId = other.userId;this.amount = other.amount;this.gatewayId = other.gatewayId;this.txnId = other.txnId;}public createPayment_args deepCopy() {return new createPayment_args(this);}@Deprecatedpublic createPayment_args clone() {return new createPayment_args(this);}public long getUserId() {return this.userId;}public createPayment_args setUserId(long userId) {this.userId = userId;setUserIdIsSet(true);return this;}public void unsetUserId() {__isset_bit_vector.clear(__USERID_ISSET_ID);}/** Returns true if field userId is set (has been asigned a value) and false otherwise */public boolean isSetUserId() {return __isset_bit_vector.get(__USERID_ISSET_ID);}public void setUserIdIsSet(boolean value) {__isset_bit_vector.set(__USERID_ISSET_ID, value);}public double getAmount() {return this.amount;}public createPayment_args setAmount(double amount) {this.amount = amount;setAmountIsSet(true);return this;}public void unsetAmount() {__isset_bit_vector.clear(__AMOUNT_ISSET_ID);}/** Returns true if field amount is set (has been asigned a value) and false otherwise */public boolean isSetAmount() {return __isset_bit_vector.get(__AMOUNT_ISSET_ID);}public void setAmountIsSet(boolean value) {__isset_bit_vector.set(__AMOUNT_ISSET_ID, value);}public long getGatewayId() {return this.gatewayId;}public createPayment_args setGatewayId(long gatewayId) {this.gatewayId = gatewayId;setGatewayIdIsSet(true);return this;}public void unsetGatewayId() {__isset_bit_vector.clear(__GATEWAYID_ISSET_ID);}/** Returns true if field gatewayId is set (has been asigned a value) and false otherwise */public boolean isSetGatewayId() {return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);}public void setGatewayIdIsSet(boolean value) {__isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);}public long getTxnId() {return this.txnId;}public createPayment_args setTxnId(long txnId) {this.txnId = txnId;setTxnIdIsSet(true);return this;}public void unsetTxnId() {__isset_bit_vector.clear(__TXNID_ISSET_ID);}/** Returns true if field txnId is set (has been asigned a value) and false otherwise */public boolean isSetTxnId() {return __isset_bit_vector.get(__TXNID_ISSET_ID);}public void setTxnIdIsSet(boolean value) {__isset_bit_vector.set(__TXNID_ISSET_ID, value);}public void setFieldValue(_Fields field, Object value) {switch (field) {case USER_ID:if (value == null) {unsetUserId();} else {setUserId((Long)value);}break;case AMOUNT:if (value == null) {unsetAmount();} else {setAmount((Double)value);}break;case GATEWAY_ID:if (value == null) {unsetGatewayId();} else {setGatewayId((Long)value);}break;case TXN_ID:if (value == null) {unsetTxnId();} else {setTxnId((Long)value);}break;}}public void setFieldValue(int fieldID, Object value) {setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);}public Object getFieldValue(_Fields field) {switch (field) {case USER_ID:return new Long(getUserId());case AMOUNT:return new Double(getAmount());case GATEWAY_ID:return new Long(getGatewayId());case TXN_ID:return new Long(getTxnId());}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 USER_ID:return isSetUserId();case AMOUNT:return isSetAmount();case GATEWAY_ID:return isSetGatewayId();case TXN_ID:return isSetTxnId();}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 createPayment_args)return this.equals((createPayment_args)that);return false;}public boolean equals(createPayment_args that) {if (that == null)return false;boolean this_present_userId = true;boolean that_present_userId = true;if (this_present_userId || that_present_userId) {if (!(this_present_userId && that_present_userId))return false;if (this.userId != that.userId)return false;}boolean this_present_amount = true;boolean that_present_amount = true;if (this_present_amount || that_present_amount) {if (!(this_present_amount && that_present_amount))return false;if (this.amount != that.amount)return false;}boolean this_present_gatewayId = true;boolean that_present_gatewayId = true;if (this_present_gatewayId || that_present_gatewayId) {if (!(this_present_gatewayId && that_present_gatewayId))return false;if (this.gatewayId != that.gatewayId)return false;}boolean this_present_txnId = true;boolean that_present_txnId = true;if (this_present_txnId || that_present_txnId) {if (!(this_present_txnId && that_present_txnId))return false;if (this.txnId != that.txnId)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(createPayment_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;createPayment_args typedOther = (createPayment_args)other;lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetAmount()).compareTo(isSetAmount());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(amount, typedOther.amount);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(isSetGatewayId());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(gatewayId, typedOther.gatewayId);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(isSetTxnId());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(txnId, typedOther.txnId);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 USER_ID:if (field.type == TType.I64) {this.userId = iprot.readI64();setUserIdIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case AMOUNT:if (field.type == TType.DOUBLE) {this.amount = iprot.readDouble();setAmountIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case GATEWAY_ID:if (field.type == TType.I64) {this.gatewayId = iprot.readI64();setGatewayIdIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case TXN_ID:if (field.type == TType.I64) {this.txnId = iprot.readI64();setTxnIdIsSet(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(USER_ID_FIELD_DESC);oprot.writeI64(this.userId);oprot.writeFieldEnd();oprot.writeFieldBegin(AMOUNT_FIELD_DESC);oprot.writeDouble(this.amount);oprot.writeFieldEnd();oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);oprot.writeI64(this.gatewayId);oprot.writeFieldEnd();oprot.writeFieldBegin(TXN_ID_FIELD_DESC);oprot.writeI64(this.txnId);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("createPayment_args(");boolean first = true;sb.append("userId:");sb.append(this.userId);first = false;if (!first) sb.append(", ");sb.append("amount:");sb.append(this.amount);first = false;if (!first) sb.append(", ");sb.append("gatewayId:");sb.append(this.gatewayId);first = false;if (!first) sb.append(", ");sb.append("txnId:");sb.append(this.txnId);first = false;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}public static class createPayment_result implements TBase<createPayment_result._Fields>, java.io.Serializable, Cloneable, Comparable<createPayment_result> {private static final TStruct STRUCT_DESC = new TStruct("createPayment_result");private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);private long success;private PaymentException pe;/** 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"),PE((short)1, "pe");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)));put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRUCT)));}});static {FieldMetaData.addStructMetaDataMap(createPayment_result.class, metaDataMap);}public createPayment_result() {}public createPayment_result(long success,PaymentException pe){this();this.success = success;setSuccessIsSet(true);this.pe = pe;}/*** Performs a deep copy on <i>other</i>.*/public createPayment_result(createPayment_result other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.success = other.success;if (other.isSetPe()) {this.pe = new PaymentException(other.pe);}}public createPayment_result deepCopy() {return new createPayment_result(this);}@Deprecatedpublic createPayment_result clone() {return new createPayment_result(this);}public long getSuccess() {return this.success;}public createPayment_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 PaymentException getPe() {return this.pe;}public createPayment_result setPe(PaymentException pe) {this.pe = pe;return this;}public void unsetPe() {this.pe = null;}/** Returns true if field pe is set (has been asigned a value) and false otherwise */public boolean isSetPe() {return this.pe != null;}public void setPeIsSet(boolean value) {if (!value) {this.pe = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((Long)value);}break;case PE:if (value == null) {unsetPe();} else {setPe((PaymentException)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());case PE:return getPe();}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();case PE:return isSetPe();}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 createPayment_result)return this.equals((createPayment_result)that);return false;}public boolean equals(createPayment_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;}boolean this_present_pe = true && this.isSetPe();boolean that_present_pe = true && that.isSetPe();if (this_present_pe || that_present_pe) {if (!(this_present_pe && that_present_pe))return false;if (!this.pe.equals(that.pe))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(createPayment_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;createPayment_result typedOther = (createPayment_result)other;lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(success, typedOther.success);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);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;case PE:if (field.type == TType.STRUCT) {this.pe = new PaymentException();this.pe.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);oprot.writeI64(this.success);oprot.writeFieldEnd();} else if (this.isSetPe()) {oprot.writeFieldBegin(PE_FIELD_DESC);this.pe.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("createPayment_result(");boolean first = true;sb.append("success:");sb.append(this.success);first = false;if (!first) sb.append(", ");sb.append("pe:");if (this.pe == null) {sb.append("null");} else {sb.append(this.pe);}first = false;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}public static class getPaymentsForUser_args implements TBase<getPaymentsForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPaymentsForUser_args> {private static final TStruct STRUCT_DESC = new TStruct("getPaymentsForUser_args");private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);private static final TField FROM_TIME_FIELD_DESC = new TField("fromTime", TType.I64, (short)2);private static final TField TO_TIME_FIELD_DESC = new TField("toTime", TType.I64, (short)3);private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);private static final TField GATEWAY_ID_FIELD_DESC = new TField("gatewayId", TType.I64, (short)5);private long userId;private long fromTime;private long toTime;private PaymentStatus status;private long gatewayId;/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements TFieldIdEnum {USER_ID((short)1, "userId"),FROM_TIME((short)2, "fromTime"),TO_TIME((short)3, "toTime"),/**** @see PaymentStatus*/STATUS((short)4, "status"),GATEWAY_ID((short)5, "gatewayId");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 __USERID_ISSET_ID = 0;private static final int __FROMTIME_ISSET_ID = 1;private static final int __TOTIME_ISSET_ID = 2;private static final int __GATEWAYID_ISSET_ID = 3;private BitSet __isset_bit_vector = new BitSet(4);public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.FROM_TIME, new FieldMetaData("fromTime", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.TO_TIME, new FieldMetaData("toTime", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT,new EnumMetaData(TType.ENUM, PaymentStatus.class)));put(_Fields.GATEWAY_ID, new FieldMetaData("gatewayId", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));}});static {FieldMetaData.addStructMetaDataMap(getPaymentsForUser_args.class, metaDataMap);}public getPaymentsForUser_args() {}public getPaymentsForUser_args(long userId,long fromTime,long toTime,PaymentStatus status,long gatewayId){this();this.userId = userId;setUserIdIsSet(true);this.fromTime = fromTime;setFromTimeIsSet(true);this.toTime = toTime;setToTimeIsSet(true);this.status = status;this.gatewayId = gatewayId;setGatewayIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public getPaymentsForUser_args(getPaymentsForUser_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.userId = other.userId;this.fromTime = other.fromTime;this.toTime = other.toTime;if (other.isSetStatus()) {this.status = other.status;}this.gatewayId = other.gatewayId;}public getPaymentsForUser_args deepCopy() {return new getPaymentsForUser_args(this);}@Deprecatedpublic getPaymentsForUser_args clone() {return new getPaymentsForUser_args(this);}public long getUserId() {return this.userId;}public getPaymentsForUser_args setUserId(long userId) {this.userId = userId;setUserIdIsSet(true);return this;}public void unsetUserId() {__isset_bit_vector.clear(__USERID_ISSET_ID);}/** Returns true if field userId is set (has been asigned a value) and false otherwise */public boolean isSetUserId() {return __isset_bit_vector.get(__USERID_ISSET_ID);}public void setUserIdIsSet(boolean value) {__isset_bit_vector.set(__USERID_ISSET_ID, value);}public long getFromTime() {return this.fromTime;}public getPaymentsForUser_args setFromTime(long fromTime) {this.fromTime = fromTime;setFromTimeIsSet(true);return this;}public void unsetFromTime() {__isset_bit_vector.clear(__FROMTIME_ISSET_ID);}/** Returns true if field fromTime is set (has been asigned a value) and false otherwise */public boolean isSetFromTime() {return __isset_bit_vector.get(__FROMTIME_ISSET_ID);}public void setFromTimeIsSet(boolean value) {__isset_bit_vector.set(__FROMTIME_ISSET_ID, value);}public long getToTime() {return this.toTime;}public getPaymentsForUser_args setToTime(long toTime) {this.toTime = toTime;setToTimeIsSet(true);return this;}public void unsetToTime() {__isset_bit_vector.clear(__TOTIME_ISSET_ID);}/** Returns true if field toTime is set (has been asigned a value) and false otherwise */public boolean isSetToTime() {return __isset_bit_vector.get(__TOTIME_ISSET_ID);}public void setToTimeIsSet(boolean value) {__isset_bit_vector.set(__TOTIME_ISSET_ID, value);}/**** @see PaymentStatus*/public PaymentStatus getStatus() {return this.status;}/**** @see PaymentStatus*/public getPaymentsForUser_args setStatus(PaymentStatus status) {this.status = status;return this;}public void unsetStatus() {this.status = null;}/** Returns true if field status is set (has been asigned a value) and false otherwise */public boolean isSetStatus() {return this.status != null;}public void setStatusIsSet(boolean value) {if (!value) {this.status = null;}}public long getGatewayId() {return this.gatewayId;}public getPaymentsForUser_args setGatewayId(long gatewayId) {this.gatewayId = gatewayId;setGatewayIdIsSet(true);return this;}public void unsetGatewayId() {__isset_bit_vector.clear(__GATEWAYID_ISSET_ID);}/** Returns true if field gatewayId is set (has been asigned a value) and false otherwise */public boolean isSetGatewayId() {return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);}public void setGatewayIdIsSet(boolean value) {__isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);}public void setFieldValue(_Fields field, Object value) {switch (field) {case USER_ID:if (value == null) {unsetUserId();} else {setUserId((Long)value);}break;case FROM_TIME:if (value == null) {unsetFromTime();} else {setFromTime((Long)value);}break;case TO_TIME:if (value == null) {unsetToTime();} else {setToTime((Long)value);}break;case STATUS:if (value == null) {unsetStatus();} else {setStatus((PaymentStatus)value);}break;case GATEWAY_ID:if (value == null) {unsetGatewayId();} else {setGatewayId((Long)value);}break;}}public void setFieldValue(int fieldID, Object value) {setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);}public Object getFieldValue(_Fields field) {switch (field) {case USER_ID:return new Long(getUserId());case FROM_TIME:return new Long(getFromTime());case TO_TIME:return new Long(getToTime());case STATUS:return getStatus();case GATEWAY_ID:return new Long(getGatewayId());}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 USER_ID:return isSetUserId();case FROM_TIME:return isSetFromTime();case TO_TIME:return isSetToTime();case STATUS:return isSetStatus();case GATEWAY_ID:return isSetGatewayId();}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 getPaymentsForUser_args)return this.equals((getPaymentsForUser_args)that);return false;}public boolean equals(getPaymentsForUser_args that) {if (that == null)return false;boolean this_present_userId = true;boolean that_present_userId = true;if (this_present_userId || that_present_userId) {if (!(this_present_userId && that_present_userId))return false;if (this.userId != that.userId)return false;}boolean this_present_fromTime = true;boolean that_present_fromTime = true;if (this_present_fromTime || that_present_fromTime) {if (!(this_present_fromTime && that_present_fromTime))return false;if (this.fromTime != that.fromTime)return false;}boolean this_present_toTime = true;boolean that_present_toTime = true;if (this_present_toTime || that_present_toTime) {if (!(this_present_toTime && that_present_toTime))return false;if (this.toTime != that.toTime)return false;}boolean this_present_status = true && this.isSetStatus();boolean that_present_status = true && that.isSetStatus();if (this_present_status || that_present_status) {if (!(this_present_status && that_present_status))return false;if (!this.status.equals(that.status))return false;}boolean this_present_gatewayId = true;boolean that_present_gatewayId = true;if (this_present_gatewayId || that_present_gatewayId) {if (!(this_present_gatewayId && that_present_gatewayId))return false;if (this.gatewayId != that.gatewayId)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getPaymentsForUser_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getPaymentsForUser_args typedOther = (getPaymentsForUser_args)other;lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetFromTime()).compareTo(isSetFromTime());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(fromTime, typedOther.fromTime);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetToTime()).compareTo(isSetToTime());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(toTime, typedOther.toTime);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(status, typedOther.status);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(isSetGatewayId());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(gatewayId, typedOther.gatewayId);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 USER_ID:if (field.type == TType.I64) {this.userId = iprot.readI64();setUserIdIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case FROM_TIME:if (field.type == TType.I64) {this.fromTime = iprot.readI64();setFromTimeIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case TO_TIME:if (field.type == TType.I64) {this.toTime = iprot.readI64();setToTimeIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case STATUS:if (field.type == TType.I32) {this.status = PaymentStatus.findByValue(iprot.readI32());} else {TProtocolUtil.skip(iprot, field.type);}break;case GATEWAY_ID:if (field.type == TType.I64) {this.gatewayId = iprot.readI64();setGatewayIdIsSet(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(USER_ID_FIELD_DESC);oprot.writeI64(this.userId);oprot.writeFieldEnd();oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);oprot.writeI64(this.fromTime);oprot.writeFieldEnd();oprot.writeFieldBegin(TO_TIME_FIELD_DESC);oprot.writeI64(this.toTime);oprot.writeFieldEnd();if (this.status != null) {oprot.writeFieldBegin(STATUS_FIELD_DESC);oprot.writeI32(this.status.getValue());oprot.writeFieldEnd();}oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);oprot.writeI64(this.gatewayId);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getPaymentsForUser_args(");boolean first = true;sb.append("userId:");sb.append(this.userId);first = false;if (!first) sb.append(", ");sb.append("fromTime:");sb.append(this.fromTime);first = false;if (!first) sb.append(", ");sb.append("toTime:");sb.append(this.toTime);first = false;if (!first) sb.append(", ");sb.append("status:");if (this.status == null) {sb.append("null");} else {String status_name = status.name();if (status_name != null) {sb.append(status_name);sb.append(" (");}sb.append(this.status);if (status_name != null) {sb.append(")");}}first = false;if (!first) sb.append(", ");sb.append("gatewayId:");sb.append(this.gatewayId);first = false;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}public static class getPaymentsForUser_result implements TBase<getPaymentsForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPaymentsForUser_result> {private static final TStruct STRUCT_DESC = new TStruct("getPaymentsForUser_result");private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);private List<Payment> success;private PaymentException pe;/** 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"),PE((short)1, "pe");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 ListMetaData(TType.LIST,new StructMetaData(TType.STRUCT, Payment.class))));put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRUCT)));}});static {FieldMetaData.addStructMetaDataMap(getPaymentsForUser_result.class, metaDataMap);}public getPaymentsForUser_result() {}public getPaymentsForUser_result(List<Payment> success,PaymentException pe){this();this.success = success;this.pe = pe;}/*** Performs a deep copy on <i>other</i>.*/public getPaymentsForUser_result(getPaymentsForUser_result other) {if (other.isSetSuccess()) {List<Payment> __this__success = new ArrayList<Payment>();for (Payment other_element : other.success) {__this__success.add(new Payment(other_element));}this.success = __this__success;}if (other.isSetPe()) {this.pe = new PaymentException(other.pe);}}public getPaymentsForUser_result deepCopy() {return new getPaymentsForUser_result(this);}@Deprecatedpublic getPaymentsForUser_result clone() {return new getPaymentsForUser_result(this);}public int getSuccessSize() {return (this.success == null) ? 0 : this.success.size();}public java.util.Iterator<Payment> getSuccessIterator() {return (this.success == null) ? null : this.success.iterator();}public void addToSuccess(Payment elem) {if (this.success == null) {this.success = new ArrayList<Payment>();}this.success.add(elem);}public List<Payment> getSuccess() {return this.success;}public getPaymentsForUser_result setSuccess(List<Payment> 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 PaymentException getPe() {return this.pe;}public getPaymentsForUser_result setPe(PaymentException pe) {this.pe = pe;return this;}public void unsetPe() {this.pe = null;}/** Returns true if field pe is set (has been asigned a value) and false otherwise */public boolean isSetPe() {return this.pe != null;}public void setPeIsSet(boolean value) {if (!value) {this.pe = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((List<Payment>)value);}break;case PE:if (value == null) {unsetPe();} else {setPe((PaymentException)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();case PE:return getPe();}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();case PE:return isSetPe();}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 getPaymentsForUser_result)return this.equals((getPaymentsForUser_result)that);return false;}public boolean equals(getPaymentsForUser_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;}boolean this_present_pe = true && this.isSetPe();boolean that_present_pe = true && that.isSetPe();if (this_present_pe || that_present_pe) {if (!(this_present_pe && that_present_pe))return false;if (!this.pe.equals(that.pe))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getPaymentsForUser_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getPaymentsForUser_result typedOther = (getPaymentsForUser_result)other;lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(success, typedOther.success);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);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.LIST) {{TList _list8 = iprot.readListBegin();this.success = new ArrayList<Payment>(_list8.size);for (int _i9 = 0; _i9 < _list8.size; ++_i9){Payment _elem10;_elem10 = new Payment();_elem10.read(iprot);this.success.add(_elem10);}iprot.readListEnd();}} else {TProtocolUtil.skip(iprot, field.type);}break;case PE:if (field.type == TType.STRUCT) {this.pe = new PaymentException();this.pe.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);{oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));for (Payment _iter11 : this.success){_iter11.write(oprot);}oprot.writeListEnd();}oprot.writeFieldEnd();} else if (this.isSetPe()) {oprot.writeFieldBegin(PE_FIELD_DESC);this.pe.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getPaymentsForUser_result(");boolean first = true;sb.append("success:");if (this.success == null) {sb.append("null");} else {sb.append(this.success);}first = false;if (!first) sb.append(", ");sb.append("pe:");if (this.pe == null) {sb.append("null");} else {sb.append(this.pe);}first = false;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}public static class getPayments_args implements TBase<getPayments_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPayments_args> {private static final TStruct STRUCT_DESC = new TStruct("getPayments_args");private static final TField FROM_TIME_FIELD_DESC = new TField("fromTime", TType.I64, (short)1);private static final TField TO_TIME_FIELD_DESC = new TField("toTime", TType.I64, (short)2);private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);private static final TField GATEWAY_ID_FIELD_DESC = new TField("gatewayId", TType.I64, (short)4);private long fromTime;private long toTime;private PaymentStatus status;private long gatewayId;/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements TFieldIdEnum {FROM_TIME((short)1, "fromTime"),TO_TIME((short)2, "toTime"),/**** @see PaymentStatus*/STATUS((short)3, "status"),GATEWAY_ID((short)4, "gatewayId");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 __FROMTIME_ISSET_ID = 0;private static final int __TOTIME_ISSET_ID = 1;private static final int __GATEWAYID_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.FROM_TIME, new FieldMetaData("fromTime", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.TO_TIME, new FieldMetaData("toTime", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT,new EnumMetaData(TType.ENUM, PaymentStatus.class)));put(_Fields.GATEWAY_ID, new FieldMetaData("gatewayId", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));}});static {FieldMetaData.addStructMetaDataMap(getPayments_args.class, metaDataMap);}public getPayments_args() {}public getPayments_args(long fromTime,long toTime,PaymentStatus status,long gatewayId){this();this.fromTime = fromTime;setFromTimeIsSet(true);this.toTime = toTime;setToTimeIsSet(true);this.status = status;this.gatewayId = gatewayId;setGatewayIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public getPayments_args(getPayments_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.fromTime = other.fromTime;this.toTime = other.toTime;if (other.isSetStatus()) {this.status = other.status;}this.gatewayId = other.gatewayId;}public getPayments_args deepCopy() {return new getPayments_args(this);}@Deprecatedpublic getPayments_args clone() {return new getPayments_args(this);}public long getFromTime() {return this.fromTime;}public getPayments_args setFromTime(long fromTime) {this.fromTime = fromTime;setFromTimeIsSet(true);return this;}public void unsetFromTime() {__isset_bit_vector.clear(__FROMTIME_ISSET_ID);}/** Returns true if field fromTime is set (has been asigned a value) and false otherwise */public boolean isSetFromTime() {return __isset_bit_vector.get(__FROMTIME_ISSET_ID);}public void setFromTimeIsSet(boolean value) {__isset_bit_vector.set(__FROMTIME_ISSET_ID, value);}public long getToTime() {return this.toTime;}public getPayments_args setToTime(long toTime) {this.toTime = toTime;setToTimeIsSet(true);return this;}public void unsetToTime() {__isset_bit_vector.clear(__TOTIME_ISSET_ID);}/** Returns true if field toTime is set (has been asigned a value) and false otherwise */public boolean isSetToTime() {return __isset_bit_vector.get(__TOTIME_ISSET_ID);}public void setToTimeIsSet(boolean value) {__isset_bit_vector.set(__TOTIME_ISSET_ID, value);}/**** @see PaymentStatus*/public PaymentStatus getStatus() {return this.status;}/**** @see PaymentStatus*/public getPayments_args setStatus(PaymentStatus status) {this.status = status;return this;}public void unsetStatus() {this.status = null;}/** Returns true if field status is set (has been asigned a value) and false otherwise */public boolean isSetStatus() {return this.status != null;}public void setStatusIsSet(boolean value) {if (!value) {this.status = null;}}public long getGatewayId() {return this.gatewayId;}public getPayments_args setGatewayId(long gatewayId) {this.gatewayId = gatewayId;setGatewayIdIsSet(true);return this;}public void unsetGatewayId() {__isset_bit_vector.clear(__GATEWAYID_ISSET_ID);}/** Returns true if field gatewayId is set (has been asigned a value) and false otherwise */public boolean isSetGatewayId() {return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);}public void setGatewayIdIsSet(boolean value) {__isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);}public void setFieldValue(_Fields field, Object value) {switch (field) {case FROM_TIME:if (value == null) {unsetFromTime();} else {setFromTime((Long)value);}break;case TO_TIME:if (value == null) {unsetToTime();} else {setToTime((Long)value);}break;case STATUS:if (value == null) {unsetStatus();} else {setStatus((PaymentStatus)value);}break;case GATEWAY_ID:if (value == null) {unsetGatewayId();} else {setGatewayId((Long)value);}break;}}public void setFieldValue(int fieldID, Object value) {setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);}public Object getFieldValue(_Fields field) {switch (field) {case FROM_TIME:return new Long(getFromTime());case TO_TIME:return new Long(getToTime());case STATUS:return getStatus();case GATEWAY_ID:return new Long(getGatewayId());}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 FROM_TIME:return isSetFromTime();case TO_TIME:return isSetToTime();case STATUS:return isSetStatus();case GATEWAY_ID:return isSetGatewayId();}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 getPayments_args)return this.equals((getPayments_args)that);return false;}public boolean equals(getPayments_args that) {if (that == null)return false;boolean this_present_fromTime = true;boolean that_present_fromTime = true;if (this_present_fromTime || that_present_fromTime) {if (!(this_present_fromTime && that_present_fromTime))return false;if (this.fromTime != that.fromTime)return false;}boolean this_present_toTime = true;boolean that_present_toTime = true;if (this_present_toTime || that_present_toTime) {if (!(this_present_toTime && that_present_toTime))return false;if (this.toTime != that.toTime)return false;}boolean this_present_status = true && this.isSetStatus();boolean that_present_status = true && that.isSetStatus();if (this_present_status || that_present_status) {if (!(this_present_status && that_present_status))return false;if (!this.status.equals(that.status))return false;}boolean this_present_gatewayId = true;boolean that_present_gatewayId = true;if (this_present_gatewayId || that_present_gatewayId) {if (!(this_present_gatewayId && that_present_gatewayId))return false;if (this.gatewayId != that.gatewayId)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getPayments_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getPayments_args typedOther = (getPayments_args)other;lastComparison = Boolean.valueOf(isSetFromTime()).compareTo(isSetFromTime());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(fromTime, typedOther.fromTime);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetToTime()).compareTo(isSetToTime());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(toTime, typedOther.toTime);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(status, typedOther.status);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(isSetGatewayId());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(gatewayId, typedOther.gatewayId);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 FROM_TIME:if (field.type == TType.I64) {this.fromTime = iprot.readI64();setFromTimeIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case TO_TIME:if (field.type == TType.I64) {this.toTime = iprot.readI64();setToTimeIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case STATUS:if (field.type == TType.I32) {this.status = PaymentStatus.findByValue(iprot.readI32());} else {TProtocolUtil.skip(iprot, field.type);}break;case GATEWAY_ID:if (field.type == TType.I64) {this.gatewayId = iprot.readI64();setGatewayIdIsSet(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(FROM_TIME_FIELD_DESC);oprot.writeI64(this.fromTime);oprot.writeFieldEnd();oprot.writeFieldBegin(TO_TIME_FIELD_DESC);oprot.writeI64(this.toTime);oprot.writeFieldEnd();if (this.status != null) {oprot.writeFieldBegin(STATUS_FIELD_DESC);oprot.writeI32(this.status.getValue());oprot.writeFieldEnd();}oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);oprot.writeI64(this.gatewayId);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getPayments_args(");boolean first = true;sb.append("fromTime:");sb.append(this.fromTime);first = false;if (!first) sb.append(", ");sb.append("toTime:");sb.append(this.toTime);first = false;if (!first) sb.append(", ");sb.append("status:");if (this.status == null) {sb.append("null");} else {String status_name = status.name();if (status_name != null) {sb.append(status_name);sb.append(" (");}sb.append(this.status);if (status_name != null) {sb.append(")");}}first = false;if (!first) sb.append(", ");sb.append("gatewayId:");sb.append(this.gatewayId);first = false;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}public static class getPayments_result implements TBase<getPayments_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPayments_result> {private static final TStruct STRUCT_DESC = new TStruct("getPayments_result");private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);private List<Payment> success;private PaymentException pe;/** 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"),PE((short)1, "pe");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 ListMetaData(TType.LIST,new StructMetaData(TType.STRUCT, Payment.class))));put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRUCT)));}});static {FieldMetaData.addStructMetaDataMap(getPayments_result.class, metaDataMap);}public getPayments_result() {}public getPayments_result(List<Payment> success,PaymentException pe){this();this.success = success;this.pe = pe;}/*** Performs a deep copy on <i>other</i>.*/public getPayments_result(getPayments_result other) {if (other.isSetSuccess()) {List<Payment> __this__success = new ArrayList<Payment>();for (Payment other_element : other.success) {__this__success.add(new Payment(other_element));}this.success = __this__success;}if (other.isSetPe()) {this.pe = new PaymentException(other.pe);}}public getPayments_result deepCopy() {return new getPayments_result(this);}@Deprecatedpublic getPayments_result clone() {return new getPayments_result(this);}public int getSuccessSize() {return (this.success == null) ? 0 : this.success.size();}public java.util.Iterator<Payment> getSuccessIterator() {return (this.success == null) ? null : this.success.iterator();}public void addToSuccess(Payment elem) {if (this.success == null) {this.success = new ArrayList<Payment>();}this.success.add(elem);}public List<Payment> getSuccess() {return this.success;}public getPayments_result setSuccess(List<Payment> 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 PaymentException getPe() {return this.pe;}public getPayments_result setPe(PaymentException pe) {this.pe = pe;return this;}public void unsetPe() {this.pe = null;}/** Returns true if field pe is set (has been asigned a value) and false otherwise */public boolean isSetPe() {return this.pe != null;}public void setPeIsSet(boolean value) {if (!value) {this.pe = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((List<Payment>)value);}break;case PE:if (value == null) {unsetPe();} else {setPe((PaymentException)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();case PE:return getPe();}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();case PE:return isSetPe();}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 getPayments_result)return this.equals((getPayments_result)that);return false;}public boolean equals(getPayments_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;}boolean this_present_pe = true && this.isSetPe();boolean that_present_pe = true && that.isSetPe();if (this_present_pe || that_present_pe) {if (!(this_present_pe && that_present_pe))return false;if (!this.pe.equals(that.pe))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getPayments_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getPayments_result typedOther = (getPayments_result)other;lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(success, typedOther.success);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);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.LIST) {{TList _list12 = iprot.readListBegin();this.success = new ArrayList<Payment>(_list12.size);for (int _i13 = 0; _i13 < _list12.size; ++_i13){Payment _elem14;_elem14 = new Payment();_elem14.read(iprot);this.success.add(_elem14);}iprot.readListEnd();}} else {TProtocolUtil.skip(iprot, field.type);}break;case PE:if (field.type == TType.STRUCT) {this.pe = new PaymentException();this.pe.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);{oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));for (Payment _iter15 : this.success){_iter15.write(oprot);}oprot.writeListEnd();}oprot.writeFieldEnd();} else if (this.isSetPe()) {oprot.writeFieldBegin(PE_FIELD_DESC);this.pe.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getPayments_result(");boolean first = true;sb.append("success:");if (this.success == null) {sb.append("null");} else {sb.append(this.success);}first = false;if (!first) sb.append(", ");sb.append("pe:");if (this.pe == null) {sb.append("null");} else {sb.append(this.pe);}first = false;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}public static class getPaymentGateway_args implements TBase<getPaymentGateway_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPaymentGateway_args> {private static final TStruct STRUCT_DESC = new TStruct("getPaymentGateway_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(getPaymentGateway_args.class, metaDataMap);}public getPaymentGateway_args() {}public getPaymentGateway_args(long id){this();this.id = id;setIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public getPaymentGateway_args(getPaymentGateway_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.id = other.id;}public getPaymentGateway_args deepCopy() {return new getPaymentGateway_args(this);}@Deprecatedpublic getPaymentGateway_args clone() {return new getPaymentGateway_args(this);}public long getId() {return this.id;}public getPaymentGateway_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 getPaymentGateway_args)return this.equals((getPaymentGateway_args)that);return false;}public boolean equals(getPaymentGateway_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(getPaymentGateway_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getPaymentGateway_args typedOther = (getPaymentGateway_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("getPaymentGateway_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 getPaymentGateway_result implements TBase<getPaymentGateway_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPaymentGateway_result> {private static final TStruct STRUCT_DESC = new TStruct("getPaymentGateway_result");private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);private PaymentGateway success;private PaymentException pe;/** 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"),PE((short)1, "pe");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, PaymentGateway.class)));put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRUCT)));}});static {FieldMetaData.addStructMetaDataMap(getPaymentGateway_result.class, metaDataMap);}public getPaymentGateway_result() {}public getPaymentGateway_result(PaymentGateway success,PaymentException pe){this();this.success = success;this.pe = pe;}/*** Performs a deep copy on <i>other</i>.*/public getPaymentGateway_result(getPaymentGateway_result other) {if (other.isSetSuccess()) {this.success = new PaymentGateway(other.success);}if (other.isSetPe()) {this.pe = new PaymentException(other.pe);}}public getPaymentGateway_result deepCopy() {return new getPaymentGateway_result(this);}@Deprecatedpublic getPaymentGateway_result clone() {return new getPaymentGateway_result(this);}public PaymentGateway getSuccess() {return this.success;}public getPaymentGateway_result setSuccess(PaymentGateway 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 PaymentException getPe() {return this.pe;}public getPaymentGateway_result setPe(PaymentException pe) {this.pe = pe;return this;}public void unsetPe() {this.pe = null;}/** Returns true if field pe is set (has been asigned a value) and false otherwise */public boolean isSetPe() {return this.pe != null;}public void setPeIsSet(boolean value) {if (!value) {this.pe = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((PaymentGateway)value);}break;case PE:if (value == null) {unsetPe();} else {setPe((PaymentException)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();case PE:return getPe();}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();case PE:return isSetPe();}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 getPaymentGateway_result)return this.equals((getPaymentGateway_result)that);return false;}public boolean equals(getPaymentGateway_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;}boolean this_present_pe = true && this.isSetPe();boolean that_present_pe = true && that.isSetPe();if (this_present_pe || that_present_pe) {if (!(this_present_pe && that_present_pe))return false;if (!this.pe.equals(that.pe))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getPaymentGateway_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getPaymentGateway_result typedOther = (getPaymentGateway_result)other;lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(success, typedOther.success);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);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 PaymentGateway();this.success.read(iprot);} else {TProtocolUtil.skip(iprot, field.type);}break;case PE:if (field.type == TType.STRUCT) {this.pe = new PaymentException();this.pe.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();} else if (this.isSetPe()) {oprot.writeFieldBegin(PE_FIELD_DESC);this.pe.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getPaymentGateway_result(");boolean first = true;sb.append("success:");if (this.success == null) {sb.append("null");} else {sb.append(this.success);}first = false;if (!first) sb.append(", ");sb.append("pe:");if (this.pe == null) {sb.append("null");} else {sb.append(this.pe);}first = false;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}public static class getPayment_args implements TBase<getPayment_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPayment_args> {private static final TStruct STRUCT_DESC = new TStruct("getPayment_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(getPayment_args.class, metaDataMap);}public getPayment_args() {}public getPayment_args(long id){this();this.id = id;setIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public getPayment_args(getPayment_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.id = other.id;}public getPayment_args deepCopy() {return new getPayment_args(this);}@Deprecatedpublic getPayment_args clone() {return new getPayment_args(this);}public long getId() {return this.id;}public getPayment_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 getPayment_args)return this.equals((getPayment_args)that);return false;}public boolean equals(getPayment_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(getPayment_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getPayment_args typedOther = (getPayment_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("getPayment_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 getPayment_result implements TBase<getPayment_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPayment_result> {private static final TStruct STRUCT_DESC = new TStruct("getPayment_result");private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);private Payment success;private PaymentException pe;/** 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"),PE((short)1, "pe");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, Payment.class)));put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRUCT)));}});static {FieldMetaData.addStructMetaDataMap(getPayment_result.class, metaDataMap);}public getPayment_result() {}public getPayment_result(Payment success,PaymentException pe){this();this.success = success;this.pe = pe;}/*** Performs a deep copy on <i>other</i>.*/public getPayment_result(getPayment_result other) {if (other.isSetSuccess()) {this.success = new Payment(other.success);}if (other.isSetPe()) {this.pe = new PaymentException(other.pe);}}public getPayment_result deepCopy() {return new getPayment_result(this);}@Deprecatedpublic getPayment_result clone() {return new getPayment_result(this);}public Payment getSuccess() {return this.success;}public getPayment_result setSuccess(Payment 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 PaymentException getPe() {return this.pe;}public getPayment_result setPe(PaymentException pe) {this.pe = pe;return this;}public void unsetPe() {this.pe = null;}/** Returns true if field pe is set (has been asigned a value) and false otherwise */public boolean isSetPe() {return this.pe != null;}public void setPeIsSet(boolean value) {if (!value) {this.pe = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((Payment)value);}break;case PE:if (value == null) {unsetPe();} else {setPe((PaymentException)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();case PE:return getPe();}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();case PE:return isSetPe();}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 getPayment_result)return this.equals((getPayment_result)that);return false;}public boolean equals(getPayment_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;}boolean this_present_pe = true && this.isSetPe();boolean that_present_pe = true && that.isSetPe();if (this_present_pe || that_present_pe) {if (!(this_present_pe && that_present_pe))return false;if (!this.pe.equals(that.pe))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getPayment_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getPayment_result typedOther = (getPayment_result)other;lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(success, typedOther.success);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);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 Payment();this.success.read(iprot);} else {TProtocolUtil.skip(iprot, field.type);}break;case PE:if (field.type == TType.STRUCT) {this.pe = new PaymentException();this.pe.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();} else if (this.isSetPe()) {oprot.writeFieldBegin(PE_FIELD_DESC);this.pe.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getPayment_result(");boolean first = true;sb.append("success:");if (this.success == null) {sb.append("null");} else {sb.append(this.success);}first = false;if (!first) sb.append(", ");sb.append("pe:");if (this.pe == null) {sb.append("null");} else {sb.append(this.pe);}first = false;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}public static class getPaymentForTxnId_args implements TBase<getPaymentForTxnId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPaymentForTxnId_args> {private static final TStruct STRUCT_DESC = new TStruct("getPaymentForTxnId_args");private static final TField TXN_ID_FIELD_DESC = new TField("txnId", TType.I64, (short)1);private long txnId;/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements TFieldIdEnum {TXN_ID((short)1, "txnId");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 __TXNID_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.TXN_ID, new FieldMetaData("txnId", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));}});static {FieldMetaData.addStructMetaDataMap(getPaymentForTxnId_args.class, metaDataMap);}public getPaymentForTxnId_args() {}public getPaymentForTxnId_args(long txnId){this();this.txnId = txnId;setTxnIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public getPaymentForTxnId_args(getPaymentForTxnId_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.txnId = other.txnId;}public getPaymentForTxnId_args deepCopy() {return new getPaymentForTxnId_args(this);}@Deprecatedpublic getPaymentForTxnId_args clone() {return new getPaymentForTxnId_args(this);}public long getTxnId() {return this.txnId;}public getPaymentForTxnId_args setTxnId(long txnId) {this.txnId = txnId;setTxnIdIsSet(true);return this;}public void unsetTxnId() {__isset_bit_vector.clear(__TXNID_ISSET_ID);}/** Returns true if field txnId is set (has been asigned a value) and false otherwise */public boolean isSetTxnId() {return __isset_bit_vector.get(__TXNID_ISSET_ID);}public void setTxnIdIsSet(boolean value) {__isset_bit_vector.set(__TXNID_ISSET_ID, value);}public void setFieldValue(_Fields field, Object value) {switch (field) {case TXN_ID:if (value == null) {unsetTxnId();} else {setTxnId((Long)value);}break;}}public void setFieldValue(int fieldID, Object value) {setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);}public Object getFieldValue(_Fields field) {switch (field) {case TXN_ID:return new Long(getTxnId());}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 TXN_ID:return isSetTxnId();}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 getPaymentForTxnId_args)return this.equals((getPaymentForTxnId_args)that);return false;}public boolean equals(getPaymentForTxnId_args that) {if (that == null)return false;boolean this_present_txnId = true;boolean that_present_txnId = true;if (this_present_txnId || that_present_txnId) {if (!(this_present_txnId && that_present_txnId))return false;if (this.txnId != that.txnId)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getPaymentForTxnId_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getPaymentForTxnId_args typedOther = (getPaymentForTxnId_args)other;lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(isSetTxnId());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(txnId, typedOther.txnId);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 TXN_ID:if (field.type == TType.I64) {this.txnId = iprot.readI64();setTxnIdIsSet(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(TXN_ID_FIELD_DESC);oprot.writeI64(this.txnId);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getPaymentForTxnId_args(");boolean first = true;sb.append("txnId:");sb.append(this.txnId);first = false;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}public static class getPaymentForTxnId_result implements TBase<getPaymentForTxnId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPaymentForTxnId_result> {private static final TStruct STRUCT_DESC = new TStruct("getPaymentForTxnId_result");private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);private List<Payment> success;private PaymentException pe;/** 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"),PE((short)1, "pe");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 ListMetaData(TType.LIST,new StructMetaData(TType.STRUCT, Payment.class))));put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRUCT)));}});static {FieldMetaData.addStructMetaDataMap(getPaymentForTxnId_result.class, metaDataMap);}public getPaymentForTxnId_result() {}public getPaymentForTxnId_result(List<Payment> success,PaymentException pe){this();this.success = success;this.pe = pe;}/*** Performs a deep copy on <i>other</i>.*/public getPaymentForTxnId_result(getPaymentForTxnId_result other) {if (other.isSetSuccess()) {List<Payment> __this__success = new ArrayList<Payment>();for (Payment other_element : other.success) {__this__success.add(new Payment(other_element));}this.success = __this__success;}if (other.isSetPe()) {this.pe = new PaymentException(other.pe);}}public getPaymentForTxnId_result deepCopy() {return new getPaymentForTxnId_result(this);}@Deprecatedpublic getPaymentForTxnId_result clone() {return new getPaymentForTxnId_result(this);}public int getSuccessSize() {return (this.success == null) ? 0 : this.success.size();}public java.util.Iterator<Payment> getSuccessIterator() {return (this.success == null) ? null : this.success.iterator();}public void addToSuccess(Payment elem) {if (this.success == null) {this.success = new ArrayList<Payment>();}this.success.add(elem);}public List<Payment> getSuccess() {return this.success;}public getPaymentForTxnId_result setSuccess(List<Payment> 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 PaymentException getPe() {return this.pe;}public getPaymentForTxnId_result setPe(PaymentException pe) {this.pe = pe;return this;}public void unsetPe() {this.pe = null;}/** Returns true if field pe is set (has been asigned a value) and false otherwise */public boolean isSetPe() {return this.pe != null;}public void setPeIsSet(boolean value) {if (!value) {this.pe = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((List<Payment>)value);}break;case PE:if (value == null) {unsetPe();} else {setPe((PaymentException)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();case PE:return getPe();}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();case PE:return isSetPe();}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 getPaymentForTxnId_result)return this.equals((getPaymentForTxnId_result)that);return false;}public boolean equals(getPaymentForTxnId_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;}boolean this_present_pe = true && this.isSetPe();boolean that_present_pe = true && that.isSetPe();if (this_present_pe || that_present_pe) {if (!(this_present_pe && that_present_pe))return false;if (!this.pe.equals(that.pe))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getPaymentForTxnId_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getPaymentForTxnId_result typedOther = (getPaymentForTxnId_result)other;lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(success, typedOther.success);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);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.LIST) {{TList _list16 = iprot.readListBegin();this.success = new ArrayList<Payment>(_list16.size);for (int _i17 = 0; _i17 < _list16.size; ++_i17){Payment _elem18;_elem18 = new Payment();_elem18.read(iprot);this.success.add(_elem18);}iprot.readListEnd();}} else {TProtocolUtil.skip(iprot, field.type);}break;case PE:if (field.type == TType.STRUCT) {this.pe = new PaymentException();this.pe.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);{oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));for (Payment _iter19 : this.success){_iter19.write(oprot);}oprot.writeListEnd();}oprot.writeFieldEnd();} else if (this.isSetPe()) {oprot.writeFieldBegin(PE_FIELD_DESC);this.pe.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getPaymentForTxnId_result(");boolean first = true;sb.append("success:");if (this.success == null) {sb.append("null");} else {sb.append(this.success);}first = false;if (!first) sb.append(", ");sb.append("pe:");if (this.pe == null) {sb.append("null");} else {sb.append(this.pe);}first = false;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}public static class updatePaymentDetails_args implements TBase<updatePaymentDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<updatePaymentDetails_args> {private static final TStruct STRUCT_DESC = new TStruct("updatePaymentDetails_args");private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);private static final TField GATEWAY_PAYMENT_ID_FIELD_DESC = new TField("gatewayPaymentId", TType.STRING, (short)2);private static final TField SESSION_ID_FIELD_DESC = new TField("sessionId", TType.STRING, (short)3);private static final TField GATEWAY_TXN_STATUS_FIELD_DESC = new TField("gatewayTxnStatus", TType.STRING, (short)4);private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)5);private static final TField GATEWAY_TXN_ID_FIELD_DESC = new TField("gatewayTxnId", TType.STRING, (short)6);private static final TField AUTH_CODE_FIELD_DESC = new TField("authCode", TType.STRING, (short)7);private static final TField REFERENCE_CODE_FIELD_DESC = new TField("referenceCode", TType.STRING, (short)8);private static final TField ERROR_CODE_FIELD_DESC = new TField("errorCode", TType.STRING, (short)9);private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)10);private static final TField ATTRIBUTES_FIELD_DESC = new TField("attributes", TType.LIST, (short)11);private long id;private String gatewayPaymentId;private String sessionId;private String gatewayTxnStatus;private String description;private String gatewayTxnId;private String authCode;private String referenceCode;private String errorCode;private PaymentStatus status;private List<Attribute> attributes;/** 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"),GATEWAY_PAYMENT_ID((short)2, "gatewayPaymentId"),SESSION_ID((short)3, "sessionId"),GATEWAY_TXN_STATUS((short)4, "gatewayTxnStatus"),DESCRIPTION((short)5, "description"),GATEWAY_TXN_ID((short)6, "gatewayTxnId"),AUTH_CODE((short)7, "authCode"),REFERENCE_CODE((short)8, "referenceCode"),ERROR_CODE((short)9, "errorCode"),/**** @see PaymentStatus*/STATUS((short)10, "status"),ATTRIBUTES((short)11, "attributes");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)));put(_Fields.GATEWAY_PAYMENT_ID, new FieldMetaData("gatewayPaymentId", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRING)));put(_Fields.SESSION_ID, new FieldMetaData("sessionId", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRING)));put(_Fields.GATEWAY_TXN_STATUS, new FieldMetaData("gatewayTxnStatus", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRING)));put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRING)));put(_Fields.GATEWAY_TXN_ID, new FieldMetaData("gatewayTxnId", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRING)));put(_Fields.AUTH_CODE, new FieldMetaData("authCode", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRING)));put(_Fields.REFERENCE_CODE, new FieldMetaData("referenceCode", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRING)));put(_Fields.ERROR_CODE, new FieldMetaData("errorCode", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRING)));put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT,new EnumMetaData(TType.ENUM, PaymentStatus.class)));put(_Fields.ATTRIBUTES, new FieldMetaData("attributes", TFieldRequirementType.DEFAULT,new ListMetaData(TType.LIST,new StructMetaData(TType.STRUCT, Attribute.class))));}});static {FieldMetaData.addStructMetaDataMap(updatePaymentDetails_args.class, metaDataMap);}public updatePaymentDetails_args() {}public updatePaymentDetails_args(long id,String gatewayPaymentId,String sessionId,String gatewayTxnStatus,String description,String gatewayTxnId,String authCode,String referenceCode,String errorCode,PaymentStatus status,List<Attribute> attributes){this();this.id = id;setIdIsSet(true);this.gatewayPaymentId = gatewayPaymentId;this.sessionId = sessionId;this.gatewayTxnStatus = gatewayTxnStatus;this.description = description;this.gatewayTxnId = gatewayTxnId;this.authCode = authCode;this.referenceCode = referenceCode;this.errorCode = errorCode;this.status = status;this.attributes = attributes;}/*** Performs a deep copy on <i>other</i>.*/public updatePaymentDetails_args(updatePaymentDetails_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.id = other.id;if (other.isSetGatewayPaymentId()) {this.gatewayPaymentId = other.gatewayPaymentId;}if (other.isSetSessionId()) {this.sessionId = other.sessionId;}if (other.isSetGatewayTxnStatus()) {this.gatewayTxnStatus = other.gatewayTxnStatus;}if (other.isSetDescription()) {this.description = other.description;}if (other.isSetGatewayTxnId()) {this.gatewayTxnId = other.gatewayTxnId;}if (other.isSetAuthCode()) {this.authCode = other.authCode;}if (other.isSetReferenceCode()) {this.referenceCode = other.referenceCode;}if (other.isSetErrorCode()) {this.errorCode = other.errorCode;}if (other.isSetStatus()) {this.status = other.status;}if (other.isSetAttributes()) {List<Attribute> __this__attributes = new ArrayList<Attribute>();for (Attribute other_element : other.attributes) {__this__attributes.add(new Attribute(other_element));}this.attributes = __this__attributes;}}public updatePaymentDetails_args deepCopy() {return new updatePaymentDetails_args(this);}@Deprecatedpublic updatePaymentDetails_args clone() {return new updatePaymentDetails_args(this);}public long getId() {return this.id;}public updatePaymentDetails_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 String getGatewayPaymentId() {return this.gatewayPaymentId;}public updatePaymentDetails_args setGatewayPaymentId(String gatewayPaymentId) {this.gatewayPaymentId = gatewayPaymentId;return this;}public void unsetGatewayPaymentId() {this.gatewayPaymentId = null;}/** Returns true if field gatewayPaymentId is set (has been asigned a value) and false otherwise */public boolean isSetGatewayPaymentId() {return this.gatewayPaymentId != null;}public void setGatewayPaymentIdIsSet(boolean value) {if (!value) {this.gatewayPaymentId = null;}}public String getSessionId() {return this.sessionId;}public updatePaymentDetails_args setSessionId(String sessionId) {this.sessionId = sessionId;return this;}public void unsetSessionId() {this.sessionId = null;}/** Returns true if field sessionId is set (has been asigned a value) and false otherwise */public boolean isSetSessionId() {return this.sessionId != null;}public void setSessionIdIsSet(boolean value) {if (!value) {this.sessionId = null;}}public String getGatewayTxnStatus() {return this.gatewayTxnStatus;}public updatePaymentDetails_args setGatewayTxnStatus(String gatewayTxnStatus) {this.gatewayTxnStatus = gatewayTxnStatus;return this;}public void unsetGatewayTxnStatus() {this.gatewayTxnStatus = null;}/** Returns true if field gatewayTxnStatus is set (has been asigned a value) and false otherwise */public boolean isSetGatewayTxnStatus() {return this.gatewayTxnStatus != null;}public void setGatewayTxnStatusIsSet(boolean value) {if (!value) {this.gatewayTxnStatus = null;}}public String getDescription() {return this.description;}public updatePaymentDetails_args setDescription(String description) {this.description = description;return this;}public void unsetDescription() {this.description = null;}/** Returns true if field description is set (has been asigned a value) and false otherwise */public boolean isSetDescription() {return this.description != null;}public void setDescriptionIsSet(boolean value) {if (!value) {this.description = null;}}public String getGatewayTxnId() {return this.gatewayTxnId;}public updatePaymentDetails_args setGatewayTxnId(String gatewayTxnId) {this.gatewayTxnId = gatewayTxnId;return this;}public void unsetGatewayTxnId() {this.gatewayTxnId = null;}/** Returns true if field gatewayTxnId is set (has been asigned a value) and false otherwise */public boolean isSetGatewayTxnId() {return this.gatewayTxnId != null;}public void setGatewayTxnIdIsSet(boolean value) {if (!value) {this.gatewayTxnId = null;}}public String getAuthCode() {return this.authCode;}public updatePaymentDetails_args setAuthCode(String authCode) {this.authCode = authCode;return this;}public void unsetAuthCode() {this.authCode = null;}/** Returns true if field authCode is set (has been asigned a value) and false otherwise */public boolean isSetAuthCode() {return this.authCode != null;}public void setAuthCodeIsSet(boolean value) {if (!value) {this.authCode = null;}}public String getReferenceCode() {return this.referenceCode;}public updatePaymentDetails_args setReferenceCode(String referenceCode) {this.referenceCode = referenceCode;return this;}public void unsetReferenceCode() {this.referenceCode = null;}/** Returns true if field referenceCode is set (has been asigned a value) and false otherwise */public boolean isSetReferenceCode() {return this.referenceCode != null;}public void setReferenceCodeIsSet(boolean value) {if (!value) {this.referenceCode = null;}}public String getErrorCode() {return this.errorCode;}public updatePaymentDetails_args setErrorCode(String errorCode) {this.errorCode = errorCode;return this;}public void unsetErrorCode() {this.errorCode = null;}/** Returns true if field errorCode is set (has been asigned a value) and false otherwise */public boolean isSetErrorCode() {return this.errorCode != null;}public void setErrorCodeIsSet(boolean value) {if (!value) {this.errorCode = null;}}/**** @see PaymentStatus*/public PaymentStatus getStatus() {return this.status;}/**** @see PaymentStatus*/public updatePaymentDetails_args setStatus(PaymentStatus status) {this.status = status;return this;}public void unsetStatus() {this.status = null;}/** Returns true if field status is set (has been asigned a value) and false otherwise */public boolean isSetStatus() {return this.status != null;}public void setStatusIsSet(boolean value) {if (!value) {this.status = null;}}public int getAttributesSize() {return (this.attributes == null) ? 0 : this.attributes.size();}public java.util.Iterator<Attribute> getAttributesIterator() {return (this.attributes == null) ? null : this.attributes.iterator();}public void addToAttributes(Attribute elem) {if (this.attributes == null) {this.attributes = new ArrayList<Attribute>();}this.attributes.add(elem);}public List<Attribute> getAttributes() {return this.attributes;}public updatePaymentDetails_args setAttributes(List<Attribute> attributes) {this.attributes = attributes;return this;}public void unsetAttributes() {this.attributes = null;}/** Returns true if field attributes is set (has been asigned a value) and false otherwise */public boolean isSetAttributes() {return this.attributes != null;}public void setAttributesIsSet(boolean value) {if (!value) {this.attributes = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case ID:if (value == null) {unsetId();} else {setId((Long)value);}break;case GATEWAY_PAYMENT_ID:if (value == null) {unsetGatewayPaymentId();} else {setGatewayPaymentId((String)value);}break;case SESSION_ID:if (value == null) {unsetSessionId();} else {setSessionId((String)value);}break;case GATEWAY_TXN_STATUS:if (value == null) {unsetGatewayTxnStatus();} else {setGatewayTxnStatus((String)value);}break;case DESCRIPTION:if (value == null) {unsetDescription();} else {setDescription((String)value);}break;case GATEWAY_TXN_ID:if (value == null) {unsetGatewayTxnId();} else {setGatewayTxnId((String)value);}break;case AUTH_CODE:if (value == null) {unsetAuthCode();} else {setAuthCode((String)value);}break;case REFERENCE_CODE:if (value == null) {unsetReferenceCode();} else {setReferenceCode((String)value);}break;case ERROR_CODE:if (value == null) {unsetErrorCode();} else {setErrorCode((String)value);}break;case STATUS:if (value == null) {unsetStatus();} else {setStatus((PaymentStatus)value);}break;case ATTRIBUTES:if (value == null) {unsetAttributes();} else {setAttributes((List<Attribute>)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 GATEWAY_PAYMENT_ID:return getGatewayPaymentId();case SESSION_ID:return getSessionId();case GATEWAY_TXN_STATUS:return getGatewayTxnStatus();case DESCRIPTION:return getDescription();case GATEWAY_TXN_ID:return getGatewayTxnId();case AUTH_CODE:return getAuthCode();case REFERENCE_CODE:return getReferenceCode();case ERROR_CODE:return getErrorCode();case STATUS:return getStatus();case ATTRIBUTES:return getAttributes();}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 GATEWAY_PAYMENT_ID:return isSetGatewayPaymentId();case SESSION_ID:return isSetSessionId();case GATEWAY_TXN_STATUS:return isSetGatewayTxnStatus();case DESCRIPTION:return isSetDescription();case GATEWAY_TXN_ID:return isSetGatewayTxnId();case AUTH_CODE:return isSetAuthCode();case REFERENCE_CODE:return isSetReferenceCode();case ERROR_CODE:return isSetErrorCode();case STATUS:return isSetStatus();case ATTRIBUTES:return isSetAttributes();}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 updatePaymentDetails_args)return this.equals((updatePaymentDetails_args)that);return false;}public boolean equals(updatePaymentDetails_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;}boolean this_present_gatewayPaymentId = true && this.isSetGatewayPaymentId();boolean that_present_gatewayPaymentId = true && that.isSetGatewayPaymentId();if (this_present_gatewayPaymentId || that_present_gatewayPaymentId) {if (!(this_present_gatewayPaymentId && that_present_gatewayPaymentId))return false;if (!this.gatewayPaymentId.equals(that.gatewayPaymentId))return false;}boolean this_present_sessionId = true && this.isSetSessionId();boolean that_present_sessionId = true && that.isSetSessionId();if (this_present_sessionId || that_present_sessionId) {if (!(this_present_sessionId && that_present_sessionId))return false;if (!this.sessionId.equals(that.sessionId))return false;}boolean this_present_gatewayTxnStatus = true && this.isSetGatewayTxnStatus();boolean that_present_gatewayTxnStatus = true && that.isSetGatewayTxnStatus();if (this_present_gatewayTxnStatus || that_present_gatewayTxnStatus) {if (!(this_present_gatewayTxnStatus && that_present_gatewayTxnStatus))return false;if (!this.gatewayTxnStatus.equals(that.gatewayTxnStatus))return false;}boolean this_present_description = true && this.isSetDescription();boolean that_present_description = true && that.isSetDescription();if (this_present_description || that_present_description) {if (!(this_present_description && that_present_description))return false;if (!this.description.equals(that.description))return false;}boolean this_present_gatewayTxnId = true && this.isSetGatewayTxnId();boolean that_present_gatewayTxnId = true && that.isSetGatewayTxnId();if (this_present_gatewayTxnId || that_present_gatewayTxnId) {if (!(this_present_gatewayTxnId && that_present_gatewayTxnId))return false;if (!this.gatewayTxnId.equals(that.gatewayTxnId))return false;}boolean this_present_authCode = true && this.isSetAuthCode();boolean that_present_authCode = true && that.isSetAuthCode();if (this_present_authCode || that_present_authCode) {if (!(this_present_authCode && that_present_authCode))return false;if (!this.authCode.equals(that.authCode))return false;}boolean this_present_referenceCode = true && this.isSetReferenceCode();boolean that_present_referenceCode = true && that.isSetReferenceCode();if (this_present_referenceCode || that_present_referenceCode) {if (!(this_present_referenceCode && that_present_referenceCode))return false;if (!this.referenceCode.equals(that.referenceCode))return false;}boolean this_present_errorCode = true && this.isSetErrorCode();boolean that_present_errorCode = true && that.isSetErrorCode();if (this_present_errorCode || that_present_errorCode) {if (!(this_present_errorCode && that_present_errorCode))return false;if (!this.errorCode.equals(that.errorCode))return false;}boolean this_present_status = true && this.isSetStatus();boolean that_present_status = true && that.isSetStatus();if (this_present_status || that_present_status) {if (!(this_present_status && that_present_status))return false;if (!this.status.equals(that.status))return false;}boolean this_present_attributes = true && this.isSetAttributes();boolean that_present_attributes = true && that.isSetAttributes();if (this_present_attributes || that_present_attributes) {if (!(this_present_attributes && that_present_attributes))return false;if (!this.attributes.equals(that.attributes))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(updatePaymentDetails_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;updatePaymentDetails_args typedOther = (updatePaymentDetails_args)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(isSetGatewayPaymentId()).compareTo(isSetGatewayPaymentId());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(gatewayPaymentId, typedOther.gatewayPaymentId);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(isSetSessionId());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(sessionId, typedOther.sessionId);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetGatewayTxnStatus()).compareTo(isSetGatewayTxnStatus());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(gatewayTxnStatus, typedOther.gatewayTxnStatus);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(description, typedOther.description);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetGatewayTxnId()).compareTo(isSetGatewayTxnId());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(gatewayTxnId, typedOther.gatewayTxnId);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetAuthCode()).compareTo(isSetAuthCode());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(authCode, typedOther.authCode);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetReferenceCode()).compareTo(isSetReferenceCode());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(referenceCode, typedOther.referenceCode);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(isSetErrorCode());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(errorCode, typedOther.errorCode);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(status, typedOther.status);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(isSetAttributes());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(attributes, typedOther.attributes);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 GATEWAY_PAYMENT_ID:if (field.type == TType.STRING) {this.gatewayPaymentId = iprot.readString();} else {TProtocolUtil.skip(iprot, field.type);}break;case SESSION_ID:if (field.type == TType.STRING) {this.sessionId = iprot.readString();} else {TProtocolUtil.skip(iprot, field.type);}break;case GATEWAY_TXN_STATUS:if (field.type == TType.STRING) {this.gatewayTxnStatus = iprot.readString();} else {TProtocolUtil.skip(iprot, field.type);}break;case DESCRIPTION:if (field.type == TType.STRING) {this.description = iprot.readString();} else {TProtocolUtil.skip(iprot, field.type);}break;case GATEWAY_TXN_ID:if (field.type == TType.STRING) {this.gatewayTxnId = iprot.readString();} else {TProtocolUtil.skip(iprot, field.type);}break;case AUTH_CODE:if (field.type == TType.STRING) {this.authCode = iprot.readString();} else {TProtocolUtil.skip(iprot, field.type);}break;case REFERENCE_CODE:if (field.type == TType.STRING) {this.referenceCode = iprot.readString();} else {TProtocolUtil.skip(iprot, field.type);}break;case ERROR_CODE:if (field.type == TType.STRING) {this.errorCode = iprot.readString();} else {TProtocolUtil.skip(iprot, field.type);}break;case STATUS:if (field.type == TType.I32) {this.status = PaymentStatus.findByValue(iprot.readI32());} else {TProtocolUtil.skip(iprot, field.type);}break;case ATTRIBUTES:if (field.type == TType.LIST) {{TList _list20 = iprot.readListBegin();this.attributes = new ArrayList<Attribute>(_list20.size);for (int _i21 = 0; _i21 < _list20.size; ++_i21){Attribute _elem22;_elem22 = new Attribute();_elem22.read(iprot);this.attributes.add(_elem22);}iprot.readListEnd();}} 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.gatewayPaymentId != null) {oprot.writeFieldBegin(GATEWAY_PAYMENT_ID_FIELD_DESC);oprot.writeString(this.gatewayPaymentId);oprot.writeFieldEnd();}if (this.sessionId != null) {oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);oprot.writeString(this.sessionId);oprot.writeFieldEnd();}if (this.gatewayTxnStatus != null) {oprot.writeFieldBegin(GATEWAY_TXN_STATUS_FIELD_DESC);oprot.writeString(this.gatewayTxnStatus);oprot.writeFieldEnd();}if (this.description != null) {oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);oprot.writeString(this.description);oprot.writeFieldEnd();}if (this.gatewayTxnId != null) {oprot.writeFieldBegin(GATEWAY_TXN_ID_FIELD_DESC);oprot.writeString(this.gatewayTxnId);oprot.writeFieldEnd();}if (this.authCode != null) {oprot.writeFieldBegin(AUTH_CODE_FIELD_DESC);oprot.writeString(this.authCode);oprot.writeFieldEnd();}if (this.referenceCode != null) {oprot.writeFieldBegin(REFERENCE_CODE_FIELD_DESC);oprot.writeString(this.referenceCode);oprot.writeFieldEnd();}if (this.errorCode != null) {oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC);oprot.writeString(this.errorCode);oprot.writeFieldEnd();}if (this.status != null) {oprot.writeFieldBegin(STATUS_FIELD_DESC);oprot.writeI32(this.status.getValue());oprot.writeFieldEnd();}if (this.attributes != null) {oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);{oprot.writeListBegin(new TList(TType.STRUCT, this.attributes.size()));for (Attribute _iter23 : this.attributes){_iter23.write(oprot);}oprot.writeListEnd();}oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("updatePaymentDetails_args(");boolean first = true;sb.append("id:");sb.append(this.id);first = false;if (!first) sb.append(", ");sb.append("gatewayPaymentId:");if (this.gatewayPaymentId == null) {sb.append("null");} else {sb.append(this.gatewayPaymentId);}first = false;if (!first) sb.append(", ");sb.append("sessionId:");if (this.sessionId == null) {sb.append("null");} else {sb.append(this.sessionId);}first = false;if (!first) sb.append(", ");sb.append("gatewayTxnStatus:");if (this.gatewayTxnStatus == null) {sb.append("null");} else {sb.append(this.gatewayTxnStatus);}first = false;if (!first) sb.append(", ");sb.append("description:");if (this.description == null) {sb.append("null");} else {sb.append(this.description);}first = false;if (!first) sb.append(", ");sb.append("gatewayTxnId:");if (this.gatewayTxnId == null) {sb.append("null");} else {sb.append(this.gatewayTxnId);}first = false;if (!first) sb.append(", ");sb.append("authCode:");if (this.authCode == null) {sb.append("null");} else {sb.append(this.authCode);}first = false;if (!first) sb.append(", ");sb.append("referenceCode:");if (this.referenceCode == null) {sb.append("null");} else {sb.append(this.referenceCode);}first = false;if (!first) sb.append(", ");sb.append("errorCode:");if (this.errorCode == null) {sb.append("null");} else {sb.append(this.errorCode);}first = false;if (!first) sb.append(", ");sb.append("status:");if (this.status == null) {sb.append("null");} else {String status_name = status.name();if (status_name != null) {sb.append(status_name);sb.append(" (");}sb.append(this.status);if (status_name != null) {sb.append(")");}}first = false;if (!first) sb.append(", ");sb.append("attributes:");if (this.attributes == null) {sb.append("null");} else {sb.append(this.attributes);}first = false;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}public static class updatePaymentDetails_result implements TBase<updatePaymentDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePaymentDetails_result> {private static final TStruct STRUCT_DESC = new TStruct("updatePaymentDetails_result");private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);private boolean success;private PaymentException pe;/** 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"),PE((short)1, "pe");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.BOOL)));put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.STRUCT)));}});static {FieldMetaData.addStructMetaDataMap(updatePaymentDetails_result.class, metaDataMap);}public updatePaymentDetails_result() {}public updatePaymentDetails_result(boolean success,PaymentException pe){this();this.success = success;setSuccessIsSet(true);this.pe = pe;}/*** Performs a deep copy on <i>other</i>.*/public updatePaymentDetails_result(updatePaymentDetails_result other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.success = other.success;if (other.isSetPe()) {this.pe = new PaymentException(other.pe);}}public updatePaymentDetails_result deepCopy() {return new updatePaymentDetails_result(this);}@Deprecatedpublic updatePaymentDetails_result clone() {return new updatePaymentDetails_result(this);}public boolean isSuccess() {return this.success;}public updatePaymentDetails_result setSuccess(boolean 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 PaymentException getPe() {return this.pe;}public updatePaymentDetails_result setPe(PaymentException pe) {this.pe = pe;return this;}public void unsetPe() {this.pe = null;}/** Returns true if field pe is set (has been asigned a value) and false otherwise */public boolean isSetPe() {return this.pe != null;}public void setPeIsSet(boolean value) {if (!value) {this.pe = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((Boolean)value);}break;case PE:if (value == null) {unsetPe();} else {setPe((PaymentException)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 Boolean(isSuccess());case PE:return getPe();}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();case PE:return isSetPe();}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 updatePaymentDetails_result)return this.equals((updatePaymentDetails_result)that);return false;}public boolean equals(updatePaymentDetails_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;}boolean this_present_pe = true && this.isSetPe();boolean that_present_pe = true && that.isSetPe();if (this_present_pe || that_present_pe) {if (!(this_present_pe && that_present_pe))return false;if (!this.pe.equals(that.pe))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(updatePaymentDetails_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;updatePaymentDetails_result typedOther = (updatePaymentDetails_result)other;lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(success, typedOther.success);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);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.BOOL) {this.success = iprot.readBool();setSuccessIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case PE:if (field.type == TType.STRUCT) {this.pe = new PaymentException();this.pe.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);oprot.writeBool(this.success);oprot.writeFieldEnd();} else if (this.isSetPe()) {oprot.writeFieldBegin(PE_FIELD_DESC);this.pe.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("updatePaymentDetails_result(");boolean first = true;sb.append("success:");sb.append(this.success);first = false;if (!first) sb.append(", ");sb.append("pe:");if (this.pe == null) {sb.append("null");} else {sb.append(this.pe);}first = false;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}}