< Summary

Class:Azure.ResourceManager.KeyVault.Models.VirtualNetworkRule
Assembly:Azure.ResourceManager.KeyVault
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\VirtualNetworkRule.cs
C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\VirtualNetworkRule.Serialization.cs
Covered lines:0
Uncovered lines:16
Coverable lines:16
Total lines:68
Line coverage:0% (0 of 16)
Covered branches:0
Total branches:6
Branch coverage:0% (0 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
get_Id()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%100%
DeserializeVirtualNetworkRule(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\VirtualNetworkRule.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;
 9
 10namespace Azure.ResourceManager.KeyVault.Models
 11{
 12    /// <summary> A rule governing the accessibility of a vault from a specific virtual network. </summary>
 13    public partial class VirtualNetworkRule
 14    {
 15        /// <summary> Initializes a new instance of VirtualNetworkRule. </summary>
 16        /// <param name="id"> Full resource id of a vnet subnet, such as &apos;/subscriptions/subid/resourceGroups/rg1/p
 17        /// <exception cref="ArgumentNullException"> <paramref name="id"/> is null. </exception>
 018        public VirtualNetworkRule(string id)
 19        {
 020            if (id == null)
 21            {
 022                throw new ArgumentNullException(nameof(id));
 23            }
 24
 025            Id = id;
 026        }
 27
 28        /// <summary> Full resource id of a vnet subnet, such as &apos;/subscriptions/subid/resourceGroups/rg1/providers
 029        public string Id { get; set; }
 30    }
 31}

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\VirtualNetworkRule.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.KeyVault.Models
 12{
 13    public partial class VirtualNetworkRule : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("id");
 019            writer.WriteStringValue(Id);
 020            writer.WriteEndObject();
 021        }
 22
 23        internal static VirtualNetworkRule DeserializeVirtualNetworkRule(JsonElement element)
 24        {
 025            string id = default;
 026            foreach (var property in element.EnumerateObject())
 27            {
 028                if (property.NameEquals("id"))
 29                {
 030                    id = property.Value.GetString();
 31                    continue;
 32                }
 33            }
 034            return new VirtualNetworkRule(id);
 35        }
 36    }
 37}