< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_GlobalParameters()-0%100%
get_WebServiceOutputs()-0%100%
get_WebServiceInputs()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeAzureMLBatchExecutionActivity(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureMLBatchExecutionActivity.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> Azure ML Batch Execution activity. </summary>
 15    public partial class AzureMLBatchExecutionActivity : ExecutionActivity
 16    {
 17        /// <summary> Initializes a new instance of AzureMLBatchExecutionActivity. </summary>
 18        /// <param name="name"> Activity name. </param>
 19        /// <exception cref="ArgumentNullException"> <paramref name="name"/> is null. </exception>
 020        public AzureMLBatchExecutionActivity(string name) : base(name)
 21        {
 022            if (name == null)
 23            {
 024                throw new ArgumentNullException(nameof(name));
 25            }
 26
 027            GlobalParameters = new ChangeTrackingDictionary<string, object>();
 028            WebServiceOutputs = new ChangeTrackingDictionary<string, AzureMLWebServiceFile>();
 029            WebServiceInputs = new ChangeTrackingDictionary<string, AzureMLWebServiceFile>();
 030            Type = "AzureMLBatchExecution";
 031        }
 32
 33        /// <summary> Initializes a new instance of AzureMLBatchExecutionActivity. </summary>
 34        /// <param name="name"> Activity name. </param>
 35        /// <param name="type"> Type of activity. </param>
 36        /// <param name="description"> Activity description. </param>
 37        /// <param name="dependsOn"> Activity depends on condition. </param>
 38        /// <param name="userProperties"> Activity user properties. </param>
 39        /// <param name="additionalProperties"> . </param>
 40        /// <param name="linkedServiceName"> Linked service reference. </param>
 41        /// <param name="policy"> Activity policy. </param>
 42        /// <param name="globalParameters"> Key,Value pairs to be passed to the Azure ML Batch Execution Service endpoin
 43        /// <param name="webServiceOutputs"> Key,Value pairs, mapping the names of Azure ML endpoint&apos;s Web Service 
 44        /// <param name="webServiceInputs"> Key,Value pairs, mapping the names of Azure ML endpoint&apos;s Web Service I
 045        internal AzureMLBatchExecutionActivity(string name, string type, string description, IList<ActivityDependency> d
 46        {
 047            GlobalParameters = globalParameters;
 048            WebServiceOutputs = webServiceOutputs;
 049            WebServiceInputs = webServiceInputs;
 050            Type = type ?? "AzureMLBatchExecution";
 051        }
 52
 53        /// <summary> Key,Value pairs to be passed to the Azure ML Batch Execution Service endpoint. Keys must match the
 054        public IDictionary<string, object> GlobalParameters { get; }
 55        /// <summary> Key,Value pairs, mapping the names of Azure ML endpoint&apos;s Web Service Outputs to AzureMLWebSe
 056        public IDictionary<string, AzureMLWebServiceFile> WebServiceOutputs { get; }
 57        /// <summary> Key,Value pairs, mapping the names of Azure ML endpoint&apos;s Web Service Inputs to AzureMLWebSer
 058        public IDictionary<string, AzureMLWebServiceFile> WebServiceInputs { get; }
 59    }
 60}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureMLBatchExecutionActivity.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 AzureMLBatchExecutionActivity : 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(GlobalParameters))
 61            {
 062                writer.WritePropertyName("globalParameters");
 063                writer.WriteStartObject();
 064                foreach (var item in GlobalParameters)
 65                {
 066                    writer.WritePropertyName(item.Key);
 067                    writer.WriteObjectValue(item.Value);
 68                }
 069                writer.WriteEndObject();
 70            }
 071            if (Optional.IsCollectionDefined(WebServiceOutputs))
 72            {
 073                writer.WritePropertyName("webServiceOutputs");
 074                writer.WriteStartObject();
 075                foreach (var item in WebServiceOutputs)
 76                {
 077                    writer.WritePropertyName(item.Key);
 078                    writer.WriteObjectValue(item.Value);
 79                }
 080                writer.WriteEndObject();
 81            }
 082            if (Optional.IsCollectionDefined(WebServiceInputs))
 83            {
 084                writer.WritePropertyName("webServiceInputs");
 085                writer.WriteStartObject();
 086                foreach (var item in WebServiceInputs)
 87                {
 088                    writer.WritePropertyName(item.Key);
 089                    writer.WriteObjectValue(item.Value);
 90                }
 091                writer.WriteEndObject();
 92            }
 093            writer.WriteEndObject();
 094            foreach (var item in AdditionalProperties)
 95            {
 096                writer.WritePropertyName(item.Key);
 097                writer.WriteObjectValue(item.Value);
 98            }
 099            writer.WriteEndObject();
 0100        }
 101
 102        internal static AzureMLBatchExecutionActivity DeserializeAzureMLBatchExecutionActivity(JsonElement element)
 103        {
 0104            Optional<LinkedServiceReference> linkedServiceName = default;
 0105            Optional<ActivityPolicy> policy = default;
 0106            string name = default;
 0107            string type = default;
 0108            Optional<string> description = default;
 0109            Optional<IList<ActivityDependency>> dependsOn = default;
 0110            Optional<IList<UserProperty>> userProperties = default;
 0111            Optional<IDictionary<string, object>> globalParameters = default;
 0112            Optional<IDictionary<string, AzureMLWebServiceFile>> webServiceOutputs = default;
 0113            Optional<IDictionary<string, AzureMLWebServiceFile>> webServiceInputs = default;
 0114            IDictionary<string, object> additionalProperties = default;
 0115            Dictionary<string, object> additionalPropertiesDictionary = default;
 0116            foreach (var property in element.EnumerateObject())
 117            {
 0118                if (property.NameEquals("linkedServiceName"))
 119                {
 0120                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
 0121                    continue;
 122                }
 0123                if (property.NameEquals("policy"))
 124                {
 0125                    policy = ActivityPolicy.DeserializeActivityPolicy(property.Value);
 0126                    continue;
 127                }
 0128                if (property.NameEquals("name"))
 129                {
 0130                    name = property.Value.GetString();
 0131                    continue;
 132                }
 0133                if (property.NameEquals("type"))
 134                {
 0135                    type = property.Value.GetString();
 0136                    continue;
 137                }
 0138                if (property.NameEquals("description"))
 139                {
 0140                    description = property.Value.GetString();
 0141                    continue;
 142                }
 0143                if (property.NameEquals("dependsOn"))
 144                {
 0145                    List<ActivityDependency> array = new List<ActivityDependency>();
 0146                    foreach (var item in property.Value.EnumerateArray())
 147                    {
 0148                        array.Add(ActivityDependency.DeserializeActivityDependency(item));
 149                    }
 0150                    dependsOn = array;
 0151                    continue;
 152                }
 0153                if (property.NameEquals("userProperties"))
 154                {
 0155                    List<UserProperty> array = new List<UserProperty>();
 0156                    foreach (var item in property.Value.EnumerateArray())
 157                    {
 0158                        array.Add(UserProperty.DeserializeUserProperty(item));
 159                    }
 0160                    userProperties = array;
 0161                    continue;
 162                }
 0163                if (property.NameEquals("typeProperties"))
 164                {
 0165                    foreach (var property0 in property.Value.EnumerateObject())
 166                    {
 0167                        if (property0.NameEquals("globalParameters"))
 168                        {
 0169                            Dictionary<string, object> dictionary = new Dictionary<string, object>();
 0170                            foreach (var property1 in property0.Value.EnumerateObject())
 171                            {
 0172                                dictionary.Add(property1.Name, property1.Value.GetObject());
 173                            }
 0174                            globalParameters = dictionary;
 0175                            continue;
 176                        }
 0177                        if (property0.NameEquals("webServiceOutputs"))
 178                        {
 0179                            Dictionary<string, AzureMLWebServiceFile> dictionary = new Dictionary<string, AzureMLWebServ
 0180                            foreach (var property1 in property0.Value.EnumerateObject())
 181                            {
 0182                                dictionary.Add(property1.Name, AzureMLWebServiceFile.DeserializeAzureMLWebServiceFile(pr
 183                            }
 0184                            webServiceOutputs = dictionary;
 0185                            continue;
 186                        }
 0187                        if (property0.NameEquals("webServiceInputs"))
 188                        {
 0189                            Dictionary<string, AzureMLWebServiceFile> dictionary = new Dictionary<string, AzureMLWebServ
 0190                            foreach (var property1 in property0.Value.EnumerateObject())
 191                            {
 0192                                dictionary.Add(property1.Name, AzureMLWebServiceFile.DeserializeAzureMLWebServiceFile(pr
 193                            }
 0194                            webServiceInputs = dictionary;
 195                            continue;
 196                        }
 197                    }
 198                    continue;
 199                }
 0200                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0201                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 202            }
 0203            additionalProperties = additionalPropertiesDictionary;
 0204            return new AzureMLBatchExecutionActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional
 205        }
 206    }
 207}