< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_PrimarybytesIn()-0%100%
get_PrimarybytesOut()-0%100%
get_SecondarybytesIn()-0%100%
get_SecondarybytesOut()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeExpressRouteCircuitStats(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ExpressRouteCircuitStats.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 stats associated with the peering. </summary>
 11    public partial class ExpressRouteCircuitStats
 12    {
 13        /// <summary> Initializes a new instance of ExpressRouteCircuitStats. </summary>
 014        public ExpressRouteCircuitStats()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ExpressRouteCircuitStats. </summary>
 19        /// <param name="primarybytesIn"> The Primary BytesIn of the peering. </param>
 20        /// <param name="primarybytesOut"> The primary BytesOut of the peering. </param>
 21        /// <param name="secondarybytesIn"> The secondary BytesIn of the peering. </param>
 22        /// <param name="secondarybytesOut"> The secondary BytesOut of the peering. </param>
 023        internal ExpressRouteCircuitStats(long? primarybytesIn, long? primarybytesOut, long? secondarybytesIn, long? sec
 24        {
 025            PrimarybytesIn = primarybytesIn;
 026            PrimarybytesOut = primarybytesOut;
 027            SecondarybytesIn = secondarybytesIn;
 028            SecondarybytesOut = secondarybytesOut;
 029        }
 30
 31        /// <summary> The Primary BytesIn of the peering. </summary>
 032        public long? PrimarybytesIn { get; set; }
 33        /// <summary> The primary BytesOut of the peering. </summary>
 034        public long? PrimarybytesOut { get; set; }
 35        /// <summary> The secondary BytesIn of the peering. </summary>
 036        public long? SecondarybytesIn { get; set; }
 37        /// <summary> The secondary BytesOut of the peering. </summary>
 038        public long? SecondarybytesOut { get; set; }
 39    }
 40}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ExpressRouteCircuitStats.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 ExpressRouteCircuitStats : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (PrimarybytesIn != null)
 19            {
 020                writer.WritePropertyName("primarybytesIn");
 021                writer.WriteNumberValue(PrimarybytesIn.Value);
 22            }
 023            if (PrimarybytesOut != null)
 24            {
 025                writer.WritePropertyName("primarybytesOut");
 026                writer.WriteNumberValue(PrimarybytesOut.Value);
 27            }
 028            if (SecondarybytesIn != null)
 29            {
 030                writer.WritePropertyName("secondarybytesIn");
 031                writer.WriteNumberValue(SecondarybytesIn.Value);
 32            }
 033            if (SecondarybytesOut != null)
 34            {
 035                writer.WritePropertyName("secondarybytesOut");
 036                writer.WriteNumberValue(SecondarybytesOut.Value);
 37            }
 038            writer.WriteEndObject();
 039        }
 40
 41        internal static ExpressRouteCircuitStats DeserializeExpressRouteCircuitStats(JsonElement element)
 42        {
 043            long? primarybytesIn = default;
 044            long? primarybytesOut = default;
 045            long? secondarybytesIn = default;
 046            long? secondarybytesOut = default;
 047            foreach (var property in element.EnumerateObject())
 48            {
 049                if (property.NameEquals("primarybytesIn"))
 50                {
 051                    if (property.Value.ValueKind == JsonValueKind.Null)
 52                    {
 53                        continue;
 54                    }
 055                    primarybytesIn = property.Value.GetInt64();
 056                    continue;
 57                }
 058                if (property.NameEquals("primarybytesOut"))
 59                {
 060                    if (property.Value.ValueKind == JsonValueKind.Null)
 61                    {
 62                        continue;
 63                    }
 064                    primarybytesOut = property.Value.GetInt64();
 065                    continue;
 66                }
 067                if (property.NameEquals("secondarybytesIn"))
 68                {
 069                    if (property.Value.ValueKind == JsonValueKind.Null)
 70                    {
 71                        continue;
 72                    }
 073                    secondarybytesIn = property.Value.GetInt64();
 074                    continue;
 75                }
 076                if (property.NameEquals("secondarybytesOut"))
 77                {
 078                    if (property.Value.ValueKind == JsonValueKind.Null)
 79                    {
 80                        continue;
 81                    }
 082                    secondarybytesOut = property.Value.GetInt64();
 83                    continue;
 84                }
 85            }
 086            return new ExpressRouteCircuitStats(primarybytesIn, primarybytesOut, secondarybytesIn, secondarybytesOut);
 87        }
 88    }
 89}