< Summary

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

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_Port()-0%100%
get_Protocol()-0%100%
get_CookieBasedAffinity()-0%100%
get_RequestTimeout()-0%100%
get_Probe()-0%100%
get_AuthenticationCertificates()-0%100%
get_TrustedRootCertificates()-0%100%
get_ConnectionDraining()-0%100%
get_HostName()-0%100%
get_PickHostNameFromBackendAddress()-0%100%
get_AffinityCookieName()-0%100%
get_ProbeEnabled()-0%100%
get_Path()-0%100%
get_ProvisioningState()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeApplicationGatewayBackendHttpSettings(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayBackendHttpSettings.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 settings of an application gateway. </summary>
 13    public partial class ApplicationGatewayBackendHttpSettings : SubResource
 14    {
 15        /// <summary> Initializes a new instance of ApplicationGatewayBackendHttpSettings. </summary>
 016        public ApplicationGatewayBackendHttpSettings()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ApplicationGatewayBackendHttpSettings. </summary>
 21        /// <param name="id"> Resource ID. </param>
 22        /// <param name="name"> Name of the backend http settings 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="port"> The destination port on the backend. </param>
 26        /// <param name="protocol"> The protocol used to communicate with the backend. </param>
 27        /// <param name="cookieBasedAffinity"> Cookie based affinity. </param>
 28        /// <param name="requestTimeout"> Request timeout in seconds. Application Gateway will fail the request if respo
 29        /// <param name="probe"> Probe resource of an application gateway. </param>
 30        /// <param name="authenticationCertificates"> Array of references to application gateway authentication certific
 31        /// <param name="trustedRootCertificates"> Array of references to application gateway trusted root certificates.
 32        /// <param name="connectionDraining"> Connection draining of the backend http settings resource. </param>
 33        /// <param name="hostName"> Host header to be sent to the backend servers. </param>
 34        /// <param name="pickHostNameFromBackendAddress"> Whether to pick host header should be picked from the host nam
 35        /// <param name="affinityCookieName"> Cookie name to use for the affinity cookie. </param>
 36        /// <param name="probeEnabled"> Whether the probe is enabled. Default value is false. </param>
 37        /// <param name="path"> Path which should be used as a prefix for all HTTP requests. Null means no path will be 
 38        /// <param name="provisioningState"> The provisioning state of the backend HTTP settings resource. </param>
 039        internal ApplicationGatewayBackendHttpSettings(string id, string name, string etag, string type, int? port, Appl
 40        {
 041            Name = name;
 042            Etag = etag;
 043            Type = type;
 044            Port = port;
 045            Protocol = protocol;
 046            CookieBasedAffinity = cookieBasedAffinity;
 047            RequestTimeout = requestTimeout;
 048            Probe = probe;
 049            AuthenticationCertificates = authenticationCertificates;
 050            TrustedRootCertificates = trustedRootCertificates;
 051            ConnectionDraining = connectionDraining;
 052            HostName = hostName;
 053            PickHostNameFromBackendAddress = pickHostNameFromBackendAddress;
 054            AffinityCookieName = affinityCookieName;
 055            ProbeEnabled = probeEnabled;
 056            Path = path;
 057            ProvisioningState = provisioningState;
 058        }
 59
 60        /// <summary> Name of the backend http settings that is unique within an Application Gateway. </summary>
 061        public string Name { get; set; }
 62        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 063        public string Etag { get; }
 64        /// <summary> Type of the resource. </summary>
 065        public string Type { get; }
 66        /// <summary> The destination port on the backend. </summary>
 067        public int? Port { get; set; }
 68        /// <summary> The protocol used to communicate with the backend. </summary>
 069        public ApplicationGatewayProtocol? Protocol { get; set; }
 70        /// <summary> Cookie based affinity. </summary>
 071        public ApplicationGatewayCookieBasedAffinity? CookieBasedAffinity { get; set; }
 72        /// <summary> Request timeout in seconds. Application Gateway will fail the request if response is not received 
 073        public int? RequestTimeout { get; set; }
 74        /// <summary> Probe resource of an application gateway. </summary>
 075        public SubResource Probe { get; set; }
 76        /// <summary> Array of references to application gateway authentication certificates. </summary>
 077        public IList<SubResource> AuthenticationCertificates { get; set; }
 78        /// <summary> Array of references to application gateway trusted root certificates. </summary>
 079        public IList<SubResource> TrustedRootCertificates { get; set; }
 80        /// <summary> Connection draining of the backend http settings resource. </summary>
 081        public ApplicationGatewayConnectionDraining ConnectionDraining { get; set; }
 82        /// <summary> Host header to be sent to the backend servers. </summary>
 083        public string HostName { get; set; }
 84        /// <summary> Whether to pick host header should be picked from the host name of the backend server. Default val
 085        public bool? PickHostNameFromBackendAddress { get; set; }
 86        /// <summary> Cookie name to use for the affinity cookie. </summary>
 087        public string AffinityCookieName { get; set; }
 88        /// <summary> Whether the probe is enabled. Default value is false. </summary>
 089        public bool? ProbeEnabled { get; set; }
 90        /// <summary> Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. 
 091        public string Path { get; set; }
 92        /// <summary> The provisioning state of the backend HTTP settings resource. </summary>
 093        public ProvisioningState? ProvisioningState { get; }
 94    }
 95}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayBackendHttpSettings.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 ApplicationGatewayBackendHttpSettings : 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 (Port != null)
 42            {
 043                writer.WritePropertyName("port");
 044                writer.WriteNumberValue(Port.Value);
 45            }
 046            if (Protocol != null)
 47            {
 048                writer.WritePropertyName("protocol");
 049                writer.WriteStringValue(Protocol.Value.ToString());
 50            }
 051            if (CookieBasedAffinity != null)
 52            {
 053                writer.WritePropertyName("cookieBasedAffinity");
 054                writer.WriteStringValue(CookieBasedAffinity.Value.ToString());
 55            }
 056            if (RequestTimeout != null)
 57            {
 058                writer.WritePropertyName("requestTimeout");
 059                writer.WriteNumberValue(RequestTimeout.Value);
 60            }
 061            if (Probe != null)
 62            {
 063                writer.WritePropertyName("probe");
 064                writer.WriteObjectValue(Probe);
 65            }
 066            if (AuthenticationCertificates != null)
 67            {
 068                writer.WritePropertyName("authenticationCertificates");
 069                writer.WriteStartArray();
 070                foreach (var item in AuthenticationCertificates)
 71                {
 072                    writer.WriteObjectValue(item);
 73                }
 074                writer.WriteEndArray();
 75            }
 076            if (TrustedRootCertificates != null)
 77            {
 078                writer.WritePropertyName("trustedRootCertificates");
 079                writer.WriteStartArray();
 080                foreach (var item in TrustedRootCertificates)
 81                {
 082                    writer.WriteObjectValue(item);
 83                }
 084                writer.WriteEndArray();
 85            }
 086            if (ConnectionDraining != null)
 87            {
 088                writer.WritePropertyName("connectionDraining");
 089                writer.WriteObjectValue(ConnectionDraining);
 90            }
 091            if (HostName != null)
 92            {
 093                writer.WritePropertyName("hostName");
 094                writer.WriteStringValue(HostName);
 95            }
 096            if (PickHostNameFromBackendAddress != null)
 97            {
 098                writer.WritePropertyName("pickHostNameFromBackendAddress");
 099                writer.WriteBooleanValue(PickHostNameFromBackendAddress.Value);
 100            }
 0101            if (AffinityCookieName != null)
 102            {
 0103                writer.WritePropertyName("affinityCookieName");
 0104                writer.WriteStringValue(AffinityCookieName);
 105            }
 0106            if (ProbeEnabled != null)
 107            {
 0108                writer.WritePropertyName("probeEnabled");
 0109                writer.WriteBooleanValue(ProbeEnabled.Value);
 110            }
 0111            if (Path != null)
 112            {
 0113                writer.WritePropertyName("path");
 0114                writer.WriteStringValue(Path);
 115            }
 0116            if (ProvisioningState != null)
 117            {
 0118                writer.WritePropertyName("provisioningState");
 0119                writer.WriteStringValue(ProvisioningState.Value.ToString());
 120            }
 0121            writer.WriteEndObject();
 0122            writer.WriteEndObject();
 0123        }
 124
 125        internal static ApplicationGatewayBackendHttpSettings DeserializeApplicationGatewayBackendHttpSettings(JsonEleme
 126        {
 0127            string name = default;
 0128            string etag = default;
 0129            string type = default;
 0130            string id = default;
 0131            int? port = default;
 0132            ApplicationGatewayProtocol? protocol = default;
 0133            ApplicationGatewayCookieBasedAffinity? cookieBasedAffinity = default;
 0134            int? requestTimeout = default;
 0135            SubResource probe = default;
 0136            IList<SubResource> authenticationCertificates = default;
 0137            IList<SubResource> trustedRootCertificates = default;
 0138            ApplicationGatewayConnectionDraining connectionDraining = default;
 0139            string hostName = default;
 0140            bool? pickHostNameFromBackendAddress = default;
 0141            string affinityCookieName = default;
 0142            bool? probeEnabled = default;
 0143            string path = default;
 0144            ProvisioningState? provisioningState = default;
 0145            foreach (var property in element.EnumerateObject())
 146            {
 0147                if (property.NameEquals("name"))
 148                {
 0149                    if (property.Value.ValueKind == JsonValueKind.Null)
 150                    {
 151                        continue;
 152                    }
 0153                    name = property.Value.GetString();
 0154                    continue;
 155                }
 0156                if (property.NameEquals("etag"))
 157                {
 0158                    if (property.Value.ValueKind == JsonValueKind.Null)
 159                    {
 160                        continue;
 161                    }
 0162                    etag = property.Value.GetString();
 0163                    continue;
 164                }
 0165                if (property.NameEquals("type"))
 166                {
 0167                    if (property.Value.ValueKind == JsonValueKind.Null)
 168                    {
 169                        continue;
 170                    }
 0171                    type = property.Value.GetString();
 0172                    continue;
 173                }
 0174                if (property.NameEquals("id"))
 175                {
 0176                    if (property.Value.ValueKind == JsonValueKind.Null)
 177                    {
 178                        continue;
 179                    }
 0180                    id = property.Value.GetString();
 0181                    continue;
 182                }
 0183                if (property.NameEquals("properties"))
 184                {
 0185                    foreach (var property0 in property.Value.EnumerateObject())
 186                    {
 0187                        if (property0.NameEquals("port"))
 188                        {
 0189                            if (property0.Value.ValueKind == JsonValueKind.Null)
 190                            {
 191                                continue;
 192                            }
 0193                            port = property0.Value.GetInt32();
 0194                            continue;
 195                        }
 0196                        if (property0.NameEquals("protocol"))
 197                        {
 0198                            if (property0.Value.ValueKind == JsonValueKind.Null)
 199                            {
 200                                continue;
 201                            }
 0202                            protocol = new ApplicationGatewayProtocol(property0.Value.GetString());
 0203                            continue;
 204                        }
 0205                        if (property0.NameEquals("cookieBasedAffinity"))
 206                        {
 0207                            if (property0.Value.ValueKind == JsonValueKind.Null)
 208                            {
 209                                continue;
 210                            }
 0211                            cookieBasedAffinity = new ApplicationGatewayCookieBasedAffinity(property0.Value.GetString())
 0212                            continue;
 213                        }
 0214                        if (property0.NameEquals("requestTimeout"))
 215                        {
 0216                            if (property0.Value.ValueKind == JsonValueKind.Null)
 217                            {
 218                                continue;
 219                            }
 0220                            requestTimeout = property0.Value.GetInt32();
 0221                            continue;
 222                        }
 0223                        if (property0.NameEquals("probe"))
 224                        {
 0225                            if (property0.Value.ValueKind == JsonValueKind.Null)
 226                            {
 227                                continue;
 228                            }
 0229                            probe = DeserializeSubResource(property0.Value);
 0230                            continue;
 231                        }
 0232                        if (property0.NameEquals("authenticationCertificates"))
 233                        {
 0234                            if (property0.Value.ValueKind == JsonValueKind.Null)
 235                            {
 236                                continue;
 237                            }
 0238                            List<SubResource> array = new List<SubResource>();
 0239                            foreach (var item in property0.Value.EnumerateArray())
 240                            {
 0241                                if (item.ValueKind == JsonValueKind.Null)
 242                                {
 0243                                    array.Add(null);
 244                                }
 245                                else
 246                                {
 0247                                    array.Add(DeserializeSubResource(item));
 248                                }
 249                            }
 0250                            authenticationCertificates = array;
 0251                            continue;
 252                        }
 0253                        if (property0.NameEquals("trustedRootCertificates"))
 254                        {
 0255                            if (property0.Value.ValueKind == JsonValueKind.Null)
 256                            {
 257                                continue;
 258                            }
 0259                            List<SubResource> array = new List<SubResource>();
 0260                            foreach (var item in property0.Value.EnumerateArray())
 261                            {
 0262                                if (item.ValueKind == JsonValueKind.Null)
 263                                {
 0264                                    array.Add(null);
 265                                }
 266                                else
 267                                {
 0268                                    array.Add(DeserializeSubResource(item));
 269                                }
 270                            }
 0271                            trustedRootCertificates = array;
 0272                            continue;
 273                        }
 0274                        if (property0.NameEquals("connectionDraining"))
 275                        {
 0276                            if (property0.Value.ValueKind == JsonValueKind.Null)
 277                            {
 278                                continue;
 279                            }
 0280                            connectionDraining = ApplicationGatewayConnectionDraining.DeserializeApplicationGatewayConne
 0281                            continue;
 282                        }
 0283                        if (property0.NameEquals("hostName"))
 284                        {
 0285                            if (property0.Value.ValueKind == JsonValueKind.Null)
 286                            {
 287                                continue;
 288                            }
 0289                            hostName = property0.Value.GetString();
 0290                            continue;
 291                        }
 0292                        if (property0.NameEquals("pickHostNameFromBackendAddress"))
 293                        {
 0294                            if (property0.Value.ValueKind == JsonValueKind.Null)
 295                            {
 296                                continue;
 297                            }
 0298                            pickHostNameFromBackendAddress = property0.Value.GetBoolean();
 0299                            continue;
 300                        }
 0301                        if (property0.NameEquals("affinityCookieName"))
 302                        {
 0303                            if (property0.Value.ValueKind == JsonValueKind.Null)
 304                            {
 305                                continue;
 306                            }
 0307                            affinityCookieName = property0.Value.GetString();
 0308                            continue;
 309                        }
 0310                        if (property0.NameEquals("probeEnabled"))
 311                        {
 0312                            if (property0.Value.ValueKind == JsonValueKind.Null)
 313                            {
 314                                continue;
 315                            }
 0316                            probeEnabled = property0.Value.GetBoolean();
 0317                            continue;
 318                        }
 0319                        if (property0.NameEquals("path"))
 320                        {
 0321                            if (property0.Value.ValueKind == JsonValueKind.Null)
 322                            {
 323                                continue;
 324                            }
 0325                            path = property0.Value.GetString();
 0326                            continue;
 327                        }
 0328                        if (property0.NameEquals("provisioningState"))
 329                        {
 0330                            if (property0.Value.ValueKind == JsonValueKind.Null)
 331                            {
 332                                continue;
 333                            }
 0334                            provisioningState = new ProvisioningState(property0.Value.GetString());
 335                            continue;
 336                        }
 337                    }
 338                    continue;
 339                }
 340            }
 0341            return new ApplicationGatewayBackendHttpSettings(id, name, etag, type, port, protocol, cookieBasedAffinity, 
 342        }
 343    }
 344}