< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Body()-0%100%
get_StatusCodes()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeApplicationGatewayProbeHealthResponseMatch(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayProbeHealthResponseMatch.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> Application gateway probe health response match. </summary>
 13    public partial class ApplicationGatewayProbeHealthResponseMatch
 14    {
 15        /// <summary> Initializes a new instance of ApplicationGatewayProbeHealthResponseMatch. </summary>
 016        public ApplicationGatewayProbeHealthResponseMatch()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ApplicationGatewayProbeHealthResponseMatch. </summary>
 21        /// <param name="body"> Body that must be contained in the health response. Default value is empty. </param>
 22        /// <param name="statusCodes"> Allowed ranges of healthy status codes. Default range of healthy status codes is 
 023        internal ApplicationGatewayProbeHealthResponseMatch(string body, IList<string> statusCodes)
 24        {
 025            Body = body;
 026            StatusCodes = statusCodes;
 027        }
 28
 29        /// <summary> Body that must be contained in the health response. Default value is empty. </summary>
 030        public string Body { get; set; }
 31        /// <summary> Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399. </summar
 032        public IList<string> StatusCodes { get; set; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayProbeHealthResponseMatch.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 ApplicationGatewayProbeHealthResponseMatch : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Body != null)
 20            {
 021                writer.WritePropertyName("body");
 022                writer.WriteStringValue(Body);
 23            }
 024            if (StatusCodes != null)
 25            {
 026                writer.WritePropertyName("statusCodes");
 027                writer.WriteStartArray();
 028                foreach (var item in StatusCodes)
 29                {
 030                    writer.WriteStringValue(item);
 31                }
 032                writer.WriteEndArray();
 33            }
 034            writer.WriteEndObject();
 035        }
 36
 37        internal static ApplicationGatewayProbeHealthResponseMatch DeserializeApplicationGatewayProbeHealthResponseMatch
 38        {
 039            string body = default;
 040            IList<string> statusCodes = default;
 041            foreach (var property in element.EnumerateObject())
 42            {
 043                if (property.NameEquals("body"))
 44                {
 045                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 049                    body = property.Value.GetString();
 050                    continue;
 51                }
 052                if (property.NameEquals("statusCodes"))
 53                {
 054                    if (property.Value.ValueKind == JsonValueKind.Null)
 55                    {
 56                        continue;
 57                    }
 058                    List<string> array = new List<string>();
 059                    foreach (var item in property.Value.EnumerateArray())
 60                    {
 061                        if (item.ValueKind == JsonValueKind.Null)
 62                        {
 063                            array.Add(null);
 64                        }
 65                        else
 66                        {
 067                            array.Add(item.GetString());
 68                        }
 69                    }
 070                    statusCodes = array;
 71                    continue;
 72                }
 73            }
 074            return new ApplicationGatewayProbeHealthResponseMatch(body, statusCodes);
 75        }
 76    }
 77}