< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_Type()-0%100%
get_Description()-0%100%
get_Structure()-0%100%
get_Schema()-0%100%
get_LinkedServiceName()-0%100%
get_Parameters()-0%100%
get_Annotations()-0%100%
get_Folder()-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%
DeserializeDataset(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\Dataset.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;
 10using System.Collections.Generic;
 11using Azure.Core;
 12
 13namespace Azure.Analytics.Synapse.Artifacts.Models
 14{
 15    /// <summary> The Azure Data Factory nested object which identifies data within different data stores, such as table
 16    public partial class Dataset : IDictionary<string, object>
 17    {
 18        /// <summary> Initializes a new instance of Dataset. </summary>
 19        /// <param name="linkedServiceName"> Linked service reference. </param>
 20        /// <exception cref="ArgumentNullException"> <paramref name="linkedServiceName"/> is null. </exception>
 021        public Dataset(LinkedServiceReference linkedServiceName)
 22        {
 023            if (linkedServiceName == null)
 24            {
 025                throw new ArgumentNullException(nameof(linkedServiceName));
 26            }
 27
 028            LinkedServiceName = linkedServiceName;
 029            Parameters = new ChangeTrackingDictionary<string, ParameterSpecification>();
 030            Annotations = new ChangeTrackingList<object>();
 031            AdditionalProperties = new ChangeTrackingDictionary<string, object>();
 032            Type = "Dataset";
 033        }
 34
 35        /// <summary> Initializes a new instance of Dataset. </summary>
 36        /// <param name="type"> Type of dataset. </param>
 37        /// <param name="description"> Dataset description. </param>
 38        /// <param name="structure"> Columns that define the structure of the dataset. Type: array (or Expression with r
 39        /// <param name="schema"> Columns that define the physical type schema of the dataset. Type: array (or Expressio
 40        /// <param name="linkedServiceName"> Linked service reference. </param>
 41        /// <param name="parameters"> Parameters for dataset. </param>
 42        /// <param name="annotations"> List of tags that can be used for describing the Dataset. </param>
 43        /// <param name="folder"> The folder that this Dataset is in. If not specified, Dataset will appear at the root 
 44        /// <param name="additionalProperties"> . </param>
 045        internal Dataset(string type, string description, object structure, object schema, LinkedServiceReference linked
 46        {
 047            Type = type ?? "Dataset";
 048            Description = description;
 049            Structure = structure;
 050            Schema = schema;
 051            LinkedServiceName = linkedServiceName;
 052            Parameters = parameters;
 053            Annotations = annotations;
 054            Folder = folder;
 055            AdditionalProperties = additionalProperties;
 056        }
 57
 58        /// <summary> Type of dataset. </summary>
 059        internal string Type { get; set; }
 60        /// <summary> Dataset description. </summary>
 061        public string Description { get; set; }
 62        /// <summary> Columns that define the structure of the dataset. Type: array (or Expression with resultType array
 063        public object Structure { get; set; }
 64        /// <summary> Columns that define the physical type schema of the dataset. Type: array (or Expression with resul
 065        public object Schema { get; set; }
 66        /// <summary> Linked service reference. </summary>
 067        public LinkedServiceReference LinkedServiceName { get; set; }
 68        /// <summary> Parameters for dataset. </summary>
 069        public IDictionary<string, ParameterSpecification> Parameters { get; }
 70        /// <summary> List of tags that can be used for describing the Dataset. </summary>
 071        public IList<object> Annotations { get; }
 72        /// <summary> The folder that this Dataset is in. If not specified, Dataset will appear at the root level. </sum
 073        public DatasetFolder Folder { get; set; }
 074        internal IDictionary<string, object> AdditionalProperties { get; }
 75        /// <inheritdoc />
 076        public IEnumerator<KeyValuePair<string, object>> GetEnumerator() => AdditionalProperties.GetEnumerator();
 77        /// <inheritdoc />
 078        IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator();
 79        /// <inheritdoc />
 080        public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value);
 81        /// <inheritdoc />
 082        public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key);
 83        /// <inheritdoc />
 084        public ICollection<string> Keys => AdditionalProperties.Keys;
 85        /// <inheritdoc />
 086        public ICollection<object> Values => AdditionalProperties.Values;
 87        /// <inheritdoc />
 088        int ICollection<KeyValuePair<string, object>>.Count => AdditionalProperties.Count;
 89        /// <inheritdoc />
 090        public void Add(string key, object value) => AdditionalProperties.Add(key, value);
 91        /// <inheritdoc />
 092        public bool Remove(string key) => AdditionalProperties.Remove(key);
 93        /// <inheritdoc />
 094        bool ICollection<KeyValuePair<string, object>>.IsReadOnly => AdditionalProperties.IsReadOnly;
 95        /// <inheritdoc />
 096        void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> value) => AdditionalProperties.A
 97        /// <inheritdoc />
 098        bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> value) => AdditionalPropertie
 99        /// <inheritdoc />
 0100        bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> value) => AdditionalPropert
 101        /// <inheritdoc />
 0102        void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] destination, int offset) =>
 103        /// <inheritdoc />
 0104        void ICollection<KeyValuePair<string, object>>.Clear() => AdditionalProperties.Clear();
 105        /// <inheritdoc />
 106        public object this[string key]
 107        {
 0108            get => AdditionalProperties[key];
 0109            set => AdditionalProperties[key] = value;
 110        }
 111    }
 112}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\Dataset.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 Dataset : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            writer.WritePropertyName("type");
 020            writer.WriteStringValue(Type);
 021            if (Optional.IsDefined(Description))
 22            {
 023                writer.WritePropertyName("description");
 024                writer.WriteStringValue(Description);
 25            }
 026            if (Optional.IsDefined(Structure))
 27            {
 028                writer.WritePropertyName("structure");
 029                writer.WriteObjectValue(Structure);
 30            }
 031            if (Optional.IsDefined(Schema))
 32            {
 033                writer.WritePropertyName("schema");
 034                writer.WriteObjectValue(Schema);
 35            }
 036            writer.WritePropertyName("linkedServiceName");
 037            writer.WriteObjectValue(LinkedServiceName);
 038            if (Optional.IsCollectionDefined(Parameters))
 39            {
 040                writer.WritePropertyName("parameters");
 041                writer.WriteStartObject();
 042                foreach (var item in Parameters)
 43                {
 044                    writer.WritePropertyName(item.Key);
 045                    writer.WriteObjectValue(item.Value);
 46                }
 047                writer.WriteEndObject();
 48            }
 049            if (Optional.IsCollectionDefined(Annotations))
 50            {
 051                writer.WritePropertyName("annotations");
 052                writer.WriteStartArray();
 053                foreach (var item in Annotations)
 54                {
 055                    writer.WriteObjectValue(item);
 56                }
 057                writer.WriteEndArray();
 58            }
 059            if (Optional.IsDefined(Folder))
 60            {
 061                writer.WritePropertyName("folder");
 062                writer.WriteObjectValue(Folder);
 63            }
 064            foreach (var item in AdditionalProperties)
 65            {
 066                writer.WritePropertyName(item.Key);
 067                writer.WriteObjectValue(item.Value);
 68            }
 069            writer.WriteEndObject();
 070        }
 71
 72        internal static Dataset DeserializeDataset(JsonElement element)
 73        {
 074            if (element.TryGetProperty("type", out JsonElement discriminator))
 75            {
 076                switch (discriminator.GetString())
 77                {
 078                    case "AmazonMWSObject": return AmazonMWSObjectDataset.DeserializeAmazonMWSObjectDataset(element);
 079                    case "AmazonRedshiftTable": return AmazonRedshiftTableDataset.DeserializeAmazonRedshiftTableDataset(
 080                    case "Avro": return AvroDataset.DeserializeAvroDataset(element);
 081                    case "AzureDataExplorerTable": return AzureDataExplorerTableDataset.DeserializeAzureDataExplorerTabl
 082                    case "AzureMariaDBTable": return AzureMariaDBTableDataset.DeserializeAzureMariaDBTableDataset(elemen
 083                    case "AzureMySqlTable": return AzureMySqlTableDataset.DeserializeAzureMySqlTableDataset(element);
 084                    case "AzurePostgreSqlTable": return AzurePostgreSqlTableDataset.DeserializeAzurePostgreSqlTableDatas
 085                    case "AzureSearchIndex": return AzureSearchIndexDataset.DeserializeAzureSearchIndexDataset(element);
 086                    case "AzureSqlDWTable": return AzureSqlDWTableDataset.DeserializeAzureSqlDWTableDataset(element);
 087                    case "AzureSqlMITable": return AzureSqlMITableDataset.DeserializeAzureSqlMITableDataset(element);
 088                    case "AzureSqlTable": return AzureSqlTableDataset.DeserializeAzureSqlTableDataset(element);
 089                    case "AzureTable": return AzureTableDataset.DeserializeAzureTableDataset(element);
 090                    case "Binary": return BinaryDataset.DeserializeBinaryDataset(element);
 091                    case "CassandraTable": return CassandraTableDataset.DeserializeCassandraTableDataset(element);
 092                    case "CommonDataServiceForAppsEntity": return CommonDataServiceForAppsEntityDataset.DeserializeCommo
 093                    case "ConcurObject": return ConcurObjectDataset.DeserializeConcurObjectDataset(element);
 094                    case "CosmosDbMongoDbApiCollection": return CosmosDbMongoDbApiCollectionDataset.DeserializeCosmosDbM
 095                    case "CosmosDbSqlApiCollection": return CosmosDbSqlApiCollectionDataset.DeserializeCosmosDbSqlApiCol
 096                    case "CouchbaseTable": return CouchbaseTableDataset.DeserializeCouchbaseTableDataset(element);
 097                    case "Db2Table": return Db2TableDataset.DeserializeDb2TableDataset(element);
 098                    case "DelimitedText": return DelimitedTextDataset.DeserializeDelimitedTextDataset(element);
 099                    case "DocumentDbCollection": return DocumentDbCollectionDataset.DeserializeDocumentDbCollectionDatas
 0100                    case "DrillTable": return DrillTableDataset.DeserializeDrillTableDataset(element);
 0101                    case "DynamicsAXResource": return DynamicsAXResourceDataset.DeserializeDynamicsAXResourceDataset(ele
 0102                    case "DynamicsCrmEntity": return DynamicsCrmEntityDataset.DeserializeDynamicsCrmEntityDataset(elemen
 0103                    case "DynamicsEntity": return DynamicsEntityDataset.DeserializeDynamicsEntityDataset(element);
 0104                    case "EloquaObject": return EloquaObjectDataset.DeserializeEloquaObjectDataset(element);
 0105                    case "GoogleAdWordsObject": return GoogleAdWordsObjectDataset.DeserializeGoogleAdWordsObjectDataset(
 0106                    case "GoogleBigQueryObject": return GoogleBigQueryObjectDataset.DeserializeGoogleBigQueryObjectDatas
 0107                    case "GreenplumTable": return GreenplumTableDataset.DeserializeGreenplumTableDataset(element);
 0108                    case "HBaseObject": return HBaseObjectDataset.DeserializeHBaseObjectDataset(element);
 0109                    case "HiveObject": return HiveObjectDataset.DeserializeHiveObjectDataset(element);
 0110                    case "HubspotObject": return HubspotObjectDataset.DeserializeHubspotObjectDataset(element);
 0111                    case "ImpalaObject": return ImpalaObjectDataset.DeserializeImpalaObjectDataset(element);
 0112                    case "InformixTable": return InformixTableDataset.DeserializeInformixTableDataset(element);
 0113                    case "JiraObject": return JiraObjectDataset.DeserializeJiraObjectDataset(element);
 0114                    case "Json": return JsonDataset.DeserializeJsonDataset(element);
 0115                    case "MagentoObject": return MagentoObjectDataset.DeserializeMagentoObjectDataset(element);
 0116                    case "MariaDBTable": return MariaDBTableDataset.DeserializeMariaDBTableDataset(element);
 0117                    case "MarketoObject": return MarketoObjectDataset.DeserializeMarketoObjectDataset(element);
 0118                    case "MicrosoftAccessTable": return MicrosoftAccessTableDataset.DeserializeMicrosoftAccessTableDatas
 0119                    case "MongoDbCollection": return MongoDbCollectionDataset.DeserializeMongoDbCollectionDataset(elemen
 0120                    case "MongoDbV2Collection": return MongoDbV2CollectionDataset.DeserializeMongoDbV2CollectionDataset(
 0121                    case "MySqlTable": return MySqlTableDataset.DeserializeMySqlTableDataset(element);
 0122                    case "NetezzaTable": return NetezzaTableDataset.DeserializeNetezzaTableDataset(element);
 0123                    case "ODataResource": return ODataResourceDataset.DeserializeODataResourceDataset(element);
 0124                    case "OdbcTable": return OdbcTableDataset.DeserializeOdbcTableDataset(element);
 0125                    case "Office365Table": return Office365Dataset.DeserializeOffice365Dataset(element);
 0126                    case "OracleServiceCloudObject": return OracleServiceCloudObjectDataset.DeserializeOracleServiceClou
 0127                    case "OracleTable": return OracleTableDataset.DeserializeOracleTableDataset(element);
 0128                    case "Orc": return OrcDataset.DeserializeOrcDataset(element);
 0129                    case "Parquet": return ParquetDataset.DeserializeParquetDataset(element);
 0130                    case "PaypalObject": return PaypalObjectDataset.DeserializePaypalObjectDataset(element);
 0131                    case "PhoenixObject": return PhoenixObjectDataset.DeserializePhoenixObjectDataset(element);
 0132                    case "PostgreSqlTable": return PostgreSqlTableDataset.DeserializePostgreSqlTableDataset(element);
 0133                    case "PrestoObject": return PrestoObjectDataset.DeserializePrestoObjectDataset(element);
 0134                    case "QuickBooksObject": return QuickBooksObjectDataset.DeserializeQuickBooksObjectDataset(element);
 0135                    case "RelationalTable": return RelationalTableDataset.DeserializeRelationalTableDataset(element);
 0136                    case "ResponsysObject": return ResponsysObjectDataset.DeserializeResponsysObjectDataset(element);
 0137                    case "RestResource": return RestResourceDataset.DeserializeRestResourceDataset(element);
 0138                    case "SalesforceMarketingCloudObject": return SalesforceMarketingCloudObjectDataset.DeserializeSales
 0139                    case "SalesforceObject": return SalesforceObjectDataset.DeserializeSalesforceObjectDataset(element);
 0140                    case "SalesforceServiceCloudObject": return SalesforceServiceCloudObjectDataset.DeserializeSalesforc
 0141                    case "SapBwCube": return SapBwCubeDataset.DeserializeSapBwCubeDataset(element);
 0142                    case "SapCloudForCustomerResource": return SapCloudForCustomerResourceDataset.DeserializeSapCloudFor
 0143                    case "SapEccResource": return SapEccResourceDataset.DeserializeSapEccResourceDataset(element);
 0144                    case "SapHanaTable": return SapHanaTableDataset.DeserializeSapHanaTableDataset(element);
 0145                    case "SapOpenHubTable": return SapOpenHubTableDataset.DeserializeSapOpenHubTableDataset(element);
 0146                    case "SapTableResource": return SapTableResourceDataset.DeserializeSapTableResourceDataset(element);
 0147                    case "ServiceNowObject": return ServiceNowObjectDataset.DeserializeServiceNowObjectDataset(element);
 0148                    case "ShopifyObject": return ShopifyObjectDataset.DeserializeShopifyObjectDataset(element);
 0149                    case "SparkObject": return SparkObjectDataset.DeserializeSparkObjectDataset(element);
 0150                    case "SqlServerTable": return SqlServerTableDataset.DeserializeSqlServerTableDataset(element);
 0151                    case "SquareObject": return SquareObjectDataset.DeserializeSquareObjectDataset(element);
 0152                    case "SybaseTable": return SybaseTableDataset.DeserializeSybaseTableDataset(element);
 0153                    case "TeradataTable": return TeradataTableDataset.DeserializeTeradataTableDataset(element);
 0154                    case "VerticaTable": return VerticaTableDataset.DeserializeVerticaTableDataset(element);
 0155                    case "WebTable": return WebTableDataset.DeserializeWebTableDataset(element);
 0156                    case "XeroObject": return XeroObjectDataset.DeserializeXeroObjectDataset(element);
 0157                    case "ZohoObject": return ZohoObjectDataset.DeserializeZohoObjectDataset(element);
 158                }
 159            }
 0160            string type = default;
 0161            Optional<string> description = default;
 0162            Optional<object> structure = default;
 0163            Optional<object> schema = default;
 0164            LinkedServiceReference linkedServiceName = default;
 0165            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 0166            Optional<IList<object>> annotations = default;
 0167            Optional<DatasetFolder> folder = default;
 0168            IDictionary<string, object> additionalProperties = default;
 0169            Dictionary<string, object> additionalPropertiesDictionary = default;
 0170            foreach (var property in element.EnumerateObject())
 171            {
 0172                if (property.NameEquals("type"))
 173                {
 0174                    type = property.Value.GetString();
 0175                    continue;
 176                }
 0177                if (property.NameEquals("description"))
 178                {
 0179                    description = property.Value.GetString();
 0180                    continue;
 181                }
 0182                if (property.NameEquals("structure"))
 183                {
 0184                    structure = property.Value.GetObject();
 0185                    continue;
 186                }
 0187                if (property.NameEquals("schema"))
 188                {
 0189                    schema = property.Value.GetObject();
 0190                    continue;
 191                }
 0192                if (property.NameEquals("linkedServiceName"))
 193                {
 0194                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
 0195                    continue;
 196                }
 0197                if (property.NameEquals("parameters"))
 198                {
 0199                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0200                    foreach (var property0 in property.Value.EnumerateObject())
 201                    {
 0202                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 203                    }
 0204                    parameters = dictionary;
 0205                    continue;
 206                }
 0207                if (property.NameEquals("annotations"))
 208                {
 0209                    List<object> array = new List<object>();
 0210                    foreach (var item in property.Value.EnumerateArray())
 211                    {
 0212                        array.Add(item.GetObject());
 213                    }
 0214                    annotations = array;
 0215                    continue;
 216                }
 0217                if (property.NameEquals("folder"))
 218                {
 0219                    folder = DatasetFolder.DeserializeDatasetFolder(property.Value);
 0220                    continue;
 221                }
 0222                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0223                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 224            }
 0225            additionalProperties = additionalPropertiesDictionary;
 0226            return new Dataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDic
 227        }
 228    }
 229}