< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Name()-0%100%
get_Subnet()-0%100%
get_Primary()-0%100%
get_PublicIPAddressConfiguration()-0%100%
get_PrivateIPAddressVersion()-0%100%
get_ApplicationGatewayBackendAddressPools()-0%100%
get_ApplicationSecurityGroups()-0%100%
get_LoadBalancerBackendAddressPools()-0%100%
get_LoadBalancerInboundNatPools()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeVirtualMachineScaleSetUpdateIPConfiguration(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetUpdateIPConfiguration.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 IP configuration. NOTE: The subnet of a s
 13    public partial class VirtualMachineScaleSetUpdateIPConfiguration : SubResource
 14    {
 15        /// <summary> Initializes a new instance of VirtualMachineScaleSetUpdateIPConfiguration. </summary>
 016        public VirtualMachineScaleSetUpdateIPConfiguration()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of VirtualMachineScaleSetUpdateIPConfiguration. </summary>
 21        /// <param name="id"> Resource Id. </param>
 22        /// <param name="name"> The IP configuration name. </param>
 23        /// <param name="subnet"> The subnet. </param>
 24        /// <param name="primary"> Specifies the primary IP Configuration in case the network interface has more than on
 25        /// <param name="publicIPAddressConfiguration"> The publicIPAddressConfiguration. </param>
 26        /// <param name="privateIPAddressVersion"> Available from Api-Version 2017-03-30 onwards, it represents whether 
 27        /// <param name="applicationGatewayBackendAddressPools"> The application gateway backend address pools. </param>
 28        /// <param name="applicationSecurityGroups"> Specifies an array of references to application security group. </p
 29        /// <param name="loadBalancerBackendAddressPools"> The load balancer backend address pools. </param>
 30        /// <param name="loadBalancerInboundNatPools"> The load balancer inbound nat pools. </param>
 031        internal VirtualMachineScaleSetUpdateIPConfiguration(string id, string name, ApiEntityReference subnet, bool? pr
 32        {
 033            Name = name;
 034            Subnet = subnet;
 035            Primary = primary;
 036            PublicIPAddressConfiguration = publicIPAddressConfiguration;
 037            PrivateIPAddressVersion = privateIPAddressVersion;
 038            ApplicationGatewayBackendAddressPools = applicationGatewayBackendAddressPools;
 039            ApplicationSecurityGroups = applicationSecurityGroups;
 040            LoadBalancerBackendAddressPools = loadBalancerBackendAddressPools;
 041            LoadBalancerInboundNatPools = loadBalancerInboundNatPools;
 042        }
 43
 44        /// <summary> The IP configuration name. </summary>
 045        public string Name { get; set; }
 46        /// <summary> The subnet. </summary>
 047        public ApiEntityReference Subnet { get; set; }
 48        /// <summary> Specifies the primary IP Configuration in case the network interface has more than one IP Configur
 049        public bool? Primary { get; set; }
 50        /// <summary> The publicIPAddressConfiguration. </summary>
 051        public VirtualMachineScaleSetUpdatePublicIPAddressConfiguration PublicIPAddressConfiguration { get; set; }
 52        /// <summary> Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration 
 053        public IPVersion? PrivateIPAddressVersion { get; set; }
 54        /// <summary> The application gateway backend address pools. </summary>
 055        public IList<SubResource> ApplicationGatewayBackendAddressPools { get; set; }
 56        /// <summary> Specifies an array of references to application security group. </summary>
 057        public IList<SubResource> ApplicationSecurityGroups { get; set; }
 58        /// <summary> The load balancer backend address pools. </summary>
 059        public IList<SubResource> LoadBalancerBackendAddressPools { get; set; }
 60        /// <summary> The load balancer inbound nat pools. </summary>
 061        public IList<SubResource> LoadBalancerInboundNatPools { get; set; }
 62    }
 63}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetUpdateIPConfiguration.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 VirtualMachineScaleSetUpdateIPConfiguration : 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 (Subnet != null)
 32            {
 033                writer.WritePropertyName("subnet");
 034                writer.WriteObjectValue(Subnet);
 35            }
 036            if (Primary != null)
 37            {
 038                writer.WritePropertyName("primary");
 039                writer.WriteBooleanValue(Primary.Value);
 40            }
 041            if (PublicIPAddressConfiguration != null)
 42            {
 043                writer.WritePropertyName("publicIPAddressConfiguration");
 044                writer.WriteObjectValue(PublicIPAddressConfiguration);
 45            }
 046            if (PrivateIPAddressVersion != null)
 47            {
 048                writer.WritePropertyName("privateIPAddressVersion");
 049                writer.WriteStringValue(PrivateIPAddressVersion.Value.ToString());
 50            }
 051            if (ApplicationGatewayBackendAddressPools != null)
 52            {
 053                writer.WritePropertyName("applicationGatewayBackendAddressPools");
 054                writer.WriteStartArray();
 055                foreach (var item in ApplicationGatewayBackendAddressPools)
 56                {
 057                    writer.WriteObjectValue(item);
 58                }
 059                writer.WriteEndArray();
 60            }
 061            if (ApplicationSecurityGroups != null)
 62            {
 063                writer.WritePropertyName("applicationSecurityGroups");
 064                writer.WriteStartArray();
 065                foreach (var item in ApplicationSecurityGroups)
 66                {
 067                    writer.WriteObjectValue(item);
 68                }
 069                writer.WriteEndArray();
 70            }
 071            if (LoadBalancerBackendAddressPools != null)
 72            {
 073                writer.WritePropertyName("loadBalancerBackendAddressPools");
 074                writer.WriteStartArray();
 075                foreach (var item in LoadBalancerBackendAddressPools)
 76                {
 077                    writer.WriteObjectValue(item);
 78                }
 079                writer.WriteEndArray();
 80            }
 081            if (LoadBalancerInboundNatPools != null)
 82            {
 083                writer.WritePropertyName("loadBalancerInboundNatPools");
 084                writer.WriteStartArray();
 085                foreach (var item in LoadBalancerInboundNatPools)
 86                {
 087                    writer.WriteObjectValue(item);
 88                }
 089                writer.WriteEndArray();
 90            }
 091            writer.WriteEndObject();
 092            writer.WriteEndObject();
 093        }
 94
 95        internal static VirtualMachineScaleSetUpdateIPConfiguration DeserializeVirtualMachineScaleSetUpdateIPConfigurati
 96        {
 097            string name = default;
 098            string id = default;
 099            ApiEntityReference subnet = default;
 0100            bool? primary = default;
 0101            VirtualMachineScaleSetUpdatePublicIPAddressConfiguration publicIPAddressConfiguration = default;
 0102            IPVersion? privateIPAddressVersion = default;
 0103            IList<SubResource> applicationGatewayBackendAddressPools = default;
 0104            IList<SubResource> applicationSecurityGroups = default;
 0105            IList<SubResource> loadBalancerBackendAddressPools = default;
 0106            IList<SubResource> loadBalancerInboundNatPools = default;
 0107            foreach (var property in element.EnumerateObject())
 108            {
 0109                if (property.NameEquals("name"))
 110                {
 0111                    if (property.Value.ValueKind == JsonValueKind.Null)
 112                    {
 113                        continue;
 114                    }
 0115                    name = property.Value.GetString();
 0116                    continue;
 117                }
 0118                if (property.NameEquals("id"))
 119                {
 0120                    if (property.Value.ValueKind == JsonValueKind.Null)
 121                    {
 122                        continue;
 123                    }
 0124                    id = property.Value.GetString();
 0125                    continue;
 126                }
 0127                if (property.NameEquals("properties"))
 128                {
 0129                    foreach (var property0 in property.Value.EnumerateObject())
 130                    {
 0131                        if (property0.NameEquals("subnet"))
 132                        {
 0133                            if (property0.Value.ValueKind == JsonValueKind.Null)
 134                            {
 135                                continue;
 136                            }
 0137                            subnet = ApiEntityReference.DeserializeApiEntityReference(property0.Value);
 0138                            continue;
 139                        }
 0140                        if (property0.NameEquals("primary"))
 141                        {
 0142                            if (property0.Value.ValueKind == JsonValueKind.Null)
 143                            {
 144                                continue;
 145                            }
 0146                            primary = property0.Value.GetBoolean();
 0147                            continue;
 148                        }
 0149                        if (property0.NameEquals("publicIPAddressConfiguration"))
 150                        {
 0151                            if (property0.Value.ValueKind == JsonValueKind.Null)
 152                            {
 153                                continue;
 154                            }
 0155                            publicIPAddressConfiguration = VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.Dese
 0156                            continue;
 157                        }
 0158                        if (property0.NameEquals("privateIPAddressVersion"))
 159                        {
 0160                            if (property0.Value.ValueKind == JsonValueKind.Null)
 161                            {
 162                                continue;
 163                            }
 0164                            privateIPAddressVersion = new IPVersion(property0.Value.GetString());
 0165                            continue;
 166                        }
 0167                        if (property0.NameEquals("applicationGatewayBackendAddressPools"))
 168                        {
 0169                            if (property0.Value.ValueKind == JsonValueKind.Null)
 170                            {
 171                                continue;
 172                            }
 0173                            List<SubResource> array = new List<SubResource>();
 0174                            foreach (var item in property0.Value.EnumerateArray())
 175                            {
 0176                                if (item.ValueKind == JsonValueKind.Null)
 177                                {
 0178                                    array.Add(null);
 179                                }
 180                                else
 181                                {
 0182                                    array.Add(DeserializeSubResource(item));
 183                                }
 184                            }
 0185                            applicationGatewayBackendAddressPools = array;
 0186                            continue;
 187                        }
 0188                        if (property0.NameEquals("applicationSecurityGroups"))
 189                        {
 0190                            if (property0.Value.ValueKind == JsonValueKind.Null)
 191                            {
 192                                continue;
 193                            }
 0194                            List<SubResource> array = new List<SubResource>();
 0195                            foreach (var item in property0.Value.EnumerateArray())
 196                            {
 0197                                if (item.ValueKind == JsonValueKind.Null)
 198                                {
 0199                                    array.Add(null);
 200                                }
 201                                else
 202                                {
 0203                                    array.Add(DeserializeSubResource(item));
 204                                }
 205                            }
 0206                            applicationSecurityGroups = array;
 0207                            continue;
 208                        }
 0209                        if (property0.NameEquals("loadBalancerBackendAddressPools"))
 210                        {
 0211                            if (property0.Value.ValueKind == JsonValueKind.Null)
 212                            {
 213                                continue;
 214                            }
 0215                            List<SubResource> array = new List<SubResource>();
 0216                            foreach (var item in property0.Value.EnumerateArray())
 217                            {
 0218                                if (item.ValueKind == JsonValueKind.Null)
 219                                {
 0220                                    array.Add(null);
 221                                }
 222                                else
 223                                {
 0224                                    array.Add(DeserializeSubResource(item));
 225                                }
 226                            }
 0227                            loadBalancerBackendAddressPools = array;
 0228                            continue;
 229                        }
 0230                        if (property0.NameEquals("loadBalancerInboundNatPools"))
 231                        {
 0232                            if (property0.Value.ValueKind == JsonValueKind.Null)
 233                            {
 234                                continue;
 235                            }
 0236                            List<SubResource> array = new List<SubResource>();
 0237                            foreach (var item in property0.Value.EnumerateArray())
 238                            {
 0239                                if (item.ValueKind == JsonValueKind.Null)
 240                                {
 0241                                    array.Add(null);
 242                                }
 243                                else
 244                                {
 0245                                    array.Add(DeserializeSubResource(item));
 246                                }
 247                            }
 0248                            loadBalancerInboundNatPools = array;
 249                            continue;
 250                        }
 251                    }
 252                    continue;
 253                }
 254            }
 0255            return new VirtualMachineScaleSetUpdateIPConfiguration(id, name, subnet, primary, publicIPAddressConfigurati
 256        }
 257    }
 258}