write method
Writes the objects out to the oprot
protocol.
Implementation
write(TProtocol oprot) {
validate();
oprot.writeStructBegin(_STRUCT_DESC);
oprot.writeFieldBegin(_CODE_FIELD_DESC);
oprot.writeI32(this.code);
oprot.writeFieldEnd();
if (this.leader != null) {
oprot.writeFieldBegin(_LEADER_FIELD_DESC);
this.leader?.write(oprot);
oprot.writeFieldEnd();
}
if (this.killed_queries != null) {
oprot.writeFieldBegin(_KILLED_QUERIES_FIELD_DESC);
{
oprot.writeMapBegin(
new TMap(TType.I64, TType.MAP, this.killed_queries?.length));
for (var elem366 in this.killed_queries?.keys ?? <int>[]) {
oprot.writeI64(elem366);
{
oprot.writeMapBegin(new TMap(TType.I64, TType.STRUCT,
this.killed_queries?[elem366]?.length));
for (var elem368
in this.killed_queries?[elem366]?.keys ?? <int>[]) {
oprot.writeI64(elem368);
this.killed_queries?[elem366]?[elem368]?.write(oprot);
}
oprot.writeMapEnd();
}
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
if (this.killed_sessions != null) {
oprot.writeFieldBegin(_KILLED_SESSIONS_FIELD_DESC);
{
oprot
.writeListBegin(new TList(TType.I64, this.killed_sessions?.length));
for (var elem369 in this.killed_sessions ?? <int>[]) {
oprot.writeI64(elem369);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}