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.indexes != null) {
oprot.writeFieldBegin(_INDEXES_FIELD_DESC);
{
oprot.writeMapBegin(
new TMap(TType.STRING, TType.STRUCT, this.indexes?.length));
for (var elem337 in this.indexes?.keys ?? <Int8List>[]) {
oprot.writeBinary(elem337);
this.indexes?[elem337]?.write(oprot);
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}