write method
Writes the objects out to the oprot
protocol.
Implementation
write(TProtocol oprot) {
validate();
oprot.writeStructBegin(_STRUCT_DESC);
if (this.hostAddr != null) {
oprot.writeFieldBegin(_HOST_ADDR_FIELD_DESC);
this.hostAddr?.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(_STATUS_FIELD_DESC);
oprot.writeI32(this.status);
oprot.writeFieldEnd();
if (this.leader_parts != null) {
oprot.writeFieldBegin(_LEADER_PARTS_FIELD_DESC);
{
oprot.writeMapBegin(
new TMap(TType.STRING, TType.LIST, this.leader_parts?.length));
for (var elem27 in this.leader_parts?.keys ?? <Int8List>[]) {
oprot.writeBinary(elem27);
{
oprot.writeListBegin(
new TList(TType.I32, this.leader_parts?[elem27]?.length));
for (var elem28 in this.leader_parts?[elem27] ?? <int>[]) {
oprot.writeI32(elem28);
}
oprot.writeListEnd();
}
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
if (this.all_parts != null) {
oprot.writeFieldBegin(_ALL_PARTS_FIELD_DESC);
{
oprot.writeMapBegin(
new TMap(TType.STRING, TType.LIST, this.all_parts?.length));
for (var elem30 in this.all_parts?.keys ?? <Int8List>[]) {
oprot.writeBinary(elem30);
{
oprot.writeListBegin(
new TList(TType.I32, this.all_parts?[elem30]?.length));
for (var elem31 in this.all_parts?[elem30] ?? <int>[]) {
oprot.writeI32(elem31);
}
oprot.writeListEnd();
}
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(_ROLE_FIELD_DESC);
oprot.writeI32(this.role);
oprot.writeFieldEnd();
if (this.git_info_sha != null) {
oprot.writeFieldBegin(_GIT_INFO_SHA_FIELD_DESC);
oprot.writeBinary(this.git_info_sha);
oprot.writeFieldEnd();
}
if (isSetZone_name()) {
if (this.zone_name != null) {
oprot.writeFieldBegin(_ZONE_NAME_FIELD_DESC);
oprot.writeBinary(this.zone_name);
oprot.writeFieldEnd();
}
}
if (isSetVersion()) {
if (this.version != null) {
oprot.writeFieldBegin(_VERSION_FIELD_DESC);
oprot.writeBinary(this.version);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}