< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_ScriptPath()-0%100%
get_ScriptLinkedService()-0%100%
get_DegreeOfParallelism()-0%100%
get_Priority()-0%100%
get_Parameters()-0%100%
get_RuntimeVersion()-0%100%
get_CompilationMode()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeDataLakeAnalyticsUsqlActivity(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\DataLakeAnalyticsUsqlActivity.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.Artifacts.Models
 13{
 14    /// <summary> Data Lake Analytics U-SQL activity. </summary>
 15    public partial class DataLakeAnalyticsUsqlActivity : ExecutionActivity
 16    {
 17        /// <summary> Initializes a new instance of DataLakeAnalyticsUsqlActivity. </summary>
 18        /// <param name="name"> Activity name. </param>
 19        /// <param name="scriptPath"> Case-sensitive path to folder that contains the U-SQL script. Type: string (or Exp
 20        /// <param name="scriptLinkedService"> Script linked service reference. </param>
 21        /// <exception cref="ArgumentNullException"> <paramref name="name"/>, <paramref name="scriptPath"/>, or <paramre
 022        public DataLakeAnalyticsUsqlActivity(string name, object scriptPath, LinkedServiceReference scriptLinkedService)
 23        {
 024            if (name == null)
 25            {
 026                throw new ArgumentNullException(nameof(name));
 27            }
 028            if (scriptPath == null)
 29            {
 030                throw new ArgumentNullException(nameof(scriptPath));
 31            }
 032            if (scriptLinkedService == null)
 33            {
 034                throw new ArgumentNullException(nameof(scriptLinkedService));
 35            }
 36
 037            ScriptPath = scriptPath;
 038            ScriptLinkedService = scriptLinkedService;
 039            Parameters = new ChangeTrackingDictionary<string, object>();
 040            Type = "DataLakeAnalyticsU-SQL";
 041        }
 42
 43        /// <summary> Initializes a new instance of DataLakeAnalyticsUsqlActivity. </summary>
 44        /// <param name="name"> Activity name. </param>
 45        /// <param name="type"> Type of activity. </param>
 46        /// <param name="description"> Activity description. </param>
 47        /// <param name="dependsOn"> Activity depends on condition. </param>
 48        /// <param name="userProperties"> Activity user properties. </param>
 49        /// <param name="additionalProperties"> . </param>
 50        /// <param name="linkedServiceName"> Linked service reference. </param>
 51        /// <param name="policy"> Activity policy. </param>
 52        /// <param name="scriptPath"> Case-sensitive path to folder that contains the U-SQL script. Type: string (or Exp
 53        /// <param name="scriptLinkedService"> Script linked service reference. </param>
 54        /// <param name="degreeOfParallelism"> The maximum number of nodes simultaneously used to run the job. Default v
 55        /// <param name="priority"> Determines which jobs out of all that are queued should be selected to run first. Th
 56        /// <param name="parameters"> Parameters for U-SQL job request. </param>
 57        /// <param name="runtimeVersion"> Runtime version of the U-SQL engine to use. Type: string (or Expression with r
 58        /// <param name="compilationMode"> Compilation mode of U-SQL. Must be one of these values : Semantic, Full and S
 059        internal DataLakeAnalyticsUsqlActivity(string name, string type, string description, IList<ActivityDependency> d
 60        {
 061            ScriptPath = scriptPath;
 062            ScriptLinkedService = scriptLinkedService;
 063            DegreeOfParallelism = degreeOfParallelism;
 064            Priority = priority;
 065            Parameters = parameters;
 066            RuntimeVersion = runtimeVersion;
 067            CompilationMode = compilationMode;
 068            Type = type ?? "DataLakeAnalyticsU-SQL";
 069        }
 70
 71        /// <summary> Case-sensitive path to folder that contains the U-SQL script. Type: string (or Expression with res
 072        public object ScriptPath { get; set; }
 73        /// <summary> Script linked service reference. </summary>
 074        public LinkedServiceReference ScriptLinkedService { get; set; }
 75        /// <summary> The maximum number of nodes simultaneously used to run the job. Default value is 1. Type: integer 
 076        public object DegreeOfParallelism { get; set; }
 77        /// <summary> Determines which jobs out of all that are queued should be selected to run first. The lower the nu
 078        public object Priority { get; set; }
 79        /// <summary> Parameters for U-SQL job request. </summary>
 080        public IDictionary<string, object> Parameters { get; }
 81        /// <summary> Runtime version of the U-SQL engine to use. Type: string (or Expression with resultType string). <
 082        public object RuntimeVersion { get; set; }
 83        /// <summary> Compilation mode of U-SQL. Must be one of these values : Semantic, Full and SingleBox. Type: strin
 084        public object CompilationMode { get; set; }
 85    }
 86}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\DataLakeAnalyticsUsqlActivity.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 DataLakeAnalyticsUsqlActivity : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Optional.IsDefined(LinkedServiceName))
 20            {
 021                writer.WritePropertyName("linkedServiceName");
 022                writer.WriteObjectValue(LinkedServiceName);
 23            }
 024            if (Optional.IsDefined(Policy))
 25            {
 026                writer.WritePropertyName("policy");
 027                writer.WriteObjectValue(Policy);
 28            }
 029            writer.WritePropertyName("name");
 030            writer.WriteStringValue(Name);
 031            writer.WritePropertyName("type");
 032            writer.WriteStringValue(Type);
 033            if (Optional.IsDefined(Description))
 34            {
 035                writer.WritePropertyName("description");
 036                writer.WriteStringValue(Description);
 37            }
 038            if (Optional.IsCollectionDefined(DependsOn))
 39            {
 040                writer.WritePropertyName("dependsOn");
 041                writer.WriteStartArray();
 042                foreach (var item in DependsOn)
 43                {
 044                    writer.WriteObjectValue(item);
 45                }
 046                writer.WriteEndArray();
 47            }
 048            if (Optional.IsCollectionDefined(UserProperties))
 49            {
 050                writer.WritePropertyName("userProperties");
 051                writer.WriteStartArray();
 052                foreach (var item in UserProperties)
 53                {
 054                    writer.WriteObjectValue(item);
 55                }
 056                writer.WriteEndArray();
 57            }
 058            writer.WritePropertyName("typeProperties");
 059            writer.WriteStartObject();
 060            writer.WritePropertyName("scriptPath");
 061            writer.WriteObjectValue(ScriptPath);
 062            writer.WritePropertyName("scriptLinkedService");
 063            writer.WriteObjectValue(ScriptLinkedService);
 064            if (Optional.IsDefined(DegreeOfParallelism))
 65            {
 066                writer.WritePropertyName("degreeOfParallelism");
 067                writer.WriteObjectValue(DegreeOfParallelism);
 68            }
 069            if (Optional.IsDefined(Priority))
 70            {
 071                writer.WritePropertyName("priority");
 072                writer.WriteObjectValue(Priority);
 73            }
 074            if (Optional.IsCollectionDefined(Parameters))
 75            {
 076                writer.WritePropertyName("parameters");
 077                writer.WriteStartObject();
 078                foreach (var item in Parameters)
 79                {
 080                    writer.WritePropertyName(item.Key);
 081                    writer.WriteObjectValue(item.Value);
 82                }
 083                writer.WriteEndObject();
 84            }
 085            if (Optional.IsDefined(RuntimeVersion))
 86            {
 087                writer.WritePropertyName("runtimeVersion");
 088                writer.WriteObjectValue(RuntimeVersion);
 89            }
 090            if (Optional.IsDefined(CompilationMode))
 91            {
 092                writer.WritePropertyName("compilationMode");
 093                writer.WriteObjectValue(CompilationMode);
 94            }
 095            writer.WriteEndObject();
 096            foreach (var item in AdditionalProperties)
 97            {
 098                writer.WritePropertyName(item.Key);
 099                writer.WriteObjectValue(item.Value);
 100            }
 0101            writer.WriteEndObject();
 0102        }
 103
 104        internal static DataLakeAnalyticsUsqlActivity DeserializeDataLakeAnalyticsUsqlActivity(JsonElement element)
 105        {
 0106            Optional<LinkedServiceReference> linkedServiceName = default;
 0107            Optional<ActivityPolicy> policy = default;
 0108            string name = default;
 0109            string type = default;
 0110            Optional<string> description = default;
 0111            Optional<IList<ActivityDependency>> dependsOn = default;
 0112            Optional<IList<UserProperty>> userProperties = default;
 0113            object scriptPath = default;
 0114            LinkedServiceReference scriptLinkedService = default;
 0115            Optional<object> degreeOfParallelism = default;
 0116            Optional<object> priority = default;
 0117            Optional<IDictionary<string, object>> parameters = default;
 0118            Optional<object> runtimeVersion = default;
 0119            Optional<object> compilationMode = default;
 0120            IDictionary<string, object> additionalProperties = default;
 0121            Dictionary<string, object> additionalPropertiesDictionary = default;
 0122            foreach (var property in element.EnumerateObject())
 123            {
 0124                if (property.NameEquals("linkedServiceName"))
 125                {
 0126                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
 0127                    continue;
 128                }
 0129                if (property.NameEquals("policy"))
 130                {
 0131                    policy = ActivityPolicy.DeserializeActivityPolicy(property.Value);
 0132                    continue;
 133                }
 0134                if (property.NameEquals("name"))
 135                {
 0136                    name = property.Value.GetString();
 0137                    continue;
 138                }
 0139                if (property.NameEquals("type"))
 140                {
 0141                    type = property.Value.GetString();
 0142                    continue;
 143                }
 0144                if (property.NameEquals("description"))
 145                {
 0146                    description = property.Value.GetString();
 0147                    continue;
 148                }
 0149                if (property.NameEquals("dependsOn"))
 150                {
 0151                    List<ActivityDependency> array = new List<ActivityDependency>();
 0152                    foreach (var item in property.Value.EnumerateArray())
 153                    {
 0154                        array.Add(ActivityDependency.DeserializeActivityDependency(item));
 155                    }
 0156                    dependsOn = array;
 0157                    continue;
 158                }
 0159                if (property.NameEquals("userProperties"))
 160                {
 0161                    List<UserProperty> array = new List<UserProperty>();
 0162                    foreach (var item in property.Value.EnumerateArray())
 163                    {
 0164                        array.Add(UserProperty.DeserializeUserProperty(item));
 165                    }
 0166                    userProperties = array;
 0167                    continue;
 168                }
 0169                if (property.NameEquals("typeProperties"))
 170                {
 0171                    foreach (var property0 in property.Value.EnumerateObject())
 172                    {
 0173                        if (property0.NameEquals("scriptPath"))
 174                        {
 0175                            scriptPath = property0.Value.GetObject();
 0176                            continue;
 177                        }
 0178                        if (property0.NameEquals("scriptLinkedService"))
 179                        {
 0180                            scriptLinkedService = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Val
 0181                            continue;
 182                        }
 0183                        if (property0.NameEquals("degreeOfParallelism"))
 184                        {
 0185                            degreeOfParallelism = property0.Value.GetObject();
 0186                            continue;
 187                        }
 0188                        if (property0.NameEquals("priority"))
 189                        {
 0190                            priority = property0.Value.GetObject();
 0191                            continue;
 192                        }
 0193                        if (property0.NameEquals("parameters"))
 194                        {
 0195                            Dictionary<string, object> dictionary = new Dictionary<string, object>();
 0196                            foreach (var property1 in property0.Value.EnumerateObject())
 197                            {
 0198                                dictionary.Add(property1.Name, property1.Value.GetObject());
 199                            }
 0200                            parameters = dictionary;
 0201                            continue;
 202                        }
 0203                        if (property0.NameEquals("runtimeVersion"))
 204                        {
 0205                            runtimeVersion = property0.Value.GetObject();
 0206                            continue;
 207                        }
 0208                        if (property0.NameEquals("compilationMode"))
 209                        {
 0210                            compilationMode = property0.Value.GetObject();
 211                            continue;
 212                        }
 213                    }
 214                    continue;
 215                }
 0216                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0217                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 218            }
 0219            additionalProperties = additionalPropertiesDictionary;
 0220            return new DataLakeAnalyticsUsqlActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional
 221        }
 222    }
 223}