< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_OfferName()-0%100%
get_ValueInGbps()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeExpressRoutePortsLocationBandwidths(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ExpressRoutePortsLocationBandwidths.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> Real-time inventory of available ExpressRoute port bandwidths. </summary>
 11    public partial class ExpressRoutePortsLocationBandwidths
 12    {
 13        /// <summary> Initializes a new instance of ExpressRoutePortsLocationBandwidths. </summary>
 014        public ExpressRoutePortsLocationBandwidths()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ExpressRoutePortsLocationBandwidths. </summary>
 19        /// <param name="offerName"> Bandwidth descriptive name. </param>
 20        /// <param name="valueInGbps"> Bandwidth value in Gbps. </param>
 021        internal ExpressRoutePortsLocationBandwidths(string offerName, int? valueInGbps)
 22        {
 023            OfferName = offerName;
 024            ValueInGbps = valueInGbps;
 025        }
 26
 27        /// <summary> Bandwidth descriptive name. </summary>
 028        public string OfferName { get; }
 29        /// <summary> Bandwidth value in Gbps. </summary>
 030        public int? ValueInGbps { get; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ExpressRoutePortsLocationBandwidths.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 ExpressRoutePortsLocationBandwidths : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (OfferName != null)
 19            {
 020                writer.WritePropertyName("offerName");
 021                writer.WriteStringValue(OfferName);
 22            }
 023            if (ValueInGbps != null)
 24            {
 025                writer.WritePropertyName("valueInGbps");
 026                writer.WriteNumberValue(ValueInGbps.Value);
 27            }
 028            writer.WriteEndObject();
 029        }
 30
 31        internal static ExpressRoutePortsLocationBandwidths DeserializeExpressRoutePortsLocationBandwidths(JsonElement e
 32        {
 033            string offerName = default;
 034            int? valueInGbps = default;
 035            foreach (var property in element.EnumerateObject())
 36            {
 037                if (property.NameEquals("offerName"))
 38                {
 039                    if (property.Value.ValueKind == JsonValueKind.Null)
 40                    {
 41                        continue;
 42                    }
 043                    offerName = property.Value.GetString();
 044                    continue;
 45                }
 046                if (property.NameEquals("valueInGbps"))
 47                {
 048                    if (property.Value.ValueKind == JsonValueKind.Null)
 49                    {
 50                        continue;
 51                    }
 052                    valueInGbps = property.Value.GetInt32();
 53                    continue;
 54                }
 55            }
 056            return new ExpressRoutePortsLocationBandwidths(offerName, valueInGbps);
 57        }
 58    }
 59}