< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Name()-0%100%
get_File()-0%100%
get_ClassName()-0%100%
get_Arguments()-0%100%
get_Jars()-0%100%
get_PythonFiles()-0%100%
get_Files()-0%100%
get_Archives()-0%100%
get_Configuration()-0%100%
get_DriverMemory()-0%100%
get_DriverCores()-0%100%
get_ExecutorMemory()-0%100%
get_ExecutorCores()-0%100%
get_ExecutorCount()-0%100%
DeserializeSparkRequest(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SparkRequest.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 SparkRequest. </summary>
 14    public partial class SparkRequest
 15    {
 16        /// <summary> Initializes a new instance of SparkRequest. </summary>
 017        internal SparkRequest()
 18        {
 019            Arguments = new ChangeTrackingList<string>();
 020            Jars = new ChangeTrackingList<string>();
 021            PythonFiles = new ChangeTrackingList<string>();
 022            Files = new ChangeTrackingList<string>();
 023            Archives = new ChangeTrackingList<string>();
 024            Configuration = new ChangeTrackingDictionary<string, string>();
 025        }
 26
 27        /// <summary> Initializes a new instance of SparkRequest. </summary>
 28        /// <param name="name"> . </param>
 29        /// <param name="file"> . </param>
 30        /// <param name="className"> . </param>
 31        /// <param name="arguments"> . </param>
 32        /// <param name="jars"> . </param>
 33        /// <param name="pythonFiles"> . </param>
 34        /// <param name="files"> . </param>
 35        /// <param name="archives"> . </param>
 36        /// <param name="configuration"> Dictionary of &lt;string&gt;. </param>
 37        /// <param name="driverMemory"> . </param>
 38        /// <param name="driverCores"> . </param>
 39        /// <param name="executorMemory"> . </param>
 40        /// <param name="executorCores"> . </param>
 41        /// <param name="executorCount"> . </param>
 042        internal SparkRequest(string name, string file, string className, IReadOnlyList<string> arguments, IReadOnlyList
 43        {
 044            Name = name;
 045            File = file;
 046            ClassName = className;
 047            Arguments = arguments;
 048            Jars = jars;
 049            PythonFiles = pythonFiles;
 050            Files = files;
 051            Archives = archives;
 052            Configuration = configuration;
 053            DriverMemory = driverMemory;
 054            DriverCores = driverCores;
 055            ExecutorMemory = executorMemory;
 056            ExecutorCores = executorCores;
 057            ExecutorCount = executorCount;
 058        }
 59
 060        public string Name { get; }
 061        public string File { get; }
 062        public string ClassName { get; }
 063        public IReadOnlyList<string> Arguments { get; }
 064        public IReadOnlyList<string> Jars { get; }
 065        public IReadOnlyList<string> PythonFiles { get; }
 066        public IReadOnlyList<string> Files { get; }
 067        public IReadOnlyList<string> Archives { get; }
 68        /// <summary> Dictionary of &lt;string&gt;. </summary>
 069        public IReadOnlyDictionary<string, string> Configuration { get; }
 070        public string DriverMemory { get; }
 071        public int? DriverCores { get; }
 072        public string ExecutorMemory { get; }
 073        public int? ExecutorCores { get; }
 074        public int? ExecutorCount { get; }
 75    }
 76}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SparkRequest.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 SparkRequest
 15    {
 16        internal static SparkRequest DeserializeSparkRequest(JsonElement element)
 17        {
 018            Optional<string> name = default;
 019            Optional<string> file = default;
 020            Optional<string> className = default;
 021            Optional<IReadOnlyList<string>> args = default;
 022            Optional<IReadOnlyList<string>> jars = default;
 023            Optional<IReadOnlyList<string>> pyFiles = default;
 024            Optional<IReadOnlyList<string>> files = default;
 025            Optional<IReadOnlyList<string>> archives = default;
 026            Optional<IReadOnlyDictionary<string, string>> conf = default;
 027            Optional<string> driverMemory = default;
 028            Optional<int> driverCores = default;
 029            Optional<string> executorMemory = default;
 030            Optional<int> executorCores = default;
 031            Optional<int> numExecutors = default;
 032            foreach (var property in element.EnumerateObject())
 33            {
 034                if (property.NameEquals("name"))
 35                {
 036                    name = property.Value.GetString();
 037                    continue;
 38                }
 039                if (property.NameEquals("file"))
 40                {
 041                    file = property.Value.GetString();
 042                    continue;
 43                }
 044                if (property.NameEquals("className"))
 45                {
 046                    className = property.Value.GetString();
 047                    continue;
 48                }
 049                if (property.NameEquals("args"))
 50                {
 051                    List<string> array = new List<string>();
 052                    foreach (var item in property.Value.EnumerateArray())
 53                    {
 054                        array.Add(item.GetString());
 55                    }
 056                    args = array;
 057                    continue;
 58                }
 059                if (property.NameEquals("jars"))
 60                {
 061                    List<string> array = new List<string>();
 062                    foreach (var item in property.Value.EnumerateArray())
 63                    {
 064                        array.Add(item.GetString());
 65                    }
 066                    jars = array;
 067                    continue;
 68                }
 069                if (property.NameEquals("pyFiles"))
 70                {
 071                    List<string> array = new List<string>();
 072                    foreach (var item in property.Value.EnumerateArray())
 73                    {
 074                        array.Add(item.GetString());
 75                    }
 076                    pyFiles = array;
 077                    continue;
 78                }
 079                if (property.NameEquals("files"))
 80                {
 081                    List<string> array = new List<string>();
 082                    foreach (var item in property.Value.EnumerateArray())
 83                    {
 084                        array.Add(item.GetString());
 85                    }
 086                    files = array;
 087                    continue;
 88                }
 089                if (property.NameEquals("archives"))
 90                {
 091                    List<string> array = new List<string>();
 092                    foreach (var item in property.Value.EnumerateArray())
 93                    {
 094                        array.Add(item.GetString());
 95                    }
 096                    archives = array;
 097                    continue;
 98                }
 099                if (property.NameEquals("conf"))
 100                {
 0101                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 0102                    foreach (var property0 in property.Value.EnumerateObject())
 103                    {
 0104                        dictionary.Add(property0.Name, property0.Value.GetString());
 105                    }
 0106                    conf = dictionary;
 0107                    continue;
 108                }
 0109                if (property.NameEquals("driverMemory"))
 110                {
 0111                    driverMemory = property.Value.GetString();
 0112                    continue;
 113                }
 0114                if (property.NameEquals("driverCores"))
 115                {
 0116                    driverCores = property.Value.GetInt32();
 0117                    continue;
 118                }
 0119                if (property.NameEquals("executorMemory"))
 120                {
 0121                    executorMemory = property.Value.GetString();
 0122                    continue;
 123                }
 0124                if (property.NameEquals("executorCores"))
 125                {
 0126                    executorCores = property.Value.GetInt32();
 0127                    continue;
 128                }
 0129                if (property.NameEquals("numExecutors"))
 130                {
 0131                    numExecutors = property.Value.GetInt32();
 132                    continue;
 133                }
 134            }
 0135            return new SparkRequest(name.Value, file.Value, className.Value, Optional.ToList(args), Optional.ToList(jars
 136        }
 137    }
 138}