public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                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)
                        {
                            Ref = new TDDIAbstractHARAPackage();
                            Ref.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                TField field;
                iprot.ReadStructBegin();
                while (true)
                {
                    field = iprot.ReadFieldBegin();
                    if (field.Type == TType.Stop)
                    {
                        break;
                    }
                    switch (field.ID)
                    {
                    case 1:
                        if (field.Type == TType.I64)
                        {
                            Id = iprot.ReadI64();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.String)
                        {
                            Name = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.String)
                        {
                            Description = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.Bool)
                        {
                            IsCitation = iprot.ReadBool();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 5:
                        if (field.Type == TType.Bool)
                        {
                            IsAbstract = iprot.ReadBool();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 6:
                        if (field.Type == TType.List)
                        {
                            {
                                KeyValueMaps = new List <TDDIKeyValueMapRef>();
                                TList _list716 = iprot.ReadListBegin();
                                for (int _i717 = 0; _i717 < _list716.Count; ++_i717)
                                {
                                    TDDIKeyValueMapRef _elem718;
                                    _elem718 = new TDDIKeyValueMapRef();
                                    _elem718.Read(iprot);
                                    KeyValueMaps.Add(_elem718);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 7:
                        if (field.Type == TType.Struct)
                        {
                            CitedElement = new TDDIAbstractBaseElement();
                            CitedElement.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 8:
                        if (field.Type == TType.List)
                        {
                            {
                                HARAArtifacts = new List <TDDIAbstractHARAArtifact>();
                                TList _list719 = iprot.ReadListBegin();
                                for (int _i720 = 0; _i720 < _list719.Count; ++_i720)
                                {
                                    TDDIAbstractHARAArtifact _elem721;
                                    _elem721 = new TDDIAbstractHARAArtifact();
                                    _elem721.Read(iprot);
                                    HARAArtifacts.Add(_elem721);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 9:
                        if (field.Type == TType.Struct)
                        {
                            Implements = new TDDIAbstractHARAPackage();
                            Implements.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
 public void Read (TProtocol iprot)
 {
   iprot.IncrementRecursionDepth();
   try
   {
     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) {
             HARAPackage = new TDDIAbstractHARAPackage();
             HARAPackage.Read(iprot);
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 2:
           if (field.Type == TType.Struct) {
             HazardTypeSystem = new TDDIHazardTypeSystem();
             HazardTypeSystem.Read(iprot);
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 3:
           if (field.Type == TType.Struct) {
             RiskParameter = new TDDIAbstractRiskParameter();
             RiskParameter.Read(iprot);
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 4:
           if (field.Type == TType.Struct) {
             RiskAssessment = new TDDIRiskAssessment();
             RiskAssessment.Read(iprot);
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 5:
           if (field.Type == TType.Struct) {
             HazardType = new TDDIHazardType();
             HazardType.Read(iprot);
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 6:
           if (field.Type == TType.Struct) {
             MalFunction = new TDDIMalFunction();
             MalFunction.Read(iprot);
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 7:
           if (field.Type == TType.Struct) {
             Hazard = new TDDIHazard();
             Hazard.Read(iprot);
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         default: 
           TProtocolUtil.Skip(iprot, field.Type);
           break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
   }
   finally
   {
     iprot.DecrementRecursionDepth();
   }
 }