< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_StorageLinkedServices()-0%100%
get_Arguments()-0%100%
get_GetDebugInfo()-0%100%
get_ClassName()-0%100%
get_JarFilePath()-0%100%
get_JarLinkedService()-0%100%
get_JarLibs()-0%100%
get_Defines()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeHDInsightMapReduceActivity(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\HDInsightMapReduceActivity.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> HDInsight MapReduce activity type. </summary>
 15    public partial class HDInsightMapReduceActivity : ExecutionActivity
 16    {
 17        /// <summary> Initializes a new instance of HDInsightMapReduceActivity. </summary>
 18        /// <param name="name"> Activity name. </param>
 19        /// <param name="className"> Class name. Type: string (or Expression with resultType string). </param>
 20        /// <param name="jarFilePath"> Jar path. Type: string (or Expression with resultType string). </param>
 21        /// <exception cref="ArgumentNullException"> <paramref name="name"/>, <paramref name="className"/>, or <paramref
 022        public HDInsightMapReduceActivity(string name, object className, object jarFilePath) : base(name)
 23        {
 024            if (name == null)
 25            {
 026                throw new ArgumentNullException(nameof(name));
 27            }
 028            if (className == null)
 29            {
 030                throw new ArgumentNullException(nameof(className));
 31            }
 032            if (jarFilePath == null)
 33            {
 034                throw new ArgumentNullException(nameof(jarFilePath));
 35            }
 36
 037            StorageLinkedServices = new ChangeTrackingList<LinkedServiceReference>();
 038            Arguments = new ChangeTrackingList<object>();
 039            ClassName = className;
 040            JarFilePath = jarFilePath;
 041            JarLibs = new ChangeTrackingList<object>();
 042            Defines = new ChangeTrackingDictionary<string, object>();
 043            Type = "HDInsightMapReduce";
 044        }
 45
 46        /// <summary> Initializes a new instance of HDInsightMapReduceActivity. </summary>
 47        /// <param name="name"> Activity name. </param>
 48        /// <param name="type"> Type of activity. </param>
 49        /// <param name="description"> Activity description. </param>
 50        /// <param name="dependsOn"> Activity depends on condition. </param>
 51        /// <param name="userProperties"> Activity user properties. </param>
 52        /// <param name="additionalProperties"> . </param>
 53        /// <param name="linkedServiceName"> Linked service reference. </param>
 54        /// <param name="policy"> Activity policy. </param>
 55        /// <param name="storageLinkedServices"> Storage linked service references. </param>
 56        /// <param name="arguments"> User specified arguments to HDInsightActivity. </param>
 57        /// <param name="getDebugInfo"> Debug info option. </param>
 58        /// <param name="className"> Class name. Type: string (or Expression with resultType string). </param>
 59        /// <param name="jarFilePath"> Jar path. Type: string (or Expression with resultType string). </param>
 60        /// <param name="jarLinkedService"> Jar linked service reference. </param>
 61        /// <param name="jarLibs"> Jar libs. </param>
 62        /// <param name="defines"> Allows user to specify defines for the MapReduce job request. </param>
 063        internal HDInsightMapReduceActivity(string name, string type, string description, IList<ActivityDependency> depe
 64        {
 065            StorageLinkedServices = storageLinkedServices;
 066            Arguments = arguments;
 067            GetDebugInfo = getDebugInfo;
 068            ClassName = className;
 069            JarFilePath = jarFilePath;
 070            JarLinkedService = jarLinkedService;
 071            JarLibs = jarLibs;
 072            Defines = defines;
 073            Type = type ?? "HDInsightMapReduce";
 074        }
 75
 76        /// <summary> Storage linked service references. </summary>
 077        public IList<LinkedServiceReference> StorageLinkedServices { get; }
 78        /// <summary> User specified arguments to HDInsightActivity. </summary>
 079        public IList<object> Arguments { get; }
 80        /// <summary> Debug info option. </summary>
 081        public HDInsightActivityDebugInfoOption? GetDebugInfo { get; set; }
 82        /// <summary> Class name. Type: string (or Expression with resultType string). </summary>
 083        public object ClassName { get; set; }
 84        /// <summary> Jar path. Type: string (or Expression with resultType string). </summary>
 085        public object JarFilePath { get; set; }
 86        /// <summary> Jar linked service reference. </summary>
 087        public LinkedServiceReference JarLinkedService { get; set; }
 88        /// <summary> Jar libs. </summary>
 089        public IList<object> JarLibs { get; }
 90        /// <summary> Allows user to specify defines for the MapReduce job request. </summary>
 091        public IDictionary<string, object> Defines { get; }
 92    }
 93}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\HDInsightMapReduceActivity.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 HDInsightMapReduceActivity : 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            if (Optional.IsCollectionDefined(StorageLinkedServices))
 61            {
 062                writer.WritePropertyName("storageLinkedServices");
 063                writer.WriteStartArray();
 064                foreach (var item in StorageLinkedServices)
 65                {
 066                    writer.WriteObjectValue(item);
 67                }
 068                writer.WriteEndArray();
 69            }
 070            if (Optional.IsCollectionDefined(Arguments))
 71            {
 072                writer.WritePropertyName("arguments");
 073                writer.WriteStartArray();
 074                foreach (var item in Arguments)
 75                {
 076                    writer.WriteObjectValue(item);
 77                }
 078                writer.WriteEndArray();
 79            }
 080            if (Optional.IsDefined(GetDebugInfo))
 81            {
 082                writer.WritePropertyName("getDebugInfo");
 083                writer.WriteStringValue(GetDebugInfo.Value.ToString());
 84            }
 085            writer.WritePropertyName("className");
 086            writer.WriteObjectValue(ClassName);
 087            writer.WritePropertyName("jarFilePath");
 088            writer.WriteObjectValue(JarFilePath);
 089            if (Optional.IsDefined(JarLinkedService))
 90            {
 091                writer.WritePropertyName("jarLinkedService");
 092                writer.WriteObjectValue(JarLinkedService);
 93            }
 094            if (Optional.IsCollectionDefined(JarLibs))
 95            {
 096                writer.WritePropertyName("jarLibs");
 097                writer.WriteStartArray();
 098                foreach (var item in JarLibs)
 99                {
 0100                    writer.WriteObjectValue(item);
 101                }
 0102                writer.WriteEndArray();
 103            }
 0104            if (Optional.IsCollectionDefined(Defines))
 105            {
 0106                writer.WritePropertyName("defines");
 0107                writer.WriteStartObject();
 0108                foreach (var item in Defines)
 109                {
 0110                    writer.WritePropertyName(item.Key);
 0111                    writer.WriteObjectValue(item.Value);
 112                }
 0113                writer.WriteEndObject();
 114            }
 0115            writer.WriteEndObject();
 0116            foreach (var item in AdditionalProperties)
 117            {
 0118                writer.WritePropertyName(item.Key);
 0119                writer.WriteObjectValue(item.Value);
 120            }
 0121            writer.WriteEndObject();
 0122        }
 123
 124        internal static HDInsightMapReduceActivity DeserializeHDInsightMapReduceActivity(JsonElement element)
 125        {
 0126            Optional<LinkedServiceReference> linkedServiceName = default;
 0127            Optional<ActivityPolicy> policy = default;
 0128            string name = default;
 0129            string type = default;
 0130            Optional<string> description = default;
 0131            Optional<IList<ActivityDependency>> dependsOn = default;
 0132            Optional<IList<UserProperty>> userProperties = default;
 0133            Optional<IList<LinkedServiceReference>> storageLinkedServices = default;
 0134            Optional<IList<object>> arguments = default;
 0135            Optional<HDInsightActivityDebugInfoOption> getDebugInfo = default;
 0136            object className = default;
 0137            object jarFilePath = default;
 0138            Optional<LinkedServiceReference> jarLinkedService = default;
 0139            Optional<IList<object>> jarLibs = default;
 0140            Optional<IDictionary<string, object>> defines = default;
 0141            IDictionary<string, object> additionalProperties = default;
 0142            Dictionary<string, object> additionalPropertiesDictionary = default;
 0143            foreach (var property in element.EnumerateObject())
 144            {
 0145                if (property.NameEquals("linkedServiceName"))
 146                {
 0147                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
 0148                    continue;
 149                }
 0150                if (property.NameEquals("policy"))
 151                {
 0152                    policy = ActivityPolicy.DeserializeActivityPolicy(property.Value);
 0153                    continue;
 154                }
 0155                if (property.NameEquals("name"))
 156                {
 0157                    name = property.Value.GetString();
 0158                    continue;
 159                }
 0160                if (property.NameEquals("type"))
 161                {
 0162                    type = property.Value.GetString();
 0163                    continue;
 164                }
 0165                if (property.NameEquals("description"))
 166                {
 0167                    description = property.Value.GetString();
 0168                    continue;
 169                }
 0170                if (property.NameEquals("dependsOn"))
 171                {
 0172                    List<ActivityDependency> array = new List<ActivityDependency>();
 0173                    foreach (var item in property.Value.EnumerateArray())
 174                    {
 0175                        array.Add(ActivityDependency.DeserializeActivityDependency(item));
 176                    }
 0177                    dependsOn = array;
 0178                    continue;
 179                }
 0180                if (property.NameEquals("userProperties"))
 181                {
 0182                    List<UserProperty> array = new List<UserProperty>();
 0183                    foreach (var item in property.Value.EnumerateArray())
 184                    {
 0185                        array.Add(UserProperty.DeserializeUserProperty(item));
 186                    }
 0187                    userProperties = array;
 0188                    continue;
 189                }
 0190                if (property.NameEquals("typeProperties"))
 191                {
 0192                    foreach (var property0 in property.Value.EnumerateObject())
 193                    {
 0194                        if (property0.NameEquals("storageLinkedServices"))
 195                        {
 0196                            List<LinkedServiceReference> array = new List<LinkedServiceReference>();
 0197                            foreach (var item in property0.Value.EnumerateArray())
 198                            {
 0199                                array.Add(LinkedServiceReference.DeserializeLinkedServiceReference(item));
 200                            }
 0201                            storageLinkedServices = array;
 0202                            continue;
 203                        }
 0204                        if (property0.NameEquals("arguments"))
 205                        {
 0206                            List<object> array = new List<object>();
 0207                            foreach (var item in property0.Value.EnumerateArray())
 208                            {
 0209                                array.Add(item.GetObject());
 210                            }
 0211                            arguments = array;
 0212                            continue;
 213                        }
 0214                        if (property0.NameEquals("getDebugInfo"))
 215                        {
 0216                            getDebugInfo = new HDInsightActivityDebugInfoOption(property0.Value.GetString());
 0217                            continue;
 218                        }
 0219                        if (property0.NameEquals("className"))
 220                        {
 0221                            className = property0.Value.GetObject();
 0222                            continue;
 223                        }
 0224                        if (property0.NameEquals("jarFilePath"))
 225                        {
 0226                            jarFilePath = property0.Value.GetObject();
 0227                            continue;
 228                        }
 0229                        if (property0.NameEquals("jarLinkedService"))
 230                        {
 0231                            jarLinkedService = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value)
 0232                            continue;
 233                        }
 0234                        if (property0.NameEquals("jarLibs"))
 235                        {
 0236                            List<object> array = new List<object>();
 0237                            foreach (var item in property0.Value.EnumerateArray())
 238                            {
 0239                                array.Add(item.GetObject());
 240                            }
 0241                            jarLibs = array;
 0242                            continue;
 243                        }
 0244                        if (property0.NameEquals("defines"))
 245                        {
 0246                            Dictionary<string, object> dictionary = new Dictionary<string, object>();
 0247                            foreach (var property1 in property0.Value.EnumerateObject())
 248                            {
 0249                                dictionary.Add(property1.Name, property1.Value.GetObject());
 250                            }
 0251                            defines = dictionary;
 252                            continue;
 253                        }
 254                    }
 255                    continue;
 256                }
 0257                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0258                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 259            }
 0260            additionalProperties = additionalPropertiesDictionary;
 0261            return new HDInsightMapReduceActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.To
 262        }
 263    }
 264}