< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%0%
get_Type()-0%100%
get_Description()-0%100%
get_RuntimeState()-0%100%
get_Annotations()-0%100%
get_AdditionalProperties()-0%100%
GetEnumerator()-0%100%
System.Collections.IEnumerable.GetEnumerator()-0%100%
TryGetValue(...)-0%100%
ContainsKey(...)-0%100%
get_Keys()-0%100%
get_Values()-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.get_Count()-0%100%
Add(...)-0%100%
Remove(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.get_IsReadOnly()-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Add(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Remove(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Contains(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.CopyTo(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Clear()-0%100%
get_Item(...)-0%100%
set_Item(...)-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeTrigger(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\Trigger.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;
 9using System.Collections.Generic;
 10using Azure.Core;
 11
 12namespace Azure.Analytics.Synapse.Artifacts.Models
 13{
 14    /// <summary> Azure Synapse nested object which contains information about creating pipeline run. </summary>
 15    public partial class Trigger : IDictionary<string, object>
 16    {
 17        /// <summary> Initializes a new instance of Trigger. </summary>
 018        public Trigger()
 19        {
 020            Annotations = new ChangeTrackingList<object>();
 021            AdditionalProperties = new ChangeTrackingDictionary<string, object>();
 022            Type = "Trigger";
 023        }
 24
 25        /// <summary> Initializes a new instance of Trigger. </summary>
 26        /// <param name="type"> Trigger type. </param>
 27        /// <param name="description"> Trigger description. </param>
 28        /// <param name="runtimeState"> Indicates if trigger is running or not. Updated when Start/Stop APIs are called 
 29        /// <param name="annotations"> List of tags that can be used for describing the trigger. </param>
 30        /// <param name="additionalProperties"> . </param>
 031        internal Trigger(string type, string description, TriggerRuntimeState? runtimeState, IList<object> annotations, 
 32        {
 033            Type = type ?? "Trigger";
 034            Description = description;
 035            RuntimeState = runtimeState;
 036            Annotations = annotations;
 037            AdditionalProperties = additionalProperties;
 038        }
 39
 40        /// <summary> Trigger type. </summary>
 041        internal string Type { get; set; }
 42        /// <summary> Trigger description. </summary>
 043        public string Description { get; set; }
 44        /// <summary> Indicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger. </
 045        public TriggerRuntimeState? RuntimeState { get; }
 46        /// <summary> List of tags that can be used for describing the trigger. </summary>
 047        public IList<object> Annotations { get; }
 048        internal IDictionary<string, object> AdditionalProperties { get; }
 49        /// <inheritdoc />
 050        public IEnumerator<KeyValuePair<string, object>> GetEnumerator() => AdditionalProperties.GetEnumerator();
 51        /// <inheritdoc />
 052        IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator();
 53        /// <inheritdoc />
 054        public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value);
 55        /// <inheritdoc />
 056        public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key);
 57        /// <inheritdoc />
 058        public ICollection<string> Keys => AdditionalProperties.Keys;
 59        /// <inheritdoc />
 060        public ICollection<object> Values => AdditionalProperties.Values;
 61        /// <inheritdoc />
 062        int ICollection<KeyValuePair<string, object>>.Count => AdditionalProperties.Count;
 63        /// <inheritdoc />
 064        public void Add(string key, object value) => AdditionalProperties.Add(key, value);
 65        /// <inheritdoc />
 066        public bool Remove(string key) => AdditionalProperties.Remove(key);
 67        /// <inheritdoc />
 068        bool ICollection<KeyValuePair<string, object>>.IsReadOnly => AdditionalProperties.IsReadOnly;
 69        /// <inheritdoc />
 070        void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> value) => AdditionalProperties.A
 71        /// <inheritdoc />
 072        bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> value) => AdditionalPropertie
 73        /// <inheritdoc />
 074        bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> value) => AdditionalPropert
 75        /// <inheritdoc />
 076        void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] destination, int offset) =>
 77        /// <inheritdoc />
 078        void ICollection<KeyValuePair<string, object>>.Clear() => AdditionalProperties.Clear();
 79        /// <inheritdoc />
 80        public object this[string key]
 81        {
 082            get => AdditionalProperties[key];
 083            set => AdditionalProperties[key] = value;
 84        }
 85    }
 86}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\Trigger.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 Trigger : 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            foreach (var item in AdditionalProperties)
 37            {
 038                writer.WritePropertyName(item.Key);
 039                writer.WriteObjectValue(item.Value);
 40            }
 041            writer.WriteEndObject();
 042        }
 43
 44        internal static Trigger DeserializeTrigger(JsonElement element)
 45        {
 046            if (element.TryGetProperty("type", out JsonElement discriminator))
 47            {
 048                switch (discriminator.GetString())
 49                {
 050                    case "MultiplePipelineTrigger": return MultiplePipelineTrigger.DeserializeMultiplePipelineTrigger(el
 051                    case "RerunTumblingWindowTrigger": return RerunTumblingWindowTrigger.DeserializeRerunTumblingWindowT
 52                }
 53            }
 054            string type = default;
 055            Optional<string> description = default;
 056            Optional<TriggerRuntimeState> runtimeState = default;
 057            Optional<IList<object>> annotations = default;
 058            IDictionary<string, object> additionalProperties = default;
 059            Dictionary<string, object> additionalPropertiesDictionary = default;
 060            foreach (var property in element.EnumerateObject())
 61            {
 062                if (property.NameEquals("type"))
 63                {
 064                    type = property.Value.GetString();
 065                    continue;
 66                }
 067                if (property.NameEquals("description"))
 68                {
 069                    description = property.Value.GetString();
 070                    continue;
 71                }
 072                if (property.NameEquals("runtimeState"))
 73                {
 074                    runtimeState = new TriggerRuntimeState(property.Value.GetString());
 075                    continue;
 76                }
 077                if (property.NameEquals("annotations"))
 78                {
 079                    List<object> array = new List<object>();
 080                    foreach (var item in property.Value.EnumerateArray())
 81                    {
 082                        array.Add(item.GetObject());
 83                    }
 084                    annotations = array;
 085                    continue;
 86                }
 087                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 088                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 89            }
 090            additionalProperties = additionalPropertiesDictionary;
 091            return new Trigger(type, description.Value, Optional.ToNullable(runtimeState), Optional.ToList(annotations),
 92        }
 93    }
 94}