< Summary

Class:Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetInstanceViewStatusesSummary
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetInstanceViewStatusesSummary.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetInstanceViewStatusesSummary.Serialization.cs
Covered lines:13
Uncovered lines:4
Coverable lines:17
Total lines:76
Line coverage:76.4% (13 of 17)
Covered branches:9
Total branches:10
Branch coverage:90% (9 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_StatusesSummary()-0%100%
DeserializeVirtualMachineScaleSetInstanceViewStatusesSummary(...)-90.91%90%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetInstanceViewStatusesSummary.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.Compute.Models
 11{
 12    /// <summary> Instance view statuses summary for virtual machines of a virtual machine scale set. </summary>
 13    public partial class VirtualMachineScaleSetInstanceViewStatusesSummary
 14    {
 15        /// <summary> Initializes a new instance of VirtualMachineScaleSetInstanceViewStatusesSummary. </summary>
 016        internal VirtualMachineScaleSetInstanceViewStatusesSummary()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of VirtualMachineScaleSetInstanceViewStatusesSummary. </summary>
 21        /// <param name="statusesSummary"> The extensions information. </param>
 6022        internal VirtualMachineScaleSetInstanceViewStatusesSummary(IReadOnlyList<VirtualMachineStatusCodeCount> statuses
 23        {
 6024            StatusesSummary = statusesSummary;
 6025        }
 26
 27        /// <summary> The extensions information. </summary>
 028        public IReadOnlyList<VirtualMachineStatusCodeCount> StatusesSummary { get; }
 29    }
 30}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetInstanceViewStatusesSummary.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.Compute.Models
 13{
 14    public partial class VirtualMachineScaleSetInstanceViewStatusesSummary
 15    {
 16        internal static VirtualMachineScaleSetInstanceViewStatusesSummary DeserializeVirtualMachineScaleSetInstanceViewS
 17        {
 6018            IReadOnlyList<VirtualMachineStatusCodeCount> statusesSummary = default;
 24019            foreach (var property in element.EnumerateObject())
 20            {
 6021                if (property.NameEquals("statusesSummary"))
 22                {
 6023                    if (property.Value.ValueKind == JsonValueKind.Null)
 24                    {
 25                        continue;
 26                    }
 6027                    List<VirtualMachineStatusCodeCount> array = new List<VirtualMachineStatusCodeCount>();
 28428                    foreach (var item in property.Value.EnumerateArray())
 29                    {
 8230                        if (item.ValueKind == JsonValueKind.Null)
 31                        {
 032                            array.Add(null);
 33                        }
 34                        else
 35                        {
 8236                            array.Add(VirtualMachineStatusCodeCount.DeserializeVirtualMachineStatusCodeCount(item));
 37                        }
 38                    }
 6039                    statusesSummary = array;
 40                    continue;
 41                }
 42            }
 6043            return new VirtualMachineScaleSetInstanceViewStatusesSummary(statusesSummary);
 44        }
 45    }
 46}