public void Write(TProtocol oprot)
{
TStruct struc = new TStruct("Type");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (Name != null && __isset.name)
{
field.Name = "name";
field.Type = TType.String;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteString(Name);
oprot.WriteFieldEnd();
}
if (Type1 != null && __isset.type1)
{
field.Name = "type1";
field.Type = TType.String;
field.ID = 2;
oprot.WriteFieldBegin(field);
oprot.WriteString(Type1);
oprot.WriteFieldEnd();
}
if (Type2 != null && __isset.type2)
{
field.Name = "type2";
field.Type = TType.String;
field.ID = 3;
oprot.WriteFieldBegin(field);
oprot.WriteString(Type2);
oprot.WriteFieldEnd();
}
if (Fields != null && __isset.fields)
{
field.Name = "fields";
field.Type = TType.List;
field.ID = 4;
oprot.WriteFieldBegin(field);
{
oprot.WriteListBegin(new TList(TType.Struct, Fields.Count));
foreach (FieldSchema _iter3 in Fields)
{
_iter3.Write(oprot);
}
oprot.WriteListEnd();
}
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}