< Summary

Class:Azure.ResourceManager.Network.Models.VirtualNetworkTap
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VirtualNetworkTap.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VirtualNetworkTap.Serialization.cs
Covered lines:0
Uncovered lines:140
Coverable lines:140
Total lines:314
Line coverage:0% (0 of 140)
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_Etag()-0%100%
get_NetworkInterfaceTapConfigurations()-0%100%
get_ResourceGuid()-0%100%
get_ProvisioningState()-0%100%
get_DestinationNetworkInterfaceIPConfiguration()-0%100%
get_DestinationLoadBalancerFrontEndIPConfiguration()-0%100%
get_DestinationPort()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeVirtualNetworkTap(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VirtualNetworkTap.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.Network.Models
 11{
 12    /// <summary> Virtual Network Tap resource. </summary>
 13    public partial class VirtualNetworkTap : Resource
 14    {
 15        /// <summary> Initializes a new instance of VirtualNetworkTap. </summary>
 016        public VirtualNetworkTap()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of VirtualNetworkTap. </summary>
 21        /// <param name="id"> Resource ID. </param>
 22        /// <param name="name"> Resource name. </param>
 23        /// <param name="type"> Resource type. </param>
 24        /// <param name="location"> Resource location. </param>
 25        /// <param name="tags"> Resource tags. </param>
 26        /// <param name="etag"> A unique read-only string that changes whenever the resource is updated. </param>
 27        /// <param name="networkInterfaceTapConfigurations"> Specifies the list of resource IDs for the network interfac
 28        /// <param name="resourceGuid"> The resource GUID property of the virtual network tap resource. </param>
 29        /// <param name="provisioningState"> The provisioning state of the virtual network tap resource. </param>
 30        /// <param name="destinationNetworkInterfaceIPConfiguration"> The reference to the private IP Address of the col
 31        /// <param name="destinationLoadBalancerFrontEndIPConfiguration"> The reference to the private IP address on the
 32        /// <param name="destinationPort"> The VXLAN destination port that will receive the tapped traffic. </param>
 033        internal VirtualNetworkTap(string id, string name, string type, string location, IDictionary<string, string> tag
 34        {
 035            Etag = etag;
 036            NetworkInterfaceTapConfigurations = networkInterfaceTapConfigurations;
 037            ResourceGuid = resourceGuid;
 038            ProvisioningState = provisioningState;
 039            DestinationNetworkInterfaceIPConfiguration = destinationNetworkInterfaceIPConfiguration;
 040            DestinationLoadBalancerFrontEndIPConfiguration = destinationLoadBalancerFrontEndIPConfiguration;
 041            DestinationPort = destinationPort;
 042        }
 43
 44        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 045        public string Etag { get; }
 46        /// <summary> Specifies the list of resource IDs for the network interface IP configuration that needs to be tap
 047        public IList<NetworkInterfaceTapConfiguration> NetworkInterfaceTapConfigurations { get; }
 48        /// <summary> The resource GUID property of the virtual network tap resource. </summary>
 049        public string ResourceGuid { get; }
 50        /// <summary> The provisioning state of the virtual network tap resource. </summary>
 051        public ProvisioningState? ProvisioningState { get; }
 52        /// <summary> The reference to the private IP Address of the collector nic that will receive the tap. </summary>
 053        public NetworkInterfaceIPConfiguration DestinationNetworkInterfaceIPConfiguration { get; set; }
 54        /// <summary> The reference to the private IP address on the internal Load Balancer that will receive the tap. <
 055        public FrontendIPConfiguration DestinationLoadBalancerFrontEndIPConfiguration { get; set; }
 56        /// <summary> The VXLAN destination port that will receive the tapped traffic. </summary>
 057        public int? DestinationPort { get; set; }
 58    }
 59}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VirtualNetworkTap.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.Network.Models
 13{
 14    public partial class VirtualNetworkTap : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Etag != null)
 20            {
 021                writer.WritePropertyName("etag");
 022                writer.WriteStringValue(Etag);
 23            }
 024            if (Id != null)
 25            {
 026                writer.WritePropertyName("id");
 027                writer.WriteStringValue(Id);
 28            }
 029            if (Name != null)
 30            {
 031                writer.WritePropertyName("name");
 032                writer.WriteStringValue(Name);
 33            }
 034            if (Type != null)
 35            {
 036                writer.WritePropertyName("type");
 037                writer.WriteStringValue(Type);
 38            }
 039            if (Location != null)
 40            {
 041                writer.WritePropertyName("location");
 042                writer.WriteStringValue(Location);
 43            }
 044            if (Tags != null)
 45            {
 046                writer.WritePropertyName("tags");
 047                writer.WriteStartObject();
 048                foreach (var item in Tags)
 49                {
 050                    writer.WritePropertyName(item.Key);
 051                    writer.WriteStringValue(item.Value);
 52                }
 053                writer.WriteEndObject();
 54            }
 055            writer.WritePropertyName("properties");
 056            writer.WriteStartObject();
 057            if (NetworkInterfaceTapConfigurations != null)
 58            {
 059                writer.WritePropertyName("networkInterfaceTapConfigurations");
 060                writer.WriteStartArray();
 061                foreach (var item in NetworkInterfaceTapConfigurations)
 62                {
 063                    writer.WriteObjectValue(item);
 64                }
 065                writer.WriteEndArray();
 66            }
 067            if (ResourceGuid != null)
 68            {
 069                writer.WritePropertyName("resourceGuid");
 070                writer.WriteStringValue(ResourceGuid);
 71            }
 072            if (ProvisioningState != null)
 73            {
 074                writer.WritePropertyName("provisioningState");
 075                writer.WriteStringValue(ProvisioningState.Value.ToString());
 76            }
 077            if (DestinationNetworkInterfaceIPConfiguration != null)
 78            {
 079                writer.WritePropertyName("destinationNetworkInterfaceIPConfiguration");
 080                writer.WriteObjectValue(DestinationNetworkInterfaceIPConfiguration);
 81            }
 082            if (DestinationLoadBalancerFrontEndIPConfiguration != null)
 83            {
 084                writer.WritePropertyName("destinationLoadBalancerFrontEndIPConfiguration");
 085                writer.WriteObjectValue(DestinationLoadBalancerFrontEndIPConfiguration);
 86            }
 087            if (DestinationPort != null)
 88            {
 089                writer.WritePropertyName("destinationPort");
 090                writer.WriteNumberValue(DestinationPort.Value);
 91            }
 092            writer.WriteEndObject();
 093            writer.WriteEndObject();
 094        }
 95
 96        internal static VirtualNetworkTap DeserializeVirtualNetworkTap(JsonElement element)
 97        {
 098            string etag = default;
 099            string id = default;
 0100            string name = default;
 0101            string type = default;
 0102            string location = default;
 0103            IDictionary<string, string> tags = default;
 0104            IList<NetworkInterfaceTapConfiguration> networkInterfaceTapConfigurations = default;
 0105            string resourceGuid = default;
 0106            ProvisioningState? provisioningState = default;
 0107            NetworkInterfaceIPConfiguration destinationNetworkInterfaceIPConfiguration = default;
 0108            FrontendIPConfiguration destinationLoadBalancerFrontEndIPConfiguration = default;
 0109            int? destinationPort = default;
 0110            foreach (var property in element.EnumerateObject())
 111            {
 0112                if (property.NameEquals("etag"))
 113                {
 0114                    if (property.Value.ValueKind == JsonValueKind.Null)
 115                    {
 116                        continue;
 117                    }
 0118                    etag = property.Value.GetString();
 0119                    continue;
 120                }
 0121                if (property.NameEquals("id"))
 122                {
 0123                    if (property.Value.ValueKind == JsonValueKind.Null)
 124                    {
 125                        continue;
 126                    }
 0127                    id = property.Value.GetString();
 0128                    continue;
 129                }
 0130                if (property.NameEquals("name"))
 131                {
 0132                    if (property.Value.ValueKind == JsonValueKind.Null)
 133                    {
 134                        continue;
 135                    }
 0136                    name = property.Value.GetString();
 0137                    continue;
 138                }
 0139                if (property.NameEquals("type"))
 140                {
 0141                    if (property.Value.ValueKind == JsonValueKind.Null)
 142                    {
 143                        continue;
 144                    }
 0145                    type = property.Value.GetString();
 0146                    continue;
 147                }
 0148                if (property.NameEquals("location"))
 149                {
 0150                    if (property.Value.ValueKind == JsonValueKind.Null)
 151                    {
 152                        continue;
 153                    }
 0154                    location = property.Value.GetString();
 0155                    continue;
 156                }
 0157                if (property.NameEquals("tags"))
 158                {
 0159                    if (property.Value.ValueKind == JsonValueKind.Null)
 160                    {
 161                        continue;
 162                    }
 0163                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 0164                    foreach (var property0 in property.Value.EnumerateObject())
 165                    {
 0166                        if (property0.Value.ValueKind == JsonValueKind.Null)
 167                        {
 0168                            dictionary.Add(property0.Name, null);
 169                        }
 170                        else
 171                        {
 0172                            dictionary.Add(property0.Name, property0.Value.GetString());
 173                        }
 174                    }
 0175                    tags = dictionary;
 0176                    continue;
 177                }
 0178                if (property.NameEquals("properties"))
 179                {
 0180                    foreach (var property0 in property.Value.EnumerateObject())
 181                    {
 0182                        if (property0.NameEquals("networkInterfaceTapConfigurations"))
 183                        {
 0184                            if (property0.Value.ValueKind == JsonValueKind.Null)
 185                            {
 186                                continue;
 187                            }
 0188                            List<NetworkInterfaceTapConfiguration> array = new List<NetworkInterfaceTapConfiguration>();
 0189                            foreach (var item in property0.Value.EnumerateArray())
 190                            {
 0191                                if (item.ValueKind == JsonValueKind.Null)
 192                                {
 0193                                    array.Add(null);
 194                                }
 195                                else
 196                                {
 0197                                    array.Add(NetworkInterfaceTapConfiguration.DeserializeNetworkInterfaceTapConfigurati
 198                                }
 199                            }
 0200                            networkInterfaceTapConfigurations = array;
 0201                            continue;
 202                        }
 0203                        if (property0.NameEquals("resourceGuid"))
 204                        {
 0205                            if (property0.Value.ValueKind == JsonValueKind.Null)
 206                            {
 207                                continue;
 208                            }
 0209                            resourceGuid = property0.Value.GetString();
 0210                            continue;
 211                        }
 0212                        if (property0.NameEquals("provisioningState"))
 213                        {
 0214                            if (property0.Value.ValueKind == JsonValueKind.Null)
 215                            {
 216                                continue;
 217                            }
 0218                            provisioningState = new ProvisioningState(property0.Value.GetString());
 0219                            continue;
 220                        }
 0221                        if (property0.NameEquals("destinationNetworkInterfaceIPConfiguration"))
 222                        {
 0223                            if (property0.Value.ValueKind == JsonValueKind.Null)
 224                            {
 225                                continue;
 226                            }
 0227                            destinationNetworkInterfaceIPConfiguration = NetworkInterfaceIPConfiguration.DeserializeNetw
 0228                            continue;
 229                        }
 0230                        if (property0.NameEquals("destinationLoadBalancerFrontEndIPConfiguration"))
 231                        {
 0232                            if (property0.Value.ValueKind == JsonValueKind.Null)
 233                            {
 234                                continue;
 235                            }
 0236                            destinationLoadBalancerFrontEndIPConfiguration = FrontendIPConfiguration.DeserializeFrontend
 0237                            continue;
 238                        }
 0239                        if (property0.NameEquals("destinationPort"))
 240                        {
 0241                            if (property0.Value.ValueKind == JsonValueKind.Null)
 242                            {
 243                                continue;
 244                            }
 0245                            destinationPort = property0.Value.GetInt32();
 246                            continue;
 247                        }
 248                    }
 249                    continue;
 250                }
 251            }
 0252            return new VirtualNetworkTap(id, name, type, location, tags, etag, networkInterfaceTapConfigurations, resour
 253        }
 254    }
 255}