< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_MlPipelineId()-0%100%
get_ExperimentName()-0%100%
get_MlPipelineParameters()-0%100%
get_MlParentRunId()-0%100%
get_ContinueOnStepFailure()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeAzureMLExecutePipelineActivity(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureMLExecutePipelineActivity.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;
 10
 11namespace Azure.Analytics.Synapse.Artifacts.Models
 12{
 13    /// <summary> Azure ML Execute Pipeline activity. </summary>
 14    public partial class AzureMLExecutePipelineActivity : ExecutionActivity
 15    {
 16        /// <summary> Initializes a new instance of AzureMLExecutePipelineActivity. </summary>
 17        /// <param name="name"> Activity name. </param>
 18        /// <param name="mlPipelineId"> ID of the published Azure ML pipeline. Type: string (or Expression with resultTy
 19        /// <exception cref="ArgumentNullException"> <paramref name="name"/> or <paramref name="mlPipelineId"/> is null.
 020        public AzureMLExecutePipelineActivity(string name, object mlPipelineId) : base(name)
 21        {
 022            if (name == null)
 23            {
 024                throw new ArgumentNullException(nameof(name));
 25            }
 026            if (mlPipelineId == null)
 27            {
 028                throw new ArgumentNullException(nameof(mlPipelineId));
 29            }
 30
 031            MlPipelineId = mlPipelineId;
 032            Type = "AzureMLExecutePipeline";
 033        }
 34
 35        /// <summary> Initializes a new instance of AzureMLExecutePipelineActivity. </summary>
 36        /// <param name="name"> Activity name. </param>
 37        /// <param name="type"> Type of activity. </param>
 38        /// <param name="description"> Activity description. </param>
 39        /// <param name="dependsOn"> Activity depends on condition. </param>
 40        /// <param name="userProperties"> Activity user properties. </param>
 41        /// <param name="additionalProperties"> . </param>
 42        /// <param name="linkedServiceName"> Linked service reference. </param>
 43        /// <param name="policy"> Activity policy. </param>
 44        /// <param name="mlPipelineId"> ID of the published Azure ML pipeline. Type: string (or Expression with resultTy
 45        /// <param name="experimentName"> Run history experiment name of the pipeline run. This information will be pass
 46        /// <param name="mlPipelineParameters"> Key,Value pairs to be passed to the published Azure ML pipeline endpoint
 47        /// <param name="mlParentRunId"> The parent Azure ML Service pipeline run id. This information will be passed in
 48        /// <param name="continueOnStepFailure"> Whether to continue execution of other steps in the PipelineRun if a st
 049        internal AzureMLExecutePipelineActivity(string name, string type, string description, IList<ActivityDependency> 
 50        {
 051            MlPipelineId = mlPipelineId;
 052            ExperimentName = experimentName;
 053            MlPipelineParameters = mlPipelineParameters;
 054            MlParentRunId = mlParentRunId;
 055            ContinueOnStepFailure = continueOnStepFailure;
 056            Type = type ?? "AzureMLExecutePipeline";
 057        }
 58
 59        /// <summary> ID of the published Azure ML pipeline. Type: string (or Expression with resultType string). </summ
 060        public object MlPipelineId { get; set; }
 61        /// <summary> Run history experiment name of the pipeline run. This information will be passed in the Experiment
 062        public object ExperimentName { get; set; }
 63        /// <summary> Key,Value pairs to be passed to the published Azure ML pipeline endpoint. Keys must match the name
 064        public object MlPipelineParameters { get; set; }
 65        /// <summary> The parent Azure ML Service pipeline run id. This information will be passed in the ParentRunId pr
 066        public object MlParentRunId { get; set; }
 67        /// <summary> Whether to continue execution of other steps in the PipelineRun if a step fails. This information 
 068        public object ContinueOnStepFailure { get; set; }
 69    }
 70}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureMLExecutePipelineActivity.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 AzureMLExecutePipelineActivity : 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("mlPipelineId");
 061            writer.WriteObjectValue(MlPipelineId);
 062            if (Optional.IsDefined(ExperimentName))
 63            {
 064                writer.WritePropertyName("experimentName");
 065                writer.WriteObjectValue(ExperimentName);
 66            }
 067            if (Optional.IsDefined(MlPipelineParameters))
 68            {
 069                writer.WritePropertyName("mlPipelineParameters");
 070                writer.WriteObjectValue(MlPipelineParameters);
 71            }
 072            if (Optional.IsDefined(MlParentRunId))
 73            {
 074                writer.WritePropertyName("mlParentRunId");
 075                writer.WriteObjectValue(MlParentRunId);
 76            }
 077            if (Optional.IsDefined(ContinueOnStepFailure))
 78            {
 079                writer.WritePropertyName("continueOnStepFailure");
 080                writer.WriteObjectValue(ContinueOnStepFailure);
 81            }
 082            writer.WriteEndObject();
 083            foreach (var item in AdditionalProperties)
 84            {
 085                writer.WritePropertyName(item.Key);
 086                writer.WriteObjectValue(item.Value);
 87            }
 088            writer.WriteEndObject();
 089        }
 90
 91        internal static AzureMLExecutePipelineActivity DeserializeAzureMLExecutePipelineActivity(JsonElement element)
 92        {
 093            Optional<LinkedServiceReference> linkedServiceName = default;
 094            Optional<ActivityPolicy> policy = default;
 095            string name = default;
 096            string type = default;
 097            Optional<string> description = default;
 098            Optional<IList<ActivityDependency>> dependsOn = default;
 099            Optional<IList<UserProperty>> userProperties = default;
 0100            object mlPipelineId = default;
 0101            Optional<object> experimentName = default;
 0102            Optional<object> mlPipelineParameters = default;
 0103            Optional<object> mlParentRunId = default;
 0104            Optional<object> continueOnStepFailure = default;
 0105            IDictionary<string, object> additionalProperties = default;
 0106            Dictionary<string, object> additionalPropertiesDictionary = default;
 0107            foreach (var property in element.EnumerateObject())
 108            {
 0109                if (property.NameEquals("linkedServiceName"))
 110                {
 0111                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
 0112                    continue;
 113                }
 0114                if (property.NameEquals("policy"))
 115                {
 0116                    policy = ActivityPolicy.DeserializeActivityPolicy(property.Value);
 0117                    continue;
 118                }
 0119                if (property.NameEquals("name"))
 120                {
 0121                    name = property.Value.GetString();
 0122                    continue;
 123                }
 0124                if (property.NameEquals("type"))
 125                {
 0126                    type = property.Value.GetString();
 0127                    continue;
 128                }
 0129                if (property.NameEquals("description"))
 130                {
 0131                    description = property.Value.GetString();
 0132                    continue;
 133                }
 0134                if (property.NameEquals("dependsOn"))
 135                {
 0136                    List<ActivityDependency> array = new List<ActivityDependency>();
 0137                    foreach (var item in property.Value.EnumerateArray())
 138                    {
 0139                        array.Add(ActivityDependency.DeserializeActivityDependency(item));
 140                    }
 0141                    dependsOn = array;
 0142                    continue;
 143                }
 0144                if (property.NameEquals("userProperties"))
 145                {
 0146                    List<UserProperty> array = new List<UserProperty>();
 0147                    foreach (var item in property.Value.EnumerateArray())
 148                    {
 0149                        array.Add(UserProperty.DeserializeUserProperty(item));
 150                    }
 0151                    userProperties = array;
 0152                    continue;
 153                }
 0154                if (property.NameEquals("typeProperties"))
 155                {
 0156                    foreach (var property0 in property.Value.EnumerateObject())
 157                    {
 0158                        if (property0.NameEquals("mlPipelineId"))
 159                        {
 0160                            mlPipelineId = property0.Value.GetObject();
 0161                            continue;
 162                        }
 0163                        if (property0.NameEquals("experimentName"))
 164                        {
 0165                            experimentName = property0.Value.GetObject();
 0166                            continue;
 167                        }
 0168                        if (property0.NameEquals("mlPipelineParameters"))
 169                        {
 0170                            mlPipelineParameters = property0.Value.GetObject();
 0171                            continue;
 172                        }
 0173                        if (property0.NameEquals("mlParentRunId"))
 174                        {
 0175                            mlParentRunId = property0.Value.GetObject();
 0176                            continue;
 177                        }
 0178                        if (property0.NameEquals("continueOnStepFailure"))
 179                        {
 0180                            continueOnStepFailure = property0.Value.GetObject();
 181                            continue;
 182                        }
 183                    }
 184                    continue;
 185                }
 0186                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0187                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 188            }
 0189            additionalProperties = additionalPropertiesDictionary;
 0190            return new AzureMLExecutePipelineActivity(name, type, description.Value, Optional.ToList(dependsOn), Optiona
 191        }
 192    }
 193}