< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_PrimaryPeerAddressPrefix()-0%100%
get_SecondaryPeerAddressPrefix()-0%100%
get_MicrosoftPeeringConfig()-0%100%
get_RouteFilter()-0%100%
get_State()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeIpv6ExpressRouteCircuitPeeringConfig(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\Ipv6ExpressRouteCircuitPeeringConfig.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> Contains IPv6 peering config. </summary>
 11    public partial class Ipv6ExpressRouteCircuitPeeringConfig
 12    {
 13        /// <summary> Initializes a new instance of Ipv6ExpressRouteCircuitPeeringConfig. </summary>
 014        public Ipv6ExpressRouteCircuitPeeringConfig()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of Ipv6ExpressRouteCircuitPeeringConfig. </summary>
 19        /// <param name="primaryPeerAddressPrefix"> The primary address prefix. </param>
 20        /// <param name="secondaryPeerAddressPrefix"> The secondary address prefix. </param>
 21        /// <param name="microsoftPeeringConfig"> The Microsoft peering configuration. </param>
 22        /// <param name="routeFilter"> The reference to the RouteFilter resource. </param>
 23        /// <param name="state"> The state of peering. </param>
 024        internal Ipv6ExpressRouteCircuitPeeringConfig(string primaryPeerAddressPrefix, string secondaryPeerAddressPrefix
 25        {
 026            PrimaryPeerAddressPrefix = primaryPeerAddressPrefix;
 027            SecondaryPeerAddressPrefix = secondaryPeerAddressPrefix;
 028            MicrosoftPeeringConfig = microsoftPeeringConfig;
 029            RouteFilter = routeFilter;
 030            State = state;
 031        }
 32
 33        /// <summary> The primary address prefix. </summary>
 034        public string PrimaryPeerAddressPrefix { get; set; }
 35        /// <summary> The secondary address prefix. </summary>
 036        public string SecondaryPeerAddressPrefix { get; set; }
 37        /// <summary> The Microsoft peering configuration. </summary>
 038        public ExpressRouteCircuitPeeringConfig MicrosoftPeeringConfig { get; set; }
 39        /// <summary> The reference to the RouteFilter resource. </summary>
 040        public SubResource RouteFilter { get; set; }
 41        /// <summary> The state of peering. </summary>
 042        public ExpressRouteCircuitPeeringState? State { get; set; }
 43    }
 44}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\Ipv6ExpressRouteCircuitPeeringConfig.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 Ipv6ExpressRouteCircuitPeeringConfig : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (PrimaryPeerAddressPrefix != null)
 19            {
 020                writer.WritePropertyName("primaryPeerAddressPrefix");
 021                writer.WriteStringValue(PrimaryPeerAddressPrefix);
 22            }
 023            if (SecondaryPeerAddressPrefix != null)
 24            {
 025                writer.WritePropertyName("secondaryPeerAddressPrefix");
 026                writer.WriteStringValue(SecondaryPeerAddressPrefix);
 27            }
 028            if (MicrosoftPeeringConfig != null)
 29            {
 030                writer.WritePropertyName("microsoftPeeringConfig");
 031                writer.WriteObjectValue(MicrosoftPeeringConfig);
 32            }
 033            if (RouteFilter != null)
 34            {
 035                writer.WritePropertyName("routeFilter");
 036                writer.WriteObjectValue(RouteFilter);
 37            }
 038            if (State != null)
 39            {
 040                writer.WritePropertyName("state");
 041                writer.WriteStringValue(State.Value.ToString());
 42            }
 043            writer.WriteEndObject();
 044        }
 45
 46        internal static Ipv6ExpressRouteCircuitPeeringConfig DeserializeIpv6ExpressRouteCircuitPeeringConfig(JsonElement
 47        {
 048            string primaryPeerAddressPrefix = default;
 049            string secondaryPeerAddressPrefix = default;
 050            ExpressRouteCircuitPeeringConfig microsoftPeeringConfig = default;
 051            SubResource routeFilter = default;
 052            ExpressRouteCircuitPeeringState? state = default;
 053            foreach (var property in element.EnumerateObject())
 54            {
 055                if (property.NameEquals("primaryPeerAddressPrefix"))
 56                {
 057                    if (property.Value.ValueKind == JsonValueKind.Null)
 58                    {
 59                        continue;
 60                    }
 061                    primaryPeerAddressPrefix = property.Value.GetString();
 062                    continue;
 63                }
 064                if (property.NameEquals("secondaryPeerAddressPrefix"))
 65                {
 066                    if (property.Value.ValueKind == JsonValueKind.Null)
 67                    {
 68                        continue;
 69                    }
 070                    secondaryPeerAddressPrefix = property.Value.GetString();
 071                    continue;
 72                }
 073                if (property.NameEquals("microsoftPeeringConfig"))
 74                {
 075                    if (property.Value.ValueKind == JsonValueKind.Null)
 76                    {
 77                        continue;
 78                    }
 079                    microsoftPeeringConfig = ExpressRouteCircuitPeeringConfig.DeserializeExpressRouteCircuitPeeringConfi
 080                    continue;
 81                }
 082                if (property.NameEquals("routeFilter"))
 83                {
 084                    if (property.Value.ValueKind == JsonValueKind.Null)
 85                    {
 86                        continue;
 87                    }
 088                    routeFilter = SubResource.DeserializeSubResource(property.Value);
 089                    continue;
 90                }
 091                if (property.NameEquals("state"))
 92                {
 093                    if (property.Value.ValueKind == JsonValueKind.Null)
 94                    {
 95                        continue;
 96                    }
 097                    state = new ExpressRouteCircuitPeeringState(property.Value.GetString());
 98                    continue;
 99                }
 100            }
 0101            return new Ipv6ExpressRouteCircuitPeeringConfig(primaryPeerAddressPrefix, secondaryPeerAddressPrefix, micros
 102        }
 103    }
 104}