< Summary

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

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\WaitActivity.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> This activity suspends pipeline execution for the specified interval. </summary>
 14    public partial class WaitActivity : Activity
 15    {
 16        /// <summary> Initializes a new instance of WaitActivity. </summary>
 17        /// <param name="name"> Activity name. </param>
 18        /// <param name="waitTimeInSeconds"> Duration in seconds. </param>
 19        /// <exception cref="ArgumentNullException"> <paramref name="name"/> is null. </exception>
 020        public WaitActivity(string name, int waitTimeInSeconds) : base(name)
 21        {
 022            if (name == null)
 23            {
 024                throw new ArgumentNullException(nameof(name));
 25            }
 26
 027            WaitTimeInSeconds = waitTimeInSeconds;
 028            Type = "Wait";
 029        }
 30
 31        /// <summary> Initializes a new instance of WaitActivity. </summary>
 32        /// <param name="name"> Activity name. </param>
 33        /// <param name="type"> Type of activity. </param>
 34        /// <param name="description"> Activity description. </param>
 35        /// <param name="dependsOn"> Activity depends on condition. </param>
 36        /// <param name="userProperties"> Activity user properties. </param>
 37        /// <param name="additionalProperties"> . </param>
 38        /// <param name="waitTimeInSeconds"> Duration in seconds. </param>
 039        internal WaitActivity(string name, string type, string description, IList<ActivityDependency> dependsOn, IList<U
 40        {
 041            WaitTimeInSeconds = waitTimeInSeconds;
 042            Type = type ?? "Wait";
 043        }
 44
 45        /// <summary> Duration in seconds. </summary>
 046        public int WaitTimeInSeconds { get; set; }
 47    }
 48}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\WaitActivity.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 WaitActivity : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            writer.WritePropertyName("name");
 020            writer.WriteStringValue(Name);
 021            writer.WritePropertyName("type");
 022            writer.WriteStringValue(Type);
 023            if (Optional.IsDefined(Description))
 24            {
 025                writer.WritePropertyName("description");
 026                writer.WriteStringValue(Description);
 27            }
 028            if (Optional.IsCollectionDefined(DependsOn))
 29            {
 030                writer.WritePropertyName("dependsOn");
 031                writer.WriteStartArray();
 032                foreach (var item in DependsOn)
 33                {
 034                    writer.WriteObjectValue(item);
 35                }
 036                writer.WriteEndArray();
 37            }
 038            if (Optional.IsCollectionDefined(UserProperties))
 39            {
 040                writer.WritePropertyName("userProperties");
 041                writer.WriteStartArray();
 042                foreach (var item in UserProperties)
 43                {
 044                    writer.WriteObjectValue(item);
 45                }
 046                writer.WriteEndArray();
 47            }
 048            writer.WritePropertyName("typeProperties");
 049            writer.WriteStartObject();
 050            writer.WritePropertyName("waitTimeInSeconds");
 051            writer.WriteNumberValue(WaitTimeInSeconds);
 052            writer.WriteEndObject();
 053            foreach (var item in AdditionalProperties)
 54            {
 055                writer.WritePropertyName(item.Key);
 056                writer.WriteObjectValue(item.Value);
 57            }
 058            writer.WriteEndObject();
 059        }
 60
 61        internal static WaitActivity DeserializeWaitActivity(JsonElement element)
 62        {
 063            string name = default;
 064            string type = default;
 065            Optional<string> description = default;
 066            Optional<IList<ActivityDependency>> dependsOn = default;
 067            Optional<IList<UserProperty>> userProperties = default;
 068            int waitTimeInSeconds = 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("name"))
 74                {
 075                    name = property.Value.GetString();
 076                    continue;
 77                }
 078                if (property.NameEquals("type"))
 79                {
 080                    type = property.Value.GetString();
 081                    continue;
 82                }
 083                if (property.NameEquals("description"))
 84                {
 085                    description = property.Value.GetString();
 086                    continue;
 87                }
 088                if (property.NameEquals("dependsOn"))
 89                {
 090                    List<ActivityDependency> array = new List<ActivityDependency>();
 091                    foreach (var item in property.Value.EnumerateArray())
 92                    {
 093                        array.Add(ActivityDependency.DeserializeActivityDependency(item));
 94                    }
 095                    dependsOn = array;
 096                    continue;
 97                }
 098                if (property.NameEquals("userProperties"))
 99                {
 0100                    List<UserProperty> array = new List<UserProperty>();
 0101                    foreach (var item in property.Value.EnumerateArray())
 102                    {
 0103                        array.Add(UserProperty.DeserializeUserProperty(item));
 104                    }
 0105                    userProperties = array;
 0106                    continue;
 107                }
 0108                if (property.NameEquals("typeProperties"))
 109                {
 0110                    foreach (var property0 in property.Value.EnumerateObject())
 111                    {
 0112                        if (property0.NameEquals("waitTimeInSeconds"))
 113                        {
 0114                            waitTimeInSeconds = property0.Value.GetInt32();
 115                            continue;
 116                        }
 117                    }
 118                    continue;
 119                }
 0120                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0121                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 122            }
 0123            additionalProperties = additionalPropertiesDictionary;
 0124            return new WaitActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userPrope
 125        }
 126    }
 127}