< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_DestinationType()-0%100%
get_Destinations()-0%100%
get_NextHopType()-0%100%
get_NextHops()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeVirtualHubRouteV2(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VirtualHubRouteV2.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> VirtualHubRouteTableV2 route. </summary>
 13    public partial class VirtualHubRouteV2
 14    {
 15        /// <summary> Initializes a new instance of VirtualHubRouteV2. </summary>
 016        public VirtualHubRouteV2()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of VirtualHubRouteV2. </summary>
 21        /// <param name="destinationType"> The type of destinations. </param>
 22        /// <param name="destinations"> List of all destinations. </param>
 23        /// <param name="nextHopType"> The type of next hops. </param>
 24        /// <param name="nextHops"> NextHops ip address. </param>
 025        internal VirtualHubRouteV2(string destinationType, IList<string> destinations, string nextHopType, IList<string>
 26        {
 027            DestinationType = destinationType;
 028            Destinations = destinations;
 029            NextHopType = nextHopType;
 030            NextHops = nextHops;
 031        }
 32
 33        /// <summary> The type of destinations. </summary>
 034        public string DestinationType { get; set; }
 35        /// <summary> List of all destinations. </summary>
 036        public IList<string> Destinations { get; set; }
 37        /// <summary> The type of next hops. </summary>
 038        public string NextHopType { get; set; }
 39        /// <summary> NextHops ip address. </summary>
 040        public IList<string> NextHops { get; set; }
 41    }
 42}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VirtualHubRouteV2.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 VirtualHubRouteV2 : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (DestinationType != null)
 20            {
 021                writer.WritePropertyName("destinationType");
 022                writer.WriteStringValue(DestinationType);
 23            }
 024            if (Destinations != null)
 25            {
 026                writer.WritePropertyName("destinations");
 027                writer.WriteStartArray();
 028                foreach (var item in Destinations)
 29                {
 030                    writer.WriteStringValue(item);
 31                }
 032                writer.WriteEndArray();
 33            }
 034            if (NextHopType != null)
 35            {
 036                writer.WritePropertyName("nextHopType");
 037                writer.WriteStringValue(NextHopType);
 38            }
 039            if (NextHops != null)
 40            {
 041                writer.WritePropertyName("nextHops");
 042                writer.WriteStartArray();
 043                foreach (var item in NextHops)
 44                {
 045                    writer.WriteStringValue(item);
 46                }
 047                writer.WriteEndArray();
 48            }
 049            writer.WriteEndObject();
 050        }
 51
 52        internal static VirtualHubRouteV2 DeserializeVirtualHubRouteV2(JsonElement element)
 53        {
 054            string destinationType = default;
 055            IList<string> destinations = default;
 056            string nextHopType = default;
 057            IList<string> nextHops = default;
 058            foreach (var property in element.EnumerateObject())
 59            {
 060                if (property.NameEquals("destinationType"))
 61                {
 062                    if (property.Value.ValueKind == JsonValueKind.Null)
 63                    {
 64                        continue;
 65                    }
 066                    destinationType = property.Value.GetString();
 067                    continue;
 68                }
 069                if (property.NameEquals("destinations"))
 70                {
 071                    if (property.Value.ValueKind == JsonValueKind.Null)
 72                    {
 73                        continue;
 74                    }
 075                    List<string> array = new List<string>();
 076                    foreach (var item in property.Value.EnumerateArray())
 77                    {
 078                        if (item.ValueKind == JsonValueKind.Null)
 79                        {
 080                            array.Add(null);
 81                        }
 82                        else
 83                        {
 084                            array.Add(item.GetString());
 85                        }
 86                    }
 087                    destinations = array;
 088                    continue;
 89                }
 090                if (property.NameEquals("nextHopType"))
 91                {
 092                    if (property.Value.ValueKind == JsonValueKind.Null)
 93                    {
 94                        continue;
 95                    }
 096                    nextHopType = property.Value.GetString();
 097                    continue;
 98                }
 099                if (property.NameEquals("nextHops"))
 100                {
 0101                    if (property.Value.ValueKind == JsonValueKind.Null)
 102                    {
 103                        continue;
 104                    }
 0105                    List<string> array = new List<string>();
 0106                    foreach (var item in property.Value.EnumerateArray())
 107                    {
 0108                        if (item.ValueKind == JsonValueKind.Null)
 109                        {
 0110                            array.Add(null);
 111                        }
 112                        else
 113                        {
 0114                            array.Add(item.GetString());
 115                        }
 116                    }
 0117                    nextHops = array;
 118                    continue;
 119                }
 120            }
 0121            return new VirtualHubRouteV2(destinationType, destinations, nextHopType, nextHops);
 122        }
 123    }
 124}