< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%100%
get_Dataset()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeDataFlowSink(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\DataFlowSink.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;
 9
 10namespace Azure.Analytics.Synapse.Artifacts.Models
 11{
 12    /// <summary> Transformation for data flow sink. </summary>
 13    public partial class DataFlowSink : Transformation
 14    {
 15        /// <summary> Initializes a new instance of DataFlowSink. </summary>
 16        /// <param name="name"> Transformation name. </param>
 17        /// <exception cref="ArgumentNullException"> <paramref name="name"/> is null. </exception>
 018        public DataFlowSink(string name) : base(name)
 19        {
 020            if (name == null)
 21            {
 022                throw new ArgumentNullException(nameof(name));
 23            }
 024        }
 25
 26        /// <summary> Initializes a new instance of DataFlowSink. </summary>
 27        /// <param name="name"> Transformation name. </param>
 28        /// <param name="description"> Transformation description. </param>
 29        /// <param name="dataset"> Dataset reference. </param>
 030        internal DataFlowSink(string name, string description, DatasetReference dataset) : base(name, description)
 31        {
 032            Dataset = dataset;
 033        }
 34
 35        /// <summary> Dataset reference. </summary>
 036        public DatasetReference Dataset { get; set; }
 37    }
 38}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\DataFlowSink.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.Text.Json;
 9using Azure.Core;
 10
 11namespace Azure.Analytics.Synapse.Artifacts.Models
 12{
 13    public partial class DataFlowSink : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Optional.IsDefined(Dataset))
 19            {
 020                writer.WritePropertyName("dataset");
 021                writer.WriteObjectValue(Dataset);
 22            }
 023            writer.WritePropertyName("name");
 024            writer.WriteStringValue(Name);
 025            if (Optional.IsDefined(Description))
 26            {
 027                writer.WritePropertyName("description");
 028                writer.WriteStringValue(Description);
 29            }
 030            writer.WriteEndObject();
 031        }
 32
 33        internal static DataFlowSink DeserializeDataFlowSink(JsonElement element)
 34        {
 035            Optional<DatasetReference> dataset = default;
 036            string name = default;
 037            Optional<string> description = default;
 038            foreach (var property in element.EnumerateObject())
 39            {
 040                if (property.NameEquals("dataset"))
 41                {
 042                    dataset = DatasetReference.DeserializeDatasetReference(property.Value);
 043                    continue;
 44                }
 045                if (property.NameEquals("name"))
 46                {
 047                    name = property.Value.GetString();
 048                    continue;
 49                }
 050                if (property.NameEquals("description"))
 51                {
 052                    description = property.Value.GetString();
 53                    continue;
 54                }
 55            }
 056            return new DataFlowSink(name, description.Value, dataset.Value);
 57        }
 58    }
 59}