public ComplexMessage(
     S16Message mS16msg,
     S32Message mS32msg,
     SimpleClass mSimpleClass
 ) {
     this.MS16msg = mS16msg;
     this.MS32msg = mS32msg;
     this.MSimpleClass = mSimpleClass;
 }
 public void Read(TProtocol iprot)
 {
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
         field = iprot.ReadFieldBegin();
         if (field.Type == TType.Stop) { 
             break;
         }
         switch (field.ID)
         {
             case 1:
                 if (field.Type == TType.Struct) {
                     MS16msg = new S16Message();
                     MS16msg.Read(iprot);
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 2:
                 if (field.Type == TType.Struct) {
                     MS32msg = new S32Message();
                     MS32msg.Read(iprot);
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 3:
                 if (field.Type == TType.Struct) {
                     MSimpleClass = new SimpleClass();
                     MSimpleClass.Read(iprot);
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             default:
                 TProtocolUtil.Skip(iprot, field.Type);
                 break;
         }
         iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }