< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_StartTime()-0%100%
get_EndTime()-0%100%
get_Code()-0%100%
get_Results()-0%100%
DeserializeTroubleshootingResult(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\TroubleshootingResult.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;
 10
 11namespace Azure.ResourceManager.Network.Models
 12{
 13    /// <summary> Troubleshooting information gained from specified resource. </summary>
 14    public partial class TroubleshootingResult
 15    {
 16        /// <summary> Initializes a new instance of TroubleshootingResult. </summary>
 017        internal TroubleshootingResult()
 18        {
 019        }
 20
 21        /// <summary> Initializes a new instance of TroubleshootingResult. </summary>
 22        /// <param name="startTime"> The start time of the troubleshooting. </param>
 23        /// <param name="endTime"> The end time of the troubleshooting. </param>
 24        /// <param name="code"> The result code of the troubleshooting. </param>
 25        /// <param name="results"> Information from troubleshooting. </param>
 026        internal TroubleshootingResult(DateTimeOffset? startTime, DateTimeOffset? endTime, string code, IReadOnlyList<Tr
 27        {
 028            StartTime = startTime;
 029            EndTime = endTime;
 030            Code = code;
 031            Results = results;
 032        }
 33
 34        /// <summary> The start time of the troubleshooting. </summary>
 035        public DateTimeOffset? StartTime { get; }
 36        /// <summary> The end time of the troubleshooting. </summary>
 037        public DateTimeOffset? EndTime { get; }
 38        /// <summary> The result code of the troubleshooting. </summary>
 039        public string Code { get; }
 40        /// <summary> Information from troubleshooting. </summary>
 041        public IReadOnlyList<TroubleshootingDetails> Results { get; }
 42    }
 43}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\TroubleshootingResult.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;
 9using System.Collections.Generic;
 10using System.Text.Json;
 11using Azure.Core;
 12
 13namespace Azure.ResourceManager.Network.Models
 14{
 15    public partial class TroubleshootingResult
 16    {
 17        internal static TroubleshootingResult DeserializeTroubleshootingResult(JsonElement element)
 18        {
 019            DateTimeOffset? startTime = default;
 020            DateTimeOffset? endTime = default;
 021            string code = default;
 022            IReadOnlyList<TroubleshootingDetails> results = default;
 023            foreach (var property in element.EnumerateObject())
 24            {
 025                if (property.NameEquals("startTime"))
 26                {
 027                    if (property.Value.ValueKind == JsonValueKind.Null)
 28                    {
 29                        continue;
 30                    }
 031                    startTime = property.Value.GetDateTimeOffset("O");
 032                    continue;
 33                }
 034                if (property.NameEquals("endTime"))
 35                {
 036                    if (property.Value.ValueKind == JsonValueKind.Null)
 37                    {
 38                        continue;
 39                    }
 040                    endTime = property.Value.GetDateTimeOffset("O");
 041                    continue;
 42                }
 043                if (property.NameEquals("code"))
 44                {
 045                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 049                    code = property.Value.GetString();
 050                    continue;
 51                }
 052                if (property.NameEquals("results"))
 53                {
 054                    if (property.Value.ValueKind == JsonValueKind.Null)
 55                    {
 56                        continue;
 57                    }
 058                    List<TroubleshootingDetails> array = new List<TroubleshootingDetails>();
 059                    foreach (var item in property.Value.EnumerateArray())
 60                    {
 061                        if (item.ValueKind == JsonValueKind.Null)
 62                        {
 063                            array.Add(null);
 64                        }
 65                        else
 66                        {
 067                            array.Add(TroubleshootingDetails.DeserializeTroubleshootingDetails(item));
 68                        }
 69                    }
 070                    results = array;
 71                    continue;
 72                }
 73            }
 074            return new TroubleshootingResult(startTime, endTime, code, results);
 75        }
 76    }
 77}