< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%100%
get_Type()-0%100%
get_ReferenceName()-0%100%
get_Name()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializePipelineReference(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\PipelineReference.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> Pipeline reference type. </summary>
 13    public partial class PipelineReference
 14    {
 15        /// <summary> Initializes a new instance of PipelineReference. </summary>
 16        /// <param name="type"> Pipeline reference type. </param>
 17        /// <param name="referenceName"> Reference pipeline name. </param>
 18        /// <exception cref="ArgumentNullException"> <paramref name="referenceName"/> is null. </exception>
 019        public PipelineReference(PipelineReferenceType type, string referenceName)
 20        {
 021            if (referenceName == null)
 22            {
 023                throw new ArgumentNullException(nameof(referenceName));
 24            }
 25
 026            Type = type;
 027            ReferenceName = referenceName;
 028        }
 29
 30        /// <summary> Initializes a new instance of PipelineReference. </summary>
 31        /// <param name="type"> Pipeline reference type. </param>
 32        /// <param name="referenceName"> Reference pipeline name. </param>
 33        /// <param name="name"> Reference name. </param>
 034        internal PipelineReference(PipelineReferenceType type, string referenceName, string name)
 35        {
 036            Type = type;
 037            ReferenceName = referenceName;
 038            Name = name;
 039        }
 40
 41        /// <summary> Pipeline reference type. </summary>
 042        public PipelineReferenceType Type { get; set; }
 43        /// <summary> Reference pipeline name. </summary>
 044        public string ReferenceName { get; set; }
 45        /// <summary> Reference name. </summary>
 046        public string Name { get; set; }
 47    }
 48}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\PipelineReference.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 PipelineReference : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("type");
 019            writer.WriteStringValue(Type.ToString());
 020            writer.WritePropertyName("referenceName");
 021            writer.WriteStringValue(ReferenceName);
 022            if (Optional.IsDefined(Name))
 23            {
 024                writer.WritePropertyName("name");
 025                writer.WriteStringValue(Name);
 26            }
 027            writer.WriteEndObject();
 028        }
 29
 30        internal static PipelineReference DeserializePipelineReference(JsonElement element)
 31        {
 032            PipelineReferenceType type = default;
 033            string referenceName = default;
 034            Optional<string> name = default;
 035            foreach (var property in element.EnumerateObject())
 36            {
 037                if (property.NameEquals("type"))
 38                {
 039                    type = new PipelineReferenceType(property.Value.GetString());
 040                    continue;
 41                }
 042                if (property.NameEquals("referenceName"))
 43                {
 044                    referenceName = property.Value.GetString();
 045                    continue;
 46                }
 047                if (property.NameEquals("name"))
 48                {
 049                    name = property.Value.GetString();
 50                    continue;
 51                }
 52            }
 053            return new PipelineReference(type, referenceName, name.Value);
 54        }
 55    }
 56}