def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return 0 if oprot.writeSandeshBegin('RestApiTrace') < 0: return -1 if self.file is not None: annotations = {} if oprot.writeFieldBegin('file', TType.STRING, -32768, annotations) < 0: return -1 if oprot.writeString(self.file) < 0: return -1 if oprot.writeFieldEnd() < 0: return -1 if self.line is not None: annotations = {} if oprot.writeFieldBegin('line', TType.I32, -32767, annotations) < 0: return -1 if oprot.writeI32(self.line) < 0: return -1 if oprot.writeFieldEnd() < 0: return -1 if self.request_id is not None: annotations = {} if oprot.writeFieldBegin('request_id', TType.STRING, 1, annotations) < 0: return -1 if oprot.writeString(self.request_id) < 0: return -1 if oprot.writeFieldEnd() < 0: return -1 if self.url is not None: annotations = {} if oprot.writeFieldBegin('url', TType.STRING, 2, annotations) < 0: return -1 if oprot.writeString(self.url) < 0: return -1 if oprot.writeFieldEnd() < 0: return -1 if self.method is not None: annotations = {} if oprot.writeFieldBegin('method', TType.STRING, 3, annotations) < 0: return -1 if oprot.writeString(self.method) < 0: return -1 if oprot.writeFieldEnd() < 0: return -1 if self.request_data is not None: annotations = {} if oprot.writeFieldBegin('request_data', TType.STRING, 4, annotations) < 0: return -1 if oprot.writeString(self.request_data) < 0: return -1 if oprot.writeFieldEnd() < 0: return -1 if self.status is not None: annotations = {} if oprot.writeFieldBegin('status', TType.STRING, 5, annotations) < 0: return -1 if oprot.writeString(self.status) < 0: return -1 if oprot.writeFieldEnd() < 0: return -1 if self.response_body is not None: annotations = {} if oprot.writeFieldBegin('response_body', TType.STRING, 6, annotations) < 0: return -1 if oprot.writeString(self.response_body) < 0: return -1 if oprot.writeFieldEnd() < 0: return -1 if self.request_error is not None: annotations = {} if oprot.writeFieldBegin('request_error', TType.STRING, 7, annotations) < 0: return -1 if oprot.writeString(self.request_error) < 0: return -1 if oprot.writeFieldEnd() < 0: return -1 if oprot.writeFieldStop() < 0: return -1 if oprot.writeSandeshEnd() < 0: return -1 return 0
def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return 0 if oprot.writeSandeshBegin('IfmapTrace') < 0: return -1 if self.file is not None: annotations = {} if oprot.writeFieldBegin('file', TType.STRING, -32768, annotations) < 0: return -1 if oprot.writeString(self.file) < 0: return -1 if oprot.writeFieldEnd() < 0: return -1 if self.line is not None: annotations = {} if oprot.writeFieldBegin('line', TType.I32, -32767, annotations) < 0: return -1 if oprot.writeI32(self.line) < 0: return -1 if oprot.writeFieldEnd() < 0: return -1 if self.request_id is not None: annotations = {} if oprot.writeFieldBegin('request_id', TType.STRING, 1, annotations) < 0: return -1 if oprot.writeString(self.request_id) < 0: return -1 if oprot.writeFieldEnd() < 0: return -1 if self.operation is not None: annotations = {} if oprot.writeFieldBegin('operation', TType.STRING, 2, annotations) < 0: return -1 if oprot.writeString(self.operation) < 0: return -1 if oprot.writeFieldEnd() < 0: return -1 if self.body is not None: annotations = {} if oprot.writeFieldBegin('body', TType.STRING, 3, annotations) < 0: return -1 if oprot.writeString(self.body) < 0: return -1 if oprot.writeFieldEnd() < 0: return -1 if self.error is not None: annotations = {} if oprot.writeFieldBegin('error', TType.STRING, 4, annotations) < 0: return -1 if oprot.writeString(self.error) < 0: return -1 if oprot.writeFieldEnd() < 0: return -1 if oprot.writeFieldStop() < 0: return -1 if oprot.writeSandeshEnd() < 0: return -1 return 0