< Summary

Class:Azure.ResourceManager.Storage.Models.EncryptionScopeKeyVaultProperties
Assembly:Azure.ResourceManager.Storage
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\EncryptionScopeKeyVaultProperties.cs
C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\EncryptionScopeKeyVaultProperties.Serialization.cs
Covered lines:10
Uncovered lines:8
Coverable lines:18
Total lines:72
Line coverage:55.5% (10 of 18)
Covered branches:4
Total branches:8
Branch coverage:50% (4 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_KeyUri()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-66.67%50%
DeserializeEncryptionScopeKeyVaultProperties(...)-33.33%50%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\EncryptionScopeKeyVaultProperties.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.Storage.Models
 9{
 10    /// <summary> The key vault properties for the encryption scope. This is a required field if encryption scope &apos;
 11    public partial class EncryptionScopeKeyVaultProperties
 12    {
 13        /// <summary> Initializes a new instance of EncryptionScopeKeyVaultProperties. </summary>
 014        public EncryptionScopeKeyVaultProperties()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of EncryptionScopeKeyVaultProperties. </summary>
 19        /// <param name="keyUri"> The object identifier for a key vault key object. When applied, the encryption scope w
 2420        internal EncryptionScopeKeyVaultProperties(string keyUri)
 21        {
 2422            KeyUri = keyUri;
 2423        }
 24
 25        /// <summary> The object identifier for a key vault key object. When applied, the encryption scope will use the 
 2826        public string KeyUri { get; set; }
 27    }
 28}

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\EncryptionScopeKeyVaultProperties.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.Storage.Models
 12{
 13    public partial class EncryptionScopeKeyVaultProperties : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 417            writer.WriteStartObject();
 418            if (KeyUri != null)
 19            {
 020                writer.WritePropertyName("keyUri");
 021                writer.WriteStringValue(KeyUri);
 22            }
 423            writer.WriteEndObject();
 424        }
 25
 26        internal static EncryptionScopeKeyVaultProperties DeserializeEncryptionScopeKeyVaultProperties(JsonElement eleme
 27        {
 2428            string keyUri = default;
 029            foreach (var property in element.EnumerateObject())
 30            {
 031                if (property.NameEquals("keyUri"))
 32                {
 033                    if (property.Value.ValueKind == JsonValueKind.Null)
 34                    {
 35                        continue;
 36                    }
 037                    keyUri = property.Value.GetString();
 38                    continue;
 39                }
 40            }
 2441            return new EncryptionScopeKeyVaultProperties(keyUri);
 42        }
 43    }
 44}