< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_TotalIngressBytesTransferred()-0%100%
get_TotalEgressBytesTransferred()-0%100%
get_VpnClientConnectionsCount()-0%100%
get_AllocatedIpAddresses()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeVpnClientConnectionHealth(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VpnClientConnectionHealth.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.Collections.Generic;
 9
 10namespace Azure.ResourceManager.Network.Models
 11{
 12    /// <summary> VpnClientConnectionHealth properties. </summary>
 13    public partial class VpnClientConnectionHealth
 14    {
 15        /// <summary> Initializes a new instance of VpnClientConnectionHealth. </summary>
 016        public VpnClientConnectionHealth()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of VpnClientConnectionHealth. </summary>
 21        /// <param name="totalIngressBytesTransferred"> Total of the Ingress Bytes Transferred in this P2S Vpn connectio
 22        /// <param name="totalEgressBytesTransferred"> Total of the Egress Bytes Transferred in this connection. </param
 23        /// <param name="vpnClientConnectionsCount"> The total of p2s vpn clients connected at this time to this P2SVpnG
 24        /// <param name="allocatedIpAddresses"> List of allocated ip addresses to the connected p2s vpn clients. </param
 025        internal VpnClientConnectionHealth(long? totalIngressBytesTransferred, long? totalEgressBytesTransferred, int? v
 26        {
 027            TotalIngressBytesTransferred = totalIngressBytesTransferred;
 028            TotalEgressBytesTransferred = totalEgressBytesTransferred;
 029            VpnClientConnectionsCount = vpnClientConnectionsCount;
 030            AllocatedIpAddresses = allocatedIpAddresses;
 031        }
 32
 33        /// <summary> Total of the Ingress Bytes Transferred in this P2S Vpn connection. </summary>
 034        public long? TotalIngressBytesTransferred { get; }
 35        /// <summary> Total of the Egress Bytes Transferred in this connection. </summary>
 036        public long? TotalEgressBytesTransferred { get; }
 37        /// <summary> The total of p2s vpn clients connected at this time to this P2SVpnGateway. </summary>
 038        public int? VpnClientConnectionsCount { get; set; }
 39        /// <summary> List of allocated ip addresses to the connected p2s vpn clients. </summary>
 040        public IList<string> AllocatedIpAddresses { get; set; }
 41    }
 42}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VpnClientConnectionHealth.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.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.ResourceManager.Network.Models
 13{
 14    public partial class VpnClientConnectionHealth : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (TotalIngressBytesTransferred != null)
 20            {
 021                writer.WritePropertyName("totalIngressBytesTransferred");
 022                writer.WriteNumberValue(TotalIngressBytesTransferred.Value);
 23            }
 024            if (TotalEgressBytesTransferred != null)
 25            {
 026                writer.WritePropertyName("totalEgressBytesTransferred");
 027                writer.WriteNumberValue(TotalEgressBytesTransferred.Value);
 28            }
 029            if (VpnClientConnectionsCount != null)
 30            {
 031                writer.WritePropertyName("vpnClientConnectionsCount");
 032                writer.WriteNumberValue(VpnClientConnectionsCount.Value);
 33            }
 034            if (AllocatedIpAddresses != null)
 35            {
 036                writer.WritePropertyName("allocatedIpAddresses");
 037                writer.WriteStartArray();
 038                foreach (var item in AllocatedIpAddresses)
 39                {
 040                    writer.WriteStringValue(item);
 41                }
 042                writer.WriteEndArray();
 43            }
 044            writer.WriteEndObject();
 045        }
 46
 47        internal static VpnClientConnectionHealth DeserializeVpnClientConnectionHealth(JsonElement element)
 48        {
 049            long? totalIngressBytesTransferred = default;
 050            long? totalEgressBytesTransferred = default;
 051            int? vpnClientConnectionsCount = default;
 052            IList<string> allocatedIpAddresses = default;
 053            foreach (var property in element.EnumerateObject())
 54            {
 055                if (property.NameEquals("totalIngressBytesTransferred"))
 56                {
 057                    if (property.Value.ValueKind == JsonValueKind.Null)
 58                    {
 59                        continue;
 60                    }
 061                    totalIngressBytesTransferred = property.Value.GetInt64();
 062                    continue;
 63                }
 064                if (property.NameEquals("totalEgressBytesTransferred"))
 65                {
 066                    if (property.Value.ValueKind == JsonValueKind.Null)
 67                    {
 68                        continue;
 69                    }
 070                    totalEgressBytesTransferred = property.Value.GetInt64();
 071                    continue;
 72                }
 073                if (property.NameEquals("vpnClientConnectionsCount"))
 74                {
 075                    if (property.Value.ValueKind == JsonValueKind.Null)
 76                    {
 77                        continue;
 78                    }
 079                    vpnClientConnectionsCount = property.Value.GetInt32();
 080                    continue;
 81                }
 082                if (property.NameEquals("allocatedIpAddresses"))
 83                {
 084                    if (property.Value.ValueKind == JsonValueKind.Null)
 85                    {
 86                        continue;
 87                    }
 088                    List<string> array = new List<string>();
 089                    foreach (var item in property.Value.EnumerateArray())
 90                    {
 091                        if (item.ValueKind == JsonValueKind.Null)
 92                        {
 093                            array.Add(null);
 94                        }
 95                        else
 96                        {
 097                            array.Add(item.GetString());
 98                        }
 99                    }
 0100                    allocatedIpAddresses = array;
 101                    continue;
 102                }
 103            }
 0104            return new VpnClientConnectionHealth(totalIngressBytesTransferred, totalEgressBytesTransferred, vpnClientCon
 105        }
 106    }
 107}