< Summary

Class:Azure.ResourceManager.Network.Models.IPConfigurationBgpPeeringAddress
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\IPConfigurationBgpPeeringAddress.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\IPConfigurationBgpPeeringAddress.Serialization.cs
Covered lines:62
Uncovered lines:10
Coverable lines:72
Total lines:183
Line coverage:86.1% (62 of 72)
Covered branches:38
Total branches:44
Branch coverage:86.3% (38 of 44)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_IpconfigurationId()-100%100%
get_DefaultBgpIpAddresses()-100%100%
get_CustomBgpIpAddresses()-100%100%
get_TunnelIpAddresses()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-91.67%92.86%
DeserializeIPConfigurationBgpPeeringAddress(...)-83.33%83.33%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\IPConfigurationBgpPeeringAddress.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> Properties of IPConfigurationBgpPeeringAddress. </summary>
 13    public partial class IPConfigurationBgpPeeringAddress
 14    {
 15        /// <summary> Initializes a new instance of IPConfigurationBgpPeeringAddress. </summary>
 016        public IPConfigurationBgpPeeringAddress()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of IPConfigurationBgpPeeringAddress. </summary>
 21        /// <param name="ipconfigurationId"> The ID of IP configuration which belongs to gateway. </param>
 22        /// <param name="defaultBgpIpAddresses"> The list of default BGP peering addresses which belong to IP configurat
 23        /// <param name="customBgpIpAddresses"> The list of custom BGP peering addresses which belong to IP configuratio
 24        /// <param name="tunnelIpAddresses"> The list of tunnel public IP addresses which belong to IP configuration. </
 3225        internal IPConfigurationBgpPeeringAddress(string ipconfigurationId, IList<string> defaultBgpIpAddresses, IList<s
 26        {
 3227            IpconfigurationId = ipconfigurationId;
 3228            DefaultBgpIpAddresses = defaultBgpIpAddresses;
 3229            CustomBgpIpAddresses = customBgpIpAddresses;
 3230            TunnelIpAddresses = tunnelIpAddresses;
 3231        }
 32
 33        /// <summary> The ID of IP configuration which belongs to gateway. </summary>
 14434        public string IpconfigurationId { get; set; }
 35        /// <summary> The list of default BGP peering addresses which belong to IP configuration. </summary>
 11236        public IList<string> DefaultBgpIpAddresses { get; }
 37        /// <summary> The list of custom BGP peering addresses which belong to IP configuration. </summary>
 14438        public IList<string> CustomBgpIpAddresses { get; set; }
 39        /// <summary> The list of tunnel public IP addresses which belong to IP configuration. </summary>
 11240        public IList<string> TunnelIpAddresses { get; }
 41    }
 42}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\IPConfigurationBgpPeeringAddress.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 IPConfigurationBgpPeeringAddress : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 5618            writer.WriteStartObject();
 5619            if (IpconfigurationId != null)
 20            {
 5621                writer.WritePropertyName("ipconfigurationId");
 5622                writer.WriteStringValue(IpconfigurationId);
 23            }
 5624            if (DefaultBgpIpAddresses != null)
 25            {
 5626                writer.WritePropertyName("defaultBgpIpAddresses");
 5627                writer.WriteStartArray();
 22428                foreach (var item in DefaultBgpIpAddresses)
 29                {
 5630                    writer.WriteStringValue(item);
 31                }
 5632                writer.WriteEndArray();
 33            }
 5634            if (CustomBgpIpAddresses != null)
 35            {
 5636                writer.WritePropertyName("customBgpIpAddresses");
 5637                writer.WriteStartArray();
 038                foreach (var item in CustomBgpIpAddresses)
 39                {
 040                    writer.WriteStringValue(item);
 41                }
 5642                writer.WriteEndArray();
 43            }
 5644            if (TunnelIpAddresses != null)
 45            {
 5646                writer.WritePropertyName("tunnelIpAddresses");
 5647                writer.WriteStartArray();
 22448                foreach (var item in TunnelIpAddresses)
 49                {
 5650                    writer.WriteStringValue(item);
 51                }
 5652                writer.WriteEndArray();
 53            }
 5654            writer.WriteEndObject();
 5655        }
 56
 57        internal static IPConfigurationBgpPeeringAddress DeserializeIPConfigurationBgpPeeringAddress(JsonElement element
 58        {
 3259            string ipconfigurationId = default;
 3260            IList<string> defaultBgpIpAddresses = default;
 3261            IList<string> customBgpIpAddresses = default;
 3262            IList<string> tunnelIpAddresses = default;
 32063            foreach (var property in element.EnumerateObject())
 64            {
 12865                if (property.NameEquals("ipconfigurationId"))
 66                {
 3267                    if (property.Value.ValueKind == JsonValueKind.Null)
 68                    {
 69                        continue;
 70                    }
 3271                    ipconfigurationId = property.Value.GetString();
 3272                    continue;
 73                }
 9674                if (property.NameEquals("defaultBgpIpAddresses"))
 75                {
 3276                    if (property.Value.ValueKind == JsonValueKind.Null)
 77                    {
 78                        continue;
 79                    }
 3280                    List<string> array = new List<string>();
 12881                    foreach (var item in property.Value.EnumerateArray())
 82                    {
 3283                        if (item.ValueKind == JsonValueKind.Null)
 84                        {
 085                            array.Add(null);
 86                        }
 87                        else
 88                        {
 3289                            array.Add(item.GetString());
 90                        }
 91                    }
 3292                    defaultBgpIpAddresses = array;
 3293                    continue;
 94                }
 6495                if (property.NameEquals("customBgpIpAddresses"))
 96                {
 3297                    if (property.Value.ValueKind == JsonValueKind.Null)
 98                    {
 99                        continue;
 100                    }
 32101                    List<string> array = new List<string>();
 0102                    foreach (var item in property.Value.EnumerateArray())
 103                    {
 0104                        if (item.ValueKind == JsonValueKind.Null)
 105                        {
 0106                            array.Add(null);
 107                        }
 108                        else
 109                        {
 0110                            array.Add(item.GetString());
 111                        }
 112                    }
 32113                    customBgpIpAddresses = array;
 32114                    continue;
 115                }
 32116                if (property.NameEquals("tunnelIpAddresses"))
 117                {
 32118                    if (property.Value.ValueKind == JsonValueKind.Null)
 119                    {
 120                        continue;
 121                    }
 32122                    List<string> array = new List<string>();
 128123                    foreach (var item in property.Value.EnumerateArray())
 124                    {
 32125                        if (item.ValueKind == JsonValueKind.Null)
 126                        {
 0127                            array.Add(null);
 128                        }
 129                        else
 130                        {
 32131                            array.Add(item.GetString());
 132                        }
 133                    }
 32134                    tunnelIpAddresses = array;
 135                    continue;
 136                }
 137            }
 32138            return new IPConfigurationBgpPeeringAddress(ipconfigurationId, defaultBgpIpAddresses, customBgpIpAddresses, 
 139        }
 140    }
 141}