< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_AccountName()-0%100%
get_ServicePrincipalId()-0%100%
get_ServicePrincipalKey()-0%100%
get_Tenant()-0%100%
get_SubscriptionId()-0%100%
get_ResourceGroupName()-0%100%
get_DataLakeAnalyticsUri()-0%100%
get_EncryptedCredential()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeAzureDataLakeAnalyticsLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureDataLakeAnalyticsLinkedService.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 Lake Analytics linked service. </summary>
 14    public partial class AzureDataLakeAnalyticsLinkedService : LinkedService
 15    {
 16        /// <summary> Initializes a new instance of AzureDataLakeAnalyticsLinkedService. </summary>
 17        /// <param name="accountName"> The Azure Data Lake Analytics account name. Type: string (or Expression with resu
 18        /// <param name="tenant"> The name or ID of the tenant to which the service principal belongs. Type: string (or 
 19        /// <exception cref="ArgumentNullException"> <paramref name="accountName"/> or <paramref name="tenant"/> is null
 020        public AzureDataLakeAnalyticsLinkedService(object accountName, object tenant)
 21        {
 022            if (accountName == null)
 23            {
 024                throw new ArgumentNullException(nameof(accountName));
 25            }
 026            if (tenant == null)
 27            {
 028                throw new ArgumentNullException(nameof(tenant));
 29            }
 30
 031            AccountName = accountName;
 032            Tenant = tenant;
 033            Type = "AzureDataLakeAnalytics";
 034        }
 35
 36        /// <summary> Initializes a new instance of AzureDataLakeAnalyticsLinkedService. </summary>
 37        /// <param name="type"> Type of linked service. </param>
 38        /// <param name="connectVia"> The integration runtime reference. </param>
 39        /// <param name="description"> Linked service description. </param>
 40        /// <param name="parameters"> Parameters for linked service. </param>
 41        /// <param name="annotations"> List of tags that can be used for describing the linked service. </param>
 42        /// <param name="additionalProperties"> . </param>
 43        /// <param name="accountName"> The Azure Data Lake Analytics account name. Type: string (or Expression with resu
 44        /// <param name="servicePrincipalId"> The ID of the application used to authenticate against the Azure Data Lake
 45        /// <param name="servicePrincipalKey"> The Key of the application used to authenticate against the Azure Data La
 46        /// <param name="tenant"> The name or ID of the tenant to which the service principal belongs. Type: string (or 
 47        /// <param name="subscriptionId"> Data Lake Analytics account subscription ID (if different from Data Factory ac
 48        /// <param name="resourceGroupName"> Data Lake Analytics account resource group name (if different from Data Fac
 49        /// <param name="dataLakeAnalyticsUri"> Azure Data Lake Analytics URI Type: string (or Expression with resultTyp
 50        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 051        internal AzureDataLakeAnalyticsLinkedService(string type, IntegrationRuntimeReference connectVia, string descrip
 52        {
 053            AccountName = accountName;
 054            ServicePrincipalId = servicePrincipalId;
 055            ServicePrincipalKey = servicePrincipalKey;
 056            Tenant = tenant;
 057            SubscriptionId = subscriptionId;
 058            ResourceGroupName = resourceGroupName;
 059            DataLakeAnalyticsUri = dataLakeAnalyticsUri;
 060            EncryptedCredential = encryptedCredential;
 061            Type = type ?? "AzureDataLakeAnalytics";
 062        }
 63
 64        /// <summary> The Azure Data Lake Analytics account name. Type: string (or Expression with resultType string). <
 065        public object AccountName { get; set; }
 66        /// <summary> The ID of the application used to authenticate against the Azure Data Lake Analytics account. Type
 067        public object ServicePrincipalId { get; set; }
 68        /// <summary> The Key of the application used to authenticate against the Azure Data Lake Analytics account. </s
 069        public SecretBase ServicePrincipalKey { get; set; }
 70        /// <summary> The name or ID of the tenant to which the service principal belongs. Type: string (or Expression w
 071        public object Tenant { get; set; }
 72        /// <summary> Data Lake Analytics account subscription ID (if different from Data Factory account). Type: string
 073        public object SubscriptionId { get; set; }
 74        /// <summary> Data Lake Analytics account resource group name (if different from Data Factory account). Type: st
 075        public object ResourceGroupName { get; set; }
 76        /// <summary> Azure Data Lake Analytics URI Type: string (or Expression with resultType string). </summary>
 077        public object DataLakeAnalyticsUri { get; set; }
 78        /// <summary> The encrypted credential used for authentication. Credentials are encrypted using the integration 
 079        public object EncryptedCredential { get; set; }
 80    }
 81}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureDataLakeAnalyticsLinkedService.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 AzureDataLakeAnalyticsLinkedService : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            writer.WritePropertyName("type");
 020            writer.WriteStringValue(Type);
 021            if (Optional.IsDefined(ConnectVia))
 22            {
 023                writer.WritePropertyName("connectVia");
 024                writer.WriteObjectValue(ConnectVia);
 25            }
 026            if (Optional.IsDefined(Description))
 27            {
 028                writer.WritePropertyName("description");
 029                writer.WriteStringValue(Description);
 30            }
 031            if (Optional.IsCollectionDefined(Parameters))
 32            {
 033                writer.WritePropertyName("parameters");
 034                writer.WriteStartObject();
 035                foreach (var item in Parameters)
 36                {
 037                    writer.WritePropertyName(item.Key);
 038                    writer.WriteObjectValue(item.Value);
 39                }
 040                writer.WriteEndObject();
 41            }
 042            if (Optional.IsCollectionDefined(Annotations))
 43            {
 044                writer.WritePropertyName("annotations");
 045                writer.WriteStartArray();
 046                foreach (var item in Annotations)
 47                {
 048                    writer.WriteObjectValue(item);
 49                }
 050                writer.WriteEndArray();
 51            }
 052            writer.WritePropertyName("typeProperties");
 053            writer.WriteStartObject();
 054            writer.WritePropertyName("accountName");
 055            writer.WriteObjectValue(AccountName);
 056            if (Optional.IsDefined(ServicePrincipalId))
 57            {
 058                writer.WritePropertyName("servicePrincipalId");
 059                writer.WriteObjectValue(ServicePrincipalId);
 60            }
 061            if (Optional.IsDefined(ServicePrincipalKey))
 62            {
 063                writer.WritePropertyName("servicePrincipalKey");
 064                writer.WriteObjectValue(ServicePrincipalKey);
 65            }
 066            writer.WritePropertyName("tenant");
 067            writer.WriteObjectValue(Tenant);
 068            if (Optional.IsDefined(SubscriptionId))
 69            {
 070                writer.WritePropertyName("subscriptionId");
 071                writer.WriteObjectValue(SubscriptionId);
 72            }
 073            if (Optional.IsDefined(ResourceGroupName))
 74            {
 075                writer.WritePropertyName("resourceGroupName");
 076                writer.WriteObjectValue(ResourceGroupName);
 77            }
 078            if (Optional.IsDefined(DataLakeAnalyticsUri))
 79            {
 080                writer.WritePropertyName("dataLakeAnalyticsUri");
 081                writer.WriteObjectValue(DataLakeAnalyticsUri);
 82            }
 083            if (Optional.IsDefined(EncryptedCredential))
 84            {
 085                writer.WritePropertyName("encryptedCredential");
 086                writer.WriteObjectValue(EncryptedCredential);
 87            }
 088            writer.WriteEndObject();
 089            foreach (var item in AdditionalProperties)
 90            {
 091                writer.WritePropertyName(item.Key);
 092                writer.WriteObjectValue(item.Value);
 93            }
 094            writer.WriteEndObject();
 095        }
 96
 97        internal static AzureDataLakeAnalyticsLinkedService DeserializeAzureDataLakeAnalyticsLinkedService(JsonElement e
 98        {
 099            string type = default;
 0100            Optional<IntegrationRuntimeReference> connectVia = default;
 0101            Optional<string> description = default;
 0102            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 0103            Optional<IList<object>> annotations = default;
 0104            object accountName = default;
 0105            Optional<object> servicePrincipalId = default;
 0106            Optional<SecretBase> servicePrincipalKey = default;
 0107            object tenant = default;
 0108            Optional<object> subscriptionId = default;
 0109            Optional<object> resourceGroupName = default;
 0110            Optional<object> dataLakeAnalyticsUri = default;
 0111            Optional<object> encryptedCredential = default;
 0112            IDictionary<string, object> additionalProperties = default;
 0113            Dictionary<string, object> additionalPropertiesDictionary = default;
 0114            foreach (var property in element.EnumerateObject())
 115            {
 0116                if (property.NameEquals("type"))
 117                {
 0118                    type = property.Value.GetString();
 0119                    continue;
 120                }
 0121                if (property.NameEquals("connectVia"))
 122                {
 0123                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
 0124                    continue;
 125                }
 0126                if (property.NameEquals("description"))
 127                {
 0128                    description = property.Value.GetString();
 0129                    continue;
 130                }
 0131                if (property.NameEquals("parameters"))
 132                {
 0133                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0134                    foreach (var property0 in property.Value.EnumerateObject())
 135                    {
 0136                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 137                    }
 0138                    parameters = dictionary;
 0139                    continue;
 140                }
 0141                if (property.NameEquals("annotations"))
 142                {
 0143                    List<object> array = new List<object>();
 0144                    foreach (var item in property.Value.EnumerateArray())
 145                    {
 0146                        array.Add(item.GetObject());
 147                    }
 0148                    annotations = array;
 0149                    continue;
 150                }
 0151                if (property.NameEquals("typeProperties"))
 152                {
 0153                    foreach (var property0 in property.Value.EnumerateObject())
 154                    {
 0155                        if (property0.NameEquals("accountName"))
 156                        {
 0157                            accountName = property0.Value.GetObject();
 0158                            continue;
 159                        }
 0160                        if (property0.NameEquals("servicePrincipalId"))
 161                        {
 0162                            servicePrincipalId = property0.Value.GetObject();
 0163                            continue;
 164                        }
 0165                        if (property0.NameEquals("servicePrincipalKey"))
 166                        {
 0167                            servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value);
 0168                            continue;
 169                        }
 0170                        if (property0.NameEquals("tenant"))
 171                        {
 0172                            tenant = property0.Value.GetObject();
 0173                            continue;
 174                        }
 0175                        if (property0.NameEquals("subscriptionId"))
 176                        {
 0177                            subscriptionId = property0.Value.GetObject();
 0178                            continue;
 179                        }
 0180                        if (property0.NameEquals("resourceGroupName"))
 181                        {
 0182                            resourceGroupName = property0.Value.GetObject();
 0183                            continue;
 184                        }
 0185                        if (property0.NameEquals("dataLakeAnalyticsUri"))
 186                        {
 0187                            dataLakeAnalyticsUri = property0.Value.GetObject();
 0188                            continue;
 189                        }
 0190                        if (property0.NameEquals("encryptedCredential"))
 191                        {
 0192                            encryptedCredential = property0.Value.GetObject();
 193                            continue;
 194                        }
 195                    }
 196                    continue;
 197                }
 0198                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0199                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 200            }
 0201            additionalProperties = additionalPropertiesDictionary;
 0202            return new AzureDataLakeAnalyticsLinkedService(type, connectVia.Value, description.Value, Optional.ToDiction
 203        }
 204    }
 205}