< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_Recursive()-0%100%
get_MaxConcurrentConnections()-0%100%
get_EnableLogging()-0%100%
get_LogStorageSettings()-0%100%
get_Dataset()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeDeleteActivity(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\DeleteActivity.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> Delete activity. </summary>
 14    public partial class DeleteActivity : ExecutionActivity
 15    {
 16        /// <summary> Initializes a new instance of DeleteActivity. </summary>
 17        /// <param name="name"> Activity name. </param>
 18        /// <param name="dataset"> Delete activity dataset reference. </param>
 19        /// <exception cref="ArgumentNullException"> <paramref name="name"/> or <paramref name="dataset"/> is null. </ex
 020        public DeleteActivity(string name, DatasetReference dataset) : base(name)
 21        {
 022            if (name == null)
 23            {
 024                throw new ArgumentNullException(nameof(name));
 25            }
 026            if (dataset == null)
 27            {
 028                throw new ArgumentNullException(nameof(dataset));
 29            }
 30
 031            Dataset = dataset;
 032            Type = "Delete";
 033        }
 34
 35        /// <summary> Initializes a new instance of DeleteActivity. </summary>
 36        /// <param name="name"> Activity name. </param>
 37        /// <param name="type"> Type of activity. </param>
 38        /// <param name="description"> Activity description. </param>
 39        /// <param name="dependsOn"> Activity depends on condition. </param>
 40        /// <param name="userProperties"> Activity user properties. </param>
 41        /// <param name="additionalProperties"> . </param>
 42        /// <param name="linkedServiceName"> Linked service reference. </param>
 43        /// <param name="policy"> Activity policy. </param>
 44        /// <param name="recursive"> If true, files or sub-folders under current folder path will be deleted recursively
 45        /// <param name="maxConcurrentConnections"> The max concurrent connections to connect data source at the same ti
 46        /// <param name="enableLogging"> Whether to record detailed logs of delete-activity execution. Default value is 
 47        /// <param name="logStorageSettings"> Log storage settings customer need to provide when enableLogging is true. 
 48        /// <param name="dataset"> Delete activity dataset reference. </param>
 049        internal DeleteActivity(string name, string type, string description, IList<ActivityDependency> dependsOn, IList
 50        {
 051            Recursive = recursive;
 052            MaxConcurrentConnections = maxConcurrentConnections;
 053            EnableLogging = enableLogging;
 054            LogStorageSettings = logStorageSettings;
 055            Dataset = dataset;
 056            Type = type ?? "Delete";
 057        }
 58
 59        /// <summary> If true, files or sub-folders under current folder path will be deleted recursively. Default is fa
 060        public object Recursive { get; set; }
 61        /// <summary> The max concurrent connections to connect data source at the same time. </summary>
 062        public int? MaxConcurrentConnections { get; set; }
 63        /// <summary> Whether to record detailed logs of delete-activity execution. Default value is false. Type: boolea
 064        public object EnableLogging { get; set; }
 65        /// <summary> Log storage settings customer need to provide when enableLogging is true. </summary>
 066        public LogStorageSettings LogStorageSettings { get; set; }
 67        /// <summary> Delete activity dataset reference. </summary>
 068        public DatasetReference Dataset { get; set; }
 69    }
 70}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\DeleteActivity.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 DeleteActivity : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Optional.IsDefined(LinkedServiceName))
 20            {
 021                writer.WritePropertyName("linkedServiceName");
 022                writer.WriteObjectValue(LinkedServiceName);
 23            }
 024            if (Optional.IsDefined(Policy))
 25            {
 026                writer.WritePropertyName("policy");
 027                writer.WriteObjectValue(Policy);
 28            }
 029            writer.WritePropertyName("name");
 030            writer.WriteStringValue(Name);
 031            writer.WritePropertyName("type");
 032            writer.WriteStringValue(Type);
 033            if (Optional.IsDefined(Description))
 34            {
 035                writer.WritePropertyName("description");
 036                writer.WriteStringValue(Description);
 37            }
 038            if (Optional.IsCollectionDefined(DependsOn))
 39            {
 040                writer.WritePropertyName("dependsOn");
 041                writer.WriteStartArray();
 042                foreach (var item in DependsOn)
 43                {
 044                    writer.WriteObjectValue(item);
 45                }
 046                writer.WriteEndArray();
 47            }
 048            if (Optional.IsCollectionDefined(UserProperties))
 49            {
 050                writer.WritePropertyName("userProperties");
 051                writer.WriteStartArray();
 052                foreach (var item in UserProperties)
 53                {
 054                    writer.WriteObjectValue(item);
 55                }
 056                writer.WriteEndArray();
 57            }
 058            writer.WritePropertyName("typeProperties");
 059            writer.WriteStartObject();
 060            if (Optional.IsDefined(Recursive))
 61            {
 062                writer.WritePropertyName("recursive");
 063                writer.WriteObjectValue(Recursive);
 64            }
 065            if (Optional.IsDefined(MaxConcurrentConnections))
 66            {
 067                writer.WritePropertyName("maxConcurrentConnections");
 068                writer.WriteNumberValue(MaxConcurrentConnections.Value);
 69            }
 070            if (Optional.IsDefined(EnableLogging))
 71            {
 072                writer.WritePropertyName("enableLogging");
 073                writer.WriteObjectValue(EnableLogging);
 74            }
 075            if (Optional.IsDefined(LogStorageSettings))
 76            {
 077                writer.WritePropertyName("logStorageSettings");
 078                writer.WriteObjectValue(LogStorageSettings);
 79            }
 080            writer.WritePropertyName("dataset");
 081            writer.WriteObjectValue(Dataset);
 082            writer.WriteEndObject();
 083            foreach (var item in AdditionalProperties)
 84            {
 085                writer.WritePropertyName(item.Key);
 086                writer.WriteObjectValue(item.Value);
 87            }
 088            writer.WriteEndObject();
 089        }
 90
 91        internal static DeleteActivity DeserializeDeleteActivity(JsonElement element)
 92        {
 093            Optional<LinkedServiceReference> linkedServiceName = default;
 094            Optional<ActivityPolicy> policy = default;
 095            string name = default;
 096            string type = default;
 097            Optional<string> description = default;
 098            Optional<IList<ActivityDependency>> dependsOn = default;
 099            Optional<IList<UserProperty>> userProperties = default;
 0100            Optional<object> recursive = default;
 0101            Optional<int> maxConcurrentConnections = default;
 0102            Optional<object> enableLogging = default;
 0103            Optional<LogStorageSettings> logStorageSettings = default;
 0104            DatasetReference dataset = default;
 0105            IDictionary<string, object> additionalProperties = default;
 0106            Dictionary<string, object> additionalPropertiesDictionary = default;
 0107            foreach (var property in element.EnumerateObject())
 108            {
 0109                if (property.NameEquals("linkedServiceName"))
 110                {
 0111                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
 0112                    continue;
 113                }
 0114                if (property.NameEquals("policy"))
 115                {
 0116                    policy = ActivityPolicy.DeserializeActivityPolicy(property.Value);
 0117                    continue;
 118                }
 0119                if (property.NameEquals("name"))
 120                {
 0121                    name = property.Value.GetString();
 0122                    continue;
 123                }
 0124                if (property.NameEquals("type"))
 125                {
 0126                    type = property.Value.GetString();
 0127                    continue;
 128                }
 0129                if (property.NameEquals("description"))
 130                {
 0131                    description = property.Value.GetString();
 0132                    continue;
 133                }
 0134                if (property.NameEquals("dependsOn"))
 135                {
 0136                    List<ActivityDependency> array = new List<ActivityDependency>();
 0137                    foreach (var item in property.Value.EnumerateArray())
 138                    {
 0139                        array.Add(ActivityDependency.DeserializeActivityDependency(item));
 140                    }
 0141                    dependsOn = array;
 0142                    continue;
 143                }
 0144                if (property.NameEquals("userProperties"))
 145                {
 0146                    List<UserProperty> array = new List<UserProperty>();
 0147                    foreach (var item in property.Value.EnumerateArray())
 148                    {
 0149                        array.Add(UserProperty.DeserializeUserProperty(item));
 150                    }
 0151                    userProperties = array;
 0152                    continue;
 153                }
 0154                if (property.NameEquals("typeProperties"))
 155                {
 0156                    foreach (var property0 in property.Value.EnumerateObject())
 157                    {
 0158                        if (property0.NameEquals("recursive"))
 159                        {
 0160                            recursive = property0.Value.GetObject();
 0161                            continue;
 162                        }
 0163                        if (property0.NameEquals("maxConcurrentConnections"))
 164                        {
 0165                            maxConcurrentConnections = property0.Value.GetInt32();
 0166                            continue;
 167                        }
 0168                        if (property0.NameEquals("enableLogging"))
 169                        {
 0170                            enableLogging = property0.Value.GetObject();
 0171                            continue;
 172                        }
 0173                        if (property0.NameEquals("logStorageSettings"))
 174                        {
 0175                            logStorageSettings = LogStorageSettings.DeserializeLogStorageSettings(property0.Value);
 0176                            continue;
 177                        }
 0178                        if (property0.NameEquals("dataset"))
 179                        {
 0180                            dataset = DatasetReference.DeserializeDatasetReference(property0.Value);
 181                            continue;
 182                        }
 183                    }
 184                    continue;
 185                }
 0186                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0187                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 188            }
 0189            additionalProperties = additionalPropertiesDictionary;
 0190            return new DeleteActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userPro
 191        }
 192    }
 193}