< Summary

Class:Azure.ResourceManager.Network.Models.ConnectivityIssue
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectivityIssue.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectivityIssue.Serialization.cs
Covered lines:0
Uncovered lines:43
Coverable lines:43
Total lines:130
Line coverage:0% (0 of 43)
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_Origin()-0%100%
get_Severity()-0%100%
get_Type()-0%100%
get_Context()-0%100%
DeserializeConnectivityIssue(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectivityIssue.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> Information about an issue encountered in the process of checking for connectivity. </summary>
 13    public partial class ConnectivityIssue
 14    {
 15        /// <summary> Initializes a new instance of ConnectivityIssue. </summary>
 016        internal ConnectivityIssue()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ConnectivityIssue. </summary>
 21        /// <param name="origin"> The origin of the issue. </param>
 22        /// <param name="severity"> The severity of the issue. </param>
 23        /// <param name="type"> The type of issue. </param>
 24        /// <param name="context"> Provides additional context on the issue. </param>
 025        internal ConnectivityIssue(Origin? origin, Severity? severity, IssueType? type, IReadOnlyList<IDictionary<string
 26        {
 027            Origin = origin;
 028            Severity = severity;
 029            Type = type;
 030            Context = context;
 031        }
 32
 33        /// <summary> The origin of the issue. </summary>
 034        public Origin? Origin { get; }
 35        /// <summary> The severity of the issue. </summary>
 036        public Severity? Severity { get; }
 37        /// <summary> The type of issue. </summary>
 038        public IssueType? Type { get; }
 39        /// <summary> Provides additional context on the issue. </summary>
 040        public IReadOnlyList<IDictionary<string, string>> Context { get; }
 41    }
 42}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectivityIssue.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 ConnectivityIssue
 15    {
 16        internal static ConnectivityIssue DeserializeConnectivityIssue(JsonElement element)
 17        {
 018            Origin? origin = default;
 019            Severity? severity = default;
 020            IssueType? type = default;
 021            IReadOnlyList<IDictionary<string, string>> context = default;
 022            foreach (var property in element.EnumerateObject())
 23            {
 024                if (property.NameEquals("origin"))
 25                {
 026                    if (property.Value.ValueKind == JsonValueKind.Null)
 27                    {
 28                        continue;
 29                    }
 030                    origin = new Origin(property.Value.GetString());
 031                    continue;
 32                }
 033                if (property.NameEquals("severity"))
 34                {
 035                    if (property.Value.ValueKind == JsonValueKind.Null)
 36                    {
 37                        continue;
 38                    }
 039                    severity = new Severity(property.Value.GetString());
 040                    continue;
 41                }
 042                if (property.NameEquals("type"))
 43                {
 044                    if (property.Value.ValueKind == JsonValueKind.Null)
 45                    {
 46                        continue;
 47                    }
 048                    type = new IssueType(property.Value.GetString());
 049                    continue;
 50                }
 051                if (property.NameEquals("context"))
 52                {
 053                    if (property.Value.ValueKind == JsonValueKind.Null)
 54                    {
 55                        continue;
 56                    }
 057                    List<IDictionary<string, string>> array = new List<IDictionary<string, string>>();
 058                    foreach (var item in property.Value.EnumerateArray())
 59                    {
 060                        if (item.ValueKind == JsonValueKind.Null)
 61                        {
 062                            array.Add(null);
 63                        }
 64                        else
 65                        {
 066                            Dictionary<string, string> dictionary = new Dictionary<string, string>();
 067                            foreach (var property0 in item.EnumerateObject())
 68                            {
 069                                if (property0.Value.ValueKind == JsonValueKind.Null)
 70                                {
 071                                    dictionary.Add(property0.Name, null);
 72                                }
 73                                else
 74                                {
 075                                    dictionary.Add(property0.Name, property0.Value.GetString());
 76                                }
 77                            }
 078                            array.Add(dictionary);
 79                        }
 80                    }
 081                    context = array;
 82                    continue;
 83                }
 84            }
 085            return new ConnectivityIssue(origin, severity, type, context);
 86        }
 87    }
 88}