write method

void write(
  1. TProtocol oprot
)
override

Writes the objects out to the oprot protocol.

Implementation

write(TProtocol oprot) {
  validate();

  oprot.writeStructBegin(_STRUCT_DESC);
  if (this.hosts != null) {
    oprot.writeFieldBegin(_HOSTS_FIELD_DESC);
    {
      oprot.writeListBegin(new TList(TType.STRUCT, this.hosts?.length));
      for (var elem245 in this.hosts ?? []) {
        elem245.write(oprot);
      }
      oprot.writeListEnd();
    }
    oprot.writeFieldEnd();
  }
  if (this.zone_name != null) {
    oprot.writeFieldBegin(_ZONE_NAME_FIELD_DESC);
    oprot.writeBinary(this.zone_name);
    oprot.writeFieldEnd();
  }
  oprot.writeFieldBegin(_IS_NEW_FIELD_DESC);
  oprot.writeBool(this.is_new);
  oprot.writeFieldEnd();
  oprot.writeFieldStop();
  oprot.writeStructEnd();
}