Rev 472 | Rev 759 | 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#from thrift.Thrift import *from ttypes import *from thrift.Thrift import TProcessorfrom thrift.transport import TTransportfrom thrift.protocol import TBinaryProtocoltry:from thrift.protocol import fastbinaryexcept:fastbinary = Noneclass Iface:def sendMail(self, mail):"""Parameters:"""passdef sendText(self, message):"""Parameters:- message"""passdef addMessage(self, message):"""Parameters:- message"""passdef updateMessage(self, id, message):"""Parameters:- id- message"""passdef getMessage(self, id):"""Parameters:- id"""passdef getSubstitutedMessage(self, id, params):"""Parameters:- id- params"""passdef addUser(self, username, password, warehouseId):"""Parameters:- username- password- warehouseId"""passdef deleteUser(self, username):"""Parameters:- username"""passdef authenticateUser(self, username, password):"""Parameters:- username- password"""passdef updatePassword(self, username, oldPassword, newPassword):"""Parameters:- username- oldPassword- newPassword"""passclass Client(Iface):def __init__(self, iprot, oprot=None):self._iprot = self._oprot = iprotif oprot != None:self._oprot = oprotself._seqid = 0def sendMail(self, mail):"""Parameters:"""self.send_sendMail(mail)self.recv_sendMail()def send_sendMail(self, mail):self._oprot.writeMessageBegin('sendMail', TMessageType.CALL, self._seqid)args = sendMail_args()args.mail = mailargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_sendMail(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = sendMail_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.se != None:raise result.sereturndef sendText(self, message):"""Parameters:- message"""self.send_sendText(message)self.recv_sendText()def send_sendText(self, message):self._oprot.writeMessageBegin('sendText', TMessageType.CALL, self._seqid)args = sendText_args()args.message = messageargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_sendText(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = sendText_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.se != None:raise result.sereturndef addMessage(self, message):"""Parameters:- message"""self.send_addMessage(message)self.recv_addMessage()def send_addMessage(self, message):self._oprot.writeMessageBegin('addMessage', TMessageType.CALL, self._seqid)args = addMessage_args()args.message = messageargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_addMessage(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = addMessage_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.se != None:raise result.sereturndef updateMessage(self, id, message):"""Parameters:- id- message"""self.send_updateMessage(id, message)self.recv_updateMessage()def send_updateMessage(self, id, message):self._oprot.writeMessageBegin('updateMessage', TMessageType.CALL, self._seqid)args = updateMessage_args()args.id = idargs.message = messageargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_updateMessage(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = updateMessage_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.se != None:raise result.sereturndef getMessage(self, id):"""Parameters:- id"""self.send_getMessage(id)return self.recv_getMessage()def send_getMessage(self, id):self._oprot.writeMessageBegin('getMessage', TMessageType.CALL, self._seqid)args = getMessage_args()args.id = idargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getMessage(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getMessage_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success != None:return result.successif result.se != None:raise result.seraise TApplicationException(TApplicationException.MISSING_RESULT, "getMessage failed: unknown result");def getSubstitutedMessage(self, id, params):"""Parameters:- id- params"""self.send_getSubstitutedMessage(id, params)return self.recv_getSubstitutedMessage()def send_getSubstitutedMessage(self, id, params):self._oprot.writeMessageBegin('getSubstitutedMessage', TMessageType.CALL, self._seqid)args = getSubstitutedMessage_args()args.id = idargs.params = paramsargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getSubstitutedMessage(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getSubstitutedMessage_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success != None:return result.successif result.se != None:raise result.seraise TApplicationException(TApplicationException.MISSING_RESULT, "getSubstitutedMessage failed: unknown result");def addUser(self, username, password, warehouseId):"""Parameters:- username- password- warehouseId"""self.send_addUser(username, password, warehouseId)return self.recv_addUser()def send_addUser(self, username, password, warehouseId):self._oprot.writeMessageBegin('addUser', TMessageType.CALL, self._seqid)args = addUser_args()args.username = usernameargs.password = passwordargs.warehouseId = warehouseIdargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_addUser(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = addUser_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success != None:return result.successif result.se != None:raise result.seraise TApplicationException(TApplicationException.MISSING_RESULT, "addUser failed: unknown result");def deleteUser(self, username):"""Parameters:- username"""self.send_deleteUser(username)return self.recv_deleteUser()def send_deleteUser(self, username):self._oprot.writeMessageBegin('deleteUser', TMessageType.CALL, self._seqid)args = deleteUser_args()args.username = usernameargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_deleteUser(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = deleteUser_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success != None:return result.successif result.se != None:raise result.seraise TApplicationException(TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result");def authenticateUser(self, username, password):"""Parameters:- username- password"""self.send_authenticateUser(username, password)return self.recv_authenticateUser()def send_authenticateUser(self, username, password):self._oprot.writeMessageBegin('authenticateUser', TMessageType.CALL, self._seqid)args = authenticateUser_args()args.username = usernameargs.password = passwordargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_authenticateUser(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = authenticateUser_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success != None:return result.successif result.se != None:raise result.seraise TApplicationException(TApplicationException.MISSING_RESULT, "authenticateUser failed: unknown result");def updatePassword(self, username, oldPassword, newPassword):"""Parameters:- username- oldPassword- newPassword"""self.send_updatePassword(username, oldPassword, newPassword)return self.recv_updatePassword()def send_updatePassword(self, username, oldPassword, newPassword):self._oprot.writeMessageBegin('updatePassword', TMessageType.CALL, self._seqid)args = updatePassword_args()args.username = usernameargs.oldPassword = oldPasswordargs.newPassword = newPasswordargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_updatePassword(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = updatePassword_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success != None:return result.successif result.se != None:raise result.seraise TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");class Processor(Iface, TProcessor):def __init__(self, handler):self._handler = handlerself._processMap = {}self._processMap["sendMail"] = Processor.process_sendMailself._processMap["sendText"] = Processor.process_sendTextself._processMap["addMessage"] = Processor.process_addMessageself._processMap["updateMessage"] = Processor.process_updateMessageself._processMap["getMessage"] = Processor.process_getMessageself._processMap["getSubstitutedMessage"] = Processor.process_getSubstitutedMessageself._processMap["addUser"] = Processor.process_addUserself._processMap["deleteUser"] = Processor.process_deleteUserself._processMap["authenticateUser"] = Processor.process_authenticateUserself._processMap["updatePassword"] = Processor.process_updatePassworddef process(self, iprot, oprot):(name, type, seqid) = iprot.readMessageBegin()if name not in self._processMap:iprot.skip(TType.STRUCT)iprot.readMessageEnd()x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)x.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()returnelse:self._processMap[name](self, seqid, iprot, oprot)return Truedef process_sendMail(self, seqid, iprot, oprot):args = sendMail_args()args.read(iprot)iprot.readMessageEnd()result = sendMail_result()try:self._handler.sendMail(args.mail)except HelperServiceException, se:result.se = seoprot.writeMessageBegin("sendMail", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_sendText(self, seqid, iprot, oprot):args = sendText_args()args.read(iprot)iprot.readMessageEnd()result = sendText_result()try:self._handler.sendText(args.message)except HelperServiceException, se:result.se = seoprot.writeMessageBegin("sendText", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_addMessage(self, seqid, iprot, oprot):args = addMessage_args()args.read(iprot)iprot.readMessageEnd()result = addMessage_result()try:self._handler.addMessage(args.message)except HelperServiceException, se:result.se = seoprot.writeMessageBegin("addMessage", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_updateMessage(self, seqid, iprot, oprot):args = updateMessage_args()args.read(iprot)iprot.readMessageEnd()result = updateMessage_result()try:self._handler.updateMessage(args.id, args.message)except HelperServiceException, se:result.se = seoprot.writeMessageBegin("updateMessage", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getMessage(self, seqid, iprot, oprot):args = getMessage_args()args.read(iprot)iprot.readMessageEnd()result = getMessage_result()try:result.success = self._handler.getMessage(args.id)except HelperServiceException, se:result.se = seoprot.writeMessageBegin("getMessage", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getSubstitutedMessage(self, seqid, iprot, oprot):args = getSubstitutedMessage_args()args.read(iprot)iprot.readMessageEnd()result = getSubstitutedMessage_result()try:result.success = self._handler.getSubstitutedMessage(args.id, args.params)except HelperServiceException, se:result.se = seoprot.writeMessageBegin("getSubstitutedMessage", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_addUser(self, seqid, iprot, oprot):args = addUser_args()args.read(iprot)iprot.readMessageEnd()result = addUser_result()try:result.success = self._handler.addUser(args.username, args.password, args.warehouseId)except HelperServiceException, se:result.se = seoprot.writeMessageBegin("addUser", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_deleteUser(self, seqid, iprot, oprot):args = deleteUser_args()args.read(iprot)iprot.readMessageEnd()result = deleteUser_result()try:result.success = self._handler.deleteUser(args.username)except HelperServiceException, se:result.se = seoprot.writeMessageBegin("deleteUser", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_authenticateUser(self, seqid, iprot, oprot):args = authenticateUser_args()args.read(iprot)iprot.readMessageEnd()result = authenticateUser_result()try:result.success = self._handler.authenticateUser(args.username, args.password)except HelperServiceException, se:result.se = seoprot.writeMessageBegin("authenticateUser", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_updatePassword(self, seqid, iprot, oprot):args = updatePassword_args()args.read(iprot)iprot.readMessageEnd()result = updatePassword_result()try:result.success = self._handler.updatePassword(args.username, args.oldPassword, args.newPassword)except HelperServiceException, se:result.se = seoprot.writeMessageBegin("updatePassword", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()# HELPER FUNCTIONS AND STRUCTURESclass sendMail_args:"""Attributes:"""thrift_spec = (None, # 0(1, TType.STRUCT, 'mail', (Mail, Mail.thrift_spec), None, ), # 1)def __init__(self, mail=None,):self.mail = maildef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRUCT:self.mail = Mail()self.mail.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('sendMail_args')if self.mail != None:oprot.writeFieldBegin('mail', TType.STRUCT, 1)self.mail.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class sendMail_result:"""Attributes:- se"""thrift_spec = (None, # 0(1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1)def __init__(self, se=None,):self.se = sedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRUCT:self.se = HelperServiceException()self.se.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('sendMail_result')if self.se != None:oprot.writeFieldBegin('se', TType.STRUCT, 1)self.se.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class sendText_args:"""Attributes:- message"""thrift_spec = (None, # 0(1, TType.STRUCT, 'message', (TextMessage, TextMessage.thrift_spec), None, ), # 1)def __init__(self, message=None,):self.message = messagedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRUCT:self.message = TextMessage()self.message.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('sendText_args')if self.message != None:oprot.writeFieldBegin('message', TType.STRUCT, 1)self.message.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class sendText_result:"""Attributes:- se"""thrift_spec = (None, # 0(1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1)def __init__(self, se=None,):self.se = sedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRUCT:self.se = HelperServiceException()self.se.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('sendText_result')if self.se != None:oprot.writeFieldBegin('se', TType.STRUCT, 1)self.se.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class addMessage_args:"""Attributes:- message"""thrift_spec = (None, # 0(1, TType.STRUCT, 'message', (Message, Message.thrift_spec), None, ), # 1)def __init__(self, message=None,):self.message = messagedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRUCT:self.message = Message()self.message.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('addMessage_args')if self.message != None:oprot.writeFieldBegin('message', TType.STRUCT, 1)self.message.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class addMessage_result:"""Attributes:- se"""thrift_spec = (None, # 0(1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1)def __init__(self, se=None,):self.se = sedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRUCT:self.se = HelperServiceException()self.se.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('addMessage_result')if self.se != None:oprot.writeFieldBegin('se', TType.STRUCT, 1)self.se.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class updateMessage_args:"""Attributes:- id- message"""thrift_spec = (None, # 0(1, TType.I64, 'id', None, None, ), # 1(2, TType.STRING, 'message', None, None, ), # 2)def __init__(self, id=None, message=None,):self.id = idself.message = messagedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.id = iprot.readI64();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.STRING:self.message = iprot.readString();else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('updateMessage_args')if self.id != None:oprot.writeFieldBegin('id', TType.I64, 1)oprot.writeI64(self.id)oprot.writeFieldEnd()if self.message != None:oprot.writeFieldBegin('message', TType.STRING, 2)oprot.writeString(self.message)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class updateMessage_result:"""Attributes:- se"""thrift_spec = (None, # 0(1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1)def __init__(self, se=None,):self.se = sedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRUCT:self.se = HelperServiceException()self.se.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('updateMessage_result')if self.se != None:oprot.writeFieldBegin('se', TType.STRUCT, 1)self.se.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getMessage_args:"""Attributes:- id"""thrift_spec = (None, # 0(1, TType.I64, 'id', None, None, ), # 1)def __init__(self, id=None,):self.id = iddef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.id = iprot.readI64();else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('getMessage_args')if self.id != None:oprot.writeFieldBegin('id', TType.I64, 1)oprot.writeI64(self.id)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getMessage_result:"""Attributes:- success- se"""thrift_spec = ((0, TType.STRUCT, 'success', (Message, Message.thrift_spec), None, ), # 0(1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1)def __init__(self, success=None, se=None,):self.success = successself.se = sedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.STRUCT:self.success = Message()self.success.read(iprot)else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.se = HelperServiceException()self.se.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('getMessage_result')if self.success != None:oprot.writeFieldBegin('success', TType.STRUCT, 0)self.success.write(oprot)oprot.writeFieldEnd()if self.se != None:oprot.writeFieldBegin('se', TType.STRUCT, 1)self.se.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getSubstitutedMessage_args:"""Attributes:- id- params"""thrift_spec = (None, # 0(1, TType.I64, 'id', None, None, ), # 1(2, TType.MAP, 'params', (TType.STRING,None,TType.STRING,None), None, ), # 2)def __init__(self, id=None, params=None,):self.id = idself.params = paramsdef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.id = iprot.readI64();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.MAP:self.params = {}(_ktype15, _vtype16, _size14 ) = iprot.readMapBegin()for _i18 in xrange(_size14):_key19 = iprot.readString();_val20 = iprot.readString();self.params[_key19] = _val20iprot.readMapEnd()else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('getSubstitutedMessage_args')if self.id != None:oprot.writeFieldBegin('id', TType.I64, 1)oprot.writeI64(self.id)oprot.writeFieldEnd()if self.params != None:oprot.writeFieldBegin('params', TType.MAP, 2)oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.params))for kiter21,viter22 in self.params.items():oprot.writeString(kiter21)oprot.writeString(viter22)oprot.writeMapEnd()oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getSubstitutedMessage_result:"""Attributes:- success- se"""thrift_spec = ((0, TType.STRUCT, 'success', (Message, Message.thrift_spec), None, ), # 0(1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1)def __init__(self, success=None, se=None,):self.success = successself.se = sedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.STRUCT:self.success = Message()self.success.read(iprot)else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.se = HelperServiceException()self.se.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('getSubstitutedMessage_result')if self.success != None:oprot.writeFieldBegin('success', TType.STRUCT, 0)self.success.write(oprot)oprot.writeFieldEnd()if self.se != None:oprot.writeFieldBegin('se', TType.STRUCT, 1)self.se.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class addUser_args:"""Attributes:- username- password- warehouseId"""thrift_spec = (None, # 0(1, TType.STRING, 'username', None, None, ), # 1(2, TType.STRING, 'password', None, None, ), # 2(3, TType.I64, 'warehouseId', None, None, ), # 3)def __init__(self, username=None, password=None, warehouseId=None,):self.username = usernameself.password = passwordself.warehouseId = warehouseIddef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRING:self.username = iprot.readString();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.STRING:self.password = iprot.readString();else:iprot.skip(ftype)elif fid == 3:if ftype == TType.I64:self.warehouseId = iprot.readI64();else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('addUser_args')if self.username != None:oprot.writeFieldBegin('username', TType.STRING, 1)oprot.writeString(self.username)oprot.writeFieldEnd()if self.password != None:oprot.writeFieldBegin('password', TType.STRING, 2)oprot.writeString(self.password)oprot.writeFieldEnd()if self.warehouseId != None:oprot.writeFieldBegin('warehouseId', TType.I64, 3)oprot.writeI64(self.warehouseId)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class addUser_result:"""Attributes:- success- se"""thrift_spec = ((0, TType.BOOL, 'success', None, None, ), # 0(1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1)def __init__(self, success=None, se=None,):self.success = successself.se = sedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.BOOL:self.success = iprot.readBool();else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.se = HelperServiceException()self.se.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('addUser_result')if self.success != None:oprot.writeFieldBegin('success', TType.BOOL, 0)oprot.writeBool(self.success)oprot.writeFieldEnd()if self.se != None:oprot.writeFieldBegin('se', TType.STRUCT, 1)self.se.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class deleteUser_args:"""Attributes:- username"""thrift_spec = (None, # 0(1, TType.STRING, 'username', None, None, ), # 1)def __init__(self, username=None,):self.username = usernamedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRING:self.username = iprot.readString();else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('deleteUser_args')if self.username != None:oprot.writeFieldBegin('username', TType.STRING, 1)oprot.writeString(self.username)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class deleteUser_result:"""Attributes:- success- se"""thrift_spec = ((0, TType.BOOL, 'success', None, None, ), # 0(1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1)def __init__(self, success=None, se=None,):self.success = successself.se = sedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.BOOL:self.success = iprot.readBool();else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.se = HelperServiceException()self.se.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('deleteUser_result')if self.success != None:oprot.writeFieldBegin('success', TType.BOOL, 0)oprot.writeBool(self.success)oprot.writeFieldEnd()if self.se != None:oprot.writeFieldBegin('se', TType.STRUCT, 1)self.se.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class authenticateUser_args:"""Attributes:- username- password"""thrift_spec = (None, # 0(1, TType.STRING, 'username', None, None, ), # 1(2, TType.STRING, 'password', None, None, ), # 2)def __init__(self, username=None, password=None,):self.username = usernameself.password = passworddef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRING:self.username = iprot.readString();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.STRING:self.password = iprot.readString();else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('authenticateUser_args')if self.username != None:oprot.writeFieldBegin('username', TType.STRING, 1)oprot.writeString(self.username)oprot.writeFieldEnd()if self.password != None:oprot.writeFieldBegin('password', TType.STRING, 2)oprot.writeString(self.password)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class authenticateUser_result:"""Attributes:- success- se"""thrift_spec = ((0, TType.I64, 'success', None, None, ), # 0(1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1)def __init__(self, success=None, se=None,):self.success = successself.se = sedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.I64:self.success = iprot.readI64();else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.se = HelperServiceException()self.se.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('authenticateUser_result')if self.success != None:oprot.writeFieldBegin('success', TType.I64, 0)oprot.writeI64(self.success)oprot.writeFieldEnd()if self.se != None:oprot.writeFieldBegin('se', TType.STRUCT, 1)self.se.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class updatePassword_args:"""Attributes:- username- oldPassword- newPassword"""thrift_spec = (None, # 0(1, TType.STRING, 'username', None, None, ), # 1(2, TType.STRING, 'oldPassword', None, None, ), # 2(3, TType.STRING, 'newPassword', None, None, ), # 3)def __init__(self, username=None, oldPassword=None, newPassword=None,):self.username = usernameself.oldPassword = oldPasswordself.newPassword = newPassworddef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRING:self.username = iprot.readString();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.STRING:self.oldPassword = iprot.readString();else:iprot.skip(ftype)elif fid == 3:if ftype == TType.STRING:self.newPassword = iprot.readString();else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('updatePassword_args')if self.username != None:oprot.writeFieldBegin('username', TType.STRING, 1)oprot.writeString(self.username)oprot.writeFieldEnd()if self.oldPassword != None:oprot.writeFieldBegin('oldPassword', TType.STRING, 2)oprot.writeString(self.oldPassword)oprot.writeFieldEnd()if self.newPassword != None:oprot.writeFieldBegin('newPassword', TType.STRING, 3)oprot.writeString(self.newPassword)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class updatePassword_result:"""Attributes:- success- se"""thrift_spec = ((0, TType.BOOL, 'success', None, None, ), # 0(1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1)def __init__(self, success=None, se=None,):self.success = successself.se = sedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.BOOL:self.success = iprot.readBool();else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.se = HelperServiceException()self.se.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('updatePassword_result')if self.success != None:oprot.writeFieldBegin('success', TType.BOOL, 0)oprot.writeBool(self.success)oprot.writeFieldEnd()if self.se != None:oprot.writeFieldBegin('se', TType.STRUCT, 1)self.se.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)