< Summary

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

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_Mapper()-0%100%
get_Reducer()-0%100%
get_Input()-0%100%
get_Output()-0%100%
get_FilePaths()-0%100%
get_FileLinkedService()-0%100%
get_Combiner()-0%100%
get_CommandEnvironment()-0%100%
get_Defines()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeHDInsightStreamingActivity(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\HDInsightStreamingActivity.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 System.Linq;
 11using Azure.Core;
 12
 13namespace Azure.Analytics.Synapse.Artifacts.Models
 14{
 15    /// <summary> HDInsight streaming activity type. </summary>
 16    public partial class HDInsightStreamingActivity : ExecutionActivity
 17    {
 18        /// <summary> Initializes a new instance of HDInsightStreamingActivity. </summary>
 19        /// <param name="name"> Activity name. </param>
 20        /// <param name="mapper"> Mapper executable name. Type: string (or Expression with resultType string). </param>
 21        /// <param name="reducer"> Reducer executable name. Type: string (or Expression with resultType string). </param
 22        /// <param name="input"> Input blob path. Type: string (or Expression with resultType string). </param>
 23        /// <param name="output"> Output blob path. Type: string (or Expression with resultType string). </param>
 24        /// <param name="filePaths"> Paths to streaming job files. Can be directories. </param>
 25        /// <exception cref="ArgumentNullException"> <paramref name="name"/>, <paramref name="mapper"/>, <paramref name=
 026        public HDInsightStreamingActivity(string name, object mapper, object reducer, object input, object output, IEnum
 27        {
 028            if (name == null)
 29            {
 030                throw new ArgumentNullException(nameof(name));
 31            }
 032            if (mapper == null)
 33            {
 034                throw new ArgumentNullException(nameof(mapper));
 35            }
 036            if (reducer == null)
 37            {
 038                throw new ArgumentNullException(nameof(reducer));
 39            }
 040            if (input == null)
 41            {
 042                throw new ArgumentNullException(nameof(input));
 43            }
 044            if (output == null)
 45            {
 046                throw new ArgumentNullException(nameof(output));
 47            }
 048            if (filePaths == null)
 49            {
 050                throw new ArgumentNullException(nameof(filePaths));
 51            }
 52
 053            StorageLinkedServices = new ChangeTrackingList<LinkedServiceReference>();
 054            Arguments = new ChangeTrackingList<object>();
 055            Mapper = mapper;
 056            Reducer = reducer;
 057            Input = input;
 058            Output = output;
 059            FilePaths = filePaths.ToList();
 060            CommandEnvironment = new ChangeTrackingList<object>();
 061            Defines = new ChangeTrackingDictionary<string, object>();
 062            Type = "HDInsightStreaming";
 063        }
 64
 65        /// <summary> Initializes a new instance of HDInsightStreamingActivity. </summary>
 66        /// <param name="name"> Activity name. </param>
 67        /// <param name="type"> Type of activity. </param>
 68        /// <param name="description"> Activity description. </param>
 69        /// <param name="dependsOn"> Activity depends on condition. </param>
 70        /// <param name="userProperties"> Activity user properties. </param>
 71        /// <param name="additionalProperties"> . </param>
 72        /// <param name="linkedServiceName"> Linked service reference. </param>
 73        /// <param name="policy"> Activity policy. </param>
 74        /// <param name="storageLinkedServices"> Storage linked service references. </param>
 75        /// <param name="arguments"> User specified arguments to HDInsightActivity. </param>
 76        /// <param name="getDebugInfo"> Debug info option. </param>
 77        /// <param name="mapper"> Mapper executable name. Type: string (or Expression with resultType string). </param>
 78        /// <param name="reducer"> Reducer executable name. Type: string (or Expression with resultType string). </param
 79        /// <param name="input"> Input blob path. Type: string (or Expression with resultType string). </param>
 80        /// <param name="output"> Output blob path. Type: string (or Expression with resultType string). </param>
 81        /// <param name="filePaths"> Paths to streaming job files. Can be directories. </param>
 82        /// <param name="fileLinkedService"> Linked service reference where the files are located. </param>
 83        /// <param name="combiner"> Combiner executable name. Type: string (or Expression with resultType string). </par
 84        /// <param name="commandEnvironment"> Command line environment values. </param>
 85        /// <param name="defines"> Allows user to specify defines for streaming job request. </param>
 086        internal HDInsightStreamingActivity(string name, string type, string description, IList<ActivityDependency> depe
 87        {
 088            StorageLinkedServices = storageLinkedServices;
 089            Arguments = arguments;
 090            GetDebugInfo = getDebugInfo;
 091            Mapper = mapper;
 092            Reducer = reducer;
 093            Input = input;
 094            Output = output;
 095            FilePaths = filePaths;
 096            FileLinkedService = fileLinkedService;
 097            Combiner = combiner;
 098            CommandEnvironment = commandEnvironment;
 099            Defines = defines;
 0100            Type = type ?? "HDInsightStreaming";
 0101        }
 102
 103        /// <summary> Storage linked service references. </summary>
 0104        public IList<LinkedServiceReference> StorageLinkedServices { get; }
 105        /// <summary> User specified arguments to HDInsightActivity. </summary>
 0106        public IList<object> Arguments { get; }
 107        /// <summary> Debug info option. </summary>
 0108        public HDInsightActivityDebugInfoOption? GetDebugInfo { get; set; }
 109        /// <summary> Mapper executable name. Type: string (or Expression with resultType string). </summary>
 0110        public object Mapper { get; set; }
 111        /// <summary> Reducer executable name. Type: string (or Expression with resultType string). </summary>
 0112        public object Reducer { get; set; }
 113        /// <summary> Input blob path. Type: string (or Expression with resultType string). </summary>
 0114        public object Input { get; set; }
 115        /// <summary> Output blob path. Type: string (or Expression with resultType string). </summary>
 0116        public object Output { get; set; }
 117        /// <summary> Paths to streaming job files. Can be directories. </summary>
 0118        public IList<object> FilePaths { get; }
 119        /// <summary> Linked service reference where the files are located. </summary>
 0120        public LinkedServiceReference FileLinkedService { get; set; }
 121        /// <summary> Combiner executable name. Type: string (or Expression with resultType string). </summary>
 0122        public object Combiner { get; set; }
 123        /// <summary> Command line environment values. </summary>
 0124        public IList<object> CommandEnvironment { get; }
 125        /// <summary> Allows user to specify defines for streaming job request. </summary>
 0126        public IDictionary<string, object> Defines { get; }
 127    }
 128}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\HDInsightStreamingActivity.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 HDInsightStreamingActivity : 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("mapper");
 086            writer.WriteObjectValue(Mapper);
 087            writer.WritePropertyName("reducer");
 088            writer.WriteObjectValue(Reducer);
 089            writer.WritePropertyName("input");
 090            writer.WriteObjectValue(Input);
 091            writer.WritePropertyName("output");
 092            writer.WriteObjectValue(Output);
 093            writer.WritePropertyName("filePaths");
 094            writer.WriteStartArray();
 095            foreach (var item in FilePaths)
 96            {
 097                writer.WriteObjectValue(item);
 98            }
 099            writer.WriteEndArray();
 0100            if (Optional.IsDefined(FileLinkedService))
 101            {
 0102                writer.WritePropertyName("fileLinkedService");
 0103                writer.WriteObjectValue(FileLinkedService);
 104            }
 0105            if (Optional.IsDefined(Combiner))
 106            {
 0107                writer.WritePropertyName("combiner");
 0108                writer.WriteObjectValue(Combiner);
 109            }
 0110            if (Optional.IsCollectionDefined(CommandEnvironment))
 111            {
 0112                writer.WritePropertyName("commandEnvironment");
 0113                writer.WriteStartArray();
 0114                foreach (var item in CommandEnvironment)
 115                {
 0116                    writer.WriteObjectValue(item);
 117                }
 0118                writer.WriteEndArray();
 119            }
 0120            if (Optional.IsCollectionDefined(Defines))
 121            {
 0122                writer.WritePropertyName("defines");
 0123                writer.WriteStartObject();
 0124                foreach (var item in Defines)
 125                {
 0126                    writer.WritePropertyName(item.Key);
 0127                    writer.WriteObjectValue(item.Value);
 128                }
 0129                writer.WriteEndObject();
 130            }
 0131            writer.WriteEndObject();
 0132            foreach (var item in AdditionalProperties)
 133            {
 0134                writer.WritePropertyName(item.Key);
 0135                writer.WriteObjectValue(item.Value);
 136            }
 0137            writer.WriteEndObject();
 0138        }
 139
 140        internal static HDInsightStreamingActivity DeserializeHDInsightStreamingActivity(JsonElement element)
 141        {
 0142            Optional<LinkedServiceReference> linkedServiceName = default;
 0143            Optional<ActivityPolicy> policy = default;
 0144            string name = default;
 0145            string type = default;
 0146            Optional<string> description = default;
 0147            Optional<IList<ActivityDependency>> dependsOn = default;
 0148            Optional<IList<UserProperty>> userProperties = default;
 0149            Optional<IList<LinkedServiceReference>> storageLinkedServices = default;
 0150            Optional<IList<object>> arguments = default;
 0151            Optional<HDInsightActivityDebugInfoOption> getDebugInfo = default;
 0152            object mapper = default;
 0153            object reducer = default;
 0154            object input = default;
 0155            object output = default;
 0156            IList<object> filePaths = default;
 0157            Optional<LinkedServiceReference> fileLinkedService = default;
 0158            Optional<object> combiner = default;
 0159            Optional<IList<object>> commandEnvironment = default;
 0160            Optional<IDictionary<string, object>> defines = default;
 0161            IDictionary<string, object> additionalProperties = default;
 0162            Dictionary<string, object> additionalPropertiesDictionary = default;
 0163            foreach (var property in element.EnumerateObject())
 164            {
 0165                if (property.NameEquals("linkedServiceName"))
 166                {
 0167                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
 0168                    continue;
 169                }
 0170                if (property.NameEquals("policy"))
 171                {
 0172                    policy = ActivityPolicy.DeserializeActivityPolicy(property.Value);
 0173                    continue;
 174                }
 0175                if (property.NameEquals("name"))
 176                {
 0177                    name = property.Value.GetString();
 0178                    continue;
 179                }
 0180                if (property.NameEquals("type"))
 181                {
 0182                    type = property.Value.GetString();
 0183                    continue;
 184                }
 0185                if (property.NameEquals("description"))
 186                {
 0187                    description = property.Value.GetString();
 0188                    continue;
 189                }
 0190                if (property.NameEquals("dependsOn"))
 191                {
 0192                    List<ActivityDependency> array = new List<ActivityDependency>();
 0193                    foreach (var item in property.Value.EnumerateArray())
 194                    {
 0195                        array.Add(ActivityDependency.DeserializeActivityDependency(item));
 196                    }
 0197                    dependsOn = array;
 0198                    continue;
 199                }
 0200                if (property.NameEquals("userProperties"))
 201                {
 0202                    List<UserProperty> array = new List<UserProperty>();
 0203                    foreach (var item in property.Value.EnumerateArray())
 204                    {
 0205                        array.Add(UserProperty.DeserializeUserProperty(item));
 206                    }
 0207                    userProperties = array;
 0208                    continue;
 209                }
 0210                if (property.NameEquals("typeProperties"))
 211                {
 0212                    foreach (var property0 in property.Value.EnumerateObject())
 213                    {
 0214                        if (property0.NameEquals("storageLinkedServices"))
 215                        {
 0216                            List<LinkedServiceReference> array = new List<LinkedServiceReference>();
 0217                            foreach (var item in property0.Value.EnumerateArray())
 218                            {
 0219                                array.Add(LinkedServiceReference.DeserializeLinkedServiceReference(item));
 220                            }
 0221                            storageLinkedServices = array;
 0222                            continue;
 223                        }
 0224                        if (property0.NameEquals("arguments"))
 225                        {
 0226                            List<object> array = new List<object>();
 0227                            foreach (var item in property0.Value.EnumerateArray())
 228                            {
 0229                                array.Add(item.GetObject());
 230                            }
 0231                            arguments = array;
 0232                            continue;
 233                        }
 0234                        if (property0.NameEquals("getDebugInfo"))
 235                        {
 0236                            getDebugInfo = new HDInsightActivityDebugInfoOption(property0.Value.GetString());
 0237                            continue;
 238                        }
 0239                        if (property0.NameEquals("mapper"))
 240                        {
 0241                            mapper = property0.Value.GetObject();
 0242                            continue;
 243                        }
 0244                        if (property0.NameEquals("reducer"))
 245                        {
 0246                            reducer = property0.Value.GetObject();
 0247                            continue;
 248                        }
 0249                        if (property0.NameEquals("input"))
 250                        {
 0251                            input = property0.Value.GetObject();
 0252                            continue;
 253                        }
 0254                        if (property0.NameEquals("output"))
 255                        {
 0256                            output = property0.Value.GetObject();
 0257                            continue;
 258                        }
 0259                        if (property0.NameEquals("filePaths"))
 260                        {
 0261                            List<object> array = new List<object>();
 0262                            foreach (var item in property0.Value.EnumerateArray())
 263                            {
 0264                                array.Add(item.GetObject());
 265                            }
 0266                            filePaths = array;
 0267                            continue;
 268                        }
 0269                        if (property0.NameEquals("fileLinkedService"))
 270                        {
 0271                            fileLinkedService = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value
 0272                            continue;
 273                        }
 0274                        if (property0.NameEquals("combiner"))
 275                        {
 0276                            combiner = property0.Value.GetObject();
 0277                            continue;
 278                        }
 0279                        if (property0.NameEquals("commandEnvironment"))
 280                        {
 0281                            List<object> array = new List<object>();
 0282                            foreach (var item in property0.Value.EnumerateArray())
 283                            {
 0284                                array.Add(item.GetObject());
 285                            }
 0286                            commandEnvironment = array;
 0287                            continue;
 288                        }
 0289                        if (property0.NameEquals("defines"))
 290                        {
 0291                            Dictionary<string, object> dictionary = new Dictionary<string, object>();
 0292                            foreach (var property1 in property0.Value.EnumerateObject())
 293                            {
 0294                                dictionary.Add(property1.Name, property1.Value.GetObject());
 295                            }
 0296                            defines = dictionary;
 297                            continue;
 298                        }
 299                    }
 300                    continue;
 301                }
 0302                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0303                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 304            }
 0305            additionalProperties = additionalPropertiesDictionary;
 0306            return new HDInsightStreamingActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.To
 307        }
 308    }
 309}