< Summary

Class:Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetNetworkProfile
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetNetworkProfile.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetNetworkProfile.Serialization.cs
Covered lines:35
Uncovered lines:1
Coverable lines:36
Total lines:111
Line coverage:97.2% (35 of 36)
Covered branches:19
Total branches:20
Branch coverage:95% (19 of 20)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-100%100%
get_HealthProbe()-100%100%
get_NetworkInterfaceConfigurations()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-100%100%
DeserializeVirtualMachineScaleSetNetworkProfile(...)-93.75%92.86%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetNetworkProfile.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> Describes a virtual machine scale set network profile. </summary>
 13    public partial class VirtualMachineScaleSetNetworkProfile
 14    {
 15        /// <summary> Initializes a new instance of VirtualMachineScaleSetNetworkProfile. </summary>
 16016        public VirtualMachineScaleSetNetworkProfile()
 17        {
 16018        }
 19
 20        /// <summary> Initializes a new instance of VirtualMachineScaleSetNetworkProfile. </summary>
 21        /// <param name="healthProbe"> A reference to a load balancer probe used to determine the health of an instance 
 22        /// <param name="networkInterfaceConfigurations"> The list of network configurations. </param>
 44823        internal VirtualMachineScaleSetNetworkProfile(ApiEntityReference healthProbe, IList<VirtualMachineScaleSetNetwor
 24        {
 44825            HealthProbe = healthProbe;
 44826            NetworkInterfaceConfigurations = networkInterfaceConfigurations;
 44827        }
 28
 29        /// <summary> A reference to a load balancer probe used to determine the health of an instance in the virtual ma
 102030        public ApiEntityReference HealthProbe { get; set; }
 31        /// <summary> The list of network configurations. </summary>
 344432        public IList<VirtualMachineScaleSetNetworkConfiguration> NetworkInterfaceConfigurations { get; set; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetNetworkProfile.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 VirtualMachineScaleSetNetworkProfile : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 36418            writer.WriteStartObject();
 36419            if (HealthProbe != null)
 20            {
 4821                writer.WritePropertyName("healthProbe");
 4822                writer.WriteObjectValue(HealthProbe);
 23            }
 36424            if (NetworkInterfaceConfigurations != null)
 25            {
 36426                writer.WritePropertyName("networkInterfaceConfigurations");
 36427                writer.WriteStartArray();
 145628                foreach (var item in NetworkInterfaceConfigurations)
 29                {
 36430                    writer.WriteObjectValue(item);
 31                }
 36432                writer.WriteEndArray();
 33            }
 36434            writer.WriteEndObject();
 36435        }
 36
 37        internal static VirtualMachineScaleSetNetworkProfile DeserializeVirtualMachineScaleSetNetworkProfile(JsonElement
 38        {
 44839            ApiEntityReference healthProbe = default;
 44840            IList<VirtualMachineScaleSetNetworkConfiguration> networkInterfaceConfigurations = default;
 188841            foreach (var property in element.EnumerateObject())
 42            {
 49643                if (property.NameEquals("healthProbe"))
 44                {
 4845                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 4849                    healthProbe = ApiEntityReference.DeserializeApiEntityReference(property.Value);
 4850                    continue;
 51                }
 44852                if (property.NameEquals("networkInterfaceConfigurations"))
 53                {
 44854                    if (property.Value.ValueKind == JsonValueKind.Null)
 55                    {
 56                        continue;
 57                    }
 44858                    List<VirtualMachineScaleSetNetworkConfiguration> array = new List<VirtualMachineScaleSetNetworkConfi
 179259                    foreach (var item in property.Value.EnumerateArray())
 60                    {
 44861                        if (item.ValueKind == JsonValueKind.Null)
 62                        {
 063                            array.Add(null);
 64                        }
 65                        else
 66                        {
 44867                            array.Add(VirtualMachineScaleSetNetworkConfiguration.DeserializeVirtualMachineScaleSetNetwor
 68                        }
 69                    }
 44870                    networkInterfaceConfigurations = array;
 71                    continue;
 72                }
 73            }
 44874            return new VirtualMachineScaleSetNetworkProfile(healthProbe, networkInterfaceConfigurations);
 75        }
 76    }
 77}