< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%100%
.ctor(...)-0%0%
get_ParentTrigger()-0%100%
get_RequestedStartTime()-0%100%
get_RequestedEndTime()-0%100%
get_MaxConcurrency()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeRerunTumblingWindowTrigger(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\RerunTumblingWindowTrigger.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;
 9using System.Collections.Generic;
 10
 11namespace Azure.Analytics.Synapse.Artifacts.Models
 12{
 13    /// <summary> Trigger that schedules pipeline reruns for all fixed time interval windows from a requested start time
 14    public partial class RerunTumblingWindowTrigger : Trigger
 15    {
 16        /// <summary> Initializes a new instance of RerunTumblingWindowTrigger. </summary>
 17        /// <param name="requestedStartTime"> The start time for the time period for which restatement is initiated. Onl
 18        /// <param name="requestedEndTime"> The end time for the time period for which restatement is initiated. Only UT
 19        /// <param name="maxConcurrency"> The max number of parallel time windows (ready for execution) for which a reru
 020        public RerunTumblingWindowTrigger(DateTimeOffset requestedStartTime, DateTimeOffset requestedEndTime, int maxCon
 21        {
 022            RequestedStartTime = requestedStartTime;
 023            RequestedEndTime = requestedEndTime;
 024            MaxConcurrency = maxConcurrency;
 025            Type = "RerunTumblingWindowTrigger";
 026        }
 27
 28        /// <summary> Initializes a new instance of RerunTumblingWindowTrigger. </summary>
 29        /// <param name="type"> Trigger type. </param>
 30        /// <param name="description"> Trigger description. </param>
 31        /// <param name="runtimeState"> Indicates if trigger is running or not. Updated when Start/Stop APIs are called 
 32        /// <param name="annotations"> List of tags that can be used for describing the trigger. </param>
 33        /// <param name="additionalProperties"> . </param>
 34        /// <param name="parentTrigger"> The parent trigger reference. </param>
 35        /// <param name="requestedStartTime"> The start time for the time period for which restatement is initiated. Onl
 36        /// <param name="requestedEndTime"> The end time for the time period for which restatement is initiated. Only UT
 37        /// <param name="maxConcurrency"> The max number of parallel time windows (ready for execution) for which a reru
 038        internal RerunTumblingWindowTrigger(string type, string description, TriggerRuntimeState? runtimeState, IList<ob
 39        {
 040            ParentTrigger = parentTrigger;
 041            RequestedStartTime = requestedStartTime;
 042            RequestedEndTime = requestedEndTime;
 043            MaxConcurrency = maxConcurrency;
 044            Type = type ?? "RerunTumblingWindowTrigger";
 045        }
 46
 47        /// <summary> The parent trigger reference. </summary>
 048        public object ParentTrigger { get; set; }
 49        /// <summary> The start time for the time period for which restatement is initiated. Only UTC time is currently 
 050        public DateTimeOffset RequestedStartTime { get; set; }
 51        /// <summary> The end time for the time period for which restatement is initiated. Only UTC time is currently su
 052        public DateTimeOffset RequestedEndTime { get; set; }
 53        /// <summary> The max number of parallel time windows (ready for execution) for which a rerun is triggered. </su
 054        public int MaxConcurrency { get; set; }
 55    }
 56}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\RerunTumblingWindowTrigger.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;
 9using System.Collections.Generic;
 10using System.Text.Json;
 11using Azure.Core;
 12
 13namespace Azure.Analytics.Synapse.Artifacts.Models
 14{
 15    public partial class RerunTumblingWindowTrigger : IUtf8JsonSerializable
 16    {
 17        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 18        {
 019            writer.WriteStartObject();
 020            writer.WritePropertyName("type");
 021            writer.WriteStringValue(Type);
 022            if (Optional.IsDefined(Description))
 23            {
 024                writer.WritePropertyName("description");
 025                writer.WriteStringValue(Description);
 26            }
 027            if (Optional.IsCollectionDefined(Annotations))
 28            {
 029                writer.WritePropertyName("annotations");
 030                writer.WriteStartArray();
 031                foreach (var item in Annotations)
 32                {
 033                    writer.WriteObjectValue(item);
 34                }
 035                writer.WriteEndArray();
 36            }
 037            writer.WritePropertyName("typeProperties");
 038            writer.WriteStartObject();
 039            if (Optional.IsDefined(ParentTrigger))
 40            {
 041                writer.WritePropertyName("parentTrigger");
 042                writer.WriteObjectValue(ParentTrigger);
 43            }
 044            writer.WritePropertyName("requestedStartTime");
 045            writer.WriteStringValue(RequestedStartTime, "O");
 046            writer.WritePropertyName("requestedEndTime");
 047            writer.WriteStringValue(RequestedEndTime, "O");
 048            writer.WritePropertyName("maxConcurrency");
 049            writer.WriteNumberValue(MaxConcurrency);
 050            writer.WriteEndObject();
 051            foreach (var item in AdditionalProperties)
 52            {
 053                writer.WritePropertyName(item.Key);
 054                writer.WriteObjectValue(item.Value);
 55            }
 056            writer.WriteEndObject();
 057        }
 58
 59        internal static RerunTumblingWindowTrigger DeserializeRerunTumblingWindowTrigger(JsonElement element)
 60        {
 061            string type = default;
 062            Optional<string> description = default;
 063            Optional<TriggerRuntimeState> runtimeState = default;
 064            Optional<IList<object>> annotations = default;
 065            Optional<object> parentTrigger = default;
 066            DateTimeOffset requestedStartTime = default;
 067            DateTimeOffset requestedEndTime = default;
 068            int maxConcurrency = default;
 069            IDictionary<string, object> additionalProperties = default;
 070            Dictionary<string, object> additionalPropertiesDictionary = default;
 071            foreach (var property in element.EnumerateObject())
 72            {
 073                if (property.NameEquals("type"))
 74                {
 075                    type = property.Value.GetString();
 076                    continue;
 77                }
 078                if (property.NameEquals("description"))
 79                {
 080                    description = property.Value.GetString();
 081                    continue;
 82                }
 083                if (property.NameEquals("runtimeState"))
 84                {
 085                    runtimeState = new TriggerRuntimeState(property.Value.GetString());
 086                    continue;
 87                }
 088                if (property.NameEquals("annotations"))
 89                {
 090                    List<object> array = new List<object>();
 091                    foreach (var item in property.Value.EnumerateArray())
 92                    {
 093                        array.Add(item.GetObject());
 94                    }
 095                    annotations = array;
 096                    continue;
 97                }
 098                if (property.NameEquals("typeProperties"))
 99                {
 0100                    foreach (var property0 in property.Value.EnumerateObject())
 101                    {
 0102                        if (property0.NameEquals("parentTrigger"))
 103                        {
 0104                            parentTrigger = property0.Value.GetObject();
 0105                            continue;
 106                        }
 0107                        if (property0.NameEquals("requestedStartTime"))
 108                        {
 0109                            requestedStartTime = property0.Value.GetDateTimeOffset("O");
 0110                            continue;
 111                        }
 0112                        if (property0.NameEquals("requestedEndTime"))
 113                        {
 0114                            requestedEndTime = property0.Value.GetDateTimeOffset("O");
 0115                            continue;
 116                        }
 0117                        if (property0.NameEquals("maxConcurrency"))
 118                        {
 0119                            maxConcurrency = property0.Value.GetInt32();
 120                            continue;
 121                        }
 122                    }
 123                    continue;
 124                }
 0125                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0126                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 127            }
 0128            additionalProperties = additionalPropertiesDictionary;
 0129            return new RerunTumblingWindowTrigger(type, description.Value, Optional.ToNullable(runtimeState), Optional.T
 130        }
 131    }
 132}