< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_Command()-0%100%
get_CommandTimeout()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeAzureDataExplorerCommandActivity(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureDataExplorerCommandActivity.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> Azure Data Explorer command activity. </summary>
 14    public partial class AzureDataExplorerCommandActivity : ExecutionActivity
 15    {
 16        /// <summary> Initializes a new instance of AzureDataExplorerCommandActivity. </summary>
 17        /// <param name="name"> Activity name. </param>
 18        /// <param name="command"> A control command, according to the Azure Data Explorer command syntax. Type: string 
 19        /// <exception cref="ArgumentNullException"> <paramref name="name"/> or <paramref name="command"/> is null. </ex
 020        public AzureDataExplorerCommandActivity(string name, object command) : base(name)
 21        {
 022            if (name == null)
 23            {
 024                throw new ArgumentNullException(nameof(name));
 25            }
 026            if (command == null)
 27            {
 028                throw new ArgumentNullException(nameof(command));
 29            }
 30
 031            Command = command;
 032            Type = "AzureDataExplorerCommand";
 033        }
 34
 35        /// <summary> Initializes a new instance of AzureDataExplorerCommandActivity. </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="command"> A control command, according to the Azure Data Explorer command syntax. Type: string 
 45        /// <param name="commandTimeout"> Control command timeout. Type: string (or Expression with resultType string), 
 046        internal AzureDataExplorerCommandActivity(string name, string type, string description, IList<ActivityDependency
 47        {
 048            Command = command;
 049            CommandTimeout = commandTimeout;
 050            Type = type ?? "AzureDataExplorerCommand";
 051        }
 52
 53        /// <summary> A control command, according to the Azure Data Explorer command syntax. Type: string (or Expressio
 054        public object Command { get; set; }
 55        /// <summary> Control command timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(
 056        public object CommandTimeout { get; set; }
 57    }
 58}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureDataExplorerCommandActivity.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 AzureDataExplorerCommandActivity : 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            writer.WritePropertyName("command");
 061            writer.WriteObjectValue(Command);
 062            if (Optional.IsDefined(CommandTimeout))
 63            {
 064                writer.WritePropertyName("commandTimeout");
 065                writer.WriteObjectValue(CommandTimeout);
 66            }
 067            writer.WriteEndObject();
 068            foreach (var item in AdditionalProperties)
 69            {
 070                writer.WritePropertyName(item.Key);
 071                writer.WriteObjectValue(item.Value);
 72            }
 073            writer.WriteEndObject();
 074        }
 75
 76        internal static AzureDataExplorerCommandActivity DeserializeAzureDataExplorerCommandActivity(JsonElement element
 77        {
 078            Optional<LinkedServiceReference> linkedServiceName = default;
 079            Optional<ActivityPolicy> policy = default;
 080            string name = default;
 081            string type = default;
 082            Optional<string> description = default;
 083            Optional<IList<ActivityDependency>> dependsOn = default;
 084            Optional<IList<UserProperty>> userProperties = default;
 085            object command = default;
 086            Optional<object> commandTimeout = default;
 087            IDictionary<string, object> additionalProperties = default;
 088            Dictionary<string, object> additionalPropertiesDictionary = default;
 089            foreach (var property in element.EnumerateObject())
 90            {
 091                if (property.NameEquals("linkedServiceName"))
 92                {
 093                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
 094                    continue;
 95                }
 096                if (property.NameEquals("policy"))
 97                {
 098                    policy = ActivityPolicy.DeserializeActivityPolicy(property.Value);
 099                    continue;
 100                }
 0101                if (property.NameEquals("name"))
 102                {
 0103                    name = property.Value.GetString();
 0104                    continue;
 105                }
 0106                if (property.NameEquals("type"))
 107                {
 0108                    type = property.Value.GetString();
 0109                    continue;
 110                }
 0111                if (property.NameEquals("description"))
 112                {
 0113                    description = property.Value.GetString();
 0114                    continue;
 115                }
 0116                if (property.NameEquals("dependsOn"))
 117                {
 0118                    List<ActivityDependency> array = new List<ActivityDependency>();
 0119                    foreach (var item in property.Value.EnumerateArray())
 120                    {
 0121                        array.Add(ActivityDependency.DeserializeActivityDependency(item));
 122                    }
 0123                    dependsOn = array;
 0124                    continue;
 125                }
 0126                if (property.NameEquals("userProperties"))
 127                {
 0128                    List<UserProperty> array = new List<UserProperty>();
 0129                    foreach (var item in property.Value.EnumerateArray())
 130                    {
 0131                        array.Add(UserProperty.DeserializeUserProperty(item));
 132                    }
 0133                    userProperties = array;
 0134                    continue;
 135                }
 0136                if (property.NameEquals("typeProperties"))
 137                {
 0138                    foreach (var property0 in property.Value.EnumerateObject())
 139                    {
 0140                        if (property0.NameEquals("command"))
 141                        {
 0142                            command = property0.Value.GetObject();
 0143                            continue;
 144                        }
 0145                        if (property0.NameEquals("commandTimeout"))
 146                        {
 0147                            commandTimeout = property0.Value.GetObject();
 148                            continue;
 149                        }
 150                    }
 151                    continue;
 152                }
 0153                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0154                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 155            }
 0156            additionalProperties = additionalPropertiesDictionary;
 0157            return new AzureDataExplorerCommandActivity(name, type, description.Value, Optional.ToList(dependsOn), Optio
 158        }
 159    }
 160}