< Summary

Class:Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetInstanceView
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetInstanceView.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetInstanceView.Serialization.cs
Covered lines:41
Uncovered lines:7
Coverable lines:48
Total lines:142
Line coverage:85.4% (41 of 48)
Covered branches:27
Total branches:30
Branch coverage:90% (27 of 30)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_VirtualMachine()-0%100%
get_Extensions()-0%100%
get_Statuses()-100%100%
get_OrchestrationServices()-100%100%
DeserializeVirtualMachineScaleSetInstanceView(...)-91.67%90%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetInstanceView.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> The instance view of a virtual machine scale set. </summary>
 13    public partial class VirtualMachineScaleSetInstanceView
 14    {
 15        /// <summary> Initializes a new instance of VirtualMachineScaleSetInstanceView. </summary>
 016        internal VirtualMachineScaleSetInstanceView()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of VirtualMachineScaleSetInstanceView. </summary>
 21        /// <param name="virtualMachine"> The instance view status summary for the virtual machine scale set. </param>
 22        /// <param name="extensions"> The extensions information. </param>
 23        /// <param name="statuses"> The resource status information. </param>
 24        /// <param name="orchestrationServices"> The orchestration services information. </param>
 6025        internal VirtualMachineScaleSetInstanceView(VirtualMachineScaleSetInstanceViewStatusesSummary virtualMachine, IR
 26        {
 6027            VirtualMachine = virtualMachine;
 6028            Extensions = extensions;
 6029            Statuses = statuses;
 6030            OrchestrationServices = orchestrationServices;
 6031        }
 32
 33        /// <summary> The instance view status summary for the virtual machine scale set. </summary>
 034        public VirtualMachineScaleSetInstanceViewStatusesSummary VirtualMachine { get; }
 35        /// <summary> The extensions information. </summary>
 036        public IReadOnlyList<VirtualMachineScaleSetVMExtensionsSummary> Extensions { get; }
 37        /// <summary> The resource status information. </summary>
 4838        public IReadOnlyList<InstanceViewStatus> Statuses { get; }
 39        /// <summary> The orchestration services information. </summary>
 2040        public IReadOnlyList<OrchestrationServiceSummary> OrchestrationServices { get; }
 41    }
 42}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetInstanceView.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 VirtualMachineScaleSetInstanceView
 15    {
 16        internal static VirtualMachineScaleSetInstanceView DeserializeVirtualMachineScaleSetInstanceView(JsonElement ele
 17        {
 6018            VirtualMachineScaleSetInstanceViewStatusesSummary virtualMachine = default;
 6019            IReadOnlyList<VirtualMachineScaleSetVMExtensionsSummary> extensions = default;
 6020            IReadOnlyList<InstanceViewStatus> statuses = default;
 6021            IReadOnlyList<OrchestrationServiceSummary> orchestrationServices = default;
 50422            foreach (var property in element.EnumerateObject())
 23            {
 19224                if (property.NameEquals("virtualMachine"))
 25                {
 6026                    if (property.Value.ValueKind == JsonValueKind.Null)
 27                    {
 28                        continue;
 29                    }
 6030                    virtualMachine = VirtualMachineScaleSetInstanceViewStatusesSummary.DeserializeVirtualMachineScaleSet
 6031                    continue;
 32                }
 13233                if (property.NameEquals("extensions"))
 34                {
 6035                    if (property.Value.ValueKind == JsonValueKind.Null)
 36                    {
 37                        continue;
 38                    }
 6039                    List<VirtualMachineScaleSetVMExtensionsSummary> array = new List<VirtualMachineScaleSetVMExtensionsS
 24040                    foreach (var item in property.Value.EnumerateArray())
 41                    {
 6042                        if (item.ValueKind == JsonValueKind.Null)
 43                        {
 044                            array.Add(null);
 45                        }
 46                        else
 47                        {
 6048                            array.Add(VirtualMachineScaleSetVMExtensionsSummary.DeserializeVirtualMachineScaleSetVMExten
 49                        }
 50                    }
 6051                    extensions = array;
 6052                    continue;
 53                }
 7254                if (property.NameEquals("statuses"))
 55                {
 6056                    if (property.Value.ValueKind == JsonValueKind.Null)
 57                    {
 58                        continue;
 59                    }
 6060                    List<InstanceViewStatus> array = new List<InstanceViewStatus>();
 24061                    foreach (var item in property.Value.EnumerateArray())
 62                    {
 6063                        if (item.ValueKind == JsonValueKind.Null)
 64                        {
 065                            array.Add(null);
 66                        }
 67                        else
 68                        {
 6069                            array.Add(InstanceViewStatus.DeserializeInstanceViewStatus(item));
 70                        }
 71                    }
 6072                    statuses = array;
 6073                    continue;
 74                }
 1275                if (property.NameEquals("orchestrationServices"))
 76                {
 1277                    if (property.Value.ValueKind == JsonValueKind.Null)
 78                    {
 79                        continue;
 80                    }
 1281                    List<OrchestrationServiceSummary> array = new List<OrchestrationServiceSummary>();
 4882                    foreach (var item in property.Value.EnumerateArray())
 83                    {
 1284                        if (item.ValueKind == JsonValueKind.Null)
 85                        {
 086                            array.Add(null);
 87                        }
 88                        else
 89                        {
 1290                            array.Add(OrchestrationServiceSummary.DeserializeOrchestrationServiceSummary(item));
 91                        }
 92                    }
 1293                    orchestrationServices = array;
 94                    continue;
 95                }
 96            }
 6097            return new VirtualMachineScaleSetInstanceView(virtualMachine, extensions, statuses, orchestrationServices);
 98        }
 99    }
 100}