< Summary

Class:Azure.Analytics.Synapse.Artifacts.Models.SparkServiceError
Assembly:Azure.Analytics.Synapse.Artifacts
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SparkServiceError.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SparkServiceError.Serialization.cs
Covered lines:0
Uncovered lines:23
Coverable lines:23
Total lines:74
Line coverage:0% (0 of 23)
Covered branches:0
Total branches:8
Branch coverage:0% (0 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Message()-0%100%
get_ErrorCode()-0%100%
get_Source()-0%100%
DeserializeSparkServiceError(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SparkServiceError.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.Analytics.Synapse.Artifacts.Models
 9{
 10    /// <summary> The SparkServiceError. </summary>
 11    public partial class SparkServiceError
 12    {
 13        /// <summary> Initializes a new instance of SparkServiceError. </summary>
 014        internal SparkServiceError()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of SparkServiceError. </summary>
 19        /// <param name="message"> . </param>
 20        /// <param name="errorCode"> . </param>
 21        /// <param name="source"> . </param>
 022        internal SparkServiceError(string message, string errorCode, SparkErrorSource? source)
 23        {
 024            Message = message;
 025            ErrorCode = errorCode;
 026            Source = source;
 027        }
 28
 029        public string Message { get; }
 030        public string ErrorCode { get; }
 031        public SparkErrorSource? Source { get; }
 32    }
 33}

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