< Summary

Class:Azure.Analytics.Synapse.Spark.Models.SparkStatement
Assembly:Azure.Analytics.Synapse.Spark
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Spark\src\Generated\Models\SparkStatement.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Spark\src\Generated\Models\SparkStatement.Serialization.cs
Covered lines:0
Uncovered lines:30
Coverable lines:30
Total lines:85
Line coverage:0% (0 of 30)
Covered branches:0
Total branches:10
Branch coverage:0% (0 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%100%
.ctor(...)-0%100%
get_Id()-0%100%
get_Code()-0%100%
get_State()-0%100%
get_Output()-0%100%
DeserializeSparkStatement(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Spark\src\Generated\Models\SparkStatement.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.Spark.Models
 9{
 10    /// <summary> The SparkStatement. </summary>
 11    public partial class SparkStatement
 12    {
 13        /// <summary> Initializes a new instance of SparkStatement. </summary>
 14        /// <param name="id"> . </param>
 015        internal SparkStatement(int id)
 16        {
 017            Id = id;
 018        }
 19
 20        /// <summary> Initializes a new instance of SparkStatement. </summary>
 21        /// <param name="id"> . </param>
 22        /// <param name="code"> . </param>
 23        /// <param name="state"> . </param>
 24        /// <param name="output"> . </param>
 025        internal SparkStatement(int id, string code, string state, SparkStatementOutput output)
 26        {
 027            Id = id;
 028            Code = code;
 029            State = state;
 030            Output = output;
 031        }
 32
 033        public int Id { get; }
 034        public string Code { get; }
 035        public string State { get; }
 036        public SparkStatementOutput Output { get; }
 37    }
 38}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Spark\src\Generated\Models\SparkStatement.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.Spark.Models
 12{
 13    public partial class SparkStatement
 14    {
 15        internal static SparkStatement DeserializeSparkStatement(JsonElement element)
 16        {
 017            int id = default;
 018            Optional<string> code = default;
 019            Optional<string> state = default;
 020            Optional<SparkStatementOutput> output = default;
 021            foreach (var property in element.EnumerateObject())
 22            {
 023                if (property.NameEquals("id"))
 24                {
 025                    id = property.Value.GetInt32();
 026                    continue;
 27                }
 028                if (property.NameEquals("code"))
 29                {
 030                    code = property.Value.GetString();
 031                    continue;
 32                }
 033                if (property.NameEquals("state"))
 34                {
 035                    state = property.Value.GetString();
 036                    continue;
 37                }
 038                if (property.NameEquals("output"))
 39                {
 040                    output = SparkStatementOutput.DeserializeSparkStatementOutput(property.Value);
 41                    continue;
 42                }
 43            }
 044            return new SparkStatement(id, code.Value, state.Value, output.Value);
 45        }
 46    }
 47}