< Summary

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

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_Protocol()-0%100%
get_Host()-0%100%
get_Path()-0%100%
get_Interval()-0%100%
get_Timeout()-0%100%
get_UnhealthyThreshold()-0%100%
get_PickHostNameFromBackendHttpSettings()-0%100%
get_MinServers()-0%100%
get_Match()-0%100%
get_ProvisioningState()-0%100%
get_Port()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeApplicationGatewayProbe(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayProbe.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> Probe of the application gateway. </summary>
 11    public partial class ApplicationGatewayProbe : SubResource
 12    {
 13        /// <summary> Initializes a new instance of ApplicationGatewayProbe. </summary>
 014        public ApplicationGatewayProbe()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ApplicationGatewayProbe. </summary>
 19        /// <param name="id"> Resource ID. </param>
 20        /// <param name="name"> Name of the probe that is unique within an Application Gateway. </param>
 21        /// <param name="etag"> A unique read-only string that changes whenever the resource is updated. </param>
 22        /// <param name="type"> Type of the resource. </param>
 23        /// <param name="protocol"> The protocol used for the probe. </param>
 24        /// <param name="host"> Host name to send the probe to. </param>
 25        /// <param name="path"> Relative path of probe. Valid path starts from &apos;/&apos;. Probe is sent to &lt;Proto
 26        /// <param name="interval"> The probing interval in seconds. This is the time interval between two consecutive p
 27        /// <param name="timeout"> The probe timeout in seconds. Probe marked as failed if valid response is not receive
 28        /// <param name="unhealthyThreshold"> The probe retry count. Backend server is marked down after consecutive pro
 29        /// <param name="pickHostNameFromBackendHttpSettings"> Whether the host header should be picked from the backend
 30        /// <param name="minServers"> Minimum number of servers that are always marked healthy. Default value is 0. </pa
 31        /// <param name="match"> Criterion for classifying a healthy probe response. </param>
 32        /// <param name="provisioningState"> The provisioning state of the probe resource. </param>
 33        /// <param name="port"> Custom port which will be used for probing the backend servers. The valid value ranges f
 034        internal ApplicationGatewayProbe(string id, string name, string etag, string type, ApplicationGatewayProtocol? p
 35        {
 036            Name = name;
 037            Etag = etag;
 038            Type = type;
 039            Protocol = protocol;
 040            Host = host;
 041            Path = path;
 042            Interval = interval;
 043            Timeout = timeout;
 044            UnhealthyThreshold = unhealthyThreshold;
 045            PickHostNameFromBackendHttpSettings = pickHostNameFromBackendHttpSettings;
 046            MinServers = minServers;
 047            Match = match;
 048            ProvisioningState = provisioningState;
 049            Port = port;
 050        }
 51
 52        /// <summary> Name of the probe 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> The protocol used for the probe. </summary>
 059        public ApplicationGatewayProtocol? Protocol { get; set; }
 60        /// <summary> Host name to send the probe to. </summary>
 061        public string Host { get; set; }
 62        /// <summary> Relative path of probe. Valid path starts from &apos;/&apos;. Probe is sent to &lt;Protocol&gt;://
 063        public string Path { get; set; }
 64        /// <summary> The probing interval in seconds. This is the time interval between two consecutive probes. Accepta
 065        public int? Interval { get; set; }
 66        /// <summary> The probe timeout in seconds. Probe marked as failed if valid response is not received with this t
 067        public int? Timeout { get; set; }
 68        /// <summary> The probe retry count. Backend server is marked down after consecutive probe failure count reaches
 069        public int? UnhealthyThreshold { get; set; }
 70        /// <summary> Whether the host header should be picked from the backend http settings. Default value is false. <
 071        public bool? PickHostNameFromBackendHttpSettings { get; set; }
 72        /// <summary> Minimum number of servers that are always marked healthy. Default value is 0. </summary>
 073        public int? MinServers { get; set; }
 74        /// <summary> Criterion for classifying a healthy probe response. </summary>
 075        public ApplicationGatewayProbeHealthResponseMatch Match { get; set; }
 76        /// <summary> The provisioning state of the probe resource. </summary>
 077        public ProvisioningState? ProvisioningState { get; }
 78        /// <summary> Custom port which will be used for probing the backend servers. The valid value ranges from 1 to 6
 079        public int? Port { get; set; }
 80    }
 81}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayProbe.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 ApplicationGatewayProbe : 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            if (Etag != null)
 24            {
 025                writer.WritePropertyName("etag");
 026                writer.WriteStringValue(Etag);
 27            }
 028            if (Type != null)
 29            {
 030                writer.WritePropertyName("type");
 031                writer.WriteStringValue(Type);
 32            }
 033            if (Id != null)
 34            {
 035                writer.WritePropertyName("id");
 036                writer.WriteStringValue(Id);
 37            }
 038            writer.WritePropertyName("properties");
 039            writer.WriteStartObject();
 040            if (Protocol != null)
 41            {
 042                writer.WritePropertyName("protocol");
 043                writer.WriteStringValue(Protocol.Value.ToString());
 44            }
 045            if (Host != null)
 46            {
 047                writer.WritePropertyName("host");
 048                writer.WriteStringValue(Host);
 49            }
 050            if (Path != null)
 51            {
 052                writer.WritePropertyName("path");
 053                writer.WriteStringValue(Path);
 54            }
 055            if (Interval != null)
 56            {
 057                writer.WritePropertyName("interval");
 058                writer.WriteNumberValue(Interval.Value);
 59            }
 060            if (Timeout != null)
 61            {
 062                writer.WritePropertyName("timeout");
 063                writer.WriteNumberValue(Timeout.Value);
 64            }
 065            if (UnhealthyThreshold != null)
 66            {
 067                writer.WritePropertyName("unhealthyThreshold");
 068                writer.WriteNumberValue(UnhealthyThreshold.Value);
 69            }
 070            if (PickHostNameFromBackendHttpSettings != null)
 71            {
 072                writer.WritePropertyName("pickHostNameFromBackendHttpSettings");
 073                writer.WriteBooleanValue(PickHostNameFromBackendHttpSettings.Value);
 74            }
 075            if (MinServers != null)
 76            {
 077                writer.WritePropertyName("minServers");
 078                writer.WriteNumberValue(MinServers.Value);
 79            }
 080            if (Match != null)
 81            {
 082                writer.WritePropertyName("match");
 083                writer.WriteObjectValue(Match);
 84            }
 085            if (ProvisioningState != null)
 86            {
 087                writer.WritePropertyName("provisioningState");
 088                writer.WriteStringValue(ProvisioningState.Value.ToString());
 89            }
 090            if (Port != null)
 91            {
 092                writer.WritePropertyName("port");
 093                writer.WriteNumberValue(Port.Value);
 94            }
 095            writer.WriteEndObject();
 096            writer.WriteEndObject();
 097        }
 98
 99        internal static ApplicationGatewayProbe DeserializeApplicationGatewayProbe(JsonElement element)
 100        {
 0101            string name = default;
 0102            string etag = default;
 0103            string type = default;
 0104            string id = default;
 0105            ApplicationGatewayProtocol? protocol = default;
 0106            string host = default;
 0107            string path = default;
 0108            int? interval = default;
 0109            int? timeout = default;
 0110            int? unhealthyThreshold = default;
 0111            bool? pickHostNameFromBackendHttpSettings = default;
 0112            int? minServers = default;
 0113            ApplicationGatewayProbeHealthResponseMatch match = default;
 0114            ProvisioningState? provisioningState = default;
 0115            int? port = default;
 0116            foreach (var property in element.EnumerateObject())
 117            {
 0118                if (property.NameEquals("name"))
 119                {
 0120                    if (property.Value.ValueKind == JsonValueKind.Null)
 121                    {
 122                        continue;
 123                    }
 0124                    name = property.Value.GetString();
 0125                    continue;
 126                }
 0127                if (property.NameEquals("etag"))
 128                {
 0129                    if (property.Value.ValueKind == JsonValueKind.Null)
 130                    {
 131                        continue;
 132                    }
 0133                    etag = property.Value.GetString();
 0134                    continue;
 135                }
 0136                if (property.NameEquals("type"))
 137                {
 0138                    if (property.Value.ValueKind == JsonValueKind.Null)
 139                    {
 140                        continue;
 141                    }
 0142                    type = property.Value.GetString();
 0143                    continue;
 144                }
 0145                if (property.NameEquals("id"))
 146                {
 0147                    if (property.Value.ValueKind == JsonValueKind.Null)
 148                    {
 149                        continue;
 150                    }
 0151                    id = property.Value.GetString();
 0152                    continue;
 153                }
 0154                if (property.NameEquals("properties"))
 155                {
 0156                    foreach (var property0 in property.Value.EnumerateObject())
 157                    {
 0158                        if (property0.NameEquals("protocol"))
 159                        {
 0160                            if (property0.Value.ValueKind == JsonValueKind.Null)
 161                            {
 162                                continue;
 163                            }
 0164                            protocol = new ApplicationGatewayProtocol(property0.Value.GetString());
 0165                            continue;
 166                        }
 0167                        if (property0.NameEquals("host"))
 168                        {
 0169                            if (property0.Value.ValueKind == JsonValueKind.Null)
 170                            {
 171                                continue;
 172                            }
 0173                            host = property0.Value.GetString();
 0174                            continue;
 175                        }
 0176                        if (property0.NameEquals("path"))
 177                        {
 0178                            if (property0.Value.ValueKind == JsonValueKind.Null)
 179                            {
 180                                continue;
 181                            }
 0182                            path = property0.Value.GetString();
 0183                            continue;
 184                        }
 0185                        if (property0.NameEquals("interval"))
 186                        {
 0187                            if (property0.Value.ValueKind == JsonValueKind.Null)
 188                            {
 189                                continue;
 190                            }
 0191                            interval = property0.Value.GetInt32();
 0192                            continue;
 193                        }
 0194                        if (property0.NameEquals("timeout"))
 195                        {
 0196                            if (property0.Value.ValueKind == JsonValueKind.Null)
 197                            {
 198                                continue;
 199                            }
 0200                            timeout = property0.Value.GetInt32();
 0201                            continue;
 202                        }
 0203                        if (property0.NameEquals("unhealthyThreshold"))
 204                        {
 0205                            if (property0.Value.ValueKind == JsonValueKind.Null)
 206                            {
 207                                continue;
 208                            }
 0209                            unhealthyThreshold = property0.Value.GetInt32();
 0210                            continue;
 211                        }
 0212                        if (property0.NameEquals("pickHostNameFromBackendHttpSettings"))
 213                        {
 0214                            if (property0.Value.ValueKind == JsonValueKind.Null)
 215                            {
 216                                continue;
 217                            }
 0218                            pickHostNameFromBackendHttpSettings = property0.Value.GetBoolean();
 0219                            continue;
 220                        }
 0221                        if (property0.NameEquals("minServers"))
 222                        {
 0223                            if (property0.Value.ValueKind == JsonValueKind.Null)
 224                            {
 225                                continue;
 226                            }
 0227                            minServers = property0.Value.GetInt32();
 0228                            continue;
 229                        }
 0230                        if (property0.NameEquals("match"))
 231                        {
 0232                            if (property0.Value.ValueKind == JsonValueKind.Null)
 233                            {
 234                                continue;
 235                            }
 0236                            match = ApplicationGatewayProbeHealthResponseMatch.DeserializeApplicationGatewayProbeHealthR
 0237                            continue;
 238                        }
 0239                        if (property0.NameEquals("provisioningState"))
 240                        {
 0241                            if (property0.Value.ValueKind == JsonValueKind.Null)
 242                            {
 243                                continue;
 244                            }
 0245                            provisioningState = new ProvisioningState(property0.Value.GetString());
 0246                            continue;
 247                        }
 0248                        if (property0.NameEquals("port"))
 249                        {
 0250                            if (property0.Value.ValueKind == JsonValueKind.Null)
 251                            {
 252                                continue;
 253                            }
 0254                            port = property0.Value.GetInt32();
 255                            continue;
 256                        }
 257                    }
 258                    continue;
 259                }
 260            }
 0261            return new ApplicationGatewayProbe(id, name, etag, type, protocol, host, path, interval, timeout, unhealthyT
 262        }
 263    }
 264}