< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Name()-0%100%
get_Etag()-0%100%
get_Type()-0%100%
get_BackendIPConfigurations()-0%100%
get_BackendAddresses()-0%100%
get_ProvisioningState()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeApplicationGatewayBackendAddressPool(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayBackendAddressPool.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> Backend Address Pool of an application gateway. </summary>
 13    public partial class ApplicationGatewayBackendAddressPool : SubResource
 14    {
 15        /// <summary> Initializes a new instance of ApplicationGatewayBackendAddressPool. </summary>
 016        public ApplicationGatewayBackendAddressPool()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ApplicationGatewayBackendAddressPool. </summary>
 21        /// <param name="id"> Resource ID. </param>
 22        /// <param name="name"> Name of the backend address pool that is unique within an Application Gateway. </param>
 23        /// <param name="etag"> A unique read-only string that changes whenever the resource is updated. </param>
 24        /// <param name="type"> Type of the resource. </param>
 25        /// <param name="backendIPConfigurations"> Collection of references to IPs defined in network interfaces. </para
 26        /// <param name="backendAddresses"> Backend addresses. </param>
 27        /// <param name="provisioningState"> The provisioning state of the backend address pool resource. </param>
 028        internal ApplicationGatewayBackendAddressPool(string id, string name, string etag, string type, IList<NetworkInt
 29        {
 030            Name = name;
 031            Etag = etag;
 032            Type = type;
 033            BackendIPConfigurations = backendIPConfigurations;
 034            BackendAddresses = backendAddresses;
 035            ProvisioningState = provisioningState;
 036        }
 37
 38        /// <summary> Name of the backend address pool that is unique within an Application Gateway. </summary>
 039        public string Name { get; set; }
 40        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 041        public string Etag { get; }
 42        /// <summary> Type of the resource. </summary>
 043        public string Type { get; }
 44        /// <summary> Collection of references to IPs defined in network interfaces. </summary>
 045        public IList<NetworkInterfaceIPConfiguration> BackendIPConfigurations { get; }
 46        /// <summary> Backend addresses. </summary>
 047        public IList<ApplicationGatewayBackendAddress> BackendAddresses { get; set; }
 48        /// <summary> The provisioning state of the backend address pool resource. </summary>
 049        public ProvisioningState? ProvisioningState { get; }
 50    }
 51}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayBackendAddressPool.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 ApplicationGatewayBackendAddressPool : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Name != null)
 20            {
 021                writer.WritePropertyName("name");
 022                writer.WriteStringValue(Name);
 23            }
 024            if (Etag != null)
 25            {
 026                writer.WritePropertyName("etag");
 027                writer.WriteStringValue(Etag);
 28            }
 029            if (Type != null)
 30            {
 031                writer.WritePropertyName("type");
 032                writer.WriteStringValue(Type);
 33            }
 034            if (Id != null)
 35            {
 036                writer.WritePropertyName("id");
 037                writer.WriteStringValue(Id);
 38            }
 039            writer.WritePropertyName("properties");
 040            writer.WriteStartObject();
 041            if (BackendIPConfigurations != null)
 42            {
 043                writer.WritePropertyName("backendIPConfigurations");
 044                writer.WriteStartArray();
 045                foreach (var item in BackendIPConfigurations)
 46                {
 047                    writer.WriteObjectValue(item);
 48                }
 049                writer.WriteEndArray();
 50            }
 051            if (BackendAddresses != null)
 52            {
 053                writer.WritePropertyName("backendAddresses");
 054                writer.WriteStartArray();
 055                foreach (var item in BackendAddresses)
 56                {
 057                    writer.WriteObjectValue(item);
 58                }
 059                writer.WriteEndArray();
 60            }
 061            if (ProvisioningState != null)
 62            {
 063                writer.WritePropertyName("provisioningState");
 064                writer.WriteStringValue(ProvisioningState.Value.ToString());
 65            }
 066            writer.WriteEndObject();
 067            writer.WriteEndObject();
 068        }
 69
 70        internal static ApplicationGatewayBackendAddressPool DeserializeApplicationGatewayBackendAddressPool(JsonElement
 71        {
 072            string name = default;
 073            string etag = default;
 074            string type = default;
 075            string id = default;
 076            IList<NetworkInterfaceIPConfiguration> backendIPConfigurations = default;
 077            IList<ApplicationGatewayBackendAddress> backendAddresses = default;
 078            ProvisioningState? provisioningState = default;
 079            foreach (var property in element.EnumerateObject())
 80            {
 081                if (property.NameEquals("name"))
 82                {
 083                    if (property.Value.ValueKind == JsonValueKind.Null)
 84                    {
 85                        continue;
 86                    }
 087                    name = property.Value.GetString();
 088                    continue;
 89                }
 090                if (property.NameEquals("etag"))
 91                {
 092                    if (property.Value.ValueKind == JsonValueKind.Null)
 93                    {
 94                        continue;
 95                    }
 096                    etag = property.Value.GetString();
 097                    continue;
 98                }
 099                if (property.NameEquals("type"))
 100                {
 0101                    if (property.Value.ValueKind == JsonValueKind.Null)
 102                    {
 103                        continue;
 104                    }
 0105                    type = property.Value.GetString();
 0106                    continue;
 107                }
 0108                if (property.NameEquals("id"))
 109                {
 0110                    if (property.Value.ValueKind == JsonValueKind.Null)
 111                    {
 112                        continue;
 113                    }
 0114                    id = property.Value.GetString();
 0115                    continue;
 116                }
 0117                if (property.NameEquals("properties"))
 118                {
 0119                    foreach (var property0 in property.Value.EnumerateObject())
 120                    {
 0121                        if (property0.NameEquals("backendIPConfigurations"))
 122                        {
 0123                            if (property0.Value.ValueKind == JsonValueKind.Null)
 124                            {
 125                                continue;
 126                            }
 0127                            List<NetworkInterfaceIPConfiguration> array = new List<NetworkInterfaceIPConfiguration>();
 0128                            foreach (var item in property0.Value.EnumerateArray())
 129                            {
 0130                                if (item.ValueKind == JsonValueKind.Null)
 131                                {
 0132                                    array.Add(null);
 133                                }
 134                                else
 135                                {
 0136                                    array.Add(NetworkInterfaceIPConfiguration.DeserializeNetworkInterfaceIPConfiguration
 137                                }
 138                            }
 0139                            backendIPConfigurations = array;
 0140                            continue;
 141                        }
 0142                        if (property0.NameEquals("backendAddresses"))
 143                        {
 0144                            if (property0.Value.ValueKind == JsonValueKind.Null)
 145                            {
 146                                continue;
 147                            }
 0148                            List<ApplicationGatewayBackendAddress> array = new List<ApplicationGatewayBackendAddress>();
 0149                            foreach (var item in property0.Value.EnumerateArray())
 150                            {
 0151                                if (item.ValueKind == JsonValueKind.Null)
 152                                {
 0153                                    array.Add(null);
 154                                }
 155                                else
 156                                {
 0157                                    array.Add(ApplicationGatewayBackendAddress.DeserializeApplicationGatewayBackendAddre
 158                                }
 159                            }
 0160                            backendAddresses = array;
 0161                            continue;
 162                        }
 0163                        if (property0.NameEquals("provisioningState"))
 164                        {
 0165                            if (property0.Value.ValueKind == JsonValueKind.Null)
 166                            {
 167                                continue;
 168                            }
 0169                            provisioningState = new ProvisioningState(property0.Value.GetString());
 170                            continue;
 171                        }
 172                    }
 173                    continue;
 174                }
 175            }
 0176            return new ApplicationGatewayBackendAddressPool(id, name, etag, type, backendIPConfigurations, backendAddres
 177        }
 178    }
 179}