< Summary

Class:Azure.Analytics.Synapse.Spark.Models.SparkSessionOptions
Assembly:Azure.Analytics.Synapse.Spark
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Spark\src\Generated\Models\SparkSessionOptions.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Spark\src\Generated\Models\SparkSessionOptions.Serialization.cs
Covered lines:0
Uncovered lines:101
Coverable lines:101
Total lines:191
Line coverage:0% (0 of 101)
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\SparkSessionOptions.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 SparkSessionOptions. </summary>
 15    public partial class SparkSessionOptions
 16    {
 17        /// <summary> Initializes a new instance of SparkSessionOptions. </summary>
 18        /// <param name="name"> . </param>
 19        /// <exception cref="ArgumentNullException"> <paramref name="name"/> is null. </exception>
 020        public SparkSessionOptions(string name)
 21        {
 022            if (name == null)
 23            {
 024                throw new ArgumentNullException(nameof(name));
 25            }
 26
 027            Tags = new ChangeTrackingDictionary<string, string>();
 028            Name = name;
 029            Arguments = new ChangeTrackingList<string>();
 030            Jars = new ChangeTrackingList<string>();
 031            PythonFiles = new ChangeTrackingList<string>();
 032            Files = new ChangeTrackingList<string>();
 033            Archives = new ChangeTrackingList<string>();
 034            Configuration = new ChangeTrackingDictionary<string, string>();
 035        }
 36
 37        /// <summary> Dictionary of &lt;string&gt;. </summary>
 038        public IDictionary<string, string> Tags { get; }
 039        public string ArtifactId { get; set; }
 040        public string Name { get; }
 041        public string File { get; set; }
 042        public string ClassName { get; set; }
 043        public IList<string> Arguments { get; }
 044        public IList<string> Jars { get; }
 045        public IList<string> PythonFiles { get; }
 046        public IList<string> Files { get; }
 047        public IList<string> Archives { get; }
 48        /// <summary> Dictionary of &lt;string&gt;. </summary>
 049        public IDictionary<string, string> Configuration { get; }
 050        public string DriverMemory { get; set; }
 051        public int? DriverCores { get; set; }
 052        public string ExecutorMemory { get; set; }
 053        public int? ExecutorCores { get; set; }
 054        public int? ExecutorCount { get; set; }
 55    }
 56}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Spark\src\Generated\Models\SparkSessionOptions.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 SparkSessionOptions : 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            if (Optional.IsDefined(File))
 37            {
 038                writer.WritePropertyName("file");
 039                writer.WriteStringValue(File);
 40            }
 041            if (Optional.IsDefined(ClassName))
 42            {
 043                writer.WritePropertyName("className");
 044                writer.WriteStringValue(ClassName);
 45            }
 046            if (Optional.IsCollectionDefined(Arguments))
 47            {
 048                writer.WritePropertyName("args");
 049                writer.WriteStartArray();
 050                foreach (var item in Arguments)
 51                {
 052                    writer.WriteStringValue(item);
 53                }
 054                writer.WriteEndArray();
 55            }
 056            if (Optional.IsCollectionDefined(Jars))
 57            {
 058                writer.WritePropertyName("jars");
 059                writer.WriteStartArray();
 060                foreach (var item in Jars)
 61                {
 062                    writer.WriteStringValue(item);
 63                }
 064                writer.WriteEndArray();
 65            }
 066            if (Optional.IsCollectionDefined(PythonFiles))
 67            {
 068                writer.WritePropertyName("pyFiles");
 069                writer.WriteStartArray();
 070                foreach (var item in PythonFiles)
 71                {
 072                    writer.WriteStringValue(item);
 73                }
 074                writer.WriteEndArray();
 75            }
 076            if (Optional.IsCollectionDefined(Files))
 77            {
 078                writer.WritePropertyName("files");
 079                writer.WriteStartArray();
 080                foreach (var item in Files)
 81                {
 082                    writer.WriteStringValue(item);
 83                }
 084                writer.WriteEndArray();
 85            }
 086            if (Optional.IsCollectionDefined(Archives))
 87            {
 088                writer.WritePropertyName("archives");
 089                writer.WriteStartArray();
 090                foreach (var item in Archives)
 91                {
 092                    writer.WriteStringValue(item);
 93                }
 094                writer.WriteEndArray();
 95            }
 096            if (Optional.IsCollectionDefined(Configuration))
 97            {
 098                writer.WritePropertyName("conf");
 099                writer.WriteStartObject();
 0100                foreach (var item in Configuration)
 101                {
 0102                    writer.WritePropertyName(item.Key);
 0103                    writer.WriteStringValue(item.Value);
 104                }
 0105                writer.WriteEndObject();
 106            }
 0107            if (Optional.IsDefined(DriverMemory))
 108            {
 0109                writer.WritePropertyName("driverMemory");
 0110                writer.WriteStringValue(DriverMemory);
 111            }
 0112            if (Optional.IsDefined(DriverCores))
 113            {
 0114                writer.WritePropertyName("driverCores");
 0115                writer.WriteNumberValue(DriverCores.Value);
 116            }
 0117            if (Optional.IsDefined(ExecutorMemory))
 118            {
 0119                writer.WritePropertyName("executorMemory");
 0120                writer.WriteStringValue(ExecutorMemory);
 121            }
 0122            if (Optional.IsDefined(ExecutorCores))
 123            {
 0124                writer.WritePropertyName("executorCores");
 0125                writer.WriteNumberValue(ExecutorCores.Value);
 126            }
 0127            if (Optional.IsDefined(ExecutorCount))
 128            {
 0129                writer.WritePropertyName("numExecutors");
 0130                writer.WriteNumberValue(ExecutorCount.Value);
 131            }
 0132            writer.WriteEndObject();
 0133        }
 134    }
 135}