public void Write(TProtocol oprot)
{
TStruct struc = new TStruct("scannerOpenTs_result");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (this.__isset.success) {
field.Name = "success";
field.Type = TType.I32;
field.ID = 0;
oprot.WriteFieldBegin(field);
oprot.WriteI32(this.success);
oprot.WriteFieldEnd();
} else if (this.__isset.io) {
if (this.io != null) {
field.Name = "io";
field.Type = TType.Struct;
field.ID = 1;
oprot.WriteFieldBegin(field);
this.io.Write(oprot);
oprot.WriteFieldEnd();
}
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}