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('PaymentResponse')
if self.serverId is not None:
oprot.writeFieldBegin('serverId', TType.STRING, 1)
oprot.writeString(self.serverId.encode('utf-8') if sys.version_info[0] == 2 else self.serverId)
oprot.writeFieldEnd()
if self.clientId is not None:
oprot.writeFieldBegin('clientId', TType.STRING, 2)
oprot.writeString(self.clientId.encode('utf-8') if sys.version_info[0] == 2 else self.clientId)
oprot.writeFieldEnd()
if self.totalPaid is not None:
oprot.writeFieldBegin('totalPaid', TType.I32, 3)
oprot.writeI32(self.totalPaid)
oprot.writeFieldEnd()
if self.serviceDeliveryToken is not None:
oprot.writeFieldBegin('serviceDeliveryToken', TType.STRUCT, 4)
self.serviceDeliveryToken.write(oprot)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
评论列表
文章目录