< Summary

Class:Azure.ResourceManager.Compute.Models.VirtualMachineStatusCodeCount
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineStatusCodeCount.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineStatusCodeCount.Serialization.cs
Covered lines:15
Uncovered lines:4
Coverable lines:19
Total lines:75
Line coverage:78.9% (15 of 19)
Covered branches:10
Total branches:10
Branch coverage:100% (10 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Code()-0%100%
get_Count()-0%100%
DeserializeVirtualMachineStatusCodeCount(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineStatusCodeCount.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> The status code and count of the virtual machine scale set instance view status summary. </summary>
 11    public partial class VirtualMachineStatusCodeCount
 12    {
 13        /// <summary> Initializes a new instance of VirtualMachineStatusCodeCount. </summary>
 014        internal VirtualMachineStatusCodeCount()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of VirtualMachineStatusCodeCount. </summary>
 19        /// <param name="code"> The instance view status code. </param>
 20        /// <param name="count"> The number of instances having a particular status code. </param>
 16421        internal VirtualMachineStatusCodeCount(string code, int? count)
 22        {
 16423            Code = code;
 16424            Count = count;
 16425        }
 26
 27        /// <summary> The instance view status code. </summary>
 028        public string Code { get; }
 29        /// <summary> The number of instances having a particular status code. </summary>
 030        public int? Count { get; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineStatusCodeCount.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 VirtualMachineStatusCodeCount
 14    {
 15        internal static VirtualMachineStatusCodeCount DeserializeVirtualMachineStatusCodeCount(JsonElement element)
 16        {
 16417            string code = default;
 16418            int? count = default;
 98419            foreach (var property in element.EnumerateObject())
 20            {
 32821                if (property.NameEquals("code"))
 22                {
 16423                    if (property.Value.ValueKind == JsonValueKind.Null)
 24                    {
 25                        continue;
 26                    }
 16427                    code = property.Value.GetString();
 16428                    continue;
 29                }
 16430                if (property.NameEquals("count"))
 31                {
 16432                    if (property.Value.ValueKind == JsonValueKind.Null)
 33                    {
 34                        continue;
 35                    }
 16436                    count = property.Value.GetInt32();
 37                    continue;
 38                }
 39            }
 16440            return new VirtualMachineStatusCodeCount(code, count);
 41        }
 42    }
 43}