< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Name()-0%100%
get_VirtualNetwork()-0%100%
get_IpAddress()-0%100%
get_NetworkInterfaceIPConfiguration()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeLoadBalancerBackendAddress(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\LoadBalancerBackendAddress.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> Load balancer backend addresses. </summary>
 11    public partial class LoadBalancerBackendAddress
 12    {
 13        /// <summary> Initializes a new instance of LoadBalancerBackendAddress. </summary>
 014        public LoadBalancerBackendAddress()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of LoadBalancerBackendAddress. </summary>
 19        /// <param name="name"> Name of the backend address. </param>
 20        /// <param name="virtualNetwork"> Reference to an existing virtual network. </param>
 21        /// <param name="ipAddress"> IP Address belonging to the referenced virtual network. </param>
 22        /// <param name="networkInterfaceIPConfiguration"> Reference to IP address defined in network interfaces. </para
 023        internal LoadBalancerBackendAddress(string name, VirtualNetwork virtualNetwork, string ipAddress, NetworkInterfa
 24        {
 025            Name = name;
 026            VirtualNetwork = virtualNetwork;
 027            IpAddress = ipAddress;
 028            NetworkInterfaceIPConfiguration = networkInterfaceIPConfiguration;
 029        }
 30
 31        /// <summary> Name of the backend address. </summary>
 032        public string Name { get; set; }
 33        /// <summary> Reference to an existing virtual network. </summary>
 034        public VirtualNetwork VirtualNetwork { get; set; }
 35        /// <summary> IP Address belonging to the referenced virtual network. </summary>
 036        public string IpAddress { get; set; }
 37        /// <summary> Reference to IP address defined in network interfaces. </summary>
 038        public NetworkInterfaceIPConfiguration NetworkInterfaceIPConfiguration { get; set; }
 39    }
 40}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\LoadBalancerBackendAddress.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 LoadBalancerBackendAddress : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Name != null)
 19            {
 020                writer.WritePropertyName("name");
 021                writer.WriteStringValue(Name);
 22            }
 023            writer.WritePropertyName("properties");
 024            writer.WriteStartObject();
 025            if (VirtualNetwork != null)
 26            {
 027                writer.WritePropertyName("virtualNetwork");
 028                writer.WriteObjectValue(VirtualNetwork);
 29            }
 030            if (IpAddress != null)
 31            {
 032                writer.WritePropertyName("ipAddress");
 033                writer.WriteStringValue(IpAddress);
 34            }
 035            if (NetworkInterfaceIPConfiguration != null)
 36            {
 037                writer.WritePropertyName("networkInterfaceIPConfiguration");
 038                writer.WriteObjectValue(NetworkInterfaceIPConfiguration);
 39            }
 040            writer.WriteEndObject();
 041            writer.WriteEndObject();
 042        }
 43
 44        internal static LoadBalancerBackendAddress DeserializeLoadBalancerBackendAddress(JsonElement element)
 45        {
 046            string name = default;
 047            VirtualNetwork virtualNetwork = default;
 048            string ipAddress = default;
 049            NetworkInterfaceIPConfiguration networkInterfaceIPConfiguration = default;
 050            foreach (var property in element.EnumerateObject())
 51            {
 052                if (property.NameEquals("name"))
 53                {
 054                    if (property.Value.ValueKind == JsonValueKind.Null)
 55                    {
 56                        continue;
 57                    }
 058                    name = property.Value.GetString();
 059                    continue;
 60                }
 061                if (property.NameEquals("properties"))
 62                {
 063                    foreach (var property0 in property.Value.EnumerateObject())
 64                    {
 065                        if (property0.NameEquals("virtualNetwork"))
 66                        {
 067                            if (property0.Value.ValueKind == JsonValueKind.Null)
 68                            {
 69                                continue;
 70                            }
 071                            virtualNetwork = VirtualNetwork.DeserializeVirtualNetwork(property0.Value);
 072                            continue;
 73                        }
 074                        if (property0.NameEquals("ipAddress"))
 75                        {
 076                            if (property0.Value.ValueKind == JsonValueKind.Null)
 77                            {
 78                                continue;
 79                            }
 080                            ipAddress = property0.Value.GetString();
 081                            continue;
 82                        }
 083                        if (property0.NameEquals("networkInterfaceIPConfiguration"))
 84                        {
 085                            if (property0.Value.ValueKind == JsonValueKind.Null)
 86                            {
 87                                continue;
 88                            }
 089                            networkInterfaceIPConfiguration = NetworkInterfaceIPConfiguration.DeserializeNetworkInterfac
 90                            continue;
 91                        }
 92                    }
 93                    continue;
 94                }
 95            }
 096            return new LoadBalancerBackendAddress(name, virtualNetwork, ipAddress, networkInterfaceIPConfiguration);
 97        }
 98    }
 99}