< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Id()-0%100%
get_SecurityRuleAssociations()-0%100%
DeserializeSecurityGroupNetworkInterface(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\SecurityGroupNetworkInterface.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
 8namespace Azure.ResourceManager.Network.Models
 9{
 10    /// <summary> Network interface and all its associated security rules. </summary>
 11    public partial class SecurityGroupNetworkInterface
 12    {
 13        /// <summary> Initializes a new instance of SecurityGroupNetworkInterface. </summary>
 014        internal SecurityGroupNetworkInterface()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of SecurityGroupNetworkInterface. </summary>
 19        /// <param name="id"> ID of the network interface. </param>
 20        /// <param name="securityRuleAssociations"> All security rules associated with the network interface. </param>
 021        internal SecurityGroupNetworkInterface(string id, SecurityRuleAssociations securityRuleAssociations)
 22        {
 023            Id = id;
 024            SecurityRuleAssociations = securityRuleAssociations;
 025        }
 26
 27        /// <summary> ID of the network interface. </summary>
 028        public string Id { get; }
 29        /// <summary> All security rules associated with the network interface. </summary>
 030        public SecurityRuleAssociations SecurityRuleAssociations { get; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\SecurityGroupNetworkInterface.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.Text.Json;
 9using Azure.Core;
 10
 11namespace Azure.ResourceManager.Network.Models
 12{
 13    public partial class SecurityGroupNetworkInterface
 14    {
 15        internal static SecurityGroupNetworkInterface DeserializeSecurityGroupNetworkInterface(JsonElement element)
 16        {
 017            string id = default;
 018            SecurityRuleAssociations securityRuleAssociations = default;
 019            foreach (var property in element.EnumerateObject())
 20            {
 021                if (property.NameEquals("id"))
 22                {
 023                    if (property.Value.ValueKind == JsonValueKind.Null)
 24                    {
 25                        continue;
 26                    }
 027                    id = property.Value.GetString();
 028                    continue;
 29                }
 030                if (property.NameEquals("securityRuleAssociations"))
 31                {
 032                    if (property.Value.ValueKind == JsonValueKind.Null)
 33                    {
 34                        continue;
 35                    }
 036                    securityRuleAssociations = SecurityRuleAssociations.DeserializeSecurityRuleAssociations(property.Val
 37                    continue;
 38                }
 39            }
 040            return new SecurityGroupNetworkInterface(id, securityRuleAssociations);
 41        }
 42    }
 43}