< Summary

Class:Azure.ResourceManager.Network.Models.NextHopResult
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\NextHopResult.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\NextHopResult.Serialization.cs
Covered lines:24
Uncovered lines:2
Coverable lines:26
Total lines:89
Line coverage:92.3% (24 of 26)
Covered branches:14
Total branches:14
Branch coverage:100% (14 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_NextHopType()-100%100%
get_NextHopIpAddress()-100%100%
get_RouteTableId()-100%100%
DeserializeNextHopResult(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\NextHopResult.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> The information about next hop from the specified VM. </summary>
 11    public partial class NextHopResult
 12    {
 13        /// <summary> Initializes a new instance of NextHopResult. </summary>
 014        internal NextHopResult()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of NextHopResult. </summary>
 19        /// <param name="nextHopType"> Next hop type. </param>
 20        /// <param name="nextHopIpAddress"> Next hop IP Address. </param>
 21        /// <param name="routeTableId"> The resource identifier for the route table associated with the route being retu
 822        internal NextHopResult(NextHopType? nextHopType, string nextHopIpAddress, string routeTableId)
 23        {
 824            NextHopType = nextHopType;
 825            NextHopIpAddress = nextHopIpAddress;
 826            RouteTableId = routeTableId;
 827        }
 28
 29        /// <summary> Next hop type. </summary>
 430        public NextHopType? NextHopType { get; }
 31        /// <summary> Next hop IP Address. </summary>
 432        public string NextHopIpAddress { get; }
 33        /// <summary> The resource identifier for the route table associated with the route being returned. If the route
 834        public string RouteTableId { get; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\NextHopResult.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 NextHopResult
 14    {
 15        internal static NextHopResult DeserializeNextHopResult(JsonElement element)
 16        {
 817            NextHopType? nextHopType = default;
 818            string nextHopIpAddress = default;
 819            string routeTableId = default;
 5620            foreach (var property in element.EnumerateObject())
 21            {
 2022                if (property.NameEquals("nextHopType"))
 23                {
 824                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 828                    nextHopType = new NextHopType(property.Value.GetString());
 829                    continue;
 30                }
 1231                if (property.NameEquals("nextHopIpAddress"))
 32                {
 433                    if (property.Value.ValueKind == JsonValueKind.Null)
 34                    {
 35                        continue;
 36                    }
 437                    nextHopIpAddress = property.Value.GetString();
 438                    continue;
 39                }
 840                if (property.NameEquals("routeTableId"))
 41                {
 842                    if (property.Value.ValueKind == JsonValueKind.Null)
 43                    {
 44                        continue;
 45                    }
 846                    routeTableId = property.Value.GetString();
 47                    continue;
 48                }
 49            }
 850            return new NextHopResult(nextHopType, nextHopIpAddress, routeTableId);
 51        }
 52    }
 53}