< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%0%
get_Type()-0%100%
get_ConnectVia()-0%100%
get_Description()-0%100%
get_Parameters()-0%100%
get_Annotations()-0%100%
get_AdditionalProperties()-0%100%
GetEnumerator()-0%100%
System.Collections.IEnumerable.GetEnumerator()-0%100%
TryGetValue(...)-0%100%
ContainsKey(...)-0%100%
get_Keys()-0%100%
get_Values()-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.get_Count()-0%100%
Add(...)-0%100%
Remove(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.get_IsReadOnly()-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Add(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Remove(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Contains(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.CopyTo(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Clear()-0%100%
get_Item(...)-0%100%
set_Item(...)-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\LinkedService.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;
 9using System.Collections.Generic;
 10using Azure.Core;
 11
 12namespace Azure.Analytics.Synapse.Artifacts.Models
 13{
 14    /// <summary> The Azure Synapse nested object which contains the information and credential which can be used to con
 15    public partial class LinkedService : IDictionary<string, object>
 16    {
 17        /// <summary> Initializes a new instance of LinkedService. </summary>
 018        public LinkedService()
 19        {
 020            Parameters = new ChangeTrackingDictionary<string, ParameterSpecification>();
 021            Annotations = new ChangeTrackingList<object>();
 022            AdditionalProperties = new ChangeTrackingDictionary<string, object>();
 023            Type = "LinkedService";
 024        }
 25
 26        /// <summary> Initializes a new instance of LinkedService. </summary>
 27        /// <param name="type"> Type of linked service. </param>
 28        /// <param name="connectVia"> The integration runtime reference. </param>
 29        /// <param name="description"> Linked service description. </param>
 30        /// <param name="parameters"> Parameters for linked service. </param>
 31        /// <param name="annotations"> List of tags that can be used for describing the linked service. </param>
 32        /// <param name="additionalProperties"> . </param>
 033        internal LinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary<stri
 34        {
 035            Type = type ?? "LinkedService";
 036            ConnectVia = connectVia;
 037            Description = description;
 038            Parameters = parameters;
 039            Annotations = annotations;
 040            AdditionalProperties = additionalProperties;
 041        }
 42
 43        /// <summary> Type of linked service. </summary>
 044        internal string Type { get; set; }
 45        /// <summary> The integration runtime reference. </summary>
 046        public IntegrationRuntimeReference ConnectVia { get; set; }
 47        /// <summary> Linked service description. </summary>
 048        public string Description { get; set; }
 49        /// <summary> Parameters for linked service. </summary>
 050        public IDictionary<string, ParameterSpecification> Parameters { get; }
 51        /// <summary> List of tags that can be used for describing the linked service. </summary>
 052        public IList<object> Annotations { get; }
 053        internal IDictionary<string, object> AdditionalProperties { get; }
 54        /// <inheritdoc />
 055        public IEnumerator<KeyValuePair<string, object>> GetEnumerator() => AdditionalProperties.GetEnumerator();
 56        /// <inheritdoc />
 057        IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator();
 58        /// <inheritdoc />
 059        public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value);
 60        /// <inheritdoc />
 061        public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key);
 62        /// <inheritdoc />
 063        public ICollection<string> Keys => AdditionalProperties.Keys;
 64        /// <inheritdoc />
 065        public ICollection<object> Values => AdditionalProperties.Values;
 66        /// <inheritdoc />
 067        int ICollection<KeyValuePair<string, object>>.Count => AdditionalProperties.Count;
 68        /// <inheritdoc />
 069        public void Add(string key, object value) => AdditionalProperties.Add(key, value);
 70        /// <inheritdoc />
 071        public bool Remove(string key) => AdditionalProperties.Remove(key);
 72        /// <inheritdoc />
 073        bool ICollection<KeyValuePair<string, object>>.IsReadOnly => AdditionalProperties.IsReadOnly;
 74        /// <inheritdoc />
 075        void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> value) => AdditionalProperties.A
 76        /// <inheritdoc />
 077        bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> value) => AdditionalPropertie
 78        /// <inheritdoc />
 079        bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> value) => AdditionalPropert
 80        /// <inheritdoc />
 081        void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] destination, int offset) =>
 82        /// <inheritdoc />
 083        void ICollection<KeyValuePair<string, object>>.Clear() => AdditionalProperties.Clear();
 84        /// <inheritdoc />
 85        public object this[string key]
 86        {
 087            get => AdditionalProperties[key];
 088            set => AdditionalProperties[key] = value;
 89        }
 90    }
 91}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\LinkedService.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 LinkedService : 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            foreach (var item in AdditionalProperties)
 53            {
 054                writer.WritePropertyName(item.Key);
 055                writer.WriteObjectValue(item.Value);
 56            }
 057            writer.WriteEndObject();
 058        }
 59
 60        internal static LinkedService DeserializeLinkedService(JsonElement element)
 61        {
 062            if (element.TryGetProperty("type", out JsonElement discriminator))
 63            {
 064                switch (discriminator.GetString())
 65                {
 066                    case "AmazonMWS": return AmazonMWSLinkedService.DeserializeAmazonMWSLinkedService(element);
 067                    case "AmazonRedshift": return AmazonRedshiftLinkedService.DeserializeAmazonRedshiftLinkedService(ele
 068                    case "AmazonS3": return AmazonS3LinkedService.DeserializeAmazonS3LinkedService(element);
 069                    case "AzureBatch": return AzureBatchLinkedService.DeserializeAzureBatchLinkedService(element);
 070                    case "AzureBlobFS": return AzureBlobFSLinkedService.DeserializeAzureBlobFSLinkedService(element);
 071                    case "AzureBlobStorage": return AzureBlobStorageLinkedService.DeserializeAzureBlobStorageLinkedServi
 072                    case "AzureDataExplorer": return AzureDataExplorerLinkedService.DeserializeAzureDataExplorerLinkedSe
 073                    case "AzureDataLakeAnalytics": return AzureDataLakeAnalyticsLinkedService.DeserializeAzureDataLakeAn
 074                    case "AzureDataLakeStore": return AzureDataLakeStoreLinkedService.DeserializeAzureDataLakeStoreLinke
 075                    case "AzureDatabricks": return AzureDatabricksLinkedService.DeserializeAzureDatabricksLinkedService(
 076                    case "AzureFileStorage": return AzureFileStorageLinkedService.DeserializeAzureFileStorageLinkedServi
 077                    case "AzureFunction": return AzureFunctionLinkedService.DeserializeAzureFunctionLinkedService(elemen
 078                    case "AzureKeyVault": return AzureKeyVaultLinkedService.DeserializeAzureKeyVaultLinkedService(elemen
 079                    case "AzureML": return AzureMLLinkedService.DeserializeAzureMLLinkedService(element);
 080                    case "AzureMLService": return AzureMLServiceLinkedService.DeserializeAzureMLServiceLinkedService(ele
 081                    case "AzureMariaDB": return AzureMariaDBLinkedService.DeserializeAzureMariaDBLinkedService(element);
 082                    case "AzureMySql": return AzureMySqlLinkedService.DeserializeAzureMySqlLinkedService(element);
 083                    case "AzurePostgreSql": return AzurePostgreSqlLinkedService.DeserializeAzurePostgreSqlLinkedService(
 084                    case "AzureSearch": return AzureSearchLinkedService.DeserializeAzureSearchLinkedService(element);
 085                    case "AzureSqlDW": return AzureSqlDWLinkedService.DeserializeAzureSqlDWLinkedService(element);
 086                    case "AzureSqlDatabase": return AzureSqlDatabaseLinkedService.DeserializeAzureSqlDatabaseLinkedServi
 087                    case "AzureSqlMI": return AzureSqlMILinkedService.DeserializeAzureSqlMILinkedService(element);
 088                    case "AzureStorage": return AzureStorageLinkedService.DeserializeAzureStorageLinkedService(element);
 089                    case "AzureTableStorage": return AzureTableStorageLinkedService.DeserializeAzureTableStorageLinkedSe
 090                    case "Cassandra": return CassandraLinkedService.DeserializeCassandraLinkedService(element);
 091                    case "CommonDataServiceForApps": return CommonDataServiceForAppsLinkedService.DeserializeCommonDataS
 092                    case "Concur": return ConcurLinkedService.DeserializeConcurLinkedService(element);
 093                    case "CosmosDb": return CosmosDbLinkedService.DeserializeCosmosDbLinkedService(element);
 094                    case "CosmosDbMongoDbApi": return CosmosDbMongoDbApiLinkedService.DeserializeCosmosDbMongoDbApiLinke
 095                    case "Couchbase": return CouchbaseLinkedService.DeserializeCouchbaseLinkedService(element);
 096                    case "CustomDataSource": return CustomDataSourceLinkedService.DeserializeCustomDataSourceLinkedServi
 097                    case "Db2": return Db2LinkedService.DeserializeDb2LinkedService(element);
 098                    case "Drill": return DrillLinkedService.DeserializeDrillLinkedService(element);
 099                    case "Dynamics": return DynamicsLinkedService.DeserializeDynamicsLinkedService(element);
 0100                    case "DynamicsAX": return DynamicsAXLinkedService.DeserializeDynamicsAXLinkedService(element);
 0101                    case "DynamicsCrm": return DynamicsCrmLinkedService.DeserializeDynamicsCrmLinkedService(element);
 0102                    case "Eloqua": return EloquaLinkedService.DeserializeEloquaLinkedService(element);
 0103                    case "FileServer": return FileServerLinkedService.DeserializeFileServerLinkedService(element);
 0104                    case "FtpServer": return FtpServerLinkedService.DeserializeFtpServerLinkedService(element);
 0105                    case "GoogleAdWords": return GoogleAdWordsLinkedService.DeserializeGoogleAdWordsLinkedService(elemen
 0106                    case "GoogleBigQuery": return GoogleBigQueryLinkedService.DeserializeGoogleBigQueryLinkedService(ele
 0107                    case "GoogleCloudStorage": return GoogleCloudStorageLinkedService.DeserializeGoogleCloudStorageLinke
 0108                    case "Greenplum": return GreenplumLinkedService.DeserializeGreenplumLinkedService(element);
 0109                    case "HBase": return HBaseLinkedService.DeserializeHBaseLinkedService(element);
 0110                    case "HDInsight": return HDInsightLinkedService.DeserializeHDInsightLinkedService(element);
 0111                    case "HDInsightOnDemand": return HDInsightOnDemandLinkedService.DeserializeHDInsightOnDemandLinkedSe
 0112                    case "Hdfs": return HdfsLinkedService.DeserializeHdfsLinkedService(element);
 0113                    case "Hive": return HiveLinkedService.DeserializeHiveLinkedService(element);
 0114                    case "HttpServer": return HttpLinkedService.DeserializeHttpLinkedService(element);
 0115                    case "Hubspot": return HubspotLinkedService.DeserializeHubspotLinkedService(element);
 0116                    case "Impala": return ImpalaLinkedService.DeserializeImpalaLinkedService(element);
 0117                    case "Informix": return InformixLinkedService.DeserializeInformixLinkedService(element);
 0118                    case "Jira": return JiraLinkedService.DeserializeJiraLinkedService(element);
 0119                    case "Magento": return MagentoLinkedService.DeserializeMagentoLinkedService(element);
 0120                    case "MariaDB": return MariaDBLinkedService.DeserializeMariaDBLinkedService(element);
 0121                    case "Marketo": return MarketoLinkedService.DeserializeMarketoLinkedService(element);
 0122                    case "MicrosoftAccess": return MicrosoftAccessLinkedService.DeserializeMicrosoftAccessLinkedService(
 0123                    case "MongoDb": return MongoDbLinkedService.DeserializeMongoDbLinkedService(element);
 0124                    case "MongoDbV2": return MongoDbV2LinkedService.DeserializeMongoDbV2LinkedService(element);
 0125                    case "MySql": return MySqlLinkedService.DeserializeMySqlLinkedService(element);
 0126                    case "Netezza": return NetezzaLinkedService.DeserializeNetezzaLinkedService(element);
 0127                    case "OData": return ODataLinkedService.DeserializeODataLinkedService(element);
 0128                    case "Odbc": return OdbcLinkedService.DeserializeOdbcLinkedService(element);
 0129                    case "Office365": return Office365LinkedService.DeserializeOffice365LinkedService(element);
 0130                    case "Oracle": return OracleLinkedService.DeserializeOracleLinkedService(element);
 0131                    case "OracleServiceCloud": return OracleServiceCloudLinkedService.DeserializeOracleServiceCloudLinke
 0132                    case "Paypal": return PaypalLinkedService.DeserializePaypalLinkedService(element);
 0133                    case "Phoenix": return PhoenixLinkedService.DeserializePhoenixLinkedService(element);
 0134                    case "PostgreSql": return PostgreSqlLinkedService.DeserializePostgreSqlLinkedService(element);
 0135                    case "Presto": return PrestoLinkedService.DeserializePrestoLinkedService(element);
 0136                    case "QuickBooks": return QuickBooksLinkedService.DeserializeQuickBooksLinkedService(element);
 0137                    case "Responsys": return ResponsysLinkedService.DeserializeResponsysLinkedService(element);
 0138                    case "RestService": return RestServiceLinkedService.DeserializeRestServiceLinkedService(element);
 0139                    case "Salesforce": return SalesforceLinkedService.DeserializeSalesforceLinkedService(element);
 0140                    case "SalesforceMarketingCloud": return SalesforceMarketingCloudLinkedService.DeserializeSalesforceM
 0141                    case "SalesforceServiceCloud": return SalesforceServiceCloudLinkedService.DeserializeSalesforceServi
 0142                    case "SapBW": return SapBWLinkedService.DeserializeSapBWLinkedService(element);
 0143                    case "SapCloudForCustomer": return SapCloudForCustomerLinkedService.DeserializeSapCloudForCustomerLi
 0144                    case "SapEcc": return SapEccLinkedService.DeserializeSapEccLinkedService(element);
 0145                    case "SapHana": return SapHanaLinkedService.DeserializeSapHanaLinkedService(element);
 0146                    case "SapOpenHub": return SapOpenHubLinkedService.DeserializeSapOpenHubLinkedService(element);
 0147                    case "SapTable": return SapTableLinkedService.DeserializeSapTableLinkedService(element);
 0148                    case "ServiceNow": return ServiceNowLinkedService.DeserializeServiceNowLinkedService(element);
 0149                    case "Sftp": return SftpServerLinkedService.DeserializeSftpServerLinkedService(element);
 0150                    case "Shopify": return ShopifyLinkedService.DeserializeShopifyLinkedService(element);
 0151                    case "Spark": return SparkLinkedService.DeserializeSparkLinkedService(element);
 0152                    case "SqlServer": return SqlServerLinkedService.DeserializeSqlServerLinkedService(element);
 0153                    case "Square": return SquareLinkedService.DeserializeSquareLinkedService(element);
 0154                    case "Sybase": return SybaseLinkedService.DeserializeSybaseLinkedService(element);
 0155                    case "Teradata": return TeradataLinkedService.DeserializeTeradataLinkedService(element);
 0156                    case "Vertica": return VerticaLinkedService.DeserializeVerticaLinkedService(element);
 0157                    case "Web": return WebLinkedService.DeserializeWebLinkedService(element);
 0158                    case "Xero": return XeroLinkedService.DeserializeXeroLinkedService(element);
 0159                    case "Zoho": return ZohoLinkedService.DeserializeZohoLinkedService(element);
 160                }
 161            }
 0162            string type = default;
 0163            Optional<IntegrationRuntimeReference> connectVia = default;
 0164            Optional<string> description = default;
 0165            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 0166            Optional<IList<object>> annotations = default;
 0167            IDictionary<string, object> additionalProperties = default;
 0168            Dictionary<string, object> additionalPropertiesDictionary = default;
 0169            foreach (var property in element.EnumerateObject())
 170            {
 0171                if (property.NameEquals("type"))
 172                {
 0173                    type = property.Value.GetString();
 0174                    continue;
 175                }
 0176                if (property.NameEquals("connectVia"))
 177                {
 0178                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
 0179                    continue;
 180                }
 0181                if (property.NameEquals("description"))
 182                {
 0183                    description = property.Value.GetString();
 0184                    continue;
 185                }
 0186                if (property.NameEquals("parameters"))
 187                {
 0188                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0189                    foreach (var property0 in property.Value.EnumerateObject())
 190                    {
 0191                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 192                    }
 0193                    parameters = dictionary;
 0194                    continue;
 195                }
 0196                if (property.NameEquals("annotations"))
 197                {
 0198                    List<object> array = new List<object>();
 0199                    foreach (var item in property.Value.EnumerateArray())
 200                    {
 0201                        array.Add(item.GetObject());
 202                    }
 0203                    annotations = array;
 0204                    continue;
 205                }
 0206                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0207                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 208            }
 0209            additionalProperties = additionalPropertiesDictionary;
 0210            return new LinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optio
 211        }
 212    }
 213}