< Summary

Class:Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetUpdateNetworkConfiguration
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetUpdateNetworkConfiguration.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetUpdateNetworkConfiguration.Serialization.cs
Covered lines:0
Uncovered lines:99
Coverable lines:99
Total lines:232
Line coverage:0% (0 of 99)
Covered branches:0
Total branches:60
Branch coverage:0% (0 of 60)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Name()-0%100%
get_Primary()-0%100%
get_EnableAcceleratedNetworking()-0%100%
get_NetworkSecurityGroup()-0%100%
get_DnsSettings()-0%100%
get_IpConfigurations()-0%100%
get_EnableIPForwarding()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeVirtualMachineScaleSetUpdateNetworkConfiguration(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetUpdateNetworkConfiguration.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&apos;s network configurations. </summary>
 13    public partial class VirtualMachineScaleSetUpdateNetworkConfiguration : SubResource
 14    {
 15        /// <summary> Initializes a new instance of VirtualMachineScaleSetUpdateNetworkConfiguration. </summary>
 016        public VirtualMachineScaleSetUpdateNetworkConfiguration()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of VirtualMachineScaleSetUpdateNetworkConfiguration. </summary>
 21        /// <param name="id"> Resource Id. </param>
 22        /// <param name="name"> The network configuration name. </param>
 23        /// <param name="primary"> Whether this is a primary NIC on a virtual machine. </param>
 24        /// <param name="enableAcceleratedNetworking"> Specifies whether the network interface is accelerated networking
 25        /// <param name="networkSecurityGroup"> The network security group. </param>
 26        /// <param name="dnsSettings"> The dns settings to be applied on the network interfaces. </param>
 27        /// <param name="ipConfigurations"> The virtual machine scale set IP Configuration. </param>
 28        /// <param name="enableIPForwarding"> Whether IP forwarding enabled on this NIC. </param>
 029        internal VirtualMachineScaleSetUpdateNetworkConfiguration(string id, string name, bool? primary, bool? enableAcc
 30        {
 031            Name = name;
 032            Primary = primary;
 033            EnableAcceleratedNetworking = enableAcceleratedNetworking;
 034            NetworkSecurityGroup = networkSecurityGroup;
 035            DnsSettings = dnsSettings;
 036            IpConfigurations = ipConfigurations;
 037            EnableIPForwarding = enableIPForwarding;
 038        }
 39
 40        /// <summary> The network configuration name. </summary>
 041        public string Name { get; set; }
 42        /// <summary> Whether this is a primary NIC on a virtual machine. </summary>
 043        public bool? Primary { get; set; }
 44        /// <summary> Specifies whether the network interface is accelerated networking-enabled. </summary>
 045        public bool? EnableAcceleratedNetworking { get; set; }
 46        /// <summary> The network security group. </summary>
 047        public SubResource NetworkSecurityGroup { get; set; }
 48        /// <summary> The dns settings to be applied on the network interfaces. </summary>
 049        public VirtualMachineScaleSetNetworkConfigurationDnsSettings DnsSettings { get; set; }
 50        /// <summary> The virtual machine scale set IP Configuration. </summary>
 051        public IList<VirtualMachineScaleSetUpdateIPConfiguration> IpConfigurations { get; set; }
 52        /// <summary> Whether IP forwarding enabled on this NIC. </summary>
 053        public bool? EnableIPForwarding { get; set; }
 54    }
 55}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetUpdateNetworkConfiguration.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 VirtualMachineScaleSetUpdateNetworkConfiguration : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Name != null)
 20            {
 021                writer.WritePropertyName("name");
 022                writer.WriteStringValue(Name);
 23            }
 024            if (Id != null)
 25            {
 026                writer.WritePropertyName("id");
 027                writer.WriteStringValue(Id);
 28            }
 029            writer.WritePropertyName("properties");
 030            writer.WriteStartObject();
 031            if (Primary != null)
 32            {
 033                writer.WritePropertyName("primary");
 034                writer.WriteBooleanValue(Primary.Value);
 35            }
 036            if (EnableAcceleratedNetworking != null)
 37            {
 038                writer.WritePropertyName("enableAcceleratedNetworking");
 039                writer.WriteBooleanValue(EnableAcceleratedNetworking.Value);
 40            }
 041            if (NetworkSecurityGroup != null)
 42            {
 043                writer.WritePropertyName("networkSecurityGroup");
 044                writer.WriteObjectValue(NetworkSecurityGroup);
 45            }
 046            if (DnsSettings != null)
 47            {
 048                writer.WritePropertyName("dnsSettings");
 049                writer.WriteObjectValue(DnsSettings);
 50            }
 051            if (IpConfigurations != null)
 52            {
 053                writer.WritePropertyName("ipConfigurations");
 054                writer.WriteStartArray();
 055                foreach (var item in IpConfigurations)
 56                {
 057                    writer.WriteObjectValue(item);
 58                }
 059                writer.WriteEndArray();
 60            }
 061            if (EnableIPForwarding != null)
 62            {
 063                writer.WritePropertyName("enableIPForwarding");
 064                writer.WriteBooleanValue(EnableIPForwarding.Value);
 65            }
 066            writer.WriteEndObject();
 067            writer.WriteEndObject();
 068        }
 69
 70        internal static VirtualMachineScaleSetUpdateNetworkConfiguration DeserializeVirtualMachineScaleSetUpdateNetworkC
 71        {
 072            string name = default;
 073            string id = default;
 074            bool? primary = default;
 075            bool? enableAcceleratedNetworking = default;
 076            SubResource networkSecurityGroup = default;
 077            VirtualMachineScaleSetNetworkConfigurationDnsSettings dnsSettings = default;
 078            IList<VirtualMachineScaleSetUpdateIPConfiguration> ipConfigurations = default;
 079            bool? enableIPForwarding = default;
 080            foreach (var property in element.EnumerateObject())
 81            {
 082                if (property.NameEquals("name"))
 83                {
 084                    if (property.Value.ValueKind == JsonValueKind.Null)
 85                    {
 86                        continue;
 87                    }
 088                    name = property.Value.GetString();
 089                    continue;
 90                }
 091                if (property.NameEquals("id"))
 92                {
 093                    if (property.Value.ValueKind == JsonValueKind.Null)
 94                    {
 95                        continue;
 96                    }
 097                    id = property.Value.GetString();
 098                    continue;
 99                }
 0100                if (property.NameEquals("properties"))
 101                {
 0102                    foreach (var property0 in property.Value.EnumerateObject())
 103                    {
 0104                        if (property0.NameEquals("primary"))
 105                        {
 0106                            if (property0.Value.ValueKind == JsonValueKind.Null)
 107                            {
 108                                continue;
 109                            }
 0110                            primary = property0.Value.GetBoolean();
 0111                            continue;
 112                        }
 0113                        if (property0.NameEquals("enableAcceleratedNetworking"))
 114                        {
 0115                            if (property0.Value.ValueKind == JsonValueKind.Null)
 116                            {
 117                                continue;
 118                            }
 0119                            enableAcceleratedNetworking = property0.Value.GetBoolean();
 0120                            continue;
 121                        }
 0122                        if (property0.NameEquals("networkSecurityGroup"))
 123                        {
 0124                            if (property0.Value.ValueKind == JsonValueKind.Null)
 125                            {
 126                                continue;
 127                            }
 0128                            networkSecurityGroup = DeserializeSubResource(property0.Value);
 0129                            continue;
 130                        }
 0131                        if (property0.NameEquals("dnsSettings"))
 132                        {
 0133                            if (property0.Value.ValueKind == JsonValueKind.Null)
 134                            {
 135                                continue;
 136                            }
 0137                            dnsSettings = VirtualMachineScaleSetNetworkConfigurationDnsSettings.DeserializeVirtualMachin
 0138                            continue;
 139                        }
 0140                        if (property0.NameEquals("ipConfigurations"))
 141                        {
 0142                            if (property0.Value.ValueKind == JsonValueKind.Null)
 143                            {
 144                                continue;
 145                            }
 0146                            List<VirtualMachineScaleSetUpdateIPConfiguration> array = new List<VirtualMachineScaleSetUpd
 0147                            foreach (var item in property0.Value.EnumerateArray())
 148                            {
 0149                                if (item.ValueKind == JsonValueKind.Null)
 150                                {
 0151                                    array.Add(null);
 152                                }
 153                                else
 154                                {
 0155                                    array.Add(VirtualMachineScaleSetUpdateIPConfiguration.DeserializeVirtualMachineScale
 156                                }
 157                            }
 0158                            ipConfigurations = array;
 0159                            continue;
 160                        }
 0161                        if (property0.NameEquals("enableIPForwarding"))
 162                        {
 0163                            if (property0.Value.ValueKind == JsonValueKind.Null)
 164                            {
 165                                continue;
 166                            }
 0167                            enableIPForwarding = property0.Value.GetBoolean();
 168                            continue;
 169                        }
 170                    }
 171                    continue;
 172                }
 173            }
 0174            return new VirtualMachineScaleSetUpdateNetworkConfiguration(id, name, primary, enableAcceleratedNetworking, 
 175        }
 176    }
 177}