< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%100%
get_VirtualNetworkCommunity()-0%100%
get_RegionalCommunity()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeVirtualNetworkBgpCommunities(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VirtualNetworkBgpCommunities.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;
 9
 10namespace Azure.ResourceManager.Network.Models
 11{
 12    /// <summary> Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET. </summa
 13    public partial class VirtualNetworkBgpCommunities
 14    {
 15        /// <summary> Initializes a new instance of VirtualNetworkBgpCommunities. </summary>
 16        /// <param name="virtualNetworkCommunity"> The BGP community associated with the virtual network. </param>
 017        public VirtualNetworkBgpCommunities(string virtualNetworkCommunity)
 18        {
 019            if (virtualNetworkCommunity == null)
 20            {
 021                throw new ArgumentNullException(nameof(virtualNetworkCommunity));
 22            }
 23
 024            VirtualNetworkCommunity = virtualNetworkCommunity;
 025        }
 26
 27        /// <summary> Initializes a new instance of VirtualNetworkBgpCommunities. </summary>
 28        /// <param name="virtualNetworkCommunity"> The BGP community associated with the virtual network. </param>
 29        /// <param name="regionalCommunity"> The BGP community associated with the region of the virtual network. </para
 030        internal VirtualNetworkBgpCommunities(string virtualNetworkCommunity, string regionalCommunity)
 31        {
 032            VirtualNetworkCommunity = virtualNetworkCommunity;
 033            RegionalCommunity = regionalCommunity;
 034        }
 35
 36        /// <summary> The BGP community associated with the virtual network. </summary>
 037        public string VirtualNetworkCommunity { get; set; }
 38        /// <summary> The BGP community associated with the region of the virtual network. </summary>
 039        public string RegionalCommunity { get; }
 40    }
 41}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VirtualNetworkBgpCommunities.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 VirtualNetworkBgpCommunities : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("virtualNetworkCommunity");
 019            writer.WriteStringValue(VirtualNetworkCommunity);
 020            if (RegionalCommunity != null)
 21            {
 022                writer.WritePropertyName("regionalCommunity");
 023                writer.WriteStringValue(RegionalCommunity);
 24            }
 025            writer.WriteEndObject();
 026        }
 27
 28        internal static VirtualNetworkBgpCommunities DeserializeVirtualNetworkBgpCommunities(JsonElement element)
 29        {
 030            string virtualNetworkCommunity = default;
 031            string regionalCommunity = default;
 032            foreach (var property in element.EnumerateObject())
 33            {
 034                if (property.NameEquals("virtualNetworkCommunity"))
 35                {
 036                    virtualNetworkCommunity = property.Value.GetString();
 037                    continue;
 38                }
 039                if (property.NameEquals("regionalCommunity"))
 40                {
 041                    if (property.Value.ValueKind == JsonValueKind.Null)
 42                    {
 43                        continue;
 44                    }
 045                    regionalCommunity = property.Value.GetString();
 46                    continue;
 47                }
 48            }
 049            return new VirtualNetworkBgpCommunities(virtualNetworkCommunity, regionalCommunity);
 50        }
 51    }
 52}