< Summary

Class:Azure.ResourceManager.Network.Models.ConnectionMonitorSuccessThreshold
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorSuccessThreshold.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorSuccessThreshold.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_ChecksFailedPercent()-0%100%
get_RoundTripTimeMs()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeConnectionMonitorSuccessThreshold(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorSuccessThreshold.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> Describes the threshold for declaring a test successful. </summary>
 11    public partial class ConnectionMonitorSuccessThreshold
 12    {
 13        /// <summary> Initializes a new instance of ConnectionMonitorSuccessThreshold. </summary>
 014        public ConnectionMonitorSuccessThreshold()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ConnectionMonitorSuccessThreshold. </summary>
 19        /// <param name="checksFailedPercent"> The maximum percentage of failed checks permitted for a test to evaluate 
 20        /// <param name="roundTripTimeMs"> The maximum round-trip time in milliseconds permitted for a test to evaluate 
 021        internal ConnectionMonitorSuccessThreshold(int? checksFailedPercent, float? roundTripTimeMs)
 22        {
 023            ChecksFailedPercent = checksFailedPercent;
 024            RoundTripTimeMs = roundTripTimeMs;
 025        }
 26
 27        /// <summary> The maximum percentage of failed checks permitted for a test to evaluate as successful. </summary>
 028        public int? ChecksFailedPercent { get; set; }
 29        /// <summary> The maximum round-trip time in milliseconds permitted for a test to evaluate as successful. </summ
 030        public float? RoundTripTimeMs { get; set; }
 31    }
 32}

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