# # Autogenerated by Thrift Compiler (0.20.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException from thrift.TRecursive import fix_spec import sys import pangramia.base_service.BaseService import logging from .ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport all_structs = [] class Iface(pangramia.base_service.BaseService.Iface): def addAccountPair(self, accountId, proxyId, machineId, proxyData, accountData): """ Parameters: - accountId - proxyId - machineId - proxyData - accountData """ pass def getPair(self, machineId): """ Parameters: - machineId """ pass def pair(self, accountId, proxyId, machineId): """ Parameters: - accountId - proxyId - machineId """ pass def unpair(self, accountId, proxyId, machineId): """ Parameters: - accountId - proxyId - machineId """ pass def listAccountPairs(self, filter): """ Parameters: - filter """ pass def addAccount(self, accountId, accountData): """ Parameters: - accountId - accountData """ pass def suspendAccount(self, accountId): """ Parameters: - accountId """ pass def resumeAccount(self, accountId): """ Parameters: - accountId """ pass def removeAccount(self, accountId): """ Parameters: - accountId """ pass def listActiveAccounts(self): pass def addProxy(self, proxyId, proxyData): """ Parameters: - proxyId - proxyData """ pass def suspendProxy(self, proxyId): """ Parameters: - proxyId """ pass def resumeProxy(self, proxyId): """ Parameters: - proxyId """ pass def removeProxy(self, proxyId): """ Parameters: - proxyId """ pass def listActiveProxies(self): pass class Client(pangramia.base_service.BaseService.Client, Iface): def __init__(self, iprot, oprot=None): pangramia.base_service.BaseService.Client.__init__(self, iprot, oprot) def addAccountPair(self, accountId, proxyId, machineId, proxyData, accountData): """ Parameters: - accountId - proxyId - machineId - proxyData - accountData """ self.send_addAccountPair(accountId, proxyId, machineId, proxyData, accountData) return self.recv_addAccountPair() def send_addAccountPair(self, accountId, proxyId, machineId, proxyData, accountData): self._oprot.writeMessageBegin('addAccountPair', TMessageType.CALL, self._seqid) args = addAccountPair_args() args.accountId = accountId args.proxyId = proxyId args.machineId = machineId args.proxyData = proxyData args.accountData = accountData args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_addAccountPair(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = addAccountPair_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.serviceExp is not None: raise result.serviceExp if result.userExp is not None: raise result.userExp raise TApplicationException(TApplicationException.MISSING_RESULT, "addAccountPair failed: unknown result") def getPair(self, machineId): """ Parameters: - machineId """ self.send_getPair(machineId) return self.recv_getPair() def send_getPair(self, machineId): self._oprot.writeMessageBegin('getPair', TMessageType.CALL, self._seqid) args = getPair_args() args.machineId = machineId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getPair(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getPair_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.serviceExp is not None: raise result.serviceExp if result.userExp is not None: raise result.userExp raise TApplicationException(TApplicationException.MISSING_RESULT, "getPair failed: unknown result") def pair(self, accountId, proxyId, machineId): """ Parameters: - accountId - proxyId - machineId """ self.send_pair(accountId, proxyId, machineId) return self.recv_pair() def send_pair(self, accountId, proxyId, machineId): self._oprot.writeMessageBegin('pair', TMessageType.CALL, self._seqid) args = pair_args() args.accountId = accountId args.proxyId = proxyId args.machineId = machineId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_pair(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = pair_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.serviceExp is not None: raise result.serviceExp if result.userExp is not None: raise result.userExp raise TApplicationException(TApplicationException.MISSING_RESULT, "pair failed: unknown result") def unpair(self, accountId, proxyId, machineId): """ Parameters: - accountId - proxyId - machineId """ self.send_unpair(accountId, proxyId, machineId) return self.recv_unpair() def send_unpair(self, accountId, proxyId, machineId): self._oprot.writeMessageBegin('unpair', TMessageType.CALL, self._seqid) args = unpair_args() args.accountId = accountId args.proxyId = proxyId args.machineId = machineId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_unpair(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = unpair_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.serviceExp is not None: raise result.serviceExp if result.userExp is not None: raise result.userExp raise TApplicationException(TApplicationException.MISSING_RESULT, "unpair failed: unknown result") def listAccountPairs(self, filter): """ Parameters: - filter """ self.send_listAccountPairs(filter) return self.recv_listAccountPairs() def send_listAccountPairs(self, filter): self._oprot.writeMessageBegin('listAccountPairs', TMessageType.CALL, self._seqid) args = listAccountPairs_args() args.filter = filter args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_listAccountPairs(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = listAccountPairs_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.serviceExp is not None: raise result.serviceExp if result.userExp is not None: raise result.userExp raise TApplicationException(TApplicationException.MISSING_RESULT, "listAccountPairs failed: unknown result") def addAccount(self, accountId, accountData): """ Parameters: - accountId - accountData """ self.send_addAccount(accountId, accountData) return self.recv_addAccount() def send_addAccount(self, accountId, accountData): self._oprot.writeMessageBegin('addAccount', TMessageType.CALL, self._seqid) args = addAccount_args() args.accountId = accountId args.accountData = accountData args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_addAccount(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = addAccount_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.serviceExp is not None: raise result.serviceExp if result.userExp is not None: raise result.userExp raise TApplicationException(TApplicationException.MISSING_RESULT, "addAccount failed: unknown result") def suspendAccount(self, accountId): """ Parameters: - accountId """ self.send_suspendAccount(accountId) return self.recv_suspendAccount() def send_suspendAccount(self, accountId): self._oprot.writeMessageBegin('suspendAccount', TMessageType.CALL, self._seqid) args = suspendAccount_args() args.accountId = accountId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_suspendAccount(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = suspendAccount_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.serviceExp is not None: raise result.serviceExp if result.userExp is not None: raise result.userExp raise TApplicationException(TApplicationException.MISSING_RESULT, "suspendAccount failed: unknown result") def resumeAccount(self, accountId): """ Parameters: - accountId """ self.send_resumeAccount(accountId) return self.recv_resumeAccount() def send_resumeAccount(self, accountId): self._oprot.writeMessageBegin('resumeAccount', TMessageType.CALL, self._seqid) args = resumeAccount_args() args.accountId = accountId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_resumeAccount(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = resumeAccount_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.serviceExp is not None: raise result.serviceExp if result.userExp is not None: raise result.userExp raise TApplicationException(TApplicationException.MISSING_RESULT, "resumeAccount failed: unknown result") def removeAccount(self, accountId): """ Parameters: - accountId """ self.send_removeAccount(accountId) return self.recv_removeAccount() def send_removeAccount(self, accountId): self._oprot.writeMessageBegin('removeAccount', TMessageType.CALL, self._seqid) args = removeAccount_args() args.accountId = accountId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_removeAccount(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = removeAccount_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.serviceExp is not None: raise result.serviceExp if result.userExp is not None: raise result.userExp raise TApplicationException(TApplicationException.MISSING_RESULT, "removeAccount failed: unknown result") def listActiveAccounts(self): self.send_listActiveAccounts() return self.recv_listActiveAccounts() def send_listActiveAccounts(self): self._oprot.writeMessageBegin('listActiveAccounts', TMessageType.CALL, self._seqid) args = listActiveAccounts_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_listActiveAccounts(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = listActiveAccounts_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.serviceExp is not None: raise result.serviceExp if result.userExp is not None: raise result.userExp raise TApplicationException(TApplicationException.MISSING_RESULT, "listActiveAccounts failed: unknown result") def addProxy(self, proxyId, proxyData): """ Parameters: - proxyId - proxyData """ self.send_addProxy(proxyId, proxyData) return self.recv_addProxy() def send_addProxy(self, proxyId, proxyData): self._oprot.writeMessageBegin('addProxy', TMessageType.CALL, self._seqid) args = addProxy_args() args.proxyId = proxyId args.proxyData = proxyData args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_addProxy(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = addProxy_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.serviceExp is not None: raise result.serviceExp if result.userExp is not None: raise result.userExp raise TApplicationException(TApplicationException.MISSING_RESULT, "addProxy failed: unknown result") def suspendProxy(self, proxyId): """ Parameters: - proxyId """ self.send_suspendProxy(proxyId) return self.recv_suspendProxy() def send_suspendProxy(self, proxyId): self._oprot.writeMessageBegin('suspendProxy', TMessageType.CALL, self._seqid) args = suspendProxy_args() args.proxyId = proxyId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_suspendProxy(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = suspendProxy_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.serviceExp is not None: raise result.serviceExp if result.userExp is not None: raise result.userExp raise TApplicationException(TApplicationException.MISSING_RESULT, "suspendProxy failed: unknown result") def resumeProxy(self, proxyId): """ Parameters: - proxyId """ self.send_resumeProxy(proxyId) return self.recv_resumeProxy() def send_resumeProxy(self, proxyId): self._oprot.writeMessageBegin('resumeProxy', TMessageType.CALL, self._seqid) args = resumeProxy_args() args.proxyId = proxyId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_resumeProxy(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = resumeProxy_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.serviceExp is not None: raise result.serviceExp if result.userExp is not None: raise result.userExp raise TApplicationException(TApplicationException.MISSING_RESULT, "resumeProxy failed: unknown result") def removeProxy(self, proxyId): """ Parameters: - proxyId """ self.send_removeProxy(proxyId) return self.recv_removeProxy() def send_removeProxy(self, proxyId): self._oprot.writeMessageBegin('removeProxy', TMessageType.CALL, self._seqid) args = removeProxy_args() args.proxyId = proxyId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_removeProxy(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = removeProxy_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.serviceExp is not None: raise result.serviceExp if result.userExp is not None: raise result.userExp raise TApplicationException(TApplicationException.MISSING_RESULT, "removeProxy failed: unknown result") def listActiveProxies(self): self.send_listActiveProxies() return self.recv_listActiveProxies() def send_listActiveProxies(self): self._oprot.writeMessageBegin('listActiveProxies', TMessageType.CALL, self._seqid) args = listActiveProxies_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_listActiveProxies(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = listActiveProxies_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.serviceExp is not None: raise result.serviceExp if result.userExp is not None: raise result.userExp raise TApplicationException(TApplicationException.MISSING_RESULT, "listActiveProxies failed: unknown result") class Processor(pangramia.base_service.BaseService.Processor, Iface, TProcessor): def __init__(self, handler): pangramia.base_service.BaseService.Processor.__init__(self, handler) self._processMap["addAccountPair"] = Processor.process_addAccountPair self._processMap["getPair"] = Processor.process_getPair self._processMap["pair"] = Processor.process_pair self._processMap["unpair"] = Processor.process_unpair self._processMap["listAccountPairs"] = Processor.process_listAccountPairs self._processMap["addAccount"] = Processor.process_addAccount self._processMap["suspendAccount"] = Processor.process_suspendAccount self._processMap["resumeAccount"] = Processor.process_resumeAccount self._processMap["removeAccount"] = Processor.process_removeAccount self._processMap["listActiveAccounts"] = Processor.process_listActiveAccounts self._processMap["addProxy"] = Processor.process_addProxy self._processMap["suspendProxy"] = Processor.process_suspendProxy self._processMap["resumeProxy"] = Processor.process_resumeProxy self._processMap["removeProxy"] = Processor.process_removeProxy self._processMap["listActiveProxies"] = Processor.process_listActiveProxies self._on_message_begin = None def on_message_begin(self, func): self._on_message_begin = func def process(self, iprot, oprot): (name, type, seqid) = iprot.readMessageBegin() if self._on_message_begin: self._on_message_begin(name, type, seqid) 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() return else: self._processMap[name](self, seqid, iprot, oprot) return True def process_addAccountPair(self, seqid, iprot, oprot): args = addAccountPair_args() args.read(iprot) iprot.readMessageEnd() result = addAccountPair_result() try: result.success = self._handler.addAccountPair(args.accountId, args.proxyId, args.machineId, args.proxyData, args.accountData) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except pangramia.yt.exceptions.ttypes.PBServiceException as serviceExp: msg_type = TMessageType.REPLY result.serviceExp = serviceExp except pangramia.yt.exceptions.ttypes.PBUserException as userExp: msg_type = TMessageType.REPLY result.userExp = userExp except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("addAccountPair", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getPair(self, seqid, iprot, oprot): args = getPair_args() args.read(iprot) iprot.readMessageEnd() result = getPair_result() try: result.success = self._handler.getPair(args.machineId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except pangramia.yt.exceptions.ttypes.PBServiceException as serviceExp: msg_type = TMessageType.REPLY result.serviceExp = serviceExp except pangramia.yt.exceptions.ttypes.PBUserException as userExp: msg_type = TMessageType.REPLY result.userExp = userExp except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getPair", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_pair(self, seqid, iprot, oprot): args = pair_args() args.read(iprot) iprot.readMessageEnd() result = pair_result() try: result.success = self._handler.pair(args.accountId, args.proxyId, args.machineId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except pangramia.yt.exceptions.ttypes.PBServiceException as serviceExp: msg_type = TMessageType.REPLY result.serviceExp = serviceExp except pangramia.yt.exceptions.ttypes.PBUserException as userExp: msg_type = TMessageType.REPLY result.userExp = userExp except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("pair", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_unpair(self, seqid, iprot, oprot): args = unpair_args() args.read(iprot) iprot.readMessageEnd() result = unpair_result() try: result.success = self._handler.unpair(args.accountId, args.proxyId, args.machineId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except pangramia.yt.exceptions.ttypes.PBServiceException as serviceExp: msg_type = TMessageType.REPLY result.serviceExp = serviceExp except pangramia.yt.exceptions.ttypes.PBUserException as userExp: msg_type = TMessageType.REPLY result.userExp = userExp except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("unpair", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_listAccountPairs(self, seqid, iprot, oprot): args = listAccountPairs_args() args.read(iprot) iprot.readMessageEnd() result = listAccountPairs_result() try: result.success = self._handler.listAccountPairs(args.filter) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except pangramia.yt.exceptions.ttypes.PBServiceException as serviceExp: msg_type = TMessageType.REPLY result.serviceExp = serviceExp except pangramia.yt.exceptions.ttypes.PBUserException as userExp: msg_type = TMessageType.REPLY result.userExp = userExp except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("listAccountPairs", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_addAccount(self, seqid, iprot, oprot): args = addAccount_args() args.read(iprot) iprot.readMessageEnd() result = addAccount_result() try: result.success = self._handler.addAccount(args.accountId, args.accountData) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except pangramia.yt.exceptions.ttypes.PBServiceException as serviceExp: msg_type = TMessageType.REPLY result.serviceExp = serviceExp except pangramia.yt.exceptions.ttypes.PBUserException as userExp: msg_type = TMessageType.REPLY result.userExp = userExp except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("addAccount", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_suspendAccount(self, seqid, iprot, oprot): args = suspendAccount_args() args.read(iprot) iprot.readMessageEnd() result = suspendAccount_result() try: result.success = self._handler.suspendAccount(args.accountId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except pangramia.yt.exceptions.ttypes.PBServiceException as serviceExp: msg_type = TMessageType.REPLY result.serviceExp = serviceExp except pangramia.yt.exceptions.ttypes.PBUserException as userExp: msg_type = TMessageType.REPLY result.userExp = userExp except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("suspendAccount", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_resumeAccount(self, seqid, iprot, oprot): args = resumeAccount_args() args.read(iprot) iprot.readMessageEnd() result = resumeAccount_result() try: result.success = self._handler.resumeAccount(args.accountId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except pangramia.yt.exceptions.ttypes.PBServiceException as serviceExp: msg_type = TMessageType.REPLY result.serviceExp = serviceExp except pangramia.yt.exceptions.ttypes.PBUserException as userExp: msg_type = TMessageType.REPLY result.userExp = userExp except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("resumeAccount", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_removeAccount(self, seqid, iprot, oprot): args = removeAccount_args() args.read(iprot) iprot.readMessageEnd() result = removeAccount_result() try: result.success = self._handler.removeAccount(args.accountId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except pangramia.yt.exceptions.ttypes.PBServiceException as serviceExp: msg_type = TMessageType.REPLY result.serviceExp = serviceExp except pangramia.yt.exceptions.ttypes.PBUserException as userExp: msg_type = TMessageType.REPLY result.userExp = userExp except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("removeAccount", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_listActiveAccounts(self, seqid, iprot, oprot): args = listActiveAccounts_args() args.read(iprot) iprot.readMessageEnd() result = listActiveAccounts_result() try: result.success = self._handler.listActiveAccounts() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except pangramia.yt.exceptions.ttypes.PBServiceException as serviceExp: msg_type = TMessageType.REPLY result.serviceExp = serviceExp except pangramia.yt.exceptions.ttypes.PBUserException as userExp: msg_type = TMessageType.REPLY result.userExp = userExp except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("listActiveAccounts", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_addProxy(self, seqid, iprot, oprot): args = addProxy_args() args.read(iprot) iprot.readMessageEnd() result = addProxy_result() try: result.success = self._handler.addProxy(args.proxyId, args.proxyData) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except pangramia.yt.exceptions.ttypes.PBServiceException as serviceExp: msg_type = TMessageType.REPLY result.serviceExp = serviceExp except pangramia.yt.exceptions.ttypes.PBUserException as userExp: msg_type = TMessageType.REPLY result.userExp = userExp except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("addProxy", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_suspendProxy(self, seqid, iprot, oprot): args = suspendProxy_args() args.read(iprot) iprot.readMessageEnd() result = suspendProxy_result() try: result.success = self._handler.suspendProxy(args.proxyId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except pangramia.yt.exceptions.ttypes.PBServiceException as serviceExp: msg_type = TMessageType.REPLY result.serviceExp = serviceExp except pangramia.yt.exceptions.ttypes.PBUserException as userExp: msg_type = TMessageType.REPLY result.userExp = userExp except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("suspendProxy", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_resumeProxy(self, seqid, iprot, oprot): args = resumeProxy_args() args.read(iprot) iprot.readMessageEnd() result = resumeProxy_result() try: result.success = self._handler.resumeProxy(args.proxyId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except pangramia.yt.exceptions.ttypes.PBServiceException as serviceExp: msg_type = TMessageType.REPLY result.serviceExp = serviceExp except pangramia.yt.exceptions.ttypes.PBUserException as userExp: msg_type = TMessageType.REPLY result.userExp = userExp except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("resumeProxy", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_removeProxy(self, seqid, iprot, oprot): args = removeProxy_args() args.read(iprot) iprot.readMessageEnd() result = removeProxy_result() try: result.success = self._handler.removeProxy(args.proxyId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except pangramia.yt.exceptions.ttypes.PBServiceException as serviceExp: msg_type = TMessageType.REPLY result.serviceExp = serviceExp except pangramia.yt.exceptions.ttypes.PBUserException as userExp: msg_type = TMessageType.REPLY result.userExp = userExp except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("removeProxy", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_listActiveProxies(self, seqid, iprot, oprot): args = listActiveProxies_args() args.read(iprot) iprot.readMessageEnd() result = listActiveProxies_result() try: result.success = self._handler.listActiveProxies() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except pangramia.yt.exceptions.ttypes.PBServiceException as serviceExp: msg_type = TMessageType.REPLY result.serviceExp = serviceExp except pangramia.yt.exceptions.ttypes.PBUserException as userExp: msg_type = TMessageType.REPLY result.userExp = userExp except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("listActiveProxies", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() # HELPER FUNCTIONS AND STRUCTURES class addAccountPair_args(object): """ Attributes: - accountId - proxyId - machineId - proxyData - accountData """ def __init__(self, accountId=None, proxyId=None, machineId=None, proxyData=None, accountData=None,): self.accountId = accountId self.proxyId = proxyId self.machineId = machineId self.proxyData = proxyData self.accountData = accountData def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.accountId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.proxyId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.machineId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRUCT: self.proxyData = pangramia.yt.common.ttypes.ProxyData() self.proxyData.read(iprot) else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRUCT: self.accountData = pangramia.yt.common.ttypes.AccountData() self.accountData.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('addAccountPair_args') if self.accountId is not None: oprot.writeFieldBegin('accountId', TType.STRING, 1) oprot.writeString(self.accountId.encode('utf-8') if sys.version_info[0] == 2 else self.accountId) oprot.writeFieldEnd() if self.proxyId is not None: oprot.writeFieldBegin('proxyId', TType.STRING, 2) oprot.writeString(self.proxyId.encode('utf-8') if sys.version_info[0] == 2 else self.proxyId) oprot.writeFieldEnd() if self.machineId is not None: oprot.writeFieldBegin('machineId', TType.STRING, 3) oprot.writeString(self.machineId.encode('utf-8') if sys.version_info[0] == 2 else self.machineId) oprot.writeFieldEnd() if self.proxyData is not None: oprot.writeFieldBegin('proxyData', TType.STRUCT, 4) self.proxyData.write(oprot) oprot.writeFieldEnd() if self.accountData is not None: oprot.writeFieldBegin('accountData', TType.STRUCT, 5) self.accountData.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(addAccountPair_args) addAccountPair_args.thrift_spec = ( None, # 0 (1, TType.STRING, 'accountId', 'UTF8', None, ), # 1 (2, TType.STRING, 'proxyId', 'UTF8', None, ), # 2 (3, TType.STRING, 'machineId', 'UTF8', None, ), # 3 (4, TType.STRUCT, 'proxyData', [pangramia.yt.common.ttypes.ProxyData, None], None, ), # 4 (5, TType.STRUCT, 'accountData', [pangramia.yt.common.ttypes.AccountData, None], None, ), # 5 ) class addAccountPair_result(object): """ Attributes: - success - serviceExp - userExp """ def __init__(self, success=None, serviceExp=None, userExp=None,): self.success = success self.serviceExp = serviceExp self.userExp = userExp def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.BOOL: self.success = iprot.readBool() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.serviceExp = pangramia.yt.exceptions.ttypes.PBServiceException.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.userExp = pangramia.yt.exceptions.ttypes.PBUserException.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('addAccountPair_result') if self.success is not None: oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() if self.serviceExp is not None: oprot.writeFieldBegin('serviceExp', TType.STRUCT, 1) self.serviceExp.write(oprot) oprot.writeFieldEnd() if self.userExp is not None: oprot.writeFieldBegin('userExp', TType.STRUCT, 2) self.userExp.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(addAccountPair_result) addAccountPair_result.thrift_spec = ( (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'serviceExp', [pangramia.yt.exceptions.ttypes.PBServiceException, None], None, ), # 1 (2, TType.STRUCT, 'userExp', [pangramia.yt.exceptions.ttypes.PBUserException, None], None, ), # 2 ) class getPair_args(object): """ Attributes: - machineId """ def __init__(self, machineId=None,): self.machineId = machineId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.machineId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getPair_args') if self.machineId is not None: oprot.writeFieldBegin('machineId', TType.STRING, 1) oprot.writeString(self.machineId.encode('utf-8') if sys.version_info[0] == 2 else self.machineId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(getPair_args) getPair_args.thrift_spec = ( None, # 0 (1, TType.STRING, 'machineId', 'UTF8', None, ), # 1 ) class getPair_result(object): """ Attributes: - success - serviceExp - userExp """ def __init__(self, success=None, serviceExp=None, userExp=None,): self.success = success self.serviceExp = serviceExp self.userExp = userExp def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = pangramia.yt.common.ttypes.AccountPairWithState() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.serviceExp = pangramia.yt.exceptions.ttypes.PBServiceException.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.userExp = pangramia.yt.exceptions.ttypes.PBUserException.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getPair_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.serviceExp is not None: oprot.writeFieldBegin('serviceExp', TType.STRUCT, 1) self.serviceExp.write(oprot) oprot.writeFieldEnd() if self.userExp is not None: oprot.writeFieldBegin('userExp', TType.STRUCT, 2) self.userExp.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(getPair_result) getPair_result.thrift_spec = ( (0, TType.STRUCT, 'success', [pangramia.yt.common.ttypes.AccountPairWithState, None], None, ), # 0 (1, TType.STRUCT, 'serviceExp', [pangramia.yt.exceptions.ttypes.PBServiceException, None], None, ), # 1 (2, TType.STRUCT, 'userExp', [pangramia.yt.exceptions.ttypes.PBUserException, None], None, ), # 2 ) class pair_args(object): """ Attributes: - accountId - proxyId - machineId """ def __init__(self, accountId=None, proxyId=None, machineId=None,): self.accountId = accountId self.proxyId = proxyId self.machineId = machineId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.accountId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.proxyId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.machineId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('pair_args') if self.accountId is not None: oprot.writeFieldBegin('accountId', TType.STRING, 1) oprot.writeString(self.accountId.encode('utf-8') if sys.version_info[0] == 2 else self.accountId) oprot.writeFieldEnd() if self.proxyId is not None: oprot.writeFieldBegin('proxyId', TType.STRING, 2) oprot.writeString(self.proxyId.encode('utf-8') if sys.version_info[0] == 2 else self.proxyId) oprot.writeFieldEnd() if self.machineId is not None: oprot.writeFieldBegin('machineId', TType.STRING, 3) oprot.writeString(self.machineId.encode('utf-8') if sys.version_info[0] == 2 else self.machineId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(pair_args) pair_args.thrift_spec = ( None, # 0 (1, TType.STRING, 'accountId', 'UTF8', None, ), # 1 (2, TType.STRING, 'proxyId', 'UTF8', None, ), # 2 (3, TType.STRING, 'machineId', 'UTF8', None, ), # 3 ) class pair_result(object): """ Attributes: - success - serviceExp - userExp """ def __init__(self, success=None, serviceExp=None, userExp=None,): self.success = success self.serviceExp = serviceExp self.userExp = userExp def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.BOOL: self.success = iprot.readBool() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.serviceExp = pangramia.yt.exceptions.ttypes.PBServiceException.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.userExp = pangramia.yt.exceptions.ttypes.PBUserException.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('pair_result') if self.success is not None: oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() if self.serviceExp is not None: oprot.writeFieldBegin('serviceExp', TType.STRUCT, 1) self.serviceExp.write(oprot) oprot.writeFieldEnd() if self.userExp is not None: oprot.writeFieldBegin('userExp', TType.STRUCT, 2) self.userExp.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(pair_result) pair_result.thrift_spec = ( (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'serviceExp', [pangramia.yt.exceptions.ttypes.PBServiceException, None], None, ), # 1 (2, TType.STRUCT, 'userExp', [pangramia.yt.exceptions.ttypes.PBUserException, None], None, ), # 2 ) class unpair_args(object): """ Attributes: - accountId - proxyId - machineId """ def __init__(self, accountId=None, proxyId=None, machineId=None,): self.accountId = accountId self.proxyId = proxyId self.machineId = machineId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.accountId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.proxyId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.machineId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('unpair_args') if self.accountId is not None: oprot.writeFieldBegin('accountId', TType.STRING, 1) oprot.writeString(self.accountId.encode('utf-8') if sys.version_info[0] == 2 else self.accountId) oprot.writeFieldEnd() if self.proxyId is not None: oprot.writeFieldBegin('proxyId', TType.STRING, 2) oprot.writeString(self.proxyId.encode('utf-8') if sys.version_info[0] == 2 else self.proxyId) oprot.writeFieldEnd() if self.machineId is not None: oprot.writeFieldBegin('machineId', TType.STRING, 3) oprot.writeString(self.machineId.encode('utf-8') if sys.version_info[0] == 2 else self.machineId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(unpair_args) unpair_args.thrift_spec = ( None, # 0 (1, TType.STRING, 'accountId', 'UTF8', None, ), # 1 (2, TType.STRING, 'proxyId', 'UTF8', None, ), # 2 (3, TType.STRING, 'machineId', 'UTF8', None, ), # 3 ) class unpair_result(object): """ Attributes: - success - serviceExp - userExp """ def __init__(self, success=None, serviceExp=None, userExp=None,): self.success = success self.serviceExp = serviceExp self.userExp = userExp def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.BOOL: self.success = iprot.readBool() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.serviceExp = pangramia.yt.exceptions.ttypes.PBServiceException.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.userExp = pangramia.yt.exceptions.ttypes.PBUserException.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('unpair_result') if self.success is not None: oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() if self.serviceExp is not None: oprot.writeFieldBegin('serviceExp', TType.STRUCT, 1) self.serviceExp.write(oprot) oprot.writeFieldEnd() if self.userExp is not None: oprot.writeFieldBegin('userExp', TType.STRUCT, 2) self.userExp.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(unpair_result) unpair_result.thrift_spec = ( (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'serviceExp', [pangramia.yt.exceptions.ttypes.PBServiceException, None], None, ), # 1 (2, TType.STRUCT, 'userExp', [pangramia.yt.exceptions.ttypes.PBUserException, None], None, ), # 2 ) class listAccountPairs_args(object): """ Attributes: - filter """ def __init__(self, filter=None,): self.filter = filter def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.filter = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('listAccountPairs_args') if self.filter is not None: oprot.writeFieldBegin('filter', TType.I32, 1) oprot.writeI32(self.filter) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(listAccountPairs_args) listAccountPairs_args.thrift_spec = ( None, # 0 (1, TType.I32, 'filter', None, None, ), # 1 ) class listAccountPairs_result(object): """ Attributes: - success - serviceExp - userExp """ def __init__(self, success=None, serviceExp=None, userExp=None,): self.success = success self.serviceExp = serviceExp self.userExp = userExp def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype3, _size0) = iprot.readListBegin() for _i4 in range(_size0): _elem5 = pangramia.yt.common.ttypes.AccountPairWithState() _elem5.read(iprot) self.success.append(_elem5) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.serviceExp = pangramia.yt.exceptions.ttypes.PBServiceException.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.userExp = pangramia.yt.exceptions.ttypes.PBUserException.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('listAccountPairs_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter6 in self.success: iter6.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.serviceExp is not None: oprot.writeFieldBegin('serviceExp', TType.STRUCT, 1) self.serviceExp.write(oprot) oprot.writeFieldEnd() if self.userExp is not None: oprot.writeFieldBegin('userExp', TType.STRUCT, 2) self.userExp.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(listAccountPairs_result) listAccountPairs_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRUCT, [pangramia.yt.common.ttypes.AccountPairWithState, None], False), None, ), # 0 (1, TType.STRUCT, 'serviceExp', [pangramia.yt.exceptions.ttypes.PBServiceException, None], None, ), # 1 (2, TType.STRUCT, 'userExp', [pangramia.yt.exceptions.ttypes.PBUserException, None], None, ), # 2 ) class addAccount_args(object): """ Attributes: - accountId - accountData """ def __init__(self, accountId=None, accountData=None,): self.accountId = accountId self.accountData = accountData def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.accountId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.accountData = pangramia.yt.common.ttypes.AccountData() self.accountData.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('addAccount_args') if self.accountId is not None: oprot.writeFieldBegin('accountId', TType.STRING, 1) oprot.writeString(self.accountId.encode('utf-8') if sys.version_info[0] == 2 else self.accountId) oprot.writeFieldEnd() if self.accountData is not None: oprot.writeFieldBegin('accountData', TType.STRUCT, 2) self.accountData.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(addAccount_args) addAccount_args.thrift_spec = ( None, # 0 (1, TType.STRING, 'accountId', 'UTF8', None, ), # 1 (2, TType.STRUCT, 'accountData', [pangramia.yt.common.ttypes.AccountData, None], None, ), # 2 ) class addAccount_result(object): """ Attributes: - success - serviceExp - userExp """ def __init__(self, success=None, serviceExp=None, userExp=None,): self.success = success self.serviceExp = serviceExp self.userExp = userExp def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.BOOL: self.success = iprot.readBool() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.serviceExp = pangramia.yt.exceptions.ttypes.PBServiceException.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.userExp = pangramia.yt.exceptions.ttypes.PBUserException.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('addAccount_result') if self.success is not None: oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() if self.serviceExp is not None: oprot.writeFieldBegin('serviceExp', TType.STRUCT, 1) self.serviceExp.write(oprot) oprot.writeFieldEnd() if self.userExp is not None: oprot.writeFieldBegin('userExp', TType.STRUCT, 2) self.userExp.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(addAccount_result) addAccount_result.thrift_spec = ( (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'serviceExp', [pangramia.yt.exceptions.ttypes.PBServiceException, None], None, ), # 1 (2, TType.STRUCT, 'userExp', [pangramia.yt.exceptions.ttypes.PBUserException, None], None, ), # 2 ) class suspendAccount_args(object): """ Attributes: - accountId """ def __init__(self, accountId=None,): self.accountId = accountId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.accountId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('suspendAccount_args') if self.accountId is not None: oprot.writeFieldBegin('accountId', TType.STRING, 1) oprot.writeString(self.accountId.encode('utf-8') if sys.version_info[0] == 2 else self.accountId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(suspendAccount_args) suspendAccount_args.thrift_spec = ( None, # 0 (1, TType.STRING, 'accountId', 'UTF8', None, ), # 1 ) class suspendAccount_result(object): """ Attributes: - success - serviceExp - userExp """ def __init__(self, success=None, serviceExp=None, userExp=None,): self.success = success self.serviceExp = serviceExp self.userExp = userExp def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.BOOL: self.success = iprot.readBool() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.serviceExp = pangramia.yt.exceptions.ttypes.PBServiceException.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.userExp = pangramia.yt.exceptions.ttypes.PBUserException.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('suspendAccount_result') if self.success is not None: oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() if self.serviceExp is not None: oprot.writeFieldBegin('serviceExp', TType.STRUCT, 1) self.serviceExp.write(oprot) oprot.writeFieldEnd() if self.userExp is not None: oprot.writeFieldBegin('userExp', TType.STRUCT, 2) self.userExp.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(suspendAccount_result) suspendAccount_result.thrift_spec = ( (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'serviceExp', [pangramia.yt.exceptions.ttypes.PBServiceException, None], None, ), # 1 (2, TType.STRUCT, 'userExp', [pangramia.yt.exceptions.ttypes.PBUserException, None], None, ), # 2 ) class resumeAccount_args(object): """ Attributes: - accountId """ def __init__(self, accountId=None,): self.accountId = accountId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.accountId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('resumeAccount_args') if self.accountId is not None: oprot.writeFieldBegin('accountId', TType.STRING, 1) oprot.writeString(self.accountId.encode('utf-8') if sys.version_info[0] == 2 else self.accountId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(resumeAccount_args) resumeAccount_args.thrift_spec = ( None, # 0 (1, TType.STRING, 'accountId', 'UTF8', None, ), # 1 ) class resumeAccount_result(object): """ Attributes: - success - serviceExp - userExp """ def __init__(self, success=None, serviceExp=None, userExp=None,): self.success = success self.serviceExp = serviceExp self.userExp = userExp def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.BOOL: self.success = iprot.readBool() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.serviceExp = pangramia.yt.exceptions.ttypes.PBServiceException.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.userExp = pangramia.yt.exceptions.ttypes.PBUserException.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('resumeAccount_result') if self.success is not None: oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() if self.serviceExp is not None: oprot.writeFieldBegin('serviceExp', TType.STRUCT, 1) self.serviceExp.write(oprot) oprot.writeFieldEnd() if self.userExp is not None: oprot.writeFieldBegin('userExp', TType.STRUCT, 2) self.userExp.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(resumeAccount_result) resumeAccount_result.thrift_spec = ( (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'serviceExp', [pangramia.yt.exceptions.ttypes.PBServiceException, None], None, ), # 1 (2, TType.STRUCT, 'userExp', [pangramia.yt.exceptions.ttypes.PBUserException, None], None, ), # 2 ) class removeAccount_args(object): """ Attributes: - accountId """ def __init__(self, accountId=None,): self.accountId = accountId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.accountId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('removeAccount_args') if self.accountId is not None: oprot.writeFieldBegin('accountId', TType.STRING, 1) oprot.writeString(self.accountId.encode('utf-8') if sys.version_info[0] == 2 else self.accountId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(removeAccount_args) removeAccount_args.thrift_spec = ( None, # 0 (1, TType.STRING, 'accountId', 'UTF8', None, ), # 1 ) class removeAccount_result(object): """ Attributes: - success - serviceExp - userExp """ def __init__(self, success=None, serviceExp=None, userExp=None,): self.success = success self.serviceExp = serviceExp self.userExp = userExp def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.BOOL: self.success = iprot.readBool() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.serviceExp = pangramia.yt.exceptions.ttypes.PBServiceException.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.userExp = pangramia.yt.exceptions.ttypes.PBUserException.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('removeAccount_result') if self.success is not None: oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() if self.serviceExp is not None: oprot.writeFieldBegin('serviceExp', TType.STRUCT, 1) self.serviceExp.write(oprot) oprot.writeFieldEnd() if self.userExp is not None: oprot.writeFieldBegin('userExp', TType.STRUCT, 2) self.userExp.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(removeAccount_result) removeAccount_result.thrift_spec = ( (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'serviceExp', [pangramia.yt.exceptions.ttypes.PBServiceException, None], None, ), # 1 (2, TType.STRUCT, 'userExp', [pangramia.yt.exceptions.ttypes.PBUserException, None], None, ), # 2 ) class listActiveAccounts_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('listActiveAccounts_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(listActiveAccounts_args) listActiveAccounts_args.thrift_spec = ( ) class listActiveAccounts_result(object): """ Attributes: - success - serviceExp - userExp """ def __init__(self, success=None, serviceExp=None, userExp=None,): self.success = success self.serviceExp = serviceExp self.userExp = userExp def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype10, _size7) = iprot.readListBegin() for _i11 in range(_size7): _elem12 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success.append(_elem12) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.serviceExp = pangramia.yt.exceptions.ttypes.PBServiceException.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.userExp = pangramia.yt.exceptions.ttypes.PBUserException.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('listActiveAccounts_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) for iter13 in self.success: oprot.writeString(iter13.encode('utf-8') if sys.version_info[0] == 2 else iter13) oprot.writeListEnd() oprot.writeFieldEnd() if self.serviceExp is not None: oprot.writeFieldBegin('serviceExp', TType.STRUCT, 1) self.serviceExp.write(oprot) oprot.writeFieldEnd() if self.userExp is not None: oprot.writeFieldBegin('userExp', TType.STRUCT, 2) self.userExp.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(listActiveAccounts_result) listActiveAccounts_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 (1, TType.STRUCT, 'serviceExp', [pangramia.yt.exceptions.ttypes.PBServiceException, None], None, ), # 1 (2, TType.STRUCT, 'userExp', [pangramia.yt.exceptions.ttypes.PBUserException, None], None, ), # 2 ) class addProxy_args(object): """ Attributes: - proxyId - proxyData """ def __init__(self, proxyId=None, proxyData=None,): self.proxyId = proxyId self.proxyData = proxyData def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.proxyId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.proxyData = pangramia.yt.common.ttypes.ProxyData() self.proxyData.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('addProxy_args') if self.proxyId is not None: oprot.writeFieldBegin('proxyId', TType.STRING, 1) oprot.writeString(self.proxyId.encode('utf-8') if sys.version_info[0] == 2 else self.proxyId) oprot.writeFieldEnd() if self.proxyData is not None: oprot.writeFieldBegin('proxyData', TType.STRUCT, 2) self.proxyData.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(addProxy_args) addProxy_args.thrift_spec = ( None, # 0 (1, TType.STRING, 'proxyId', 'UTF8', None, ), # 1 (2, TType.STRUCT, 'proxyData', [pangramia.yt.common.ttypes.ProxyData, None], None, ), # 2 ) class addProxy_result(object): """ Attributes: - success - serviceExp - userExp """ def __init__(self, success=None, serviceExp=None, userExp=None,): self.success = success self.serviceExp = serviceExp self.userExp = userExp def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.BOOL: self.success = iprot.readBool() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.serviceExp = pangramia.yt.exceptions.ttypes.PBServiceException.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.userExp = pangramia.yt.exceptions.ttypes.PBUserException.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('addProxy_result') if self.success is not None: oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() if self.serviceExp is not None: oprot.writeFieldBegin('serviceExp', TType.STRUCT, 1) self.serviceExp.write(oprot) oprot.writeFieldEnd() if self.userExp is not None: oprot.writeFieldBegin('userExp', TType.STRUCT, 2) self.userExp.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(addProxy_result) addProxy_result.thrift_spec = ( (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'serviceExp', [pangramia.yt.exceptions.ttypes.PBServiceException, None], None, ), # 1 (2, TType.STRUCT, 'userExp', [pangramia.yt.exceptions.ttypes.PBUserException, None], None, ), # 2 ) class suspendProxy_args(object): """ Attributes: - proxyId """ def __init__(self, proxyId=None,): self.proxyId = proxyId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.proxyId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('suspendProxy_args') if self.proxyId is not None: oprot.writeFieldBegin('proxyId', TType.STRING, 1) oprot.writeString(self.proxyId.encode('utf-8') if sys.version_info[0] == 2 else self.proxyId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(suspendProxy_args) suspendProxy_args.thrift_spec = ( None, # 0 (1, TType.STRING, 'proxyId', 'UTF8', None, ), # 1 ) class suspendProxy_result(object): """ Attributes: - success - serviceExp - userExp """ def __init__(self, success=None, serviceExp=None, userExp=None,): self.success = success self.serviceExp = serviceExp self.userExp = userExp def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.BOOL: self.success = iprot.readBool() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.serviceExp = pangramia.yt.exceptions.ttypes.PBServiceException.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.userExp = pangramia.yt.exceptions.ttypes.PBUserException.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('suspendProxy_result') if self.success is not None: oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() if self.serviceExp is not None: oprot.writeFieldBegin('serviceExp', TType.STRUCT, 1) self.serviceExp.write(oprot) oprot.writeFieldEnd() if self.userExp is not None: oprot.writeFieldBegin('userExp', TType.STRUCT, 2) self.userExp.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(suspendProxy_result) suspendProxy_result.thrift_spec = ( (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'serviceExp', [pangramia.yt.exceptions.ttypes.PBServiceException, None], None, ), # 1 (2, TType.STRUCT, 'userExp', [pangramia.yt.exceptions.ttypes.PBUserException, None], None, ), # 2 ) class resumeProxy_args(object): """ Attributes: - proxyId """ def __init__(self, proxyId=None,): self.proxyId = proxyId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.proxyId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('resumeProxy_args') if self.proxyId is not None: oprot.writeFieldBegin('proxyId', TType.STRING, 1) oprot.writeString(self.proxyId.encode('utf-8') if sys.version_info[0] == 2 else self.proxyId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(resumeProxy_args) resumeProxy_args.thrift_spec = ( None, # 0 (1, TType.STRING, 'proxyId', 'UTF8', None, ), # 1 ) class resumeProxy_result(object): """ Attributes: - success - serviceExp - userExp """ def __init__(self, success=None, serviceExp=None, userExp=None,): self.success = success self.serviceExp = serviceExp self.userExp = userExp def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.BOOL: self.success = iprot.readBool() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.serviceExp = pangramia.yt.exceptions.ttypes.PBServiceException.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.userExp = pangramia.yt.exceptions.ttypes.PBUserException.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('resumeProxy_result') if self.success is not None: oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() if self.serviceExp is not None: oprot.writeFieldBegin('serviceExp', TType.STRUCT, 1) self.serviceExp.write(oprot) oprot.writeFieldEnd() if self.userExp is not None: oprot.writeFieldBegin('userExp', TType.STRUCT, 2) self.userExp.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(resumeProxy_result) resumeProxy_result.thrift_spec = ( (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'serviceExp', [pangramia.yt.exceptions.ttypes.PBServiceException, None], None, ), # 1 (2, TType.STRUCT, 'userExp', [pangramia.yt.exceptions.ttypes.PBUserException, None], None, ), # 2 ) class removeProxy_args(object): """ Attributes: - proxyId """ def __init__(self, proxyId=None,): self.proxyId = proxyId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.proxyId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('removeProxy_args') if self.proxyId is not None: oprot.writeFieldBegin('proxyId', TType.STRING, 1) oprot.writeString(self.proxyId.encode('utf-8') if sys.version_info[0] == 2 else self.proxyId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(removeProxy_args) removeProxy_args.thrift_spec = ( None, # 0 (1, TType.STRING, 'proxyId', 'UTF8', None, ), # 1 ) class removeProxy_result(object): """ Attributes: - success - serviceExp - userExp """ def __init__(self, success=None, serviceExp=None, userExp=None,): self.success = success self.serviceExp = serviceExp self.userExp = userExp def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.BOOL: self.success = iprot.readBool() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.serviceExp = pangramia.yt.exceptions.ttypes.PBServiceException.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.userExp = pangramia.yt.exceptions.ttypes.PBUserException.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('removeProxy_result') if self.success is not None: oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() if self.serviceExp is not None: oprot.writeFieldBegin('serviceExp', TType.STRUCT, 1) self.serviceExp.write(oprot) oprot.writeFieldEnd() if self.userExp is not None: oprot.writeFieldBegin('userExp', TType.STRUCT, 2) self.userExp.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(removeProxy_result) removeProxy_result.thrift_spec = ( (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'serviceExp', [pangramia.yt.exceptions.ttypes.PBServiceException, None], None, ), # 1 (2, TType.STRUCT, 'userExp', [pangramia.yt.exceptions.ttypes.PBUserException, None], None, ), # 2 ) class listActiveProxies_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('listActiveProxies_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(listActiveProxies_args) listActiveProxies_args.thrift_spec = ( ) class listActiveProxies_result(object): """ Attributes: - success - serviceExp - userExp """ def __init__(self, success=None, serviceExp=None, userExp=None,): self.success = success self.serviceExp = serviceExp self.userExp = userExp def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype17, _size14) = iprot.readListBegin() for _i18 in range(_size14): _elem19 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success.append(_elem19) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.serviceExp = pangramia.yt.exceptions.ttypes.PBServiceException.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.userExp = pangramia.yt.exceptions.ttypes.PBUserException.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('listActiveProxies_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) for iter20 in self.success: oprot.writeString(iter20.encode('utf-8') if sys.version_info[0] == 2 else iter20) oprot.writeListEnd() oprot.writeFieldEnd() if self.serviceExp is not None: oprot.writeFieldBegin('serviceExp', TType.STRUCT, 1) self.serviceExp.write(oprot) oprot.writeFieldEnd() if self.userExp is not None: oprot.writeFieldBegin('userExp', TType.STRUCT, 2) self.userExp.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] 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) all_structs.append(listActiveProxies_result) listActiveProxies_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 (1, TType.STRUCT, 'serviceExp', [pangramia.yt.exceptions.ttypes.PBServiceException, None], None, ), # 1 (2, TType.STRUCT, 'userExp', [pangramia.yt.exceptions.ttypes.PBUserException, None], None, ), # 2 ) fix_spec(all_structs) del all_structs