< Summary

Class:Azure.Analytics.Synapse.Artifacts.Models.PipelineResource
Assembly:Azure.Analytics.Synapse.Artifacts
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\PipelineResource.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\PipelineResource.Serialization.cs
Covered lines:56
Uncovered lines:111
Coverable lines:167
Total lines:324
Line coverage:33.5% (56 of 167)
Covered branches:24
Total branches:70
Branch coverage:34.2% (24 of 70)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Description()-0%100%
get_Activities()-0%100%
get_Parameters()-0%100%
get_Variables()-0%100%
get_Concurrency()-0%100%
get_Annotations()-0%100%
get_RunDimensions()-0%100%
get_Folder()-0%100%
get_AdditionalProperties()-0%100%
GetEnumerator()-0%100%
System.Collections.IEnumerable.GetEnumerator()-0%100%
TryGetValue(...)-0%100%
ContainsKey(...)-0%100%
get_Keys()-0%100%
get_Values()-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.get_Count()-0%100%
Add(...)-0%100%
Remove(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.get_IsReadOnly()-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Add(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Remove(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Contains(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.CopyTo(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Clear()-0%100%
get_Item(...)-0%100%
set_Item(...)-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializePipelineResource(...)-63.38%57.14%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\PipelineResource.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;
 9using System.Collections.Generic;
 10using Azure.Core;
 11
 12namespace Azure.Analytics.Synapse.Artifacts.Models
 13{
 14    /// <summary> Pipeline resource type. </summary>
 15    public partial class PipelineResource : SubResource, IDictionary<string, object>
 16    {
 17        /// <summary> Initializes a new instance of PipelineResource. </summary>
 018        public PipelineResource()
 19        {
 020            Activities = new ChangeTrackingList<Activity>();
 021            Parameters = new ChangeTrackingDictionary<string, ParameterSpecification>();
 022            Variables = new ChangeTrackingDictionary<string, VariableSpecification>();
 023            Annotations = new ChangeTrackingList<object>();
 024            RunDimensions = new ChangeTrackingDictionary<string, object>();
 025            AdditionalProperties = new ChangeTrackingDictionary<string, object>();
 026        }
 27
 28        /// <summary> Initializes a new instance of PipelineResource. </summary>
 29        /// <param name="id"> The resource identifier. </param>
 30        /// <param name="name"> The resource name. </param>
 31        /// <param name="type"> The resource type. </param>
 32        /// <param name="etag"> Etag identifies change in the resource. </param>
 33        /// <param name="description"> The description of the pipeline. </param>
 34        /// <param name="activities"> List of activities in pipeline. </param>
 35        /// <param name="parameters"> List of parameters for pipeline. </param>
 36        /// <param name="variables"> List of variables for pipeline. </param>
 37        /// <param name="concurrency"> The max number of concurrent runs for the pipeline. </param>
 38        /// <param name="annotations"> List of tags that can be used for describing the Pipeline. </param>
 39        /// <param name="runDimensions"> Dimensions emitted by Pipeline. </param>
 40        /// <param name="folder"> The folder that this Pipeline is in. If not specified, Pipeline will appear at the roo
 41        /// <param name="additionalProperties"> . </param>
 842        internal PipelineResource(string id, string name, string type, string etag, string description, IList<Activity> 
 43        {
 844            Description = description;
 845            Activities = activities;
 846            Parameters = parameters;
 847            Variables = variables;
 848            Concurrency = concurrency;
 849            Annotations = annotations;
 850            RunDimensions = runDimensions;
 851            Folder = folder;
 852            AdditionalProperties = additionalProperties;
 853        }
 54
 55        /// <summary> The description of the pipeline. </summary>
 056        public string Description { get; set; }
 57        /// <summary> List of activities in pipeline. </summary>
 058        public IList<Activity> Activities { get; }
 59        /// <summary> List of parameters for pipeline. </summary>
 060        public IDictionary<string, ParameterSpecification> Parameters { get; }
 61        /// <summary> List of variables for pipeline. </summary>
 062        public IDictionary<string, VariableSpecification> Variables { get; }
 63        /// <summary> The max number of concurrent runs for the pipeline. </summary>
 064        public int? Concurrency { get; set; }
 65        /// <summary> List of tags that can be used for describing the Pipeline. </summary>
 066        public IList<object> Annotations { get; }
 67        /// <summary> Dimensions emitted by Pipeline. </summary>
 068        public IDictionary<string, object> RunDimensions { get; }
 69        /// <summary> The folder that this Pipeline is in. If not specified, Pipeline will appear at the root level. </s
 070        public PipelineFolder Folder { get; set; }
 071        internal IDictionary<string, object> AdditionalProperties { get; }
 72        /// <inheritdoc />
 073        public IEnumerator<KeyValuePair<string, object>> GetEnumerator() => AdditionalProperties.GetEnumerator();
 74        /// <inheritdoc />
 075        IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator();
 76        /// <inheritdoc />
 077        public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value);
 78        /// <inheritdoc />
 079        public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key);
 80        /// <inheritdoc />
 081        public ICollection<string> Keys => AdditionalProperties.Keys;
 82        /// <inheritdoc />
 083        public ICollection<object> Values => AdditionalProperties.Values;
 84        /// <inheritdoc />
 085        int ICollection<KeyValuePair<string, object>>.Count => AdditionalProperties.Count;
 86        /// <inheritdoc />
 087        public void Add(string key, object value) => AdditionalProperties.Add(key, value);
 88        /// <inheritdoc />
 089        public bool Remove(string key) => AdditionalProperties.Remove(key);
 90        /// <inheritdoc />
 091        bool ICollection<KeyValuePair<string, object>>.IsReadOnly => AdditionalProperties.IsReadOnly;
 92        /// <inheritdoc />
 093        void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> value) => AdditionalProperties.A
 94        /// <inheritdoc />
 095        bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> value) => AdditionalPropertie
 96        /// <inheritdoc />
 097        bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> value) => AdditionalPropert
 98        /// <inheritdoc />
 099        void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] destination, int offset) =>
 100        /// <inheritdoc />
 0101        void ICollection<KeyValuePair<string, object>>.Clear() => AdditionalProperties.Clear();
 102        /// <inheritdoc />
 103        public object this[string key]
 104        {
 0105            get => AdditionalProperties[key];
 0106            set => AdditionalProperties[key] = value;
 107        }
 108    }
 109}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\PipelineResource.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 PipelineResource : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            writer.WritePropertyName("properties");
 020            writer.WriteStartObject();
 021            if (Optional.IsDefined(Description))
 22            {
 023                writer.WritePropertyName("description");
 024                writer.WriteStringValue(Description);
 25            }
 026            if (Optional.IsCollectionDefined(Activities))
 27            {
 028                writer.WritePropertyName("activities");
 029                writer.WriteStartArray();
 030                foreach (var item in Activities)
 31                {
 032                    writer.WriteObjectValue(item);
 33                }
 034                writer.WriteEndArray();
 35            }
 036            if (Optional.IsCollectionDefined(Parameters))
 37            {
 038                writer.WritePropertyName("parameters");
 039                writer.WriteStartObject();
 040                foreach (var item in Parameters)
 41                {
 042                    writer.WritePropertyName(item.Key);
 043                    writer.WriteObjectValue(item.Value);
 44                }
 045                writer.WriteEndObject();
 46            }
 047            if (Optional.IsCollectionDefined(Variables))
 48            {
 049                writer.WritePropertyName("variables");
 050                writer.WriteStartObject();
 051                foreach (var item in Variables)
 52                {
 053                    writer.WritePropertyName(item.Key);
 054                    writer.WriteObjectValue(item.Value);
 55                }
 056                writer.WriteEndObject();
 57            }
 058            if (Optional.IsDefined(Concurrency))
 59            {
 060                writer.WritePropertyName("concurrency");
 061                writer.WriteNumberValue(Concurrency.Value);
 62            }
 063            if (Optional.IsCollectionDefined(Annotations))
 64            {
 065                writer.WritePropertyName("annotations");
 066                writer.WriteStartArray();
 067                foreach (var item in Annotations)
 68                {
 069                    writer.WriteObjectValue(item);
 70                }
 071                writer.WriteEndArray();
 72            }
 073            if (Optional.IsCollectionDefined(RunDimensions))
 74            {
 075                writer.WritePropertyName("runDimensions");
 076                writer.WriteStartObject();
 077                foreach (var item in RunDimensions)
 78                {
 079                    writer.WritePropertyName(item.Key);
 080                    writer.WriteObjectValue(item.Value);
 81                }
 082                writer.WriteEndObject();
 83            }
 084            if (Optional.IsDefined(Folder))
 85            {
 086                writer.WritePropertyName("folder");
 087                writer.WriteObjectValue(Folder);
 88            }
 089            writer.WriteEndObject();
 090            foreach (var item in AdditionalProperties)
 91            {
 092                writer.WritePropertyName(item.Key);
 093                writer.WriteObjectValue(item.Value);
 94            }
 095            writer.WriteEndObject();
 096        }
 97
 98        internal static PipelineResource DeserializePipelineResource(JsonElement element)
 99        {
 8100            Optional<string> id = default;
 8101            Optional<string> name = default;
 8102            Optional<string> type = default;
 8103            Optional<string> etag = default;
 8104            Optional<string> description = default;
 8105            Optional<IList<Activity>> activities = default;
 8106            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 8107            Optional<IDictionary<string, VariableSpecification>> variables = default;
 8108            Optional<int> concurrency = default;
 8109            Optional<IList<object>> annotations = default;
 8110            Optional<IDictionary<string, object>> runDimensions = default;
 8111            Optional<PipelineFolder> folder = default;
 8112            IDictionary<string, object> additionalProperties = default;
 8113            Dictionary<string, object> additionalPropertiesDictionary = default;
 96114            foreach (var property in element.EnumerateObject())
 115            {
 40116                if (property.NameEquals("id"))
 117                {
 8118                    id = property.Value.GetString();
 8119                    continue;
 120                }
 32121                if (property.NameEquals("name"))
 122                {
 8123                    name = property.Value.GetString();
 8124                    continue;
 125                }
 24126                if (property.NameEquals("type"))
 127                {
 8128                    type = property.Value.GetString();
 8129                    continue;
 130                }
 16131                if (property.NameEquals("etag"))
 132                {
 8133                    etag = property.Value.GetString();
 8134                    continue;
 135                }
 8136                if (property.NameEquals("properties"))
 137                {
 48138                    foreach (var property0 in property.Value.EnumerateObject())
 139                    {
 16140                        if (property0.NameEquals("description"))
 141                        {
 0142                            description = property0.Value.GetString();
 0143                            continue;
 144                        }
 16145                        if (property0.NameEquals("activities"))
 146                        {
 8147                            List<Activity> array = new List<Activity>();
 32148                            foreach (var item in property0.Value.EnumerateArray())
 149                            {
 8150                                array.Add(Activity.DeserializeActivity(item));
 151                            }
 8152                            activities = array;
 8153                            continue;
 154                        }
 8155                        if (property0.NameEquals("parameters"))
 156                        {
 0157                            Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpec
 0158                            foreach (var property1 in property0.Value.EnumerateObject())
 159                            {
 0160                                dictionary.Add(property1.Name, ParameterSpecification.DeserializeParameterSpecification(
 161                            }
 0162                            parameters = dictionary;
 0163                            continue;
 164                        }
 8165                        if (property0.NameEquals("variables"))
 166                        {
 0167                            Dictionary<string, VariableSpecification> dictionary = new Dictionary<string, VariableSpecif
 0168                            foreach (var property1 in property0.Value.EnumerateObject())
 169                            {
 0170                                dictionary.Add(property1.Name, VariableSpecification.DeserializeVariableSpecification(pr
 171                            }
 0172                            variables = dictionary;
 0173                            continue;
 174                        }
 8175                        if (property0.NameEquals("concurrency"))
 176                        {
 0177                            concurrency = property0.Value.GetInt32();
 0178                            continue;
 179                        }
 8180                        if (property0.NameEquals("annotations"))
 181                        {
 8182                            List<object> array = new List<object>();
 0183                            foreach (var item in property0.Value.EnumerateArray())
 184                            {
 0185                                array.Add(item.GetObject());
 186                            }
 8187                            annotations = array;
 8188                            continue;
 189                        }
 0190                        if (property0.NameEquals("runDimensions"))
 191                        {
 0192                            Dictionary<string, object> dictionary = new Dictionary<string, object>();
 0193                            foreach (var property1 in property0.Value.EnumerateObject())
 194                            {
 0195                                dictionary.Add(property1.Name, property1.Value.GetObject());
 196                            }
 0197                            runDimensions = dictionary;
 0198                            continue;
 199                        }
 0200                        if (property0.NameEquals("folder"))
 201                        {
 0202                            folder = PipelineFolder.DeserializePipelineFolder(property0.Value);
 203                            continue;
 204                        }
 205                    }
 206                    continue;
 207                }
 0208                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0209                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 210            }
 8211            additionalProperties = additionalPropertiesDictionary;
 8212            return new PipelineResource(id.Value, name.Value, type.Value, etag.Value, description.Value, Optional.ToList
 213        }
 214    }
 215}