< Summary

Class:Azure.ResourceManager.Network.Models.NetworkSecurityGroupResult
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\NetworkSecurityGroupResult.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\NetworkSecurityGroupResult.Serialization.cs
Covered lines:0
Uncovered lines:24
Coverable lines:24
Total lines:90
Line coverage:0% (0 of 24)
Covered branches:0
Total branches:14
Branch coverage:0% (0 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_SecurityRuleAccessResult()-0%100%
get_EvaluatedNetworkSecurityGroups()-0%100%
DeserializeNetworkSecurityGroupResult(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\NetworkSecurityGroupResult.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System.Collections.Generic;
 9
 10namespace Azure.ResourceManager.Network.Models
 11{
 12    /// <summary> Network configuration diagnostic result corresponded provided traffic query. </summary>
 13    public partial class NetworkSecurityGroupResult
 14    {
 15        /// <summary> Initializes a new instance of NetworkSecurityGroupResult. </summary>
 016        internal NetworkSecurityGroupResult()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of NetworkSecurityGroupResult. </summary>
 21        /// <param name="securityRuleAccessResult"> The network traffic is allowed or denied. </param>
 22        /// <param name="evaluatedNetworkSecurityGroups"> List of results network security groups diagnostic. </param>
 023        internal NetworkSecurityGroupResult(SecurityRuleAccess? securityRuleAccessResult, IReadOnlyList<EvaluatedNetwork
 24        {
 025            SecurityRuleAccessResult = securityRuleAccessResult;
 026            EvaluatedNetworkSecurityGroups = evaluatedNetworkSecurityGroups;
 027        }
 28
 29        /// <summary> The network traffic is allowed or denied. </summary>
 030        public SecurityRuleAccess? SecurityRuleAccessResult { get; }
 31        /// <summary> List of results network security groups diagnostic. </summary>
 032        public IReadOnlyList<EvaluatedNetworkSecurityGroup> EvaluatedNetworkSecurityGroups { get; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\NetworkSecurityGroupResult.Serialization.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.ResourceManager.Network.Models
 13{
 14    public partial class NetworkSecurityGroupResult
 15    {
 16        internal static NetworkSecurityGroupResult DeserializeNetworkSecurityGroupResult(JsonElement element)
 17        {
 018            SecurityRuleAccess? securityRuleAccessResult = default;
 019            IReadOnlyList<EvaluatedNetworkSecurityGroup> evaluatedNetworkSecurityGroups = default;
 020            foreach (var property in element.EnumerateObject())
 21            {
 022                if (property.NameEquals("securityRuleAccessResult"))
 23                {
 024                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 028                    securityRuleAccessResult = new SecurityRuleAccess(property.Value.GetString());
 029                    continue;
 30                }
 031                if (property.NameEquals("evaluatedNetworkSecurityGroups"))
 32                {
 033                    if (property.Value.ValueKind == JsonValueKind.Null)
 34                    {
 35                        continue;
 36                    }
 037                    List<EvaluatedNetworkSecurityGroup> array = new List<EvaluatedNetworkSecurityGroup>();
 038                    foreach (var item in property.Value.EnumerateArray())
 39                    {
 040                        if (item.ValueKind == JsonValueKind.Null)
 41                        {
 042                            array.Add(null);
 43                        }
 44                        else
 45                        {
 046                            array.Add(EvaluatedNetworkSecurityGroup.DeserializeEvaluatedNetworkSecurityGroup(item));
 47                        }
 48                    }
 049                    evaluatedNetworkSecurityGroups = array;
 50                    continue;
 51                }
 52            }
 053            return new NetworkSecurityGroupResult(securityRuleAccessResult, evaluatedNetworkSecurityGroups);
 54        }
 55    }
 56}