< Summary

Class:Azure.ResourceManager.Network.Models.PublicIPAddressSku
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\PublicIPAddressSku.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\PublicIPAddressSku.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%
DeserializePublicIPAddressSku(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\PublicIPAddressSku.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 public IP address. </summary>
 11    public partial class PublicIPAddressSku
 12    {
 13        /// <summary> Initializes a new instance of PublicIPAddressSku. </summary>
 014        public PublicIPAddressSku()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of PublicIPAddressSku. </summary>
 19        /// <param name="name"> Name of a public IP address SKU. </param>
 22820        internal PublicIPAddressSku(PublicIPAddressSkuName? name)
 21        {
 22822            Name = name;
 22823        }
 24
 25        /// <summary> Name of a public IP address SKU. </summary>
 24426        public PublicIPAddressSkuName? Name { get; set; }
 27    }
 28}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\PublicIPAddressSku.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 PublicIPAddressSku : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 817            writer.WriteStartObject();
 818            if (Name != null)
 19            {
 820                writer.WritePropertyName("name");
 821                writer.WriteStringValue(Name.Value.ToString());
 22            }
 823            writer.WriteEndObject();
 824        }
 25
 26        internal static PublicIPAddressSku DeserializePublicIPAddressSku(JsonElement element)
 27        {
 22828            PublicIPAddressSkuName? name = default;
 91229            foreach (var property in element.EnumerateObject())
 30            {
 22831                if (property.NameEquals("name"))
 32                {
 22833                    if (property.Value.ValueKind == JsonValueKind.Null)
 34                    {
 35                        continue;
 36                    }
 22837                    name = new PublicIPAddressSkuName(property.Value.GetString());
 38                    continue;
 39                }
 40            }
 22841            return new PublicIPAddressSku(name);
 42        }
 43    }
 44}