< Summary

Class:Azure.ResourceManager.Network.Models.TroubleshootingDetails
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\TroubleshootingDetails.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\TroubleshootingDetails.Serialization.cs
Covered lines:0
Uncovered lines:45
Coverable lines:45
Total lines:132
Line coverage:0% (0 of 45)
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_Id()-0%100%
get_ReasonType()-0%100%
get_Summary()-0%100%
get_Detail()-0%100%
get_RecommendedActions()-0%100%
DeserializeTroubleshootingDetails(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\TroubleshootingDetails.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 gained from troubleshooting of specified resource. </summary>
 13    public partial class TroubleshootingDetails
 14    {
 15        /// <summary> Initializes a new instance of TroubleshootingDetails. </summary>
 016        internal TroubleshootingDetails()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of TroubleshootingDetails. </summary>
 21        /// <param name="id"> The id of the get troubleshoot operation. </param>
 22        /// <param name="reasonType"> Reason type of failure. </param>
 23        /// <param name="summary"> A summary of troubleshooting. </param>
 24        /// <param name="detail"> Details on troubleshooting results. </param>
 25        /// <param name="recommendedActions"> List of recommended actions. </param>
 026        internal TroubleshootingDetails(string id, string reasonType, string summary, string detail, IReadOnlyList<Troub
 27        {
 028            Id = id;
 029            ReasonType = reasonType;
 030            Summary = summary;
 031            Detail = detail;
 032            RecommendedActions = recommendedActions;
 033        }
 34
 35        /// <summary> The id of the get troubleshoot operation. </summary>
 036        public string Id { get; }
 37        /// <summary> Reason type of failure. </summary>
 038        public string ReasonType { get; }
 39        /// <summary> A summary of troubleshooting. </summary>
 040        public string Summary { get; }
 41        /// <summary> Details on troubleshooting results. </summary>
 042        public string Detail { get; }
 43        /// <summary> List of recommended actions. </summary>
 044        public IReadOnlyList<TroubleshootingRecommendedActions> RecommendedActions { get; }
 45    }
 46}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\TroubleshootingDetails.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 TroubleshootingDetails
 15    {
 16        internal static TroubleshootingDetails DeserializeTroubleshootingDetails(JsonElement element)
 17        {
 018            string id = default;
 019            string reasonType = default;
 020            string summary = default;
 021            string detail = default;
 022            IReadOnlyList<TroubleshootingRecommendedActions> recommendedActions = default;
 023            foreach (var property in element.EnumerateObject())
 24            {
 025                if (property.NameEquals("id"))
 26                {
 027                    if (property.Value.ValueKind == JsonValueKind.Null)
 28                    {
 29                        continue;
 30                    }
 031                    id = property.Value.GetString();
 032                    continue;
 33                }
 034                if (property.NameEquals("reasonType"))
 35                {
 036                    if (property.Value.ValueKind == JsonValueKind.Null)
 37                    {
 38                        continue;
 39                    }
 040                    reasonType = property.Value.GetString();
 041                    continue;
 42                }
 043                if (property.NameEquals("summary"))
 44                {
 045                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 049                    summary = property.Value.GetString();
 050                    continue;
 51                }
 052                if (property.NameEquals("detail"))
 53                {
 054                    if (property.Value.ValueKind == JsonValueKind.Null)
 55                    {
 56                        continue;
 57                    }
 058                    detail = property.Value.GetString();
 059                    continue;
 60                }
 061                if (property.NameEquals("recommendedActions"))
 62                {
 063                    if (property.Value.ValueKind == JsonValueKind.Null)
 64                    {
 65                        continue;
 66                    }
 067                    List<TroubleshootingRecommendedActions> array = new List<TroubleshootingRecommendedActions>();
 068                    foreach (var item in property.Value.EnumerateArray())
 69                    {
 070                        if (item.ValueKind == JsonValueKind.Null)
 71                        {
 072                            array.Add(null);
 73                        }
 74                        else
 75                        {
 076                            array.Add(TroubleshootingRecommendedActions.DeserializeTroubleshootingRecommendedActions(ite
 77                        }
 78                    }
 079                    recommendedActions = array;
 80                    continue;
 81                }
 82            }
 083            return new TroubleshootingDetails(id, reasonType, summary, detail, recommendedActions);
 84        }
 85    }
 86}