< Summary

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

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ExpressRouteCircuitSku.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> Contains SKU in an ExpressRouteCircuit. </summary>
 11    public partial class ExpressRouteCircuitSku
 12    {
 13        /// <summary> Initializes a new instance of ExpressRouteCircuitSku. </summary>
 014        public ExpressRouteCircuitSku()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ExpressRouteCircuitSku. </summary>
 19        /// <param name="name"> The name of the SKU. </param>
 20        /// <param name="tier"> The tier of the SKU. </param>
 21        /// <param name="family"> The family of the SKU. </param>
 022        internal ExpressRouteCircuitSku(string name, ExpressRouteCircuitSkuTier? tier, ExpressRouteCircuitSkuFamily? fam
 23        {
 024            Name = name;
 025            Tier = tier;
 026            Family = family;
 027        }
 28
 29        /// <summary> The name of the SKU. </summary>
 030        public string Name { get; set; }
 31        /// <summary> The tier of the SKU. </summary>
 032        public ExpressRouteCircuitSkuTier? Tier { get; set; }
 33        /// <summary> The family of the SKU. </summary>
 034        public ExpressRouteCircuitSkuFamily? Family { get; set; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ExpressRouteCircuitSku.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 ExpressRouteCircuitSku : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Name != null)
 19            {
 020                writer.WritePropertyName("name");
 021                writer.WriteStringValue(Name);
 22            }
 023            if (Tier != null)
 24            {
 025                writer.WritePropertyName("tier");
 026                writer.WriteStringValue(Tier.Value.ToString());
 27            }
 028            if (Family != null)
 29            {
 030                writer.WritePropertyName("family");
 031                writer.WriteStringValue(Family.Value.ToString());
 32            }
 033            writer.WriteEndObject();
 034        }
 35
 36        internal static ExpressRouteCircuitSku DeserializeExpressRouteCircuitSku(JsonElement element)
 37        {
 038            string name = default;
 039            ExpressRouteCircuitSkuTier? tier = default;
 040            ExpressRouteCircuitSkuFamily? family = default;
 041            foreach (var property in element.EnumerateObject())
 42            {
 043                if (property.NameEquals("name"))
 44                {
 045                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 049                    name = property.Value.GetString();
 050                    continue;
 51                }
 052                if (property.NameEquals("tier"))
 53                {
 054                    if (property.Value.ValueKind == JsonValueKind.Null)
 55                    {
 56                        continue;
 57                    }
 058                    tier = new ExpressRouteCircuitSkuTier(property.Value.GetString());
 059                    continue;
 60                }
 061                if (property.NameEquals("family"))
 62                {
 063                    if (property.Value.ValueKind == JsonValueKind.Null)
 64                    {
 65                        continue;
 66                    }
 067                    family = new ExpressRouteCircuitSkuFamily(property.Value.GetString());
 68                    continue;
 69                }
 70            }
 071            return new ExpressRouteCircuitSku(name, tier, family);
 72        }
 73    }
 74}