< Summary

Class:Azure.ResourceManager.AppConfiguration.Models.KeyVaultProperties
Assembly:Azure.ResourceManager.AppConfiguration
File(s):C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\KeyVaultProperties.cs
C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\KeyVaultProperties.Serialization.cs
Covered lines:0
Uncovered lines:28
Coverable lines:28
Total lines:91
Line coverage:0% (0 of 28)
Covered branches:0
Total branches:14
Branch coverage:0% (0 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_KeyIdentifier()-0%100%
get_IdentityClientId()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeKeyVaultProperties(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\KeyVaultProperties.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.AppConfiguration.Models
 9{
 10    /// <summary> Settings concerning key vault encryption for a configuration store. </summary>
 11    public partial class KeyVaultProperties
 12    {
 13        /// <summary> Initializes a new instance of KeyVaultProperties. </summary>
 014        public KeyVaultProperties()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of KeyVaultProperties. </summary>
 19        /// <param name="keyIdentifier"> The URI of the key vault key used to encrypt data. </param>
 20        /// <param name="identityClientId"> The client id of the identity which will be used to access key vault. </para
 021        internal KeyVaultProperties(string keyIdentifier, string identityClientId)
 22        {
 023            KeyIdentifier = keyIdentifier;
 024            IdentityClientId = identityClientId;
 025        }
 26
 27        /// <summary> The URI of the key vault key used to encrypt data. </summary>
 028        public string KeyIdentifier { get; set; }
 29        /// <summary> The client id of the identity which will be used to access key vault. </summary>
 030        public string IdentityClientId { get; set; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\KeyVaultProperties.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.AppConfiguration.Models
 12{
 13    public partial class KeyVaultProperties : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (KeyIdentifier != null)
 19            {
 020                writer.WritePropertyName("keyIdentifier");
 021                writer.WriteStringValue(KeyIdentifier);
 22            }
 023            if (IdentityClientId != null)
 24            {
 025                writer.WritePropertyName("identityClientId");
 026                writer.WriteStringValue(IdentityClientId);
 27            }
 028            writer.WriteEndObject();
 029        }
 30
 31        internal static KeyVaultProperties DeserializeKeyVaultProperties(JsonElement element)
 32        {
 033            string keyIdentifier = default;
 034            string identityClientId = default;
 035            foreach (var property in element.EnumerateObject())
 36            {
 037                if (property.NameEquals("keyIdentifier"))
 38                {
 039                    if (property.Value.ValueKind == JsonValueKind.Null)
 40                    {
 41                        continue;
 42                    }
 043                    keyIdentifier = property.Value.GetString();
 044                    continue;
 45                }
 046                if (property.NameEquals("identityClientId"))
 47                {
 048                    if (property.Value.ValueKind == JsonValueKind.Null)
 49                    {
 50                        continue;
 51                    }
 052                    identityClientId = property.Value.GetString();
 53                    continue;
 54                }
 55            }
 056            return new KeyVaultProperties(keyIdentifier, identityClientId);
 57        }
 58    }
 59}