< Summary

Class:Azure.ResourceManager.KeyVault.Models.DeletedVault
Assembly:Azure.ResourceManager.KeyVault
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\DeletedVault.cs
C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\DeletedVault.Serialization.cs
Covered lines:27
Uncovered lines:2
Coverable lines:29
Total lines:87
Line coverage:93.1% (27 of 29)
Covered branches:10
Total branches:10
Branch coverage:100% (10 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Id()-100%100%
get_Name()-100%100%
get_Type()-100%100%
get_Properties()-100%100%
DeserializeDeletedVault(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\DeletedVault.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.KeyVault.Models
 9{
 10    /// <summary> Deleted vault information with extended details. </summary>
 11    public partial class DeletedVault
 12    {
 13        /// <summary> Initializes a new instance of DeletedVault. </summary>
 014        internal DeletedVault()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of DeletedVault. </summary>
 19        /// <param name="id"> The resource ID for the deleted key vault. </param>
 20        /// <param name="name"> The name of the key vault. </param>
 21        /// <param name="type"> The resource type of the key vault. </param>
 22        /// <param name="properties"> Properties of the vault. </param>
 18823        internal DeletedVault(string id, string name, string type, DeletedVaultProperties properties)
 24        {
 18825            Id = id;
 18826            Name = name;
 18827            Type = type;
 18828            Properties = properties;
 18829        }
 30
 31        /// <summary> The resource ID for the deleted key vault. </summary>
 1232        public string Id { get; }
 33        /// <summary> The name of the key vault. </summary>
 3634        public string Name { get; }
 35        /// <summary> The resource type of the key vault. </summary>
 1236        public string Type { get; }
 37        /// <summary> Properties of the vault. </summary>
 7238        public DeletedVaultProperties Properties { get; }
 39    }
 40}

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\DeletedVault.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 DeletedVault
 14    {
 15        internal static DeletedVault DeserializeDeletedVault(JsonElement element)
 16        {
 18817            Optional<string> id = default;
 18818            Optional<string> name = default;
 18819            Optional<string> type = default;
 18820            Optional<DeletedVaultProperties> properties = default;
 188021            foreach (var property in element.EnumerateObject())
 22            {
 75223                if (property.NameEquals("id"))
 24                {
 18825                    id = property.Value.GetString();
 18826                    continue;
 27                }
 56428                if (property.NameEquals("name"))
 29                {
 18830                    name = property.Value.GetString();
 18831                    continue;
 32                }
 37633                if (property.NameEquals("type"))
 34                {
 18835                    type = property.Value.GetString();
 18836                    continue;
 37                }
 18838                if (property.NameEquals("properties"))
 39                {
 18840                    properties = DeletedVaultProperties.DeserializeDeletedVaultProperties(property.Value);
 41                    continue;
 42                }
 43            }
 18844            return new DeletedVault(id.Value, name.Value, type.Value, properties.Value);
 45        }
 46    }
 47}