< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%100%
.ctor(...)-0%100%
get_MinCapacity()-0%100%
get_MaxCapacity()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeApplicationGatewayAutoscaleConfiguration(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayAutoscaleConfiguration.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> Application Gateway autoscale configuration. </summary>
 11    public partial class ApplicationGatewayAutoscaleConfiguration
 12    {
 13        /// <summary> Initializes a new instance of ApplicationGatewayAutoscaleConfiguration. </summary>
 14        /// <param name="minCapacity"> Lower bound on number of Application Gateway capacity. </param>
 015        public ApplicationGatewayAutoscaleConfiguration(int minCapacity)
 16        {
 017            MinCapacity = minCapacity;
 018        }
 19
 20        /// <summary> Initializes a new instance of ApplicationGatewayAutoscaleConfiguration. </summary>
 21        /// <param name="minCapacity"> Lower bound on number of Application Gateway capacity. </param>
 22        /// <param name="maxCapacity"> Upper bound on number of Application Gateway capacity. </param>
 023        internal ApplicationGatewayAutoscaleConfiguration(int minCapacity, int? maxCapacity)
 24        {
 025            MinCapacity = minCapacity;
 026            MaxCapacity = maxCapacity;
 027        }
 28
 29        /// <summary> Lower bound on number of Application Gateway capacity. </summary>
 030        public int MinCapacity { get; set; }
 31        /// <summary> Upper bound on number of Application Gateway capacity. </summary>
 032        public int? MaxCapacity { get; set; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayAutoscaleConfiguration.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 ApplicationGatewayAutoscaleConfiguration : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("minCapacity");
 019            writer.WriteNumberValue(MinCapacity);
 020            if (MaxCapacity != null)
 21            {
 022                writer.WritePropertyName("maxCapacity");
 023                writer.WriteNumberValue(MaxCapacity.Value);
 24            }
 025            writer.WriteEndObject();
 026        }
 27
 28        internal static ApplicationGatewayAutoscaleConfiguration DeserializeApplicationGatewayAutoscaleConfiguration(Jso
 29        {
 030            int minCapacity = default;
 031            int? maxCapacity = default;
 032            foreach (var property in element.EnumerateObject())
 33            {
 034                if (property.NameEquals("minCapacity"))
 35                {
 036                    minCapacity = property.Value.GetInt32();
 037                    continue;
 38                }
 039                if (property.NameEquals("maxCapacity"))
 40                {
 041                    if (property.Value.ValueKind == JsonValueKind.Null)
 42                    {
 43                        continue;
 44                    }
 045                    maxCapacity = property.Value.GetInt32();
 46                    continue;
 47                }
 48            }
 049            return new ApplicationGatewayAutoscaleConfiguration(minCapacity, maxCapacity);
 50        }
 51    }
 52}