< Summary

Class:Azure.ResourceManager.Network.Models.LoadBalancerSku
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\LoadBalancerSku.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\LoadBalancerSku.Serialization.cs
Covered lines:16
Uncovered lines:2
Coverable lines:18
Total lines:72
Line coverage:88.8% (16 of 18)
Covered branches:8
Total branches:8
Branch coverage:100% (8 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Name()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-100%100%
DeserializeLoadBalancerSku(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\LoadBalancerSku.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> SKU of a load balancer. </summary>
 11    public partial class LoadBalancerSku
 12    {
 13        /// <summary> Initializes a new instance of LoadBalancerSku. </summary>
 014        public LoadBalancerSku()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of LoadBalancerSku. </summary>
 19        /// <param name="name"> Name of a load balancer SKU. </param>
 12020        internal LoadBalancerSku(LoadBalancerSkuName? name)
 21        {
 12022            Name = name;
 12023        }
 24
 25        /// <summary> Name of a load balancer SKU. </summary>
 15226        public LoadBalancerSkuName? Name { get; set; }
 27    }
 28}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\LoadBalancerSku.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 LoadBalancerSku : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 1617            writer.WriteStartObject();
 1618            if (Name != null)
 19            {
 1620                writer.WritePropertyName("name");
 1621                writer.WriteStringValue(Name.Value.ToString());
 22            }
 1623            writer.WriteEndObject();
 1624        }
 25
 26        internal static LoadBalancerSku DeserializeLoadBalancerSku(JsonElement element)
 27        {
 12028            LoadBalancerSkuName? name = default;
 48029            foreach (var property in element.EnumerateObject())
 30            {
 12031                if (property.NameEquals("name"))
 32                {
 12033                    if (property.Value.ValueKind == JsonValueKind.Null)
 34                    {
 35                        continue;
 36                    }
 12037                    name = new LoadBalancerSkuName(property.Value.GetString());
 38                    continue;
 39                }
 40            }
 12041            return new LoadBalancerSku(name);
 42        }
 43    }
 44}