< Summary

Class:Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVMInstanceRequiredIDs
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetVMInstanceRequiredIDs.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetVMInstanceRequiredIDs.Serialization.cs
Covered lines:12
Uncovered lines:5
Coverable lines:17
Total lines:67
Line coverage:70.5% (12 of 17)
Covered branches:3
Total branches:6
Branch coverage:50% (3 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-100%50%
get_InstanceIds()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetVMInstanceRequiredIDs.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;
 9using System.Collections.Generic;
 10using System.Linq;
 11
 12namespace Azure.ResourceManager.Compute.Models
 13{
 14    /// <summary> Specifies a list of virtual machine instance IDs from the VM scale set. </summary>
 15    public partial class VirtualMachineScaleSetVMInstanceRequiredIDs
 16    {
 17        /// <summary> Initializes a new instance of VirtualMachineScaleSetVMInstanceRequiredIDs. </summary>
 18        /// <param name="instanceIds"> The virtual machine scale set instance ids. </param>
 019        public VirtualMachineScaleSetVMInstanceRequiredIDs(IEnumerable<string> instanceIds)
 20        {
 021            if (instanceIds == null)
 22            {
 023                throw new ArgumentNullException(nameof(instanceIds));
 24            }
 25
 026            InstanceIds = instanceIds.ToList();
 027        }
 28
 29        /// <summary> Initializes a new instance of VirtualMachineScaleSetVMInstanceRequiredIDs. </summary>
 30        /// <param name="instanceIds"> The virtual machine scale set instance ids. </param>
 431        internal VirtualMachineScaleSetVMInstanceRequiredIDs(IList<string> instanceIds)
 32        {
 433            InstanceIds = instanceIds ?? new List<string>();
 434        }
 35
 36        /// <summary> The virtual machine scale set instance ids. </summary>
 1637        public IList<string> InstanceIds { get; }
 38    }
 39}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetVMInstanceRequiredIDs.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 VirtualMachineScaleSetVMInstanceRequiredIDs : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 1617            writer.WriteStartObject();
 1618            writer.WritePropertyName("instanceIds");
 1619            writer.WriteStartArray();
 9620            foreach (var item in InstanceIds)
 21            {
 3222                writer.WriteStringValue(item);
 23            }
 1624            writer.WriteEndArray();
 1625            writer.WriteEndObject();
 1626        }
 27    }
 28}