< Summary

Class:Azure.Security.KeyVault.Administration.Models.KeyVaultError
Assembly:Azure.Security.KeyVault.Administration
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Administration\src\Generated\Models\KeyVaultError.cs
C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Administration\src\Generated\Models\KeyVaultError.Serialization.cs
Covered lines:0
Uncovered lines:14
Coverable lines:14
Total lines:62
Line coverage:0% (0 of 14)
Covered branches:0
Total branches:6
Branch coverage:0% (0 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Error()-0%100%
DeserializeKeyVaultError(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Administration\src\Generated\Models\KeyVaultError.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.Security.KeyVault.Administration.Models
 9{
 10    /// <summary> The key vault error exception. </summary>
 11    internal partial class KeyVaultError
 12    {
 13        /// <summary> Initializes a new instance of KeyVaultError. </summary>
 014        internal KeyVaultError()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of KeyVaultError. </summary>
 19        /// <param name="error"> The key vault server error. </param>
 020        internal KeyVaultError(KeyVaultServiceError error)
 21        {
 022            Error = error;
 023        }
 24
 25        /// <summary> The key vault server error. </summary>
 026        public KeyVaultServiceError Error { get; }
 27    }
 28}

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Administration\src\Generated\Models\KeyVaultError.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.Security.KeyVault.Administration.Models
 12{
 13    internal partial class KeyVaultError
 14    {
 15        internal static KeyVaultError DeserializeKeyVaultError(JsonElement element)
 16        {
 017            Optional<KeyVaultServiceError> error = default;
 018            foreach (var property in element.EnumerateObject())
 19            {
 020                if (property.NameEquals("error"))
 21                {
 022                    if (property.Value.ValueKind == JsonValueKind.Null)
 23                    {
 024                        error = null;
 025                        continue;
 26                    }
 027                    error = KeyVaultServiceError.DeserializeKeyVaultServiceError(property.Value);
 28                    continue;
 29                }
 30            }
 031            return new KeyVaultError(error.Value);
 32        }
 33    }
 34}