< Summary

Class:Azure.ResourceManager.KeyVault.Models.DeletedVaultProperties
Assembly:Azure.ResourceManager.KeyVault
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\DeletedVaultProperties.cs
C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\DeletedVaultProperties.Serialization.cs
Covered lines:36
Uncovered lines:3
Coverable lines:39
Total lines:109
Line coverage:92.3% (36 of 39)
Covered branches:14
Total branches:14
Branch coverage:100% (14 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_VaultId()-100%100%
get_Location()-100%100%
get_DeletionDate()-100%100%
get_ScheduledPurgeDate()-100%100%
get_Tags()-100%100%
DeserializeDeletedVaultProperties(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\DeletedVaultProperties.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;
 9using System.Collections.Generic;
 10using Azure.Core;
 11
 12namespace Azure.ResourceManager.KeyVault.Models
 13{
 14    /// <summary> Properties of the deleted vault. </summary>
 15    public partial class DeletedVaultProperties
 16    {
 17        /// <summary> Initializes a new instance of DeletedVaultProperties. </summary>
 018        internal DeletedVaultProperties()
 19        {
 020            Tags = new ChangeTrackingDictionary<string, string>();
 021        }
 22
 23        /// <summary> Initializes a new instance of DeletedVaultProperties. </summary>
 24        /// <param name="vaultId"> The resource id of the original vault. </param>
 25        /// <param name="location"> The location of the original vault. </param>
 26        /// <param name="deletionDate"> The deleted date. </param>
 27        /// <param name="scheduledPurgeDate"> The scheduled purged date. </param>
 28        /// <param name="tags"> Tags of the original vault. </param>
 18829        internal DeletedVaultProperties(string vaultId, string location, DateTimeOffset? deletionDate, DateTimeOffset? s
 30        {
 18831            VaultId = vaultId;
 18832            Location = location;
 18833            DeletionDate = deletionDate;
 18834            ScheduledPurgeDate = scheduledPurgeDate;
 18835            Tags = tags;
 18836        }
 37
 38        /// <summary> The resource id of the original vault. </summary>
 2439        public string VaultId { get; }
 40        /// <summary> The location of the original vault. </summary>
 1241        public string Location { get; }
 42        /// <summary> The deleted date. </summary>
 1243        public DateTimeOffset? DeletionDate { get; }
 44        /// <summary> The scheduled purged date. </summary>
 1245        public DateTimeOffset? ScheduledPurgeDate { get; }
 46        /// <summary> Tags of the original vault. </summary>
 1247        public IReadOnlyDictionary<string, string> Tags { get; }
 48    }
 49}

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\DeletedVaultProperties.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;
 9using System.Collections.Generic;
 10using System.Text.Json;
 11using Azure.Core;
 12
 13namespace Azure.ResourceManager.KeyVault.Models
 14{
 15    public partial class DeletedVaultProperties
 16    {
 17        internal static DeletedVaultProperties DeserializeDeletedVaultProperties(JsonElement element)
 18        {
 18819            Optional<string> vaultId = default;
 18820            Optional<string> location = default;
 18821            Optional<DateTimeOffset> deletionDate = default;
 18822            Optional<DateTimeOffset> scheduledPurgeDate = default;
 18823            Optional<IReadOnlyDictionary<string, string>> tags = default;
 238424            foreach (var property in element.EnumerateObject())
 25            {
 100426                if (property.NameEquals("vaultId"))
 27                {
 18828                    vaultId = property.Value.GetString();
 18829                    continue;
 30                }
 81631                if (property.NameEquals("location"))
 32                {
 18833                    location = property.Value.GetString();
 18834                    continue;
 35                }
 62836                if (property.NameEquals("deletionDate"))
 37                {
 18838                    deletionDate = property.Value.GetDateTimeOffset("O");
 18839                    continue;
 40                }
 44041                if (property.NameEquals("scheduledPurgeDate"))
 42                {
 18843                    scheduledPurgeDate = property.Value.GetDateTimeOffset("O");
 18844                    continue;
 45                }
 25246                if (property.NameEquals("tags"))
 47                {
 18848                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 55649                    foreach (var property0 in property.Value.EnumerateObject())
 50                    {
 9051                        dictionary.Add(property0.Name, property0.Value.GetString());
 52                    }
 18853                    tags = dictionary;
 54                    continue;
 55                }
 56            }
 18857            return new DeletedVaultProperties(vaultId.Value, location.Value, Optional.ToNullable(deletionDate), Optional
 58        }
 59    }
 60}