< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_Pipeline()-0%100%
get_Parameters()-0%100%
get_WaitOnCompletion()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeExecutePipelineActivity(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\ExecutePipelineActivity.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> Execute pipeline activity. </summary>
 15    public partial class ExecutePipelineActivity : Activity
 16    {
 17        /// <summary> Initializes a new instance of ExecutePipelineActivity. </summary>
 18        /// <param name="name"> Activity name. </param>
 19        /// <param name="pipeline"> Pipeline reference. </param>
 20        /// <exception cref="ArgumentNullException"> <paramref name="name"/> or <paramref name="pipeline"/> is null. </e
 021        public ExecutePipelineActivity(string name, PipelineReference pipeline) : base(name)
 22        {
 023            if (name == null)
 24            {
 025                throw new ArgumentNullException(nameof(name));
 26            }
 027            if (pipeline == null)
 28            {
 029                throw new ArgumentNullException(nameof(pipeline));
 30            }
 31
 032            Pipeline = pipeline;
 033            Parameters = new ChangeTrackingDictionary<string, object>();
 034            Type = "ExecutePipeline";
 035        }
 36
 37        /// <summary> Initializes a new instance of ExecutePipelineActivity. </summary>
 38        /// <param name="name"> Activity name. </param>
 39        /// <param name="type"> Type of activity. </param>
 40        /// <param name="description"> Activity description. </param>
 41        /// <param name="dependsOn"> Activity depends on condition. </param>
 42        /// <param name="userProperties"> Activity user properties. </param>
 43        /// <param name="additionalProperties"> . </param>
 44        /// <param name="pipeline"> Pipeline reference. </param>
 45        /// <param name="parameters"> Pipeline parameters. </param>
 46        /// <param name="waitOnCompletion"> Defines whether activity execution will wait for the dependent pipeline exec
 047        internal ExecutePipelineActivity(string name, string type, string description, IList<ActivityDependency> depends
 48        {
 049            Pipeline = pipeline;
 050            Parameters = parameters;
 051            WaitOnCompletion = waitOnCompletion;
 052            Type = type ?? "ExecutePipeline";
 053        }
 54
 55        /// <summary> Pipeline reference. </summary>
 056        public PipelineReference Pipeline { get; set; }
 57        /// <summary> Pipeline parameters. </summary>
 058        public IDictionary<string, object> Parameters { get; }
 59        /// <summary> Defines whether activity execution will wait for the dependent pipeline execution to finish. Defau
 060        public bool? WaitOnCompletion { get; set; }
 61    }
 62}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\ExecutePipelineActivity.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 ExecutePipelineActivity : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            writer.WritePropertyName("name");
 020            writer.WriteStringValue(Name);
 021            writer.WritePropertyName("type");
 022            writer.WriteStringValue(Type);
 023            if (Optional.IsDefined(Description))
 24            {
 025                writer.WritePropertyName("description");
 026                writer.WriteStringValue(Description);
 27            }
 028            if (Optional.IsCollectionDefined(DependsOn))
 29            {
 030                writer.WritePropertyName("dependsOn");
 031                writer.WriteStartArray();
 032                foreach (var item in DependsOn)
 33                {
 034                    writer.WriteObjectValue(item);
 35                }
 036                writer.WriteEndArray();
 37            }
 038            if (Optional.IsCollectionDefined(UserProperties))
 39            {
 040                writer.WritePropertyName("userProperties");
 041                writer.WriteStartArray();
 042                foreach (var item in UserProperties)
 43                {
 044                    writer.WriteObjectValue(item);
 45                }
 046                writer.WriteEndArray();
 47            }
 048            writer.WritePropertyName("typeProperties");
 049            writer.WriteStartObject();
 050            writer.WritePropertyName("pipeline");
 051            writer.WriteObjectValue(Pipeline);
 052            if (Optional.IsCollectionDefined(Parameters))
 53            {
 054                writer.WritePropertyName("parameters");
 055                writer.WriteStartObject();
 056                foreach (var item in Parameters)
 57                {
 058                    writer.WritePropertyName(item.Key);
 059                    writer.WriteObjectValue(item.Value);
 60                }
 061                writer.WriteEndObject();
 62            }
 063            if (Optional.IsDefined(WaitOnCompletion))
 64            {
 065                writer.WritePropertyName("waitOnCompletion");
 066                writer.WriteBooleanValue(WaitOnCompletion.Value);
 67            }
 068            writer.WriteEndObject();
 069            foreach (var item in AdditionalProperties)
 70            {
 071                writer.WritePropertyName(item.Key);
 072                writer.WriteObjectValue(item.Value);
 73            }
 074            writer.WriteEndObject();
 075        }
 76
 77        internal static ExecutePipelineActivity DeserializeExecutePipelineActivity(JsonElement element)
 78        {
 079            string name = default;
 080            string type = default;
 081            Optional<string> description = default;
 082            Optional<IList<ActivityDependency>> dependsOn = default;
 083            Optional<IList<UserProperty>> userProperties = default;
 084            PipelineReference pipeline = default;
 085            Optional<IDictionary<string, object>> parameters = default;
 086            Optional<bool> waitOnCompletion = default;
 087            IDictionary<string, object> additionalProperties = default;
 088            Dictionary<string, object> additionalPropertiesDictionary = default;
 089            foreach (var property in element.EnumerateObject())
 90            {
 091                if (property.NameEquals("name"))
 92                {
 093                    name = property.Value.GetString();
 094                    continue;
 95                }
 096                if (property.NameEquals("type"))
 97                {
 098                    type = property.Value.GetString();
 099                    continue;
 100                }
 0101                if (property.NameEquals("description"))
 102                {
 0103                    description = property.Value.GetString();
 0104                    continue;
 105                }
 0106                if (property.NameEquals("dependsOn"))
 107                {
 0108                    List<ActivityDependency> array = new List<ActivityDependency>();
 0109                    foreach (var item in property.Value.EnumerateArray())
 110                    {
 0111                        array.Add(ActivityDependency.DeserializeActivityDependency(item));
 112                    }
 0113                    dependsOn = array;
 0114                    continue;
 115                }
 0116                if (property.NameEquals("userProperties"))
 117                {
 0118                    List<UserProperty> array = new List<UserProperty>();
 0119                    foreach (var item in property.Value.EnumerateArray())
 120                    {
 0121                        array.Add(UserProperty.DeserializeUserProperty(item));
 122                    }
 0123                    userProperties = array;
 0124                    continue;
 125                }
 0126                if (property.NameEquals("typeProperties"))
 127                {
 0128                    foreach (var property0 in property.Value.EnumerateObject())
 129                    {
 0130                        if (property0.NameEquals("pipeline"))
 131                        {
 0132                            pipeline = PipelineReference.DeserializePipelineReference(property0.Value);
 0133                            continue;
 134                        }
 0135                        if (property0.NameEquals("parameters"))
 136                        {
 0137                            Dictionary<string, object> dictionary = new Dictionary<string, object>();
 0138                            foreach (var property1 in property0.Value.EnumerateObject())
 139                            {
 0140                                dictionary.Add(property1.Name, property1.Value.GetObject());
 141                            }
 0142                            parameters = dictionary;
 0143                            continue;
 144                        }
 0145                        if (property0.NameEquals("waitOnCompletion"))
 146                        {
 0147                            waitOnCompletion = property0.Value.GetBoolean();
 148                            continue;
 149                        }
 150                    }
 151                    continue;
 152                }
 0153                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0154                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 155            }
 0156            additionalProperties = additionalPropertiesDictionary;
 0157            return new ExecutePipelineActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToLis
 158        }
 159    }
 160}