< Summary

Class:Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetSku
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetSku.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetSku.Serialization.cs
Covered lines:21
Uncovered lines:5
Coverable lines:26
Total lines:89
Line coverage:80.7% (21 of 26)
Covered branches:14
Total branches:14
Branch coverage:100% (14 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_ResourceType()-0%100%
get_Sku()-0%100%
get_Capacity()-0%100%
DeserializeVirtualMachineScaleSetSku(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetSku.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 an available virtual machine scale set sku. </summary>
 11    public partial class VirtualMachineScaleSetSku
 12    {
 13        /// <summary> Initializes a new instance of VirtualMachineScaleSetSku. </summary>
 014        internal VirtualMachineScaleSetSku()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of VirtualMachineScaleSetSku. </summary>
 19        /// <param name="resourceType"> The type of resource the sku applies to. </param>
 20        /// <param name="sku"> The Sku. </param>
 21        /// <param name="capacity"> Specifies the number of virtual machines in the scale set. </param>
 215622        internal VirtualMachineScaleSetSku(string resourceType, Sku sku, VirtualMachineScaleSetSkuCapacity capacity)
 23        {
 215624            ResourceType = resourceType;
 215625            Sku = sku;
 215626            Capacity = capacity;
 215627        }
 28
 29        /// <summary> The type of resource the sku applies to. </summary>
 030        public string ResourceType { get; }
 31        /// <summary> The Sku. </summary>
 032        public Sku Sku { get; }
 33        /// <summary> Specifies the number of virtual machines in the scale set. </summary>
 034        public VirtualMachineScaleSetSkuCapacity Capacity { get; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetSku.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 VirtualMachineScaleSetSku
 14    {
 15        internal static VirtualMachineScaleSetSku DeserializeVirtualMachineScaleSetSku(JsonElement element)
 16        {
 215617            string resourceType = default;
 215618            Sku sku = default;
 215619            VirtualMachineScaleSetSkuCapacity capacity = default;
 1724820            foreach (var property in element.EnumerateObject())
 21            {
 646822                if (property.NameEquals("resourceType"))
 23                {
 215624                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 215628                    resourceType = property.Value.GetString();
 215629                    continue;
 30                }
 431231                if (property.NameEquals("sku"))
 32                {
 215633                    if (property.Value.ValueKind == JsonValueKind.Null)
 34                    {
 35                        continue;
 36                    }
 215637                    sku = Sku.DeserializeSku(property.Value);
 215638                    continue;
 39                }
 215640                if (property.NameEquals("capacity"))
 41                {
 215642                    if (property.Value.ValueKind == JsonValueKind.Null)
 43                    {
 44                        continue;
 45                    }
 215646                    capacity = VirtualMachineScaleSetSkuCapacity.DeserializeVirtualMachineScaleSetSkuCapacity(property.V
 47                    continue;
 48                }
 49            }
 215650            return new VirtualMachineScaleSetSku(resourceType, sku, capacity);
 51        }
 52    }
 53}