< Summary

Class:Azure.ResourceManager.EventHubs.Models.NWRuleSetVirtualNetworkRules
Assembly:Azure.ResourceManager.EventHubs
File(s):C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\NWRuleSetVirtualNetworkRules.cs
C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\NWRuleSetVirtualNetworkRules.Serialization.cs
Covered lines:26
Uncovered lines:2
Coverable lines:28
Total lines:91
Line coverage:92.8% (26 of 28)
Covered branches:13
Total branches:14
Branch coverage:92.8% (13 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-100%100%
get_Subnet()-100%100%
get_IgnoreMissingVnetServiceEndpoint()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-77.78%75%
DeserializeNWRuleSetVirtualNetworkRules(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\NWRuleSetVirtualNetworkRules.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.EventHubs.Models
 9{
 10    /// <summary> The response from the List namespace operation. </summary>
 11    public partial class NWRuleSetVirtualNetworkRules
 12    {
 13        /// <summary> Initializes a new instance of NWRuleSetVirtualNetworkRules. </summary>
 1214        public NWRuleSetVirtualNetworkRules()
 15        {
 1216        }
 17
 18        /// <summary> Initializes a new instance of NWRuleSetVirtualNetworkRules. </summary>
 19        /// <param name="subnet"> Subnet properties. </param>
 20        /// <param name="ignoreMissingVnetServiceEndpoint"> Value that indicates whether to ignore missing Vnet Service 
 2421        internal NWRuleSetVirtualNetworkRules(Subnet subnet, bool? ignoreMissingVnetServiceEndpoint)
 22        {
 2423            Subnet = subnet;
 2424            IgnoreMissingVnetServiceEndpoint = ignoreMissingVnetServiceEndpoint;
 2425        }
 26
 27        /// <summary> Subnet properties. </summary>
 6028        public Subnet Subnet { get; set; }
 29        /// <summary> Value that indicates whether to ignore missing Vnet Service Endpoint. </summary>
 3630        public bool? IgnoreMissingVnetServiceEndpoint { get; set; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\NWRuleSetVirtualNetworkRules.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.EventHubs.Models
 12{
 13    public partial class NWRuleSetVirtualNetworkRules : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 1217            writer.WriteStartObject();
 1218            if (Subnet != null)
 19            {
 1220                writer.WritePropertyName("subnet");
 1221                writer.WriteObjectValue(Subnet);
 22            }
 1223            if (IgnoreMissingVnetServiceEndpoint != null)
 24            {
 025                writer.WritePropertyName("ignoreMissingVnetServiceEndpoint");
 026                writer.WriteBooleanValue(IgnoreMissingVnetServiceEndpoint.Value);
 27            }
 1228            writer.WriteEndObject();
 1229        }
 30
 31        internal static NWRuleSetVirtualNetworkRules DeserializeNWRuleSetVirtualNetworkRules(JsonElement element)
 32        {
 2433            Subnet subnet = default;
 2434            bool? ignoreMissingVnetServiceEndpoint = default;
 14435            foreach (var property in element.EnumerateObject())
 36            {
 4837                if (property.NameEquals("subnet"))
 38                {
 2439                    if (property.Value.ValueKind == JsonValueKind.Null)
 40                    {
 41                        continue;
 42                    }
 2443                    subnet = Subnet.DeserializeSubnet(property.Value);
 2444                    continue;
 45                }
 2446                if (property.NameEquals("ignoreMissingVnetServiceEndpoint"))
 47                {
 2448                    if (property.Value.ValueKind == JsonValueKind.Null)
 49                    {
 50                        continue;
 51                    }
 2452                    ignoreMissingVnetServiceEndpoint = property.Value.GetBoolean();
 53                    continue;
 54                }
 55            }
 2456            return new NWRuleSetVirtualNetworkRules(subnet, ignoreMissingVnetServiceEndpoint);
 57        }
 58    }
 59}