< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_AggregationLevel()-0%100%
get_ProviderLocation()-0%100%
get_ReachabilityReport()-0%100%
DeserializeAzureReachabilityReport(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\AzureReachabilityReport.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;
 9using System.Collections.Generic;
 10using System.Linq;
 11
 12namespace Azure.ResourceManager.Network.Models
 13{
 14    /// <summary> Azure reachability report details. </summary>
 15    public partial class AzureReachabilityReport
 16    {
 17        /// <summary> Initializes a new instance of AzureReachabilityReport. </summary>
 18        /// <param name="aggregationLevel"> The aggregation level of Azure reachability report. Can be Country, State or
 19        /// <param name="providerLocation"> Parameters that define a geographic location. </param>
 20        /// <param name="reachabilityReport"> List of Azure reachability report items. </param>
 021        internal AzureReachabilityReport(string aggregationLevel, AzureReachabilityReportLocation providerLocation, IEnu
 22        {
 023            if (aggregationLevel == null)
 24            {
 025                throw new ArgumentNullException(nameof(aggregationLevel));
 26            }
 027            if (providerLocation == null)
 28            {
 029                throw new ArgumentNullException(nameof(providerLocation));
 30            }
 031            if (reachabilityReport == null)
 32            {
 033                throw new ArgumentNullException(nameof(reachabilityReport));
 34            }
 35
 036            AggregationLevel = aggregationLevel;
 037            ProviderLocation = providerLocation;
 038            ReachabilityReport = reachabilityReport.ToArray();
 039        }
 40
 41        /// <summary> Initializes a new instance of AzureReachabilityReport. </summary>
 42        /// <param name="aggregationLevel"> The aggregation level of Azure reachability report. Can be Country, State or
 43        /// <param name="providerLocation"> Parameters that define a geographic location. </param>
 44        /// <param name="reachabilityReport"> List of Azure reachability report items. </param>
 045        internal AzureReachabilityReport(string aggregationLevel, AzureReachabilityReportLocation providerLocation, IRea
 46        {
 047            AggregationLevel = aggregationLevel;
 048            ProviderLocation = providerLocation;
 049            ReachabilityReport = reachabilityReport ?? new List<AzureReachabilityReportItem>();
 050        }
 51
 52        /// <summary> The aggregation level of Azure reachability report. Can be Country, State or City. </summary>
 053        public string AggregationLevel { get; }
 54        /// <summary> Parameters that define a geographic location. </summary>
 055        public AzureReachabilityReportLocation ProviderLocation { get; }
 56        /// <summary> List of Azure reachability report items. </summary>
 057        public IReadOnlyList<AzureReachabilityReportItem> ReachabilityReport { get; }
 58    }
 59}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\AzureReachabilityReport.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 AzureReachabilityReport
 15    {
 16        internal static AzureReachabilityReport DeserializeAzureReachabilityReport(JsonElement element)
 17        {
 018            string aggregationLevel = default;
 019            AzureReachabilityReportLocation providerLocation = default;
 020            IReadOnlyList<AzureReachabilityReportItem> reachabilityReport = default;
 021            foreach (var property in element.EnumerateObject())
 22            {
 023                if (property.NameEquals("aggregationLevel"))
 24                {
 025                    aggregationLevel = property.Value.GetString();
 026                    continue;
 27                }
 028                if (property.NameEquals("providerLocation"))
 29                {
 030                    providerLocation = AzureReachabilityReportLocation.DeserializeAzureReachabilityReportLocation(proper
 031                    continue;
 32                }
 033                if (property.NameEquals("reachabilityReport"))
 34                {
 035                    List<AzureReachabilityReportItem> array = new List<AzureReachabilityReportItem>();
 036                    foreach (var item in property.Value.EnumerateArray())
 37                    {
 038                        if (item.ValueKind == JsonValueKind.Null)
 39                        {
 040                            array.Add(null);
 41                        }
 42                        else
 43                        {
 044                            array.Add(AzureReachabilityReportItem.DeserializeAzureReachabilityReportItem(item));
 45                        }
 46                    }
 047                    reachabilityReport = array;
 48                    continue;
 49                }
 50            }
 051            return new AzureReachabilityReport(aggregationLevel, providerLocation, reachabilityReport);
 52        }
 53    }
 54}