< Summary

Class:Azure.ResourceManager.Network.Models.NetworkInterfaceTapConfiguration
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\NetworkInterfaceTapConfiguration.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\NetworkInterfaceTapConfiguration.Serialization.cs
Covered lines:0
Uncovered lines:71
Coverable lines:71
Total lines:174
Line coverage:0% (0 of 71)
Covered branches:0
Total branches:42
Branch coverage:0% (0 of 42)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Name()-0%100%
get_Etag()-0%100%
get_Type()-0%100%
get_VirtualNetworkTap()-0%100%
get_ProvisioningState()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeNetworkInterfaceTapConfiguration(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\NetworkInterfaceTapConfiguration.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
 8namespace Azure.ResourceManager.Network.Models
 9{
 10    /// <summary> Tap configuration in a Network Interface. </summary>
 11    public partial class NetworkInterfaceTapConfiguration : SubResource
 12    {
 13        /// <summary> Initializes a new instance of NetworkInterfaceTapConfiguration. </summary>
 014        public NetworkInterfaceTapConfiguration()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of NetworkInterfaceTapConfiguration. </summary>
 19        /// <param name="id"> Resource ID. </param>
 20        /// <param name="name"> The name of the resource that is unique within a resource group. This name can be used t
 21        /// <param name="etag"> A unique read-only string that changes whenever the resource is updated. </param>
 22        /// <param name="type"> Sub Resource type. </param>
 23        /// <param name="virtualNetworkTap"> The reference to the Virtual Network Tap resource. </param>
 24        /// <param name="provisioningState"> The provisioning state of the network interface tap configuration resource.
 025        internal NetworkInterfaceTapConfiguration(string id, string name, string etag, string type, VirtualNetworkTap vi
 26        {
 027            Name = name;
 028            Etag = etag;
 029            Type = type;
 030            VirtualNetworkTap = virtualNetworkTap;
 031            ProvisioningState = provisioningState;
 032        }
 33
 34        /// <summary> The name of the resource that is unique within a resource group. This name can be used to access t
 035        public string Name { get; set; }
 36        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 037        public string Etag { get; }
 38        /// <summary> Sub Resource type. </summary>
 039        public string Type { get; }
 40        /// <summary> The reference to the Virtual Network Tap resource. </summary>
 041        public VirtualNetworkTap VirtualNetworkTap { get; set; }
 42        /// <summary> The provisioning state of the network interface tap configuration resource. </summary>
 043        public ProvisioningState? ProvisioningState { get; }
 44    }
 45}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\NetworkInterfaceTapConfiguration.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.Network.Models
 12{
 13    public partial class NetworkInterfaceTapConfiguration : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Name != null)
 19            {
 020                writer.WritePropertyName("name");
 021                writer.WriteStringValue(Name);
 22            }
 023            if (Etag != null)
 24            {
 025                writer.WritePropertyName("etag");
 026                writer.WriteStringValue(Etag);
 27            }
 028            if (Type != null)
 29            {
 030                writer.WritePropertyName("type");
 031                writer.WriteStringValue(Type);
 32            }
 033            if (Id != null)
 34            {
 035                writer.WritePropertyName("id");
 036                writer.WriteStringValue(Id);
 37            }
 038            writer.WritePropertyName("properties");
 039            writer.WriteStartObject();
 040            if (VirtualNetworkTap != null)
 41            {
 042                writer.WritePropertyName("virtualNetworkTap");
 043                writer.WriteObjectValue(VirtualNetworkTap);
 44            }
 045            if (ProvisioningState != null)
 46            {
 047                writer.WritePropertyName("provisioningState");
 048                writer.WriteStringValue(ProvisioningState.Value.ToString());
 49            }
 050            writer.WriteEndObject();
 051            writer.WriteEndObject();
 052        }
 53
 54        internal static NetworkInterfaceTapConfiguration DeserializeNetworkInterfaceTapConfiguration(JsonElement element
 55        {
 056            string name = default;
 057            string etag = default;
 058            string type = default;
 059            string id = default;
 060            VirtualNetworkTap virtualNetworkTap = default;
 061            ProvisioningState? provisioningState = default;
 062            foreach (var property in element.EnumerateObject())
 63            {
 064                if (property.NameEquals("name"))
 65                {
 066                    if (property.Value.ValueKind == JsonValueKind.Null)
 67                    {
 68                        continue;
 69                    }
 070                    name = property.Value.GetString();
 071                    continue;
 72                }
 073                if (property.NameEquals("etag"))
 74                {
 075                    if (property.Value.ValueKind == JsonValueKind.Null)
 76                    {
 77                        continue;
 78                    }
 079                    etag = property.Value.GetString();
 080                    continue;
 81                }
 082                if (property.NameEquals("type"))
 83                {
 084                    if (property.Value.ValueKind == JsonValueKind.Null)
 85                    {
 86                        continue;
 87                    }
 088                    type = 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("virtualNetworkTap"))
 105                        {
 0106                            if (property0.Value.ValueKind == JsonValueKind.Null)
 107                            {
 108                                continue;
 109                            }
 0110                            virtualNetworkTap = VirtualNetworkTap.DeserializeVirtualNetworkTap(property0.Value);
 0111                            continue;
 112                        }
 0113                        if (property0.NameEquals("provisioningState"))
 114                        {
 0115                            if (property0.Value.ValueKind == JsonValueKind.Null)
 116                            {
 117                                continue;
 118                            }
 0119                            provisioningState = new ProvisioningState(property0.Value.GetString());
 120                            continue;
 121                        }
 122                    }
 123                    continue;
 124                }
 125            }
 0126            return new NetworkInterfaceTapConfiguration(id, name, etag, type, virtualNetworkTap, provisioningState);
 127        }
 128    }
 129}