< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Asn()-0%100%
get_BgpPeeringAddress()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeVpnLinkBgpSettings(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VpnLinkBgpSettings.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> BGP settings details for a link. </summary>
 11    public partial class VpnLinkBgpSettings
 12    {
 13        /// <summary> Initializes a new instance of VpnLinkBgpSettings. </summary>
 014        public VpnLinkBgpSettings()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of VpnLinkBgpSettings. </summary>
 19        /// <param name="asn"> The BGP speaker&apos;s ASN. </param>
 20        /// <param name="bgpPeeringAddress"> The BGP peering address and BGP identifier of this BGP speaker. </param>
 021        internal VpnLinkBgpSettings(long? asn, string bgpPeeringAddress)
 22        {
 023            Asn = asn;
 024            BgpPeeringAddress = bgpPeeringAddress;
 025        }
 26
 27        /// <summary> The BGP speaker&apos;s ASN. </summary>
 028        public long? Asn { get; set; }
 29        /// <summary> The BGP peering address and BGP identifier of this BGP speaker. </summary>
 030        public string BgpPeeringAddress { get; set; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VpnLinkBgpSettings.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 VpnLinkBgpSettings : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Asn != null)
 19            {
 020                writer.WritePropertyName("asn");
 021                writer.WriteNumberValue(Asn.Value);
 22            }
 023            if (BgpPeeringAddress != null)
 24            {
 025                writer.WritePropertyName("bgpPeeringAddress");
 026                writer.WriteStringValue(BgpPeeringAddress);
 27            }
 028            writer.WriteEndObject();
 029        }
 30
 31        internal static VpnLinkBgpSettings DeserializeVpnLinkBgpSettings(JsonElement element)
 32        {
 033            long? asn = default;
 034            string bgpPeeringAddress = default;
 035            foreach (var property in element.EnumerateObject())
 36            {
 037                if (property.NameEquals("asn"))
 38                {
 039                    if (property.Value.ValueKind == JsonValueKind.Null)
 40                    {
 41                        continue;
 42                    }
 043                    asn = property.Value.GetInt64();
 044                    continue;
 45                }
 046                if (property.NameEquals("bgpPeeringAddress"))
 47                {
 048                    if (property.Value.ValueKind == JsonValueKind.Null)
 49                    {
 50                        continue;
 51                    }
 052                    bgpPeeringAddress = property.Value.GetString();
 53                    continue;
 54                }
 55            }
 056            return new VpnLinkBgpSettings(asn, bgpPeeringAddress);
 57        }
 58    }
 59}