< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Type()-0%100%
get_Description()-0%100%
get_Annotations()-0%100%
get_Folder()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeDataFlow(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\DataFlow.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> Azure Synapse nested object which contains a flow with data movements and transformations. </summary>
 14    public partial class DataFlow
 15    {
 16        /// <summary> Initializes a new instance of DataFlow. </summary>
 017        public DataFlow()
 18        {
 019            Annotations = new ChangeTrackingList<object>();
 020        }
 21
 22        /// <summary> Initializes a new instance of DataFlow. </summary>
 23        /// <param name="type"> Type of data flow. </param>
 24        /// <param name="description"> The description of the data flow. </param>
 25        /// <param name="annotations"> List of tags that can be used for describing the data flow. </param>
 26        /// <param name="folder"> The folder that this data flow is in. If not specified, Data flow will appear at the r
 027        internal DataFlow(string type, string description, IList<object> annotations, DataFlowFolder folder)
 28        {
 029            Type = type;
 030            Description = description;
 031            Annotations = annotations;
 032            Folder = folder;
 033        }
 34
 35        /// <summary> Type of data flow. </summary>
 036        internal string Type { get; set; }
 37        /// <summary> The description of the data flow. </summary>
 038        public string Description { get; set; }
 39        /// <summary> List of tags that can be used for describing the data flow. </summary>
 040        public IList<object> Annotations { get; }
 41        /// <summary> The folder that this data flow is in. If not specified, Data flow will appear at the root level. <
 042        public DataFlowFolder Folder { get; set; }
 43    }
 44}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\DataFlow.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 DataFlow : 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.WriteEndObject();
 042        }
 43
 44        internal static DataFlow DeserializeDataFlow(JsonElement element)
 45        {
 046            if (element.TryGetProperty("type", out JsonElement discriminator))
 47            {
 048                switch (discriminator.GetString())
 49                {
 050                    case "MappingDataFlow": return MappingDataFlow.DeserializeMappingDataFlow(element);
 51                }
 52            }
 053            string type = default;
 054            Optional<string> description = default;
 055            Optional<IList<object>> annotations = default;
 056            Optional<DataFlowFolder> folder = default;
 057            foreach (var property in element.EnumerateObject())
 58            {
 059                if (property.NameEquals("type"))
 60                {
 061                    type = property.Value.GetString();
 062                    continue;
 63                }
 064                if (property.NameEquals("description"))
 65                {
 066                    description = property.Value.GetString();
 067                    continue;
 68                }
 069                if (property.NameEquals("annotations"))
 70                {
 071                    List<object> array = new List<object>();
 072                    foreach (var item in property.Value.EnumerateArray())
 73                    {
 074                        array.Add(item.GetObject());
 75                    }
 076                    annotations = array;
 077                    continue;
 78                }
 079                if (property.NameEquals("folder"))
 80                {
 081                    folder = DataFlowFolder.DeserializeDataFlowFolder(property.Value);
 82                    continue;
 83                }
 84            }
 085            return new DataFlow(type, description.Value, Optional.ToList(annotations), folder.Value);
 86        }
 87    }
 88}