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 TDDISecurityCapability();
                            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.List)
                        {
                            {
                                KeyValueMaps = new List <TDDIKeyValueMap>();
                                TList _list1464 = iprot.ReadListBegin();
                                for (int _i1465 = 0; _i1465 < _list1464.Count; ++_i1465)
                                {
                                    TDDIKeyValueMap _elem1466;
                                    _elem1466 = new TDDIKeyValueMap();
                                    _elem1466.Read(iprot);
                                    KeyValueMaps.Add(_elem1466);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

                    case 6:
                        if (field.Type == TType.List)
                        {
                            {
                                Attacks = new List <TDDIAbstractAttack>();
                                TList _list1467 = iprot.ReadListBegin();
                                for (int _i1468 = 0; _i1468 < _list1467.Count; ++_i1468)
                                {
                                    TDDIAbstractAttack _elem1469;
                                    _elem1469 = new TDDIAbstractAttack();
                                    _elem1469.Read(iprot);
                                    Attacks.Add(_elem1469);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 7:
                        if (field.Type == TType.List)
                        {
                            {
                                AddressedBy = new List <TDDISecurityCapability>();
                                TList _list1470 = iprot.ReadListBegin();
                                for (int _i1471 = 0; _i1471 < _list1470.Count; ++_i1471)
                                {
                                    TDDISecurityCapability _elem1472;
                                    _elem1472 = new TDDISecurityCapability();
                                    _elem1472.Read(iprot);
                                    AddressedBy.Add(_elem1472);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 8:
                        if (field.Type == TType.List)
                        {
                            {
                                AttackedItems = new List <TDDIVulnerableItemRef>();
                                TList _list1473 = iprot.ReadListBegin();
                                for (int _i1474 = 0; _i1474 < _list1473.Count; ++_i1474)
                                {
                                    TDDIVulnerableItemRef _elem1475;
                                    _elem1475 = new TDDIVulnerableItemRef();
                                    _elem1475.Read(iprot);
                                    AttackedItems.Add(_elem1475);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }