< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
get_Tags()-0%100%
get_ArtifactId()-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%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Spark\src\Generated\Models\SparkBatchJobOptions.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;
 9using System.Collections.Generic;
 10using Azure.Core;
 11
 12namespace Azure.Analytics.Synapse.Spark.Models
 13{
 14    /// <summary> The SparkBatchJobOptions. </summary>
 15    public partial class SparkBatchJobOptions
 16    {
 17        /// <summary> Initializes a new instance of SparkBatchJobOptions. </summary>
 18        /// <param name="name"> . </param>
 19        /// <param name="file"> . </param>
 20        /// <exception cref="ArgumentNullException"> <paramref name="name"/> or <paramref name="file"/> is null. </excep
 021        public SparkBatchJobOptions(string name, string file)
 22        {
 023            if (name == null)
 24            {
 025                throw new ArgumentNullException(nameof(name));
 26            }
 027            if (file == null)
 28            {
 029                throw new ArgumentNullException(nameof(file));
 30            }
 31
 032            Tags = new ChangeTrackingDictionary<string, string>();
 033            Name = name;
 034            File = file;
 035            Arguments = new ChangeTrackingList<string>();
 036            Jars = new ChangeTrackingList<string>();
 037            PythonFiles = new ChangeTrackingList<string>();
 038            Files = new ChangeTrackingList<string>();
 039            Archives = new ChangeTrackingList<string>();
 040            Configuration = new ChangeTrackingDictionary<string, string>();
 041        }
 42
 43        /// <summary> Dictionary of &lt;string&gt;. </summary>
 044        public IDictionary<string, string> Tags { get; }
 045        public string ArtifactId { get; set; }
 046        public string Name { get; }
 047        public string File { get; }
 048        public string ClassName { get; set; }
 049        public IList<string> Arguments { get; }
 050        public IList<string> Jars { get; }
 051        public IList<string> PythonFiles { get; }
 052        public IList<string> Files { get; }
 053        public IList<string> Archives { get; }
 54        /// <summary> Dictionary of &lt;string&gt;. </summary>
 055        public IDictionary<string, string> Configuration { get; }
 056        public string DriverMemory { get; set; }
 057        public int? DriverCores { get; set; }
 058        public string ExecutorMemory { get; set; }
 059        public int? ExecutorCores { get; set; }
 060        public int? ExecutorCount { get; set; }
 61    }
 62}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Spark\src\Generated\Models\SparkBatchJobOptions.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 SparkBatchJobOptions : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Optional.IsCollectionDefined(Tags))
 19            {
 020                writer.WritePropertyName("tags");
 021                writer.WriteStartObject();
 022                foreach (var item in Tags)
 23                {
 024                    writer.WritePropertyName(item.Key);
 025                    writer.WriteStringValue(item.Value);
 26                }
 027                writer.WriteEndObject();
 28            }
 029            if (Optional.IsDefined(ArtifactId))
 30            {
 031                writer.WritePropertyName("artifactId");
 032                writer.WriteStringValue(ArtifactId);
 33            }
 034            writer.WritePropertyName("name");
 035            writer.WriteStringValue(Name);
 036            writer.WritePropertyName("file");
 037            writer.WriteStringValue(File);
 038            if (Optional.IsDefined(ClassName))
 39            {
 040                writer.WritePropertyName("className");
 041                writer.WriteStringValue(ClassName);
 42            }
 043            if (Optional.IsCollectionDefined(Arguments))
 44            {
 045                writer.WritePropertyName("args");
 046                writer.WriteStartArray();
 047                foreach (var item in Arguments)
 48                {
 049                    writer.WriteStringValue(item);
 50                }
 051                writer.WriteEndArray();
 52            }
 053            if (Optional.IsCollectionDefined(Jars))
 54            {
 055                writer.WritePropertyName("jars");
 056                writer.WriteStartArray();
 057                foreach (var item in Jars)
 58                {
 059                    writer.WriteStringValue(item);
 60                }
 061                writer.WriteEndArray();
 62            }
 063            if (Optional.IsCollectionDefined(PythonFiles))
 64            {
 065                writer.WritePropertyName("pyFiles");
 066                writer.WriteStartArray();
 067                foreach (var item in PythonFiles)
 68                {
 069                    writer.WriteStringValue(item);
 70                }
 071                writer.WriteEndArray();
 72            }
 073            if (Optional.IsCollectionDefined(Files))
 74            {
 075                writer.WritePropertyName("files");
 076                writer.WriteStartArray();
 077                foreach (var item in Files)
 78                {
 079                    writer.WriteStringValue(item);
 80                }
 081                writer.WriteEndArray();
 82            }
 083            if (Optional.IsCollectionDefined(Archives))
 84            {
 085                writer.WritePropertyName("archives");
 086                writer.WriteStartArray();
 087                foreach (var item in Archives)
 88                {
 089                    writer.WriteStringValue(item);
 90                }
 091                writer.WriteEndArray();
 92            }
 093            if (Optional.IsCollectionDefined(Configuration))
 94            {
 095                writer.WritePropertyName("conf");
 096                writer.WriteStartObject();
 097                foreach (var item in Configuration)
 98                {
 099                    writer.WritePropertyName(item.Key);
 0100                    writer.WriteStringValue(item.Value);
 101                }
 0102                writer.WriteEndObject();
 103            }
 0104            if (Optional.IsDefined(DriverMemory))
 105            {
 0106                writer.WritePropertyName("driverMemory");
 0107                writer.WriteStringValue(DriverMemory);
 108            }
 0109            if (Optional.IsDefined(DriverCores))
 110            {
 0111                writer.WritePropertyName("driverCores");
 0112                writer.WriteNumberValue(DriverCores.Value);
 113            }
 0114            if (Optional.IsDefined(ExecutorMemory))
 115            {
 0116                writer.WritePropertyName("executorMemory");
 0117                writer.WriteStringValue(ExecutorMemory);
 118            }
 0119            if (Optional.IsDefined(ExecutorCores))
 120            {
 0121                writer.WritePropertyName("executorCores");
 0122                writer.WriteNumberValue(ExecutorCores.Value);
 123            }
 0124            if (Optional.IsDefined(ExecutorCount))
 125            {
 0126                writer.WritePropertyName("numExecutors");
 0127                writer.WriteNumberValue(ExecutorCount.Value);
 128            }
 0129            writer.WriteEndObject();
 0130        }
 131    }
 132}