< Summary

Class:Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetSkuCapacity
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetSkuCapacity.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetSkuCapacity.Serialization.cs
Covered lines:27
Uncovered lines:6
Coverable lines:33
Total lines:103
Line coverage:81.8% (27 of 33)
Covered branches:18
Total branches:18
Branch coverage:100% (18 of 18)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Minimum()-0%100%
get_Maximum()-0%100%
get_DefaultCapacity()-0%100%
get_ScaleType()-0%100%
DeserializeVirtualMachineScaleSetSkuCapacity(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetSkuCapacity.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.Compute.Models
 9{
 10    /// <summary> Describes scaling information of a sku. </summary>
 11    public partial class VirtualMachineScaleSetSkuCapacity
 12    {
 13        /// <summary> Initializes a new instance of VirtualMachineScaleSetSkuCapacity. </summary>
 014        internal VirtualMachineScaleSetSkuCapacity()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of VirtualMachineScaleSetSkuCapacity. </summary>
 19        /// <param name="minimum"> The minimum capacity. </param>
 20        /// <param name="maximum"> The maximum capacity that can be set. </param>
 21        /// <param name="defaultCapacity"> The default capacity. </param>
 22        /// <param name="scaleType"> The scale type applicable to the sku. </param>
 215623        internal VirtualMachineScaleSetSkuCapacity(long? minimum, long? maximum, long? defaultCapacity, VirtualMachineSc
 24        {
 215625            Minimum = minimum;
 215626            Maximum = maximum;
 215627            DefaultCapacity = defaultCapacity;
 215628            ScaleType = scaleType;
 215629        }
 30
 31        /// <summary> The minimum capacity. </summary>
 032        public long? Minimum { get; }
 33        /// <summary> The maximum capacity that can be set. </summary>
 034        public long? Maximum { get; }
 35        /// <summary> The default capacity. </summary>
 036        public long? DefaultCapacity { get; }
 37        /// <summary> The scale type applicable to the sku. </summary>
 038        public VirtualMachineScaleSetSkuScaleType? ScaleType { get; }
 39    }
 40}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetSkuCapacity.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.Compute.Models
 12{
 13    public partial class VirtualMachineScaleSetSkuCapacity
 14    {
 15        internal static VirtualMachineScaleSetSkuCapacity DeserializeVirtualMachineScaleSetSkuCapacity(JsonElement eleme
 16        {
 215617            long? minimum = default;
 215618            long? maximum = default;
 215619            long? defaultCapacity = default;
 215620            VirtualMachineScaleSetSkuScaleType? scaleType = default;
 2156021            foreach (var property in element.EnumerateObject())
 22            {
 862423                if (property.NameEquals("minimum"))
 24                {
 215625                    if (property.Value.ValueKind == JsonValueKind.Null)
 26                    {
 27                        continue;
 28                    }
 215629                    minimum = property.Value.GetInt64();
 215630                    continue;
 31                }
 646832                if (property.NameEquals("maximum"))
 33                {
 215634                    if (property.Value.ValueKind == JsonValueKind.Null)
 35                    {
 36                        continue;
 37                    }
 215638                    maximum = property.Value.GetInt64();
 215639                    continue;
 40                }
 431241                if (property.NameEquals("defaultCapacity"))
 42                {
 215643                    if (property.Value.ValueKind == JsonValueKind.Null)
 44                    {
 45                        continue;
 46                    }
 215647                    defaultCapacity = property.Value.GetInt64();
 215648                    continue;
 49                }
 215650                if (property.NameEquals("scaleType"))
 51                {
 215652                    if (property.Value.ValueKind == JsonValueKind.Null)
 53                    {
 54                        continue;
 55                    }
 215656                    scaleType = property.Value.GetString().ToVirtualMachineScaleSetSkuScaleType();
 57                    continue;
 58                }
 59            }
 215660            return new VirtualMachineScaleSetSkuCapacity(minimum, maximum, defaultCapacity, scaleType);
 61        }
 62    }
 63}