< Summary

Class:Azure.ResourceManager.Network.Models.Availability
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\Availability.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\Availability.Serialization.cs
Covered lines:0
Uncovered lines:26
Coverable lines:26
Total lines:89
Line coverage:0% (0 of 26)
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_TimeGrain()-0%100%
get_Retention()-0%100%
get_BlobDuration()-0%100%
DeserializeAvailability(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\Availability.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> Availability of the metric. </summary>
 11    public partial class Availability
 12    {
 13        /// <summary> Initializes a new instance of Availability. </summary>
 014        internal Availability()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of Availability. </summary>
 19        /// <param name="timeGrain"> The time grain of the availability. </param>
 20        /// <param name="retention"> The retention of the availability. </param>
 21        /// <param name="blobDuration"> Duration of the availability blob. </param>
 022        internal Availability(string timeGrain, string retention, string blobDuration)
 23        {
 024            TimeGrain = timeGrain;
 025            Retention = retention;
 026            BlobDuration = blobDuration;
 027        }
 28
 29        /// <summary> The time grain of the availability. </summary>
 030        public string TimeGrain { get; }
 31        /// <summary> The retention of the availability. </summary>
 032        public string Retention { get; }
 33        /// <summary> Duration of the availability blob. </summary>
 034        public string BlobDuration { get; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\Availability.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 Availability
 14    {
 15        internal static Availability DeserializeAvailability(JsonElement element)
 16        {
 017            string timeGrain = default;
 018            string retention = default;
 019            string blobDuration = default;
 020            foreach (var property in element.EnumerateObject())
 21            {
 022                if (property.NameEquals("timeGrain"))
 23                {
 024                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 028                    timeGrain = property.Value.GetString();
 029                    continue;
 30                }
 031                if (property.NameEquals("retention"))
 32                {
 033                    if (property.Value.ValueKind == JsonValueKind.Null)
 34                    {
 35                        continue;
 36                    }
 037                    retention = property.Value.GetString();
 038                    continue;
 39                }
 040                if (property.NameEquals("blobDuration"))
 41                {
 042                    if (property.Value.ValueKind == JsonValueKind.Null)
 43                    {
 44                        continue;
 45                    }
 046                    blobDuration = property.Value.GetString();
 47                    continue;
 48                }
 49            }
 050            return new Availability(timeGrain, retention, blobDuration);
 51        }
 52    }
 53}