< Summary

Class:Azure.ResourceManager.KeyVault.Models.CloudErrorBody
Assembly:Azure.ResourceManager.KeyVault
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\CloudErrorBody.cs
C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\CloudErrorBody.Serialization.cs
Covered lines:0
Uncovered lines:17
Coverable lines:17
Total lines:67
Line coverage:0% (0 of 17)
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_Code()-0%100%
get_Message()-0%100%
DeserializeCloudErrorBody(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\CloudErrorBody.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.KeyVault.Models
 9{
 10    /// <summary> An error response from Key Vault resource provider. </summary>
 11    internal partial class CloudErrorBody
 12    {
 13        /// <summary> Initializes a new instance of CloudErrorBody. </summary>
 014        internal CloudErrorBody()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of CloudErrorBody. </summary>
 19        /// <param name="code"> Error code. This is a mnemonic that can be consumed programmatically. </param>
 20        /// <param name="message"> User friendly error message. The message is typically localized and may vary with ser
 021        internal CloudErrorBody(string code, string message)
 22        {
 023            Code = code;
 024            Message = message;
 025        }
 26
 27        /// <summary> Error code. This is a mnemonic that can be consumed programmatically. </summary>
 028        public string Code { get; }
 29        /// <summary> User friendly error message. The message is typically localized and may vary with service version.
 030        public string Message { get; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\CloudErrorBody.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.KeyVault.Models
 12{
 13    internal partial class CloudErrorBody
 14    {
 15        internal static CloudErrorBody DeserializeCloudErrorBody(JsonElement element)
 16        {
 017            Optional<string> code = default;
 018            Optional<string> message = default;
 019            foreach (var property in element.EnumerateObject())
 20            {
 021                if (property.NameEquals("code"))
 22                {
 023                    code = property.Value.GetString();
 024                    continue;
 25                }
 026                if (property.NameEquals("message"))
 27                {
 028                    message = property.Value.GetString();
 29                    continue;
 30                }
 31            }
 032            return new CloudErrorBody(code.Value, message.Value);
 33        }
 34    }
 35}