def write(self, oprot): if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL) ) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write( fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) return if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL) ) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write( fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return oprot.writeStructBegin('executeJson_args') if self.sessionId != None: oprot.writeFieldBegin('sessionId', TType.I64, 1) oprot.writeI64(self.sessionId) oprot.writeFieldEnd() if self.stmt != None: oprot.writeFieldBegin('stmt', TType.STRING, 2) oprot.writeString(self.stmt) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd()
def write(self, oprot): if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL) ) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write( fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) return if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL) ) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write( fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return oprot.writeStructBegin('remove_result') if self.success != None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd()
def write(self, oprot): if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL) ) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write( fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) return if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL) ) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write( fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return oprot.writeStructBegin('authenticate_args') if self.username != None: oprot.writeFieldBegin('username', TType.STRING, 1) oprot.writeString(self.username) oprot.writeFieldEnd() if self.password != None: oprot.writeFieldBegin('password', TType.STRING, 2) oprot.writeString(self.password) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd()