< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_TableName()-0%100%
get_Table()-0%100%
get_SchemaTypePropertiesSchema()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeAmazonRedshiftTableDataset(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AmazonRedshiftTableDataset.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> The Amazon Redshift table dataset. </summary>
 14    public partial class AmazonRedshiftTableDataset : Dataset
 15    {
 16        /// <summary> Initializes a new instance of AmazonRedshiftTableDataset. </summary>
 17        /// <param name="linkedServiceName"> Linked service reference. </param>
 18        /// <exception cref="ArgumentNullException"> <paramref name="linkedServiceName"/> is null. </exception>
 019        public AmazonRedshiftTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName)
 20        {
 021            if (linkedServiceName == null)
 22            {
 023                throw new ArgumentNullException(nameof(linkedServiceName));
 24            }
 25
 026            Type = "AmazonRedshiftTable";
 027        }
 28
 29        /// <summary> Initializes a new instance of AmazonRedshiftTableDataset. </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="tableName"> This property will be retired. Please consider using schema + table properties inst
 40        /// <param name="table"> The Amazon Redshift table name. Type: string (or Expression with resultType string). </
 41        /// <param name="schemaTypePropertiesSchema"> The Amazon Redshift schema name. Type: string (or Expression with 
 042        internal AmazonRedshiftTableDataset(string type, string description, object structure, object schema, LinkedServ
 43        {
 044            TableName = tableName;
 045            Table = table;
 046            SchemaTypePropertiesSchema = schemaTypePropertiesSchema;
 047            Type = type ?? "AmazonRedshiftTable";
 048        }
 49
 50        /// <summary> This property will be retired. Please consider using schema + table properties instead. </summary>
 051        public object TableName { get; set; }
 52        /// <summary> The Amazon Redshift table name. Type: string (or Expression with resultType string). </summary>
 053        public object Table { get; set; }
 54        /// <summary> The Amazon Redshift schema name. Type: string (or Expression with resultType string). </summary>
 055        public object SchemaTypePropertiesSchema { get; set; }
 56    }
 57}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AmazonRedshiftTableDataset.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 AmazonRedshiftTableDataset : 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(TableName))
 67            {
 068                writer.WritePropertyName("tableName");
 069                writer.WriteObjectValue(TableName);
 70            }
 071            if (Optional.IsDefined(Table))
 72            {
 073                writer.WritePropertyName("table");
 074                writer.WriteObjectValue(Table);
 75            }
 076            if (Optional.IsDefined(SchemaTypePropertiesSchema))
 77            {
 078                writer.WritePropertyName("schema");
 079                writer.WriteObjectValue(SchemaTypePropertiesSchema);
 80            }
 081            writer.WriteEndObject();
 082            foreach (var item in AdditionalProperties)
 83            {
 084                writer.WritePropertyName(item.Key);
 085                writer.WriteObjectValue(item.Value);
 86            }
 087            writer.WriteEndObject();
 088        }
 89
 90        internal static AmazonRedshiftTableDataset DeserializeAmazonRedshiftTableDataset(JsonElement element)
 91        {
 092            string type = default;
 093            Optional<string> description = default;
 094            Optional<object> structure = default;
 095            Optional<object> schema = default;
 096            LinkedServiceReference linkedServiceName = default;
 097            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 098            Optional<IList<object>> annotations = default;
 099            Optional<DatasetFolder> folder = default;
 0100            Optional<object> tableName = default;
 0101            Optional<object> table = default;
 0102            Optional<object> schema0 = default;
 0103            IDictionary<string, object> additionalProperties = default;
 0104            Dictionary<string, object> additionalPropertiesDictionary = default;
 0105            foreach (var property in element.EnumerateObject())
 106            {
 0107                if (property.NameEquals("type"))
 108                {
 0109                    type = property.Value.GetString();
 0110                    continue;
 111                }
 0112                if (property.NameEquals("description"))
 113                {
 0114                    description = property.Value.GetString();
 0115                    continue;
 116                }
 0117                if (property.NameEquals("structure"))
 118                {
 0119                    structure = property.Value.GetObject();
 0120                    continue;
 121                }
 0122                if (property.NameEquals("schema"))
 123                {
 0124                    schema = property.Value.GetObject();
 0125                    continue;
 126                }
 0127                if (property.NameEquals("linkedServiceName"))
 128                {
 0129                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
 0130                    continue;
 131                }
 0132                if (property.NameEquals("parameters"))
 133                {
 0134                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0135                    foreach (var property0 in property.Value.EnumerateObject())
 136                    {
 0137                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 138                    }
 0139                    parameters = dictionary;
 0140                    continue;
 141                }
 0142                if (property.NameEquals("annotations"))
 143                {
 0144                    List<object> array = new List<object>();
 0145                    foreach (var item in property.Value.EnumerateArray())
 146                    {
 0147                        array.Add(item.GetObject());
 148                    }
 0149                    annotations = array;
 0150                    continue;
 151                }
 0152                if (property.NameEquals("folder"))
 153                {
 0154                    folder = DatasetFolder.DeserializeDatasetFolder(property.Value);
 0155                    continue;
 156                }
 0157                if (property.NameEquals("typeProperties"))
 158                {
 0159                    foreach (var property0 in property.Value.EnumerateObject())
 160                    {
 0161                        if (property0.NameEquals("tableName"))
 162                        {
 0163                            tableName = property0.Value.GetObject();
 0164                            continue;
 165                        }
 0166                        if (property0.NameEquals("table"))
 167                        {
 0168                            table = property0.Value.GetObject();
 0169                            continue;
 170                        }
 0171                        if (property0.NameEquals("schema"))
 172                        {
 0173                            schema0 = property0.Value.GetObject();
 174                            continue;
 175                        }
 176                    }
 177                    continue;
 178                }
 0179                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0180                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 181            }
 0182            additionalProperties = additionalPropertiesDictionary;
 0183            return new AmazonRedshiftTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceN
 184        }
 185    }
 186}