< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_AssociatedRouteTable()-0%100%
get_PropagatedRouteTables()-0%100%
get_VnetRoutes()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeRoutingConfiguration(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\RoutingConfiguration.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> Routing Configuration indicating the associated and propagated route tables for this connection. </sum
 11    public partial class RoutingConfiguration
 12    {
 13        /// <summary> Initializes a new instance of RoutingConfiguration. </summary>
 014        public RoutingConfiguration()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of RoutingConfiguration. </summary>
 19        /// <param name="associatedRouteTable"> The resource id RouteTable associated with this RoutingConfiguration. </
 20        /// <param name="propagatedRouteTables"> The list of RouteTables to advertise the routes to. </param>
 21        /// <param name="vnetRoutes"> List of routes that control routing from VirtualHub into a virtual network connect
 022        internal RoutingConfiguration(SubResource associatedRouteTable, PropagatedRouteTable propagatedRouteTables, Vnet
 23        {
 024            AssociatedRouteTable = associatedRouteTable;
 025            PropagatedRouteTables = propagatedRouteTables;
 026            VnetRoutes = vnetRoutes;
 027        }
 28
 29        /// <summary> The resource id RouteTable associated with this RoutingConfiguration. </summary>
 030        public SubResource AssociatedRouteTable { get; set; }
 31        /// <summary> The list of RouteTables to advertise the routes to. </summary>
 032        public PropagatedRouteTable PropagatedRouteTables { get; set; }
 33        /// <summary> List of routes that control routing from VirtualHub into a virtual network connection. </summary>
 034        public VnetRoute VnetRoutes { get; set; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\RoutingConfiguration.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 RoutingConfiguration : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (AssociatedRouteTable != null)
 19            {
 020                writer.WritePropertyName("associatedRouteTable");
 021                writer.WriteObjectValue(AssociatedRouteTable);
 22            }
 023            if (PropagatedRouteTables != null)
 24            {
 025                writer.WritePropertyName("propagatedRouteTables");
 026                writer.WriteObjectValue(PropagatedRouteTables);
 27            }
 028            if (VnetRoutes != null)
 29            {
 030                writer.WritePropertyName("vnetRoutes");
 031                writer.WriteObjectValue(VnetRoutes);
 32            }
 033            writer.WriteEndObject();
 034        }
 35
 36        internal static RoutingConfiguration DeserializeRoutingConfiguration(JsonElement element)
 37        {
 038            SubResource associatedRouteTable = default;
 039            PropagatedRouteTable propagatedRouteTables = default;
 040            VnetRoute vnetRoutes = default;
 041            foreach (var property in element.EnumerateObject())
 42            {
 043                if (property.NameEquals("associatedRouteTable"))
 44                {
 045                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 049                    associatedRouteTable = SubResource.DeserializeSubResource(property.Value);
 050                    continue;
 51                }
 052                if (property.NameEquals("propagatedRouteTables"))
 53                {
 054                    if (property.Value.ValueKind == JsonValueKind.Null)
 55                    {
 56                        continue;
 57                    }
 058                    propagatedRouteTables = PropagatedRouteTable.DeserializePropagatedRouteTable(property.Value);
 059                    continue;
 60                }
 061                if (property.NameEquals("vnetRoutes"))
 62                {
 063                    if (property.Value.ValueKind == JsonValueKind.Null)
 64                    {
 65                        continue;
 66                    }
 067                    vnetRoutes = VnetRoute.DeserializeVnetRoute(property.Value);
 68                    continue;
 69                }
 70            }
 071            return new RoutingConfiguration(associatedRouteTable, propagatedRouteTables, vnetRoutes);
 72        }
 73    }
 74}