< Summary

Class:Azure.Analytics.Synapse.Artifacts.Models.AzureDataLakeStoreLinkedService
Assembly:Azure.Analytics.Synapse.Artifacts
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureDataLakeStoreLinkedService.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureDataLakeStoreLinkedService.Serialization.cs
Covered lines:0
Uncovered lines:144
Coverable lines:144
Total lines:283
Line coverage:0% (0 of 144)
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_DataLakeStoreUri()-0%100%
get_ServicePrincipalId()-0%100%
get_ServicePrincipalKey()-0%100%
get_Tenant()-0%100%
get_AccountName()-0%100%
get_SubscriptionId()-0%100%
get_ResourceGroupName()-0%100%
get_EncryptedCredential()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeAzureDataLakeStoreLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureDataLakeStoreLinkedService.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 Store linked service. </summary>
 14    public partial class AzureDataLakeStoreLinkedService : LinkedService
 15    {
 16        /// <summary> Initializes a new instance of AzureDataLakeStoreLinkedService. </summary>
 17        /// <param name="dataLakeStoreUri"> Data Lake Store service URI. Type: string (or Expression with resultType str
 18        /// <exception cref="ArgumentNullException"> <paramref name="dataLakeStoreUri"/> is null. </exception>
 019        public AzureDataLakeStoreLinkedService(object dataLakeStoreUri)
 20        {
 021            if (dataLakeStoreUri == null)
 22            {
 023                throw new ArgumentNullException(nameof(dataLakeStoreUri));
 24            }
 25
 026            DataLakeStoreUri = dataLakeStoreUri;
 027            Type = "AzureDataLakeStore";
 028        }
 29
 30        /// <summary> Initializes a new instance of AzureDataLakeStoreLinkedService. </summary>
 31        /// <param name="type"> Type of linked service. </param>
 32        /// <param name="connectVia"> The integration runtime reference. </param>
 33        /// <param name="description"> Linked service description. </param>
 34        /// <param name="parameters"> Parameters for linked service. </param>
 35        /// <param name="annotations"> List of tags that can be used for describing the linked service. </param>
 36        /// <param name="additionalProperties"> . </param>
 37        /// <param name="dataLakeStoreUri"> Data Lake Store service URI. Type: string (or Expression with resultType str
 38        /// <param name="servicePrincipalId"> The ID of the application used to authenticate against the Azure Data Lake
 39        /// <param name="servicePrincipalKey"> The Key of the application used to authenticate against the Azure Data La
 40        /// <param name="tenant"> The name or ID of the tenant to which the service principal belongs. Type: string (or 
 41        /// <param name="accountName"> Data Lake Store account name. Type: string (or Expression with resultType string)
 42        /// <param name="subscriptionId"> Data Lake Store account subscription ID (if different from Data Factory accoun
 43        /// <param name="resourceGroupName"> Data Lake Store account resource group name (if different from Data Factory
 44        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 045        internal AzureDataLakeStoreLinkedService(string type, IntegrationRuntimeReference connectVia, string description
 46        {
 047            DataLakeStoreUri = dataLakeStoreUri;
 048            ServicePrincipalId = servicePrincipalId;
 049            ServicePrincipalKey = servicePrincipalKey;
 050            Tenant = tenant;
 051            AccountName = accountName;
 052            SubscriptionId = subscriptionId;
 053            ResourceGroupName = resourceGroupName;
 054            EncryptedCredential = encryptedCredential;
 055            Type = type ?? "AzureDataLakeStore";
 056        }
 57
 58        /// <summary> Data Lake Store service URI. Type: string (or Expression with resultType string). </summary>
 059        public object DataLakeStoreUri { get; set; }
 60        /// <summary> The ID of the application used to authenticate against the Azure Data Lake Store account. Type: st
 061        public object ServicePrincipalId { get; set; }
 62        /// <summary> The Key of the application used to authenticate against the Azure Data Lake Store account. </summa
 063        public SecretBase ServicePrincipalKey { get; set; }
 64        /// <summary> The name or ID of the tenant to which the service principal belongs. Type: string (or Expression w
 065        public object Tenant { get; set; }
 66        /// <summary> Data Lake Store account name. Type: string (or Expression with resultType string). </summary>
 067        public object AccountName { get; set; }
 68        /// <summary> Data Lake Store account subscription ID (if different from Data Factory account). Type: string (or
 069        public object SubscriptionId { get; set; }
 70        /// <summary> Data Lake Store account resource group name (if different from Data Factory account). Type: string
 071        public object ResourceGroupName { get; set; }
 72        /// <summary> The encrypted credential used for authentication. Credentials are encrypted using the integration 
 073        public object EncryptedCredential { get; set; }
 74    }
 75}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureDataLakeStoreLinkedService.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 AzureDataLakeStoreLinkedService : 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("dataLakeStoreUri");
 055            writer.WriteObjectValue(DataLakeStoreUri);
 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            if (Optional.IsDefined(Tenant))
 67            {
 068                writer.WritePropertyName("tenant");
 069                writer.WriteObjectValue(Tenant);
 70            }
 071            if (Optional.IsDefined(AccountName))
 72            {
 073                writer.WritePropertyName("accountName");
 074                writer.WriteObjectValue(AccountName);
 75            }
 076            if (Optional.IsDefined(SubscriptionId))
 77            {
 078                writer.WritePropertyName("subscriptionId");
 079                writer.WriteObjectValue(SubscriptionId);
 80            }
 081            if (Optional.IsDefined(ResourceGroupName))
 82            {
 083                writer.WritePropertyName("resourceGroupName");
 084                writer.WriteObjectValue(ResourceGroupName);
 85            }
 086            if (Optional.IsDefined(EncryptedCredential))
 87            {
 088                writer.WritePropertyName("encryptedCredential");
 089                writer.WriteObjectValue(EncryptedCredential);
 90            }
 091            writer.WriteEndObject();
 092            foreach (var item in AdditionalProperties)
 93            {
 094                writer.WritePropertyName(item.Key);
 095                writer.WriteObjectValue(item.Value);
 96            }
 097            writer.WriteEndObject();
 098        }
 99
 100        internal static AzureDataLakeStoreLinkedService DeserializeAzureDataLakeStoreLinkedService(JsonElement element)
 101        {
 0102            string type = default;
 0103            Optional<IntegrationRuntimeReference> connectVia = default;
 0104            Optional<string> description = default;
 0105            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 0106            Optional<IList<object>> annotations = default;
 0107            object dataLakeStoreUri = default;
 0108            Optional<object> servicePrincipalId = default;
 0109            Optional<SecretBase> servicePrincipalKey = default;
 0110            Optional<object> tenant = default;
 0111            Optional<object> accountName = default;
 0112            Optional<object> subscriptionId = default;
 0113            Optional<object> resourceGroupName = default;
 0114            Optional<object> encryptedCredential = default;
 0115            IDictionary<string, object> additionalProperties = default;
 0116            Dictionary<string, object> additionalPropertiesDictionary = default;
 0117            foreach (var property in element.EnumerateObject())
 118            {
 0119                if (property.NameEquals("type"))
 120                {
 0121                    type = property.Value.GetString();
 0122                    continue;
 123                }
 0124                if (property.NameEquals("connectVia"))
 125                {
 0126                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
 0127                    continue;
 128                }
 0129                if (property.NameEquals("description"))
 130                {
 0131                    description = property.Value.GetString();
 0132                    continue;
 133                }
 0134                if (property.NameEquals("parameters"))
 135                {
 0136                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0137                    foreach (var property0 in property.Value.EnumerateObject())
 138                    {
 0139                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 140                    }
 0141                    parameters = dictionary;
 0142                    continue;
 143                }
 0144                if (property.NameEquals("annotations"))
 145                {
 0146                    List<object> array = new List<object>();
 0147                    foreach (var item in property.Value.EnumerateArray())
 148                    {
 0149                        array.Add(item.GetObject());
 150                    }
 0151                    annotations = array;
 0152                    continue;
 153                }
 0154                if (property.NameEquals("typeProperties"))
 155                {
 0156                    foreach (var property0 in property.Value.EnumerateObject())
 157                    {
 0158                        if (property0.NameEquals("dataLakeStoreUri"))
 159                        {
 0160                            dataLakeStoreUri = property0.Value.GetObject();
 0161                            continue;
 162                        }
 0163                        if (property0.NameEquals("servicePrincipalId"))
 164                        {
 0165                            servicePrincipalId = property0.Value.GetObject();
 0166                            continue;
 167                        }
 0168                        if (property0.NameEquals("servicePrincipalKey"))
 169                        {
 0170                            servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value);
 0171                            continue;
 172                        }
 0173                        if (property0.NameEquals("tenant"))
 174                        {
 0175                            tenant = property0.Value.GetObject();
 0176                            continue;
 177                        }
 0178                        if (property0.NameEquals("accountName"))
 179                        {
 0180                            accountName = property0.Value.GetObject();
 0181                            continue;
 182                        }
 0183                        if (property0.NameEquals("subscriptionId"))
 184                        {
 0185                            subscriptionId = property0.Value.GetObject();
 0186                            continue;
 187                        }
 0188                        if (property0.NameEquals("resourceGroupName"))
 189                        {
 0190                            resourceGroupName = property0.Value.GetObject();
 0191                            continue;
 192                        }
 0193                        if (property0.NameEquals("encryptedCredential"))
 194                        {
 0195                            encryptedCredential = property0.Value.GetObject();
 196                            continue;
 197                        }
 198                    }
 199                    continue;
 200                }
 0201                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0202                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 203            }
 0204            additionalProperties = additionalPropertiesDictionary;
 0205            return new AzureDataLakeStoreLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(
 206        }
 207    }
 208}