< Summary

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

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_FrontendIPConfiguration()-0%100%
get_FrontendPort()-0%100%
get_Protocol()-0%100%
get_HostName()-0%100%
get_SslCertificate()-0%100%
get_RequireServerNameIndication()-0%100%
get_ProvisioningState()-0%100%
get_CustomErrorConfigurations()-0%100%
get_FirewallPolicy()-0%100%
get_HostNames()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeApplicationGatewayHttpListener(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayHttpListener.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> Http listener of an application gateway. </summary>
 13    public partial class ApplicationGatewayHttpListener : SubResource
 14    {
 15        /// <summary> Initializes a new instance of ApplicationGatewayHttpListener. </summary>
 016        public ApplicationGatewayHttpListener()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ApplicationGatewayHttpListener. </summary>
 21        /// <param name="id"> Resource ID. </param>
 22        /// <param name="name"> Name of the HTTP listener 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="frontendIPConfiguration"> Frontend IP configuration resource of an application gateway. </param
 26        /// <param name="frontendPort"> Frontend port resource of an application gateway. </param>
 27        /// <param name="protocol"> Protocol of the HTTP listener. </param>
 28        /// <param name="hostName"> Host name of HTTP listener. </param>
 29        /// <param name="sslCertificate"> SSL certificate resource of an application gateway. </param>
 30        /// <param name="requireServerNameIndication"> Applicable only if protocol is https. Enables SNI for multi-hosti
 31        /// <param name="provisioningState"> The provisioning state of the HTTP listener resource. </param>
 32        /// <param name="customErrorConfigurations"> Custom error configurations of the HTTP listener. </param>
 33        /// <param name="firewallPolicy"> Reference to the FirewallPolicy resource. </param>
 34        /// <param name="hostNames"> List of Host names for HTTP Listener that allows special wildcard characters as wel
 035        internal ApplicationGatewayHttpListener(string id, string name, string etag, string type, SubResource frontendIP
 36        {
 037            Name = name;
 038            Etag = etag;
 039            Type = type;
 040            FrontendIPConfiguration = frontendIPConfiguration;
 041            FrontendPort = frontendPort;
 042            Protocol = protocol;
 043            HostName = hostName;
 044            SslCertificate = sslCertificate;
 045            RequireServerNameIndication = requireServerNameIndication;
 046            ProvisioningState = provisioningState;
 047            CustomErrorConfigurations = customErrorConfigurations;
 048            FirewallPolicy = firewallPolicy;
 049            HostNames = hostNames;
 050        }
 51
 52        /// <summary> Name of the HTTP listener that is unique within an Application Gateway. </summary>
 053        public string Name { get; set; }
 54        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 055        public string Etag { get; }
 56        /// <summary> Type of the resource. </summary>
 057        public string Type { get; }
 58        /// <summary> Frontend IP configuration resource of an application gateway. </summary>
 059        public SubResource FrontendIPConfiguration { get; set; }
 60        /// <summary> Frontend port resource of an application gateway. </summary>
 061        public SubResource FrontendPort { get; set; }
 62        /// <summary> Protocol of the HTTP listener. </summary>
 063        public ApplicationGatewayProtocol? Protocol { get; set; }
 64        /// <summary> Host name of HTTP listener. </summary>
 065        public string HostName { get; set; }
 66        /// <summary> SSL certificate resource of an application gateway. </summary>
 067        public SubResource SslCertificate { get; set; }
 68        /// <summary> Applicable only if protocol is https. Enables SNI for multi-hosting. </summary>
 069        public bool? RequireServerNameIndication { get; set; }
 70        /// <summary> The provisioning state of the HTTP listener resource. </summary>
 071        public ProvisioningState? ProvisioningState { get; }
 72        /// <summary> Custom error configurations of the HTTP listener. </summary>
 073        public IList<ApplicationGatewayCustomError> CustomErrorConfigurations { get; set; }
 74        /// <summary> Reference to the FirewallPolicy resource. </summary>
 075        public SubResource FirewallPolicy { get; set; }
 76        /// <summary> List of Host names for HTTP Listener that allows special wildcard characters as well. </summary>
 077        public IList<string> HostNames { get; set; }
 78    }
 79}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayHttpListener.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 ApplicationGatewayHttpListener : 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 (FrontendIPConfiguration != null)
 42            {
 043                writer.WritePropertyName("frontendIPConfiguration");
 044                writer.WriteObjectValue(FrontendIPConfiguration);
 45            }
 046            if (FrontendPort != null)
 47            {
 048                writer.WritePropertyName("frontendPort");
 049                writer.WriteObjectValue(FrontendPort);
 50            }
 051            if (Protocol != null)
 52            {
 053                writer.WritePropertyName("protocol");
 054                writer.WriteStringValue(Protocol.Value.ToString());
 55            }
 056            if (HostName != null)
 57            {
 058                writer.WritePropertyName("hostName");
 059                writer.WriteStringValue(HostName);
 60            }
 061            if (SslCertificate != null)
 62            {
 063                writer.WritePropertyName("sslCertificate");
 064                writer.WriteObjectValue(SslCertificate);
 65            }
 066            if (RequireServerNameIndication != null)
 67            {
 068                writer.WritePropertyName("requireServerNameIndication");
 069                writer.WriteBooleanValue(RequireServerNameIndication.Value);
 70            }
 071            if (ProvisioningState != null)
 72            {
 073                writer.WritePropertyName("provisioningState");
 074                writer.WriteStringValue(ProvisioningState.Value.ToString());
 75            }
 076            if (CustomErrorConfigurations != null)
 77            {
 078                writer.WritePropertyName("customErrorConfigurations");
 079                writer.WriteStartArray();
 080                foreach (var item in CustomErrorConfigurations)
 81                {
 082                    writer.WriteObjectValue(item);
 83                }
 084                writer.WriteEndArray();
 85            }
 086            if (FirewallPolicy != null)
 87            {
 088                writer.WritePropertyName("firewallPolicy");
 089                writer.WriteObjectValue(FirewallPolicy);
 90            }
 091            if (HostNames != null)
 92            {
 093                writer.WritePropertyName("hostNames");
 094                writer.WriteStartArray();
 095                foreach (var item in HostNames)
 96                {
 097                    writer.WriteStringValue(item);
 98                }
 099                writer.WriteEndArray();
 100            }
 0101            writer.WriteEndObject();
 0102            writer.WriteEndObject();
 0103        }
 104
 105        internal static ApplicationGatewayHttpListener DeserializeApplicationGatewayHttpListener(JsonElement element)
 106        {
 0107            string name = default;
 0108            string etag = default;
 0109            string type = default;
 0110            string id = default;
 0111            SubResource frontendIPConfiguration = default;
 0112            SubResource frontendPort = default;
 0113            ApplicationGatewayProtocol? protocol = default;
 0114            string hostName = default;
 0115            SubResource sslCertificate = default;
 0116            bool? requireServerNameIndication = default;
 0117            ProvisioningState? provisioningState = default;
 0118            IList<ApplicationGatewayCustomError> customErrorConfigurations = default;
 0119            SubResource firewallPolicy = default;
 0120            IList<string> hostNames = default;
 0121            foreach (var property in element.EnumerateObject())
 122            {
 0123                if (property.NameEquals("name"))
 124                {
 0125                    if (property.Value.ValueKind == JsonValueKind.Null)
 126                    {
 127                        continue;
 128                    }
 0129                    name = property.Value.GetString();
 0130                    continue;
 131                }
 0132                if (property.NameEquals("etag"))
 133                {
 0134                    if (property.Value.ValueKind == JsonValueKind.Null)
 135                    {
 136                        continue;
 137                    }
 0138                    etag = property.Value.GetString();
 0139                    continue;
 140                }
 0141                if (property.NameEquals("type"))
 142                {
 0143                    if (property.Value.ValueKind == JsonValueKind.Null)
 144                    {
 145                        continue;
 146                    }
 0147                    type = property.Value.GetString();
 0148                    continue;
 149                }
 0150                if (property.NameEquals("id"))
 151                {
 0152                    if (property.Value.ValueKind == JsonValueKind.Null)
 153                    {
 154                        continue;
 155                    }
 0156                    id = property.Value.GetString();
 0157                    continue;
 158                }
 0159                if (property.NameEquals("properties"))
 160                {
 0161                    foreach (var property0 in property.Value.EnumerateObject())
 162                    {
 0163                        if (property0.NameEquals("frontendIPConfiguration"))
 164                        {
 0165                            if (property0.Value.ValueKind == JsonValueKind.Null)
 166                            {
 167                                continue;
 168                            }
 0169                            frontendIPConfiguration = DeserializeSubResource(property0.Value);
 0170                            continue;
 171                        }
 0172                        if (property0.NameEquals("frontendPort"))
 173                        {
 0174                            if (property0.Value.ValueKind == JsonValueKind.Null)
 175                            {
 176                                continue;
 177                            }
 0178                            frontendPort = DeserializeSubResource(property0.Value);
 0179                            continue;
 180                        }
 0181                        if (property0.NameEquals("protocol"))
 182                        {
 0183                            if (property0.Value.ValueKind == JsonValueKind.Null)
 184                            {
 185                                continue;
 186                            }
 0187                            protocol = new ApplicationGatewayProtocol(property0.Value.GetString());
 0188                            continue;
 189                        }
 0190                        if (property0.NameEquals("hostName"))
 191                        {
 0192                            if (property0.Value.ValueKind == JsonValueKind.Null)
 193                            {
 194                                continue;
 195                            }
 0196                            hostName = property0.Value.GetString();
 0197                            continue;
 198                        }
 0199                        if (property0.NameEquals("sslCertificate"))
 200                        {
 0201                            if (property0.Value.ValueKind == JsonValueKind.Null)
 202                            {
 203                                continue;
 204                            }
 0205                            sslCertificate = DeserializeSubResource(property0.Value);
 0206                            continue;
 207                        }
 0208                        if (property0.NameEquals("requireServerNameIndication"))
 209                        {
 0210                            if (property0.Value.ValueKind == JsonValueKind.Null)
 211                            {
 212                                continue;
 213                            }
 0214                            requireServerNameIndication = property0.Value.GetBoolean();
 0215                            continue;
 216                        }
 0217                        if (property0.NameEquals("provisioningState"))
 218                        {
 0219                            if (property0.Value.ValueKind == JsonValueKind.Null)
 220                            {
 221                                continue;
 222                            }
 0223                            provisioningState = new ProvisioningState(property0.Value.GetString());
 0224                            continue;
 225                        }
 0226                        if (property0.NameEquals("customErrorConfigurations"))
 227                        {
 0228                            if (property0.Value.ValueKind == JsonValueKind.Null)
 229                            {
 230                                continue;
 231                            }
 0232                            List<ApplicationGatewayCustomError> array = new List<ApplicationGatewayCustomError>();
 0233                            foreach (var item in property0.Value.EnumerateArray())
 234                            {
 0235                                if (item.ValueKind == JsonValueKind.Null)
 236                                {
 0237                                    array.Add(null);
 238                                }
 239                                else
 240                                {
 0241                                    array.Add(ApplicationGatewayCustomError.DeserializeApplicationGatewayCustomError(ite
 242                                }
 243                            }
 0244                            customErrorConfigurations = array;
 0245                            continue;
 246                        }
 0247                        if (property0.NameEquals("firewallPolicy"))
 248                        {
 0249                            if (property0.Value.ValueKind == JsonValueKind.Null)
 250                            {
 251                                continue;
 252                            }
 0253                            firewallPolicy = DeserializeSubResource(property0.Value);
 0254                            continue;
 255                        }
 0256                        if (property0.NameEquals("hostNames"))
 257                        {
 0258                            if (property0.Value.ValueKind == JsonValueKind.Null)
 259                            {
 260                                continue;
 261                            }
 0262                            List<string> array = new List<string>();
 0263                            foreach (var item in property0.Value.EnumerateArray())
 264                            {
 0265                                if (item.ValueKind == JsonValueKind.Null)
 266                                {
 0267                                    array.Add(null);
 268                                }
 269                                else
 270                                {
 0271                                    array.Add(item.GetString());
 272                                }
 273                            }
 0274                            hostNames = array;
 275                            continue;
 276                        }
 277                    }
 278                    continue;
 279                }
 280            }
 0281            return new ApplicationGatewayHttpListener(id, name, etag, type, frontendIPConfiguration, frontendPort, proto
 282        }
 283    }
 284}