< Summary

Class:Azure.ResourceManager.EventHubs.Models.KeyVaultProperties
Assembly:Azure.ResourceManager.EventHubs
File(s):C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\KeyVaultProperties.cs
C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\KeyVaultProperties.Serialization.cs
Covered lines:0
Uncovered lines:38
Coverable lines:38
Total lines:110
Line coverage:0% (0 of 38)
Covered branches:0
Total branches:20
Branch coverage:0% (0 of 20)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_KeyName()-0%100%
get_KeyVaultUri()-0%100%
get_KeyVersion()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeKeyVaultProperties(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\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.EventHubs.Models
 9{
 10    /// <summary> Properties to configure keyVault Properties. </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="keyName"> Name of the Key from KeyVault. </param>
 20        /// <param name="keyVaultUri"> Uri of KeyVault. </param>
 21        /// <param name="keyVersion"> Key Version. </param>
 022        internal KeyVaultProperties(string keyName, string keyVaultUri, string keyVersion)
 23        {
 024            KeyName = keyName;
 025            KeyVaultUri = keyVaultUri;
 026            KeyVersion = keyVersion;
 027        }
 28
 29        /// <summary> Name of the Key from KeyVault. </summary>
 030        public string KeyName { get; set; }
 31        /// <summary> Uri of KeyVault. </summary>
 032        public string KeyVaultUri { get; set; }
 33        /// <summary> Key Version. </summary>
 034        public string KeyVersion { get; set; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\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.EventHubs.Models
 12{
 13    public partial class KeyVaultProperties : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (KeyName != null)
 19            {
 020                writer.WritePropertyName("keyName");
 021                writer.WriteStringValue(KeyName);
 22            }
 023            if (KeyVaultUri != null)
 24            {
 025                writer.WritePropertyName("keyVaultUri");
 026                writer.WriteStringValue(KeyVaultUri);
 27            }
 028            if (KeyVersion != null)
 29            {
 030                writer.WritePropertyName("keyVersion");
 031                writer.WriteStringValue(KeyVersion);
 32            }
 033            writer.WriteEndObject();
 034        }
 35
 36        internal static KeyVaultProperties DeserializeKeyVaultProperties(JsonElement element)
 37        {
 038            string keyName = default;
 039            string keyVaultUri = default;
 040            string keyVersion = default;
 041            foreach (var property in element.EnumerateObject())
 42            {
 043                if (property.NameEquals("keyName"))
 44                {
 045                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 049                    keyName = property.Value.GetString();
 050                    continue;
 51                }
 052                if (property.NameEquals("keyVaultUri"))
 53                {
 054                    if (property.Value.ValueKind == JsonValueKind.Null)
 55                    {
 56                        continue;
 57                    }
 058                    keyVaultUri = property.Value.GetString();
 059                    continue;
 60                }
 061                if (property.NameEquals("keyVersion"))
 62                {
 063                    if (property.Value.ValueKind == JsonValueKind.Null)
 64                    {
 65                        continue;
 66                    }
 067                    keyVersion = property.Value.GetString();
 68                    continue;
 69                }
 70            }
 071            return new KeyVaultProperties(keyName, keyVaultUri, keyVersion);
 72        }
 73    }
 74}