< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%0%
get_Sources()-0%100%
get_Sinks()-0%100%
get_Transformations()-0%100%
get_Script()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeMappingDataFlow(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\MappingDataFlow.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 Azure.Core;
 10
 11namespace Azure.Analytics.Synapse.Artifacts.Models
 12{
 13    /// <summary> Mapping data flow. </summary>
 14    public partial class MappingDataFlow : DataFlow
 15    {
 16        /// <summary> Initializes a new instance of MappingDataFlow. </summary>
 017        public MappingDataFlow()
 18        {
 019            Sources = new ChangeTrackingList<DataFlowSource>();
 020            Sinks = new ChangeTrackingList<DataFlowSink>();
 021            Transformations = new ChangeTrackingList<Transformation>();
 022            Type = "MappingDataFlow";
 023        }
 24
 25        /// <summary> Initializes a new instance of MappingDataFlow. </summary>
 26        /// <param name="type"> Type of data flow. </param>
 27        /// <param name="description"> The description of the data flow. </param>
 28        /// <param name="annotations"> List of tags that can be used for describing the data flow. </param>
 29        /// <param name="folder"> The folder that this data flow is in. If not specified, Data flow will appear at the r
 30        /// <param name="sources"> List of sources in data flow. </param>
 31        /// <param name="sinks"> List of sinks in data flow. </param>
 32        /// <param name="transformations"> List of transformations in data flow. </param>
 33        /// <param name="script"> DataFlow script. </param>
 034        internal MappingDataFlow(string type, string description, IList<object> annotations, DataFlowFolder folder, ILis
 35        {
 036            Sources = sources;
 037            Sinks = sinks;
 038            Transformations = transformations;
 039            Script = script;
 040            Type = type ?? "MappingDataFlow";
 041        }
 42
 43        /// <summary> List of sources in data flow. </summary>
 044        public IList<DataFlowSource> Sources { get; }
 45        /// <summary> List of sinks in data flow. </summary>
 046        public IList<DataFlowSink> Sinks { get; }
 47        /// <summary> List of transformations in data flow. </summary>
 048        public IList<Transformation> Transformations { get; }
 49        /// <summary> DataFlow script. </summary>
 050        public string Script { get; set; }
 51    }
 52}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\MappingDataFlow.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 MappingDataFlow : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            writer.WritePropertyName("type");
 020            writer.WriteStringValue(Type);
 021            if (Optional.IsDefined(Description))
 22            {
 023                writer.WritePropertyName("description");
 024                writer.WriteStringValue(Description);
 25            }
 026            if (Optional.IsCollectionDefined(Annotations))
 27            {
 028                writer.WritePropertyName("annotations");
 029                writer.WriteStartArray();
 030                foreach (var item in Annotations)
 31                {
 032                    writer.WriteObjectValue(item);
 33                }
 034                writer.WriteEndArray();
 35            }
 036            if (Optional.IsDefined(Folder))
 37            {
 038                writer.WritePropertyName("folder");
 039                writer.WriteObjectValue(Folder);
 40            }
 041            writer.WritePropertyName("typeProperties");
 042            writer.WriteStartObject();
 043            if (Optional.IsCollectionDefined(Sources))
 44            {
 045                writer.WritePropertyName("sources");
 046                writer.WriteStartArray();
 047                foreach (var item in Sources)
 48                {
 049                    writer.WriteObjectValue(item);
 50                }
 051                writer.WriteEndArray();
 52            }
 053            if (Optional.IsCollectionDefined(Sinks))
 54            {
 055                writer.WritePropertyName("sinks");
 056                writer.WriteStartArray();
 057                foreach (var item in Sinks)
 58                {
 059                    writer.WriteObjectValue(item);
 60                }
 061                writer.WriteEndArray();
 62            }
 063            if (Optional.IsCollectionDefined(Transformations))
 64            {
 065                writer.WritePropertyName("transformations");
 066                writer.WriteStartArray();
 067                foreach (var item in Transformations)
 68                {
 069                    writer.WriteObjectValue(item);
 70                }
 071                writer.WriteEndArray();
 72            }
 073            if (Optional.IsDefined(Script))
 74            {
 075                writer.WritePropertyName("script");
 076                writer.WriteStringValue(Script);
 77            }
 078            writer.WriteEndObject();
 079            writer.WriteEndObject();
 080        }
 81
 82        internal static MappingDataFlow DeserializeMappingDataFlow(JsonElement element)
 83        {
 084            string type = default;
 085            Optional<string> description = default;
 086            Optional<IList<object>> annotations = default;
 087            Optional<DataFlowFolder> folder = default;
 088            Optional<IList<DataFlowSource>> sources = default;
 089            Optional<IList<DataFlowSink>> sinks = default;
 090            Optional<IList<Transformation>> transformations = default;
 091            Optional<string> script = default;
 092            foreach (var property in element.EnumerateObject())
 93            {
 094                if (property.NameEquals("type"))
 95                {
 096                    type = property.Value.GetString();
 097                    continue;
 98                }
 099                if (property.NameEquals("description"))
 100                {
 0101                    description = property.Value.GetString();
 0102                    continue;
 103                }
 0104                if (property.NameEquals("annotations"))
 105                {
 0106                    List<object> array = new List<object>();
 0107                    foreach (var item in property.Value.EnumerateArray())
 108                    {
 0109                        array.Add(item.GetObject());
 110                    }
 0111                    annotations = array;
 0112                    continue;
 113                }
 0114                if (property.NameEquals("folder"))
 115                {
 0116                    folder = DataFlowFolder.DeserializeDataFlowFolder(property.Value);
 0117                    continue;
 118                }
 0119                if (property.NameEquals("typeProperties"))
 120                {
 0121                    foreach (var property0 in property.Value.EnumerateObject())
 122                    {
 0123                        if (property0.NameEquals("sources"))
 124                        {
 0125                            List<DataFlowSource> array = new List<DataFlowSource>();
 0126                            foreach (var item in property0.Value.EnumerateArray())
 127                            {
 0128                                array.Add(DataFlowSource.DeserializeDataFlowSource(item));
 129                            }
 0130                            sources = array;
 0131                            continue;
 132                        }
 0133                        if (property0.NameEquals("sinks"))
 134                        {
 0135                            List<DataFlowSink> array = new List<DataFlowSink>();
 0136                            foreach (var item in property0.Value.EnumerateArray())
 137                            {
 0138                                array.Add(DataFlowSink.DeserializeDataFlowSink(item));
 139                            }
 0140                            sinks = array;
 0141                            continue;
 142                        }
 0143                        if (property0.NameEquals("transformations"))
 144                        {
 0145                            List<Transformation> array = new List<Transformation>();
 0146                            foreach (var item in property0.Value.EnumerateArray())
 147                            {
 0148                                array.Add(Transformation.DeserializeTransformation(item));
 149                            }
 0150                            transformations = array;
 0151                            continue;
 152                        }
 0153                        if (property0.NameEquals("script"))
 154                        {
 0155                            script = property0.Value.GetString();
 156                            continue;
 157                        }
 158                    }
 159                    continue;
 160                }
 161            }
 0162            return new MappingDataFlow(type, description.Value, Optional.ToList(annotations), folder.Value, Optional.ToL
 163        }
 164    }
 165}