< Summary

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

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\MultiplePipelineTrigger.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> Base class for all triggers that support one to many model for trigger to pipeline. </summary>
 14    public partial class MultiplePipelineTrigger : Trigger
 15    {
 16        /// <summary> Initializes a new instance of MultiplePipelineTrigger. </summary>
 017        public MultiplePipelineTrigger()
 18        {
 019            Pipelines = new ChangeTrackingList<TriggerPipelineReference>();
 020            Type = "MultiplePipelineTrigger";
 021        }
 22
 23        /// <summary> Initializes a new instance of MultiplePipelineTrigger. </summary>
 24        /// <param name="type"> Trigger type. </param>
 25        /// <param name="description"> Trigger description. </param>
 26        /// <param name="runtimeState"> Indicates if trigger is running or not. Updated when Start/Stop APIs are called 
 27        /// <param name="annotations"> List of tags that can be used for describing the trigger. </param>
 28        /// <param name="additionalProperties"> . </param>
 29        /// <param name="pipelines"> Pipelines that need to be started. </param>
 030        internal MultiplePipelineTrigger(string type, string description, TriggerRuntimeState? runtimeState, IList<objec
 31        {
 032            Pipelines = pipelines;
 033            Type = type ?? "MultiplePipelineTrigger";
 034        }
 35
 36        /// <summary> Pipelines that need to be started. </summary>
 037        public IList<TriggerPipelineReference> Pipelines { get; }
 38    }
 39}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\MultiplePipelineTrigger.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 MultiplePipelineTrigger : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Optional.IsCollectionDefined(Pipelines))
 20            {
 021                writer.WritePropertyName("pipelines");
 022                writer.WriteStartArray();
 023                foreach (var item in Pipelines)
 24                {
 025                    writer.WriteObjectValue(item);
 26                }
 027                writer.WriteEndArray();
 28            }
 029            writer.WritePropertyName("type");
 030            writer.WriteStringValue(Type);
 031            if (Optional.IsDefined(Description))
 32            {
 033                writer.WritePropertyName("description");
 034                writer.WriteStringValue(Description);
 35            }
 036            if (Optional.IsCollectionDefined(Annotations))
 37            {
 038                writer.WritePropertyName("annotations");
 039                writer.WriteStartArray();
 040                foreach (var item in Annotations)
 41                {
 042                    writer.WriteObjectValue(item);
 43                }
 044                writer.WriteEndArray();
 45            }
 046            foreach (var item in AdditionalProperties)
 47            {
 048                writer.WritePropertyName(item.Key);
 049                writer.WriteObjectValue(item.Value);
 50            }
 051            writer.WriteEndObject();
 052        }
 53
 54        internal static MultiplePipelineTrigger DeserializeMultiplePipelineTrigger(JsonElement element)
 55        {
 056            Optional<IList<TriggerPipelineReference>> pipelines = default;
 057            string type = default;
 058            Optional<string> description = default;
 059            Optional<TriggerRuntimeState> runtimeState = default;
 060            Optional<IList<object>> annotations = default;
 061            IDictionary<string, object> additionalProperties = default;
 062            Dictionary<string, object> additionalPropertiesDictionary = default;
 063            foreach (var property in element.EnumerateObject())
 64            {
 065                if (property.NameEquals("pipelines"))
 66                {
 067                    List<TriggerPipelineReference> array = new List<TriggerPipelineReference>();
 068                    foreach (var item in property.Value.EnumerateArray())
 69                    {
 070                        array.Add(TriggerPipelineReference.DeserializeTriggerPipelineReference(item));
 71                    }
 072                    pipelines = array;
 073                    continue;
 74                }
 075                if (property.NameEquals("type"))
 76                {
 077                    type = property.Value.GetString();
 078                    continue;
 79                }
 080                if (property.NameEquals("description"))
 81                {
 082                    description = property.Value.GetString();
 083                    continue;
 84                }
 085                if (property.NameEquals("runtimeState"))
 86                {
 087                    runtimeState = new TriggerRuntimeState(property.Value.GetString());
 088                    continue;
 89                }
 090                if (property.NameEquals("annotations"))
 91                {
 092                    List<object> array = new List<object>();
 093                    foreach (var item in property.Value.EnumerateArray())
 94                    {
 095                        array.Add(item.GetObject());
 96                    }
 097                    annotations = array;
 098                    continue;
 99                }
 0100                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0101                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 102            }
 0103            additionalProperties = additionalPropertiesDictionary;
 0104            return new MultiplePipelineTrigger(type, description.Value, Optional.ToNullable(runtimeState), Optional.ToLi
 105        }
 106    }
 107}