< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_Location()-0%100%
get_ColumnDelimiter()-0%100%
get_RowDelimiter()-0%100%
get_EncodingName()-0%100%
get_CompressionCodec()-0%100%
get_CompressionLevel()-0%100%
get_QuoteChar()-0%100%
get_EscapeChar()-0%100%
get_FirstRowAsHeader()-0%100%
get_NullValue()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeDelimitedTextDataset(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\DelimitedTextDataset.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> Delimited text dataset. </summary>
 14    public partial class DelimitedTextDataset : Dataset
 15    {
 16        /// <summary> Initializes a new instance of DelimitedTextDataset. </summary>
 17        /// <param name="linkedServiceName"> Linked service reference. </param>
 18        /// <exception cref="ArgumentNullException"> <paramref name="linkedServiceName"/> is null. </exception>
 019        public DelimitedTextDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName)
 20        {
 021            if (linkedServiceName == null)
 22            {
 023                throw new ArgumentNullException(nameof(linkedServiceName));
 24            }
 25
 026            Type = "DelimitedText";
 027        }
 28
 29        /// <summary> Initializes a new instance of DelimitedTextDataset. </summary>
 30        /// <param name="type"> Type of dataset. </param>
 31        /// <param name="description"> Dataset description. </param>
 32        /// <param name="structure"> Columns that define the structure of the dataset. Type: array (or Expression with r
 33        /// <param name="schema"> Columns that define the physical type schema of the dataset. Type: array (or Expressio
 34        /// <param name="linkedServiceName"> Linked service reference. </param>
 35        /// <param name="parameters"> Parameters for dataset. </param>
 36        /// <param name="annotations"> List of tags that can be used for describing the Dataset. </param>
 37        /// <param name="folder"> The folder that this Dataset is in. If not specified, Dataset will appear at the root 
 38        /// <param name="additionalProperties"> . </param>
 39        /// <param name="location"> The location of the delimited text storage. </param>
 40        /// <param name="columnDelimiter"> The column delimiter. Type: string (or Expression with resultType string). </
 41        /// <param name="rowDelimiter"> The row delimiter. Type: string (or Expression with resultType string). </param>
 42        /// <param name="encodingName"> The code page name of the preferred encoding. If miss, the default value is UTF-
 43        /// <param name="compressionCodec"> . </param>
 44        /// <param name="compressionLevel"> The data compression method used for DelimitedText. </param>
 45        /// <param name="quoteChar"> The quote character. Type: string (or Expression with resultType string). </param>
 46        /// <param name="escapeChar"> The escape character. Type: string (or Expression with resultType string). </param
 47        /// <param name="firstRowAsHeader"> When used as input, treat the first row of data as headers. When used as out
 48        /// <param name="nullValue"> The null value string. Type: string (or Expression with resultType string). </param
 049        internal DelimitedTextDataset(string type, string description, object structure, object schema, LinkedServiceRef
 50        {
 051            Location = location;
 052            ColumnDelimiter = columnDelimiter;
 053            RowDelimiter = rowDelimiter;
 054            EncodingName = encodingName;
 055            CompressionCodec = compressionCodec;
 056            CompressionLevel = compressionLevel;
 057            QuoteChar = quoteChar;
 058            EscapeChar = escapeChar;
 059            FirstRowAsHeader = firstRowAsHeader;
 060            NullValue = nullValue;
 061            Type = type ?? "DelimitedText";
 062        }
 63
 64        /// <summary> The location of the delimited text storage. </summary>
 065        public DatasetLocation Location { get; set; }
 66        /// <summary> The column delimiter. Type: string (or Expression with resultType string). </summary>
 067        public object ColumnDelimiter { get; set; }
 68        /// <summary> The row delimiter. Type: string (or Expression with resultType string). </summary>
 069        public object RowDelimiter { get; set; }
 70        /// <summary> The code page name of the preferred encoding. If miss, the default value is UTF-8, unless BOM deno
 071        public object EncodingName { get; set; }
 072        public DelimitedTextCompressionCodec? CompressionCodec { get; set; }
 73        /// <summary> The data compression method used for DelimitedText. </summary>
 074        public DatasetCompressionLevel? CompressionLevel { get; set; }
 75        /// <summary> The quote character. Type: string (or Expression with resultType string). </summary>
 076        public object QuoteChar { get; set; }
 77        /// <summary> The escape character. Type: string (or Expression with resultType string). </summary>
 078        public object EscapeChar { get; set; }
 79        /// <summary> When used as input, treat the first row of data as headers. When used as output,write the headers 
 080        public object FirstRowAsHeader { get; set; }
 81        /// <summary> The null value string. Type: string (or Expression with resultType string). </summary>
 082        public object NullValue { get; set; }
 83    }
 84}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\DelimitedTextDataset.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 DelimitedTextDataset : 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            writer.WritePropertyName("typeProperties");
 065            writer.WriteStartObject();
 066            if (Optional.IsDefined(Location))
 67            {
 068                writer.WritePropertyName("location");
 069                writer.WriteObjectValue(Location);
 70            }
 071            if (Optional.IsDefined(ColumnDelimiter))
 72            {
 073                writer.WritePropertyName("columnDelimiter");
 074                writer.WriteObjectValue(ColumnDelimiter);
 75            }
 076            if (Optional.IsDefined(RowDelimiter))
 77            {
 078                writer.WritePropertyName("rowDelimiter");
 079                writer.WriteObjectValue(RowDelimiter);
 80            }
 081            if (Optional.IsDefined(EncodingName))
 82            {
 083                writer.WritePropertyName("encodingName");
 084                writer.WriteObjectValue(EncodingName);
 85            }
 086            if (Optional.IsDefined(CompressionCodec))
 87            {
 088                writer.WritePropertyName("compressionCodec");
 089                writer.WriteStringValue(CompressionCodec.Value.ToString());
 90            }
 091            if (Optional.IsDefined(CompressionLevel))
 92            {
 093                writer.WritePropertyName("compressionLevel");
 094                writer.WriteStringValue(CompressionLevel.Value.ToString());
 95            }
 096            if (Optional.IsDefined(QuoteChar))
 97            {
 098                writer.WritePropertyName("quoteChar");
 099                writer.WriteObjectValue(QuoteChar);
 100            }
 0101            if (Optional.IsDefined(EscapeChar))
 102            {
 0103                writer.WritePropertyName("escapeChar");
 0104                writer.WriteObjectValue(EscapeChar);
 105            }
 0106            if (Optional.IsDefined(FirstRowAsHeader))
 107            {
 0108                writer.WritePropertyName("firstRowAsHeader");
 0109                writer.WriteObjectValue(FirstRowAsHeader);
 110            }
 0111            if (Optional.IsDefined(NullValue))
 112            {
 0113                writer.WritePropertyName("nullValue");
 0114                writer.WriteObjectValue(NullValue);
 115            }
 0116            writer.WriteEndObject();
 0117            foreach (var item in AdditionalProperties)
 118            {
 0119                writer.WritePropertyName(item.Key);
 0120                writer.WriteObjectValue(item.Value);
 121            }
 0122            writer.WriteEndObject();
 0123        }
 124
 125        internal static DelimitedTextDataset DeserializeDelimitedTextDataset(JsonElement element)
 126        {
 0127            string type = default;
 0128            Optional<string> description = default;
 0129            Optional<object> structure = default;
 0130            Optional<object> schema = default;
 0131            LinkedServiceReference linkedServiceName = default;
 0132            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 0133            Optional<IList<object>> annotations = default;
 0134            Optional<DatasetFolder> folder = default;
 0135            Optional<DatasetLocation> location = default;
 0136            Optional<object> columnDelimiter = default;
 0137            Optional<object> rowDelimiter = default;
 0138            Optional<object> encodingName = default;
 0139            Optional<DelimitedTextCompressionCodec> compressionCodec = default;
 0140            Optional<DatasetCompressionLevel> compressionLevel = default;
 0141            Optional<object> quoteChar = default;
 0142            Optional<object> escapeChar = default;
 0143            Optional<object> firstRowAsHeader = default;
 0144            Optional<object> nullValue = default;
 0145            IDictionary<string, object> additionalProperties = default;
 0146            Dictionary<string, object> additionalPropertiesDictionary = default;
 0147            foreach (var property in element.EnumerateObject())
 148            {
 0149                if (property.NameEquals("type"))
 150                {
 0151                    type = property.Value.GetString();
 0152                    continue;
 153                }
 0154                if (property.NameEquals("description"))
 155                {
 0156                    description = property.Value.GetString();
 0157                    continue;
 158                }
 0159                if (property.NameEquals("structure"))
 160                {
 0161                    structure = property.Value.GetObject();
 0162                    continue;
 163                }
 0164                if (property.NameEquals("schema"))
 165                {
 0166                    schema = property.Value.GetObject();
 0167                    continue;
 168                }
 0169                if (property.NameEquals("linkedServiceName"))
 170                {
 0171                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
 0172                    continue;
 173                }
 0174                if (property.NameEquals("parameters"))
 175                {
 0176                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0177                    foreach (var property0 in property.Value.EnumerateObject())
 178                    {
 0179                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 180                    }
 0181                    parameters = dictionary;
 0182                    continue;
 183                }
 0184                if (property.NameEquals("annotations"))
 185                {
 0186                    List<object> array = new List<object>();
 0187                    foreach (var item in property.Value.EnumerateArray())
 188                    {
 0189                        array.Add(item.GetObject());
 190                    }
 0191                    annotations = array;
 0192                    continue;
 193                }
 0194                if (property.NameEquals("folder"))
 195                {
 0196                    folder = DatasetFolder.DeserializeDatasetFolder(property.Value);
 0197                    continue;
 198                }
 0199                if (property.NameEquals("typeProperties"))
 200                {
 0201                    foreach (var property0 in property.Value.EnumerateObject())
 202                    {
 0203                        if (property0.NameEquals("location"))
 204                        {
 0205                            location = DatasetLocation.DeserializeDatasetLocation(property0.Value);
 0206                            continue;
 207                        }
 0208                        if (property0.NameEquals("columnDelimiter"))
 209                        {
 0210                            columnDelimiter = property0.Value.GetObject();
 0211                            continue;
 212                        }
 0213                        if (property0.NameEquals("rowDelimiter"))
 214                        {
 0215                            rowDelimiter = property0.Value.GetObject();
 0216                            continue;
 217                        }
 0218                        if (property0.NameEquals("encodingName"))
 219                        {
 0220                            encodingName = property0.Value.GetObject();
 0221                            continue;
 222                        }
 0223                        if (property0.NameEquals("compressionCodec"))
 224                        {
 0225                            compressionCodec = new DelimitedTextCompressionCodec(property0.Value.GetString());
 0226                            continue;
 227                        }
 0228                        if (property0.NameEquals("compressionLevel"))
 229                        {
 0230                            compressionLevel = new DatasetCompressionLevel(property0.Value.GetString());
 0231                            continue;
 232                        }
 0233                        if (property0.NameEquals("quoteChar"))
 234                        {
 0235                            quoteChar = property0.Value.GetObject();
 0236                            continue;
 237                        }
 0238                        if (property0.NameEquals("escapeChar"))
 239                        {
 0240                            escapeChar = property0.Value.GetObject();
 0241                            continue;
 242                        }
 0243                        if (property0.NameEquals("firstRowAsHeader"))
 244                        {
 0245                            firstRowAsHeader = property0.Value.GetObject();
 0246                            continue;
 247                        }
 0248                        if (property0.NameEquals("nullValue"))
 249                        {
 0250                            nullValue = property0.Value.GetObject();
 251                            continue;
 252                        }
 253                    }
 254                    continue;
 255                }
 0256                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0257                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 258            }
 0259            additionalProperties = additionalPropertiesDictionary;
 0260            return new DelimitedTextDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, O
 261        }
 262    }
 263}