< Summary

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

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AmazonMWSObjectDataset.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> Amazon Marketplace Web Service dataset. </summary>
 14    public partial class AmazonMWSObjectDataset : Dataset
 15    {
 16        /// <summary> Initializes a new instance of AmazonMWSObjectDataset. </summary>
 17        /// <param name="linkedServiceName"> Linked service reference. </param>
 18        /// <exception cref="ArgumentNullException"> <paramref name="linkedServiceName"/> is null. </exception>
 019        public AmazonMWSObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName)
 20        {
 021            if (linkedServiceName == null)
 22            {
 023                throw new ArgumentNullException(nameof(linkedServiceName));
 24            }
 25
 026            Type = "AmazonMWSObject";
 027        }
 28
 29        /// <summary> Initializes a new instance of AmazonMWSObjectDataset. </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"> The table name. Type: string (or Expression with resultType string). </param>
 040        internal AmazonMWSObjectDataset(string type, string description, object structure, object schema, LinkedServiceR
 41        {
 042            TableName = tableName;
 043            Type = type ?? "AmazonMWSObject";
 044        }
 45
 46        /// <summary> The table name. Type: string (or Expression with resultType string). </summary>
 047        public object TableName { get; set; }
 48    }
 49}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AmazonMWSObjectDataset.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 AmazonMWSObjectDataset : 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            writer.WriteEndObject();
 072            foreach (var item in AdditionalProperties)
 73            {
 074                writer.WritePropertyName(item.Key);
 075                writer.WriteObjectValue(item.Value);
 76            }
 077            writer.WriteEndObject();
 078        }
 79
 80        internal static AmazonMWSObjectDataset DeserializeAmazonMWSObjectDataset(JsonElement element)
 81        {
 082            string type = default;
 083            Optional<string> description = default;
 084            Optional<object> structure = default;
 085            Optional<object> schema = default;
 086            LinkedServiceReference linkedServiceName = default;
 087            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 088            Optional<IList<object>> annotations = default;
 089            Optional<DatasetFolder> folder = default;
 090            Optional<object> tableName = default;
 091            IDictionary<string, object> additionalProperties = default;
 092            Dictionary<string, object> additionalPropertiesDictionary = default;
 093            foreach (var property in element.EnumerateObject())
 94            {
 095                if (property.NameEquals("type"))
 96                {
 097                    type = property.Value.GetString();
 098                    continue;
 99                }
 0100                if (property.NameEquals("description"))
 101                {
 0102                    description = property.Value.GetString();
 0103                    continue;
 104                }
 0105                if (property.NameEquals("structure"))
 106                {
 0107                    structure = property.Value.GetObject();
 0108                    continue;
 109                }
 0110                if (property.NameEquals("schema"))
 111                {
 0112                    schema = property.Value.GetObject();
 0113                    continue;
 114                }
 0115                if (property.NameEquals("linkedServiceName"))
 116                {
 0117                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
 0118                    continue;
 119                }
 0120                if (property.NameEquals("parameters"))
 121                {
 0122                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0123                    foreach (var property0 in property.Value.EnumerateObject())
 124                    {
 0125                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 126                    }
 0127                    parameters = dictionary;
 0128                    continue;
 129                }
 0130                if (property.NameEquals("annotations"))
 131                {
 0132                    List<object> array = new List<object>();
 0133                    foreach (var item in property.Value.EnumerateArray())
 134                    {
 0135                        array.Add(item.GetObject());
 136                    }
 0137                    annotations = array;
 0138                    continue;
 139                }
 0140                if (property.NameEquals("folder"))
 141                {
 0142                    folder = DatasetFolder.DeserializeDatasetFolder(property.Value);
 0143                    continue;
 144                }
 0145                if (property.NameEquals("typeProperties"))
 146                {
 0147                    foreach (var property0 in property.Value.EnumerateObject())
 148                    {
 0149                        if (property0.NameEquals("tableName"))
 150                        {
 0151                            tableName = property0.Value.GetObject();
 152                            continue;
 153                        }
 154                    }
 155                    continue;
 156                }
 0157                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0158                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 159            }
 0160            additionalProperties = additionalPropertiesDictionary;
 0161            return new AmazonMWSObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName,
 162        }
 163    }
 164}