< Summary

Class:Azure.Analytics.Synapse.AccessControl.Models.ErrorDetail
Assembly:Azure.Analytics.Synapse.AccessControl
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.AccessControl\src\Generated\Models\ErrorDetail.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.AccessControl\src\Generated\Models\ErrorDetail.Serialization.cs
Covered lines:0
Uncovered lines:29
Coverable lines:29
Total lines:90
Line coverage:0% (0 of 29)
Covered branches:0
Total branches:12
Branch coverage:0% (0 of 12)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%100%
get_Code()-0%100%
get_Message()-0%100%
get_Target()-0%100%
DeserializeErrorDetail(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.AccessControl\src\Generated\Models\ErrorDetail.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;
 9
 10namespace Azure.Analytics.Synapse.AccessControl.Models
 11{
 12    /// <summary> The ErrorDetail. </summary>
 13    internal partial class ErrorDetail
 14    {
 15        /// <summary> Initializes a new instance of ErrorDetail. </summary>
 16        /// <param name="code"> . </param>
 17        /// <param name="message"> . </param>
 18        /// <exception cref="ArgumentNullException"> <paramref name="code"/> or <paramref name="message"/> is null. </ex
 019        internal ErrorDetail(string code, string message)
 20        {
 021            if (code == null)
 22            {
 023                throw new ArgumentNullException(nameof(code));
 24            }
 025            if (message == null)
 26            {
 027                throw new ArgumentNullException(nameof(message));
 28            }
 29
 030            Code = code;
 031            Message = message;
 032        }
 33
 34        /// <summary> Initializes a new instance of ErrorDetail. </summary>
 35        /// <param name="code"> . </param>
 36        /// <param name="message"> . </param>
 37        /// <param name="target"> . </param>
 038        internal ErrorDetail(string code, string message, string target)
 39        {
 040            Code = code;
 041            Message = message;
 042            Target = target;
 043        }
 44
 045        public string Code { get; }
 046        public string Message { get; }
 047        public string Target { get; }
 48    }
 49}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.AccessControl\src\Generated\Models\ErrorDetail.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.Analytics.Synapse.AccessControl.Models
 12{
 13    internal partial class ErrorDetail
 14    {
 15        internal static ErrorDetail DeserializeErrorDetail(JsonElement element)
 16        {
 017            string code = default;
 018            string message = default;
 019            Optional<string> target = default;
 020            foreach (var property in element.EnumerateObject())
 21            {
 022                if (property.NameEquals("code"))
 23                {
 024                    code = property.Value.GetString();
 025                    continue;
 26                }
 027                if (property.NameEquals("message"))
 28                {
 029                    message = property.Value.GetString();
 030                    continue;
 31                }
 032                if (property.NameEquals("target"))
 33                {
 034                    target = property.Value.GetString();
 35                    continue;
 36                }
 37            }
 038            return new ErrorDetail(code, message, target.Value);
 39        }
 40    }
 41}