< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%100%
.ctor(...)-0%100%
get_LivyInfo()-0%100%
get_Name()-0%100%
get_WorkspaceName()-0%100%
get_SparkPoolName()-0%100%
get_SubmitterName()-0%100%
get_SubmitterId()-0%100%
get_ArtifactId()-0%100%
get_JobType()-0%100%
get_Result()-0%100%
get_Scheduler()-0%100%
get_Plugin()-0%100%
get_Errors()-0%100%
get_Tags()-0%100%
get_Id()-0%100%
get_AppId()-0%100%
get_AppInfo()-0%100%
get_State()-0%100%
get_LogLines()-0%100%
DeserializeSparkBatchJob(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SparkBatchJob.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.Collections.Generic;
 9using Azure.Core;
 10
 11namespace Azure.Analytics.Synapse.Artifacts.Models
 12{
 13    /// <summary> The SparkBatchJob. </summary>
 14    public partial class SparkBatchJob
 15    {
 16        /// <summary> Initializes a new instance of SparkBatchJob. </summary>
 17        /// <param name="id"> The session Id. </param>
 018        internal SparkBatchJob(int id)
 19        {
 020            Errors = new ChangeTrackingList<SparkServiceError>();
 021            Tags = new ChangeTrackingDictionary<string, string>();
 022            Id = id;
 023            AppInfo = new ChangeTrackingDictionary<string, string>();
 024            LogLines = new ChangeTrackingList<string>();
 025        }
 26
 27        /// <summary> Initializes a new instance of SparkBatchJob. </summary>
 28        /// <param name="livyInfo"> . </param>
 29        /// <param name="name"> The batch name. </param>
 30        /// <param name="workspaceName"> The workspace name. </param>
 31        /// <param name="sparkPoolName"> The Spark pool name. </param>
 32        /// <param name="submitterName"> The submitter name. </param>
 33        /// <param name="submitterId"> The submitter identifier. </param>
 34        /// <param name="artifactId"> The artifact identifier. </param>
 35        /// <param name="jobType"> The job type. </param>
 36        /// <param name="result"> The Spark batch job result. </param>
 37        /// <param name="scheduler"> The scheduler information. </param>
 38        /// <param name="plugin"> The plugin information. </param>
 39        /// <param name="errors"> The error information. </param>
 40        /// <param name="tags"> The tags. </param>
 41        /// <param name="id"> The session Id. </param>
 42        /// <param name="appId"> The application id of this session. </param>
 43        /// <param name="appInfo"> The detailed application info. </param>
 44        /// <param name="state"> The batch state. </param>
 45        /// <param name="logLines"> The log lines. </param>
 046        internal SparkBatchJob(SparkBatchJobState livyInfo, string name, string workspaceName, string sparkPoolName, str
 47        {
 048            LivyInfo = livyInfo;
 049            Name = name;
 050            WorkspaceName = workspaceName;
 051            SparkPoolName = sparkPoolName;
 052            SubmitterName = submitterName;
 053            SubmitterId = submitterId;
 054            ArtifactId = artifactId;
 055            JobType = jobType;
 056            Result = result;
 057            Scheduler = scheduler;
 058            Plugin = plugin;
 059            Errors = errors;
 060            Tags = tags;
 061            Id = id;
 062            AppId = appId;
 063            AppInfo = appInfo;
 064            State = state;
 065            LogLines = logLines;
 066        }
 67
 068        public SparkBatchJobState LivyInfo { get; }
 69        /// <summary> The batch name. </summary>
 070        public string Name { get; }
 71        /// <summary> The workspace name. </summary>
 072        public string WorkspaceName { get; }
 73        /// <summary> The Spark pool name. </summary>
 074        public string SparkPoolName { get; }
 75        /// <summary> The submitter name. </summary>
 076        public string SubmitterName { get; }
 77        /// <summary> The submitter identifier. </summary>
 078        public string SubmitterId { get; }
 79        /// <summary> The artifact identifier. </summary>
 080        public string ArtifactId { get; }
 81        /// <summary> The job type. </summary>
 082        public SparkJobType? JobType { get; }
 83        /// <summary> The Spark batch job result. </summary>
 084        public SparkBatchJobResultType? Result { get; }
 85        /// <summary> The scheduler information. </summary>
 086        public SparkScheduler Scheduler { get; }
 87        /// <summary> The plugin information. </summary>
 088        public SparkServicePlugin Plugin { get; }
 89        /// <summary> The error information. </summary>
 090        public IReadOnlyList<SparkServiceError> Errors { get; }
 91        /// <summary> The tags. </summary>
 092        public IReadOnlyDictionary<string, string> Tags { get; }
 93        /// <summary> The session Id. </summary>
 094        public int Id { get; }
 95        /// <summary> The application id of this session. </summary>
 096        public string AppId { get; }
 97        /// <summary> The detailed application info. </summary>
 098        public IReadOnlyDictionary<string, string> AppInfo { get; }
 99        /// <summary> The batch state. </summary>
 0100        public string State { get; }
 101        /// <summary> The log lines. </summary>
 0102        public IReadOnlyList<string> LogLines { get; }
 103    }
 104}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SparkBatchJob.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.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.Analytics.Synapse.Artifacts.Models
 13{
 14    public partial class SparkBatchJob
 15    {
 16        internal static SparkBatchJob DeserializeSparkBatchJob(JsonElement element)
 17        {
 018            Optional<SparkBatchJobState> livyInfo = default;
 019            Optional<string> name = default;
 020            Optional<string> workspaceName = default;
 021            Optional<string> sparkPoolName = default;
 022            Optional<string> submitterName = default;
 023            Optional<string> submitterId = default;
 024            Optional<string> artifactId = default;
 025            Optional<SparkJobType> jobType = default;
 026            Optional<SparkBatchJobResultType> result = default;
 027            Optional<SparkScheduler> schedulerInfo = default;
 028            Optional<SparkServicePlugin> pluginInfo = default;
 029            Optional<IReadOnlyList<SparkServiceError>> errorInfo = default;
 030            Optional<IReadOnlyDictionary<string, string>> tags = default;
 031            int id = default;
 032            Optional<string> appId = default;
 033            Optional<IReadOnlyDictionary<string, string>> appInfo = default;
 034            Optional<string> state = default;
 035            Optional<IReadOnlyList<string>> log = default;
 036            foreach (var property in element.EnumerateObject())
 37            {
 038                if (property.NameEquals("livyInfo"))
 39                {
 040                    livyInfo = SparkBatchJobState.DeserializeSparkBatchJobState(property.Value);
 041                    continue;
 42                }
 043                if (property.NameEquals("name"))
 44                {
 045                    name = property.Value.GetString();
 046                    continue;
 47                }
 048                if (property.NameEquals("workspaceName"))
 49                {
 050                    workspaceName = property.Value.GetString();
 051                    continue;
 52                }
 053                if (property.NameEquals("sparkPoolName"))
 54                {
 055                    sparkPoolName = property.Value.GetString();
 056                    continue;
 57                }
 058                if (property.NameEquals("submitterName"))
 59                {
 060                    submitterName = property.Value.GetString();
 061                    continue;
 62                }
 063                if (property.NameEquals("submitterId"))
 64                {
 065                    submitterId = property.Value.GetString();
 066                    continue;
 67                }
 068                if (property.NameEquals("artifactId"))
 69                {
 070                    artifactId = property.Value.GetString();
 071                    continue;
 72                }
 073                if (property.NameEquals("jobType"))
 74                {
 075                    jobType = new SparkJobType(property.Value.GetString());
 076                    continue;
 77                }
 078                if (property.NameEquals("result"))
 79                {
 080                    result = new SparkBatchJobResultType(property.Value.GetString());
 081                    continue;
 82                }
 083                if (property.NameEquals("schedulerInfo"))
 84                {
 085                    schedulerInfo = SparkScheduler.DeserializeSparkScheduler(property.Value);
 086                    continue;
 87                }
 088                if (property.NameEquals("pluginInfo"))
 89                {
 090                    pluginInfo = SparkServicePlugin.DeserializeSparkServicePlugin(property.Value);
 091                    continue;
 92                }
 093                if (property.NameEquals("errorInfo"))
 94                {
 095                    List<SparkServiceError> array = new List<SparkServiceError>();
 096                    foreach (var item in property.Value.EnumerateArray())
 97                    {
 098                        array.Add(SparkServiceError.DeserializeSparkServiceError(item));
 99                    }
 0100                    errorInfo = array;
 0101                    continue;
 102                }
 0103                if (property.NameEquals("tags"))
 104                {
 0105                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 0106                    foreach (var property0 in property.Value.EnumerateObject())
 107                    {
 0108                        dictionary.Add(property0.Name, property0.Value.GetString());
 109                    }
 0110                    tags = dictionary;
 0111                    continue;
 112                }
 0113                if (property.NameEquals("id"))
 114                {
 0115                    id = property.Value.GetInt32();
 0116                    continue;
 117                }
 0118                if (property.NameEquals("appId"))
 119                {
 0120                    appId = property.Value.GetString();
 0121                    continue;
 122                }
 0123                if (property.NameEquals("appInfo"))
 124                {
 0125                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 0126                    foreach (var property0 in property.Value.EnumerateObject())
 127                    {
 0128                        dictionary.Add(property0.Name, property0.Value.GetString());
 129                    }
 0130                    appInfo = dictionary;
 0131                    continue;
 132                }
 0133                if (property.NameEquals("state"))
 134                {
 0135                    state = property.Value.GetString();
 0136                    continue;
 137                }
 0138                if (property.NameEquals("log"))
 139                {
 0140                    List<string> array = new List<string>();
 0141                    foreach (var item in property.Value.EnumerateArray())
 142                    {
 0143                        array.Add(item.GetString());
 144                    }
 0145                    log = array;
 146                    continue;
 147                }
 148            }
 0149            return new SparkBatchJob(livyInfo.Value, name.Value, workspaceName.Value, sparkPoolName.Value, submitterName
 150        }
 151    }
 152}