< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_Source()-0%100%
get_Dataset()-0%100%
get_FirstRowOnly()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeLookupActivity(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\LookupActivity.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> Lookup activity. </summary>
 14    public partial class LookupActivity : ExecutionActivity
 15    {
 16        /// <summary> Initializes a new instance of LookupActivity. </summary>
 17        /// <param name="name"> Activity name. </param>
 18        /// <param name="source"> Dataset-specific source properties, same as copy activity source. </param>
 19        /// <param name="dataset"> Lookup activity dataset reference. </param>
 20        /// <exception cref="ArgumentNullException"> <paramref name="name"/>, <paramref name="source"/>, or <paramref na
 021        public LookupActivity(string name, CopySource source, DatasetReference dataset) : base(name)
 22        {
 023            if (name == null)
 24            {
 025                throw new ArgumentNullException(nameof(name));
 26            }
 027            if (source == null)
 28            {
 029                throw new ArgumentNullException(nameof(source));
 30            }
 031            if (dataset == null)
 32            {
 033                throw new ArgumentNullException(nameof(dataset));
 34            }
 35
 036            Source = source;
 037            Dataset = dataset;
 038            Type = "Lookup";
 039        }
 40
 41        /// <summary> Initializes a new instance of LookupActivity. </summary>
 42        /// <param name="name"> Activity name. </param>
 43        /// <param name="type"> Type of activity. </param>
 44        /// <param name="description"> Activity description. </param>
 45        /// <param name="dependsOn"> Activity depends on condition. </param>
 46        /// <param name="userProperties"> Activity user properties. </param>
 47        /// <param name="additionalProperties"> . </param>
 48        /// <param name="linkedServiceName"> Linked service reference. </param>
 49        /// <param name="policy"> Activity policy. </param>
 50        /// <param name="source"> Dataset-specific source properties, same as copy activity source. </param>
 51        /// <param name="dataset"> Lookup activity dataset reference. </param>
 52        /// <param name="firstRowOnly"> Whether to return first row or all rows. Default value is true. Type: boolean (o
 053        internal LookupActivity(string name, string type, string description, IList<ActivityDependency> dependsOn, IList
 54        {
 055            Source = source;
 056            Dataset = dataset;
 057            FirstRowOnly = firstRowOnly;
 058            Type = type ?? "Lookup";
 059        }
 60
 61        /// <summary> Dataset-specific source properties, same as copy activity source. </summary>
 062        public CopySource Source { get; set; }
 63        /// <summary> Lookup activity dataset reference. </summary>
 064        public DatasetReference Dataset { get; set; }
 65        /// <summary> Whether to return first row or all rows. Default value is true. Type: boolean (or Expression with 
 066        public object FirstRowOnly { get; set; }
 67    }
 68}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\LookupActivity.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 LookupActivity : 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("source");
 061            writer.WriteObjectValue(Source);
 062            writer.WritePropertyName("dataset");
 063            writer.WriteObjectValue(Dataset);
 064            if (Optional.IsDefined(FirstRowOnly))
 65            {
 066                writer.WritePropertyName("firstRowOnly");
 067                writer.WriteObjectValue(FirstRowOnly);
 68            }
 069            writer.WriteEndObject();
 070            foreach (var item in AdditionalProperties)
 71            {
 072                writer.WritePropertyName(item.Key);
 073                writer.WriteObjectValue(item.Value);
 74            }
 075            writer.WriteEndObject();
 076        }
 77
 78        internal static LookupActivity DeserializeLookupActivity(JsonElement element)
 79        {
 080            Optional<LinkedServiceReference> linkedServiceName = default;
 081            Optional<ActivityPolicy> policy = default;
 082            string name = default;
 083            string type = default;
 084            Optional<string> description = default;
 085            Optional<IList<ActivityDependency>> dependsOn = default;
 086            Optional<IList<UserProperty>> userProperties = default;
 087            CopySource source = default;
 088            DatasetReference dataset = default;
 089            Optional<object> firstRowOnly = default;
 090            IDictionary<string, object> additionalProperties = default;
 091            Dictionary<string, object> additionalPropertiesDictionary = default;
 092            foreach (var property in element.EnumerateObject())
 93            {
 094                if (property.NameEquals("linkedServiceName"))
 95                {
 096                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
 097                    continue;
 98                }
 099                if (property.NameEquals("policy"))
 100                {
 0101                    policy = ActivityPolicy.DeserializeActivityPolicy(property.Value);
 0102                    continue;
 103                }
 0104                if (property.NameEquals("name"))
 105                {
 0106                    name = property.Value.GetString();
 0107                    continue;
 108                }
 0109                if (property.NameEquals("type"))
 110                {
 0111                    type = property.Value.GetString();
 0112                    continue;
 113                }
 0114                if (property.NameEquals("description"))
 115                {
 0116                    description = property.Value.GetString();
 0117                    continue;
 118                }
 0119                if (property.NameEquals("dependsOn"))
 120                {
 0121                    List<ActivityDependency> array = new List<ActivityDependency>();
 0122                    foreach (var item in property.Value.EnumerateArray())
 123                    {
 0124                        array.Add(ActivityDependency.DeserializeActivityDependency(item));
 125                    }
 0126                    dependsOn = array;
 0127                    continue;
 128                }
 0129                if (property.NameEquals("userProperties"))
 130                {
 0131                    List<UserProperty> array = new List<UserProperty>();
 0132                    foreach (var item in property.Value.EnumerateArray())
 133                    {
 0134                        array.Add(UserProperty.DeserializeUserProperty(item));
 135                    }
 0136                    userProperties = array;
 0137                    continue;
 138                }
 0139                if (property.NameEquals("typeProperties"))
 140                {
 0141                    foreach (var property0 in property.Value.EnumerateObject())
 142                    {
 0143                        if (property0.NameEquals("source"))
 144                        {
 0145                            source = CopySource.DeserializeCopySource(property0.Value);
 0146                            continue;
 147                        }
 0148                        if (property0.NameEquals("dataset"))
 149                        {
 0150                            dataset = DatasetReference.DeserializeDatasetReference(property0.Value);
 0151                            continue;
 152                        }
 0153                        if (property0.NameEquals("firstRowOnly"))
 154                        {
 0155                            firstRowOnly = property0.Value.GetObject();
 156                            continue;
 157                        }
 158                    }
 159                    continue;
 160                }
 0161                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0162                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 163            }
 0164            additionalProperties = additionalPropertiesDictionary;
 0165            return new LookupActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userPro
 166        }
 167    }
 168}