< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%0%
get_ConnectionString()-0%100%
get_AccountKey()-0%100%
get_SasUri()-0%100%
get_SasToken()-0%100%
get_ServiceEndpoint()-0%100%
get_ServicePrincipalId()-0%100%
get_ServicePrincipalKey()-0%100%
get_Tenant()-0%100%
get_EncryptedCredential()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeAzureBlobStorageLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureBlobStorageLinkedService.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;
 9
 10namespace Azure.Analytics.Synapse.Artifacts.Models
 11{
 12    /// <summary> The azure blob storage linked service. </summary>
 13    public partial class AzureBlobStorageLinkedService : LinkedService
 14    {
 15        /// <summary> Initializes a new instance of AzureBlobStorageLinkedService. </summary>
 016        public AzureBlobStorageLinkedService()
 17        {
 018            Type = "AzureBlobStorage";
 019        }
 20
 21        /// <summary> Initializes a new instance of AzureBlobStorageLinkedService. </summary>
 22        /// <param name="type"> Type of linked service. </param>
 23        /// <param name="connectVia"> The integration runtime reference. </param>
 24        /// <param name="description"> Linked service description. </param>
 25        /// <param name="parameters"> Parameters for linked service. </param>
 26        /// <param name="annotations"> List of tags that can be used for describing the linked service. </param>
 27        /// <param name="additionalProperties"> . </param>
 28        /// <param name="connectionString"> The connection string. It is mutually exclusive with sasUri, serviceEndpoint
 29        /// <param name="accountKey"> The Azure key vault secret reference of accountKey in connection string. </param>
 30        /// <param name="sasUri"> SAS URI of the Azure Blob Storage resource. It is mutually exclusive with connectionSt
 31        /// <param name="sasToken"> The Azure key vault secret reference of sasToken in sas uri. </param>
 32        /// <param name="serviceEndpoint"> Blob service endpoint of the Azure Blob Storage resource. It is mutually excl
 33        /// <param name="servicePrincipalId"> The ID of the service principal used to authenticate against Azure SQL Dat
 34        /// <param name="servicePrincipalKey"> The key of the service principal used to authenticate against Azure SQL D
 35        /// <param name="tenant"> The name or ID of the tenant to which the service principal belongs. Type: string (or 
 36        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 037        internal AzureBlobStorageLinkedService(string type, IntegrationRuntimeReference connectVia, string description, 
 38        {
 039            ConnectionString = connectionString;
 040            AccountKey = accountKey;
 041            SasUri = sasUri;
 042            SasToken = sasToken;
 043            ServiceEndpoint = serviceEndpoint;
 044            ServicePrincipalId = servicePrincipalId;
 045            ServicePrincipalKey = servicePrincipalKey;
 046            Tenant = tenant;
 047            EncryptedCredential = encryptedCredential;
 048            Type = type ?? "AzureBlobStorage";
 049        }
 50
 51        /// <summary> The connection string. It is mutually exclusive with sasUri, serviceEndpoint property. Type: strin
 052        public object ConnectionString { get; set; }
 53        /// <summary> The Azure key vault secret reference of accountKey in connection string. </summary>
 054        public AzureKeyVaultSecretReference AccountKey { get; set; }
 55        /// <summary> SAS URI of the Azure Blob Storage resource. It is mutually exclusive with connectionString, servic
 056        public object SasUri { get; set; }
 57        /// <summary> The Azure key vault secret reference of sasToken in sas uri. </summary>
 058        public AzureKeyVaultSecretReference SasToken { get; set; }
 59        /// <summary> Blob service endpoint of the Azure Blob Storage resource. It is mutually exclusive with connection
 060        public string ServiceEndpoint { get; set; }
 61        /// <summary> The ID of the service principal used to authenticate against Azure SQL Data Warehouse. Type: strin
 062        public object ServicePrincipalId { get; set; }
 63        /// <summary> The key of the service principal used to authenticate against Azure SQL Data Warehouse. </summary>
 064        public SecretBase ServicePrincipalKey { get; set; }
 65        /// <summary> The name or ID of the tenant to which the service principal belongs. Type: string (or Expression w
 066        public object Tenant { get; set; }
 67        /// <summary> The encrypted credential used for authentication. Credentials are encrypted using the integration 
 068        public string EncryptedCredential { get; set; }
 69    }
 70}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureBlobStorageLinkedService.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 AzureBlobStorageLinkedService : 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            if (Optional.IsDefined(ConnectionString))
 55            {
 056                writer.WritePropertyName("connectionString");
 057                writer.WriteObjectValue(ConnectionString);
 58            }
 059            if (Optional.IsDefined(AccountKey))
 60            {
 061                writer.WritePropertyName("accountKey");
 062                writer.WriteObjectValue(AccountKey);
 63            }
 064            if (Optional.IsDefined(SasUri))
 65            {
 066                writer.WritePropertyName("sasUri");
 067                writer.WriteObjectValue(SasUri);
 68            }
 069            if (Optional.IsDefined(SasToken))
 70            {
 071                writer.WritePropertyName("sasToken");
 072                writer.WriteObjectValue(SasToken);
 73            }
 074            if (Optional.IsDefined(ServiceEndpoint))
 75            {
 076                writer.WritePropertyName("serviceEndpoint");
 077                writer.WriteStringValue(ServiceEndpoint);
 78            }
 079            if (Optional.IsDefined(ServicePrincipalId))
 80            {
 081                writer.WritePropertyName("servicePrincipalId");
 082                writer.WriteObjectValue(ServicePrincipalId);
 83            }
 084            if (Optional.IsDefined(ServicePrincipalKey))
 85            {
 086                writer.WritePropertyName("servicePrincipalKey");
 087                writer.WriteObjectValue(ServicePrincipalKey);
 88            }
 089            if (Optional.IsDefined(Tenant))
 90            {
 091                writer.WritePropertyName("tenant");
 092                writer.WriteObjectValue(Tenant);
 93            }
 094            if (Optional.IsDefined(EncryptedCredential))
 95            {
 096                writer.WritePropertyName("encryptedCredential");
 097                writer.WriteStringValue(EncryptedCredential);
 98            }
 099            writer.WriteEndObject();
 0100            foreach (var item in AdditionalProperties)
 101            {
 0102                writer.WritePropertyName(item.Key);
 0103                writer.WriteObjectValue(item.Value);
 104            }
 0105            writer.WriteEndObject();
 0106        }
 107
 108        internal static AzureBlobStorageLinkedService DeserializeAzureBlobStorageLinkedService(JsonElement element)
 109        {
 0110            string type = default;
 0111            Optional<IntegrationRuntimeReference> connectVia = default;
 0112            Optional<string> description = default;
 0113            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 0114            Optional<IList<object>> annotations = default;
 0115            Optional<object> connectionString = default;
 0116            Optional<AzureKeyVaultSecretReference> accountKey = default;
 0117            Optional<object> sasUri = default;
 0118            Optional<AzureKeyVaultSecretReference> sasToken = default;
 0119            Optional<string> serviceEndpoint = default;
 0120            Optional<object> servicePrincipalId = default;
 0121            Optional<SecretBase> servicePrincipalKey = default;
 0122            Optional<object> tenant = default;
 0123            Optional<string> encryptedCredential = default;
 0124            IDictionary<string, object> additionalProperties = default;
 0125            Dictionary<string, object> additionalPropertiesDictionary = default;
 0126            foreach (var property in element.EnumerateObject())
 127            {
 0128                if (property.NameEquals("type"))
 129                {
 0130                    type = property.Value.GetString();
 0131                    continue;
 132                }
 0133                if (property.NameEquals("connectVia"))
 134                {
 0135                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
 0136                    continue;
 137                }
 0138                if (property.NameEquals("description"))
 139                {
 0140                    description = property.Value.GetString();
 0141                    continue;
 142                }
 0143                if (property.NameEquals("parameters"))
 144                {
 0145                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0146                    foreach (var property0 in property.Value.EnumerateObject())
 147                    {
 0148                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 149                    }
 0150                    parameters = dictionary;
 0151                    continue;
 152                }
 0153                if (property.NameEquals("annotations"))
 154                {
 0155                    List<object> array = new List<object>();
 0156                    foreach (var item in property.Value.EnumerateArray())
 157                    {
 0158                        array.Add(item.GetObject());
 159                    }
 0160                    annotations = array;
 0161                    continue;
 162                }
 0163                if (property.NameEquals("typeProperties"))
 164                {
 0165                    foreach (var property0 in property.Value.EnumerateObject())
 166                    {
 0167                        if (property0.NameEquals("connectionString"))
 168                        {
 0169                            connectionString = property0.Value.GetObject();
 0170                            continue;
 171                        }
 0172                        if (property0.NameEquals("accountKey"))
 173                        {
 0174                            accountKey = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.
 0175                            continue;
 176                        }
 0177                        if (property0.NameEquals("sasUri"))
 178                        {
 0179                            sasUri = property0.Value.GetObject();
 0180                            continue;
 181                        }
 0182                        if (property0.NameEquals("sasToken"))
 183                        {
 0184                            sasToken = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Va
 0185                            continue;
 186                        }
 0187                        if (property0.NameEquals("serviceEndpoint"))
 188                        {
 0189                            serviceEndpoint = property0.Value.GetString();
 0190                            continue;
 191                        }
 0192                        if (property0.NameEquals("servicePrincipalId"))
 193                        {
 0194                            servicePrincipalId = property0.Value.GetObject();
 0195                            continue;
 196                        }
 0197                        if (property0.NameEquals("servicePrincipalKey"))
 198                        {
 0199                            servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value);
 0200                            continue;
 201                        }
 0202                        if (property0.NameEquals("tenant"))
 203                        {
 0204                            tenant = property0.Value.GetObject();
 0205                            continue;
 206                        }
 0207                        if (property0.NameEquals("encryptedCredential"))
 208                        {
 0209                            encryptedCredential = property0.Value.GetString();
 210                            continue;
 211                        }
 212                    }
 213                    continue;
 214                }
 0215                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0216                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 217            }
 0218            additionalProperties = additionalPropertiesDictionary;
 0219            return new AzureBlobStorageLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(pa
 220        }
 221    }
 222}