< Summary

Class:Azure.Analytics.Synapse.Artifacts.Models.MongoDbV2CollectionDataset
Assembly:Azure.Analytics.Synapse.Artifacts
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\MongoDbV2CollectionDataset.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\MongoDbV2CollectionDataset.Serialization.cs
Covered lines:0
Uncovered lines:103
Coverable lines:103
Total lines:216
Line coverage:0% (0 of 103)
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_Collection()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeMongoDbV2CollectionDataset(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\MongoDbV2CollectionDataset.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 MongoDB database dataset. </summary>
 14    public partial class MongoDbV2CollectionDataset : Dataset
 15    {
 16        /// <summary> Initializes a new instance of MongoDbV2CollectionDataset. </summary>
 17        /// <param name="linkedServiceName"> Linked service reference. </param>
 18        /// <param name="collection"> The collection name of the MongoDB database. Type: string (or Expression with resu
 19        /// <exception cref="ArgumentNullException"> <paramref name="linkedServiceName"/> or <paramref name="collection"
 020        public MongoDbV2CollectionDataset(LinkedServiceReference linkedServiceName, object collection) : base(linkedServ
 21        {
 022            if (linkedServiceName == null)
 23            {
 024                throw new ArgumentNullException(nameof(linkedServiceName));
 25            }
 026            if (collection == null)
 27            {
 028                throw new ArgumentNullException(nameof(collection));
 29            }
 30
 031            Collection = collection;
 032            Type = "MongoDbV2Collection";
 033        }
 34
 35        /// <summary> Initializes a new instance of MongoDbV2CollectionDataset. </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>
 45        /// <param name="collection"> The collection name of the MongoDB database. Type: string (or Expression with resu
 046        internal MongoDbV2CollectionDataset(string type, string description, object structure, object schema, LinkedServ
 47        {
 048            Collection = collection;
 049            Type = type ?? "MongoDbV2Collection";
 050        }
 51
 52        /// <summary> The collection name of the MongoDB database. Type: string (or Expression with resultType string). 
 053        public object Collection { get; set; }
 54    }
 55}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\MongoDbV2CollectionDataset.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 MongoDbV2CollectionDataset : 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            writer.WritePropertyName("collection");
 067            writer.WriteObjectValue(Collection);
 068            writer.WriteEndObject();
 069            foreach (var item in AdditionalProperties)
 70            {
 071                writer.WritePropertyName(item.Key);
 072                writer.WriteObjectValue(item.Value);
 73            }
 074            writer.WriteEndObject();
 075        }
 76
 77        internal static MongoDbV2CollectionDataset DeserializeMongoDbV2CollectionDataset(JsonElement element)
 78        {
 079            string type = default;
 080            Optional<string> description = default;
 081            Optional<object> structure = default;
 082            Optional<object> schema = default;
 083            LinkedServiceReference linkedServiceName = default;
 084            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 085            Optional<IList<object>> annotations = default;
 086            Optional<DatasetFolder> folder = default;
 087            object collection = default;
 088            IDictionary<string, object> additionalProperties = default;
 089            Dictionary<string, object> additionalPropertiesDictionary = default;
 090            foreach (var property in element.EnumerateObject())
 91            {
 092                if (property.NameEquals("type"))
 93                {
 094                    type = property.Value.GetString();
 095                    continue;
 96                }
 097                if (property.NameEquals("description"))
 98                {
 099                    description = property.Value.GetString();
 0100                    continue;
 101                }
 0102                if (property.NameEquals("structure"))
 103                {
 0104                    structure = property.Value.GetObject();
 0105                    continue;
 106                }
 0107                if (property.NameEquals("schema"))
 108                {
 0109                    schema = property.Value.GetObject();
 0110                    continue;
 111                }
 0112                if (property.NameEquals("linkedServiceName"))
 113                {
 0114                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
 0115                    continue;
 116                }
 0117                if (property.NameEquals("parameters"))
 118                {
 0119                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0120                    foreach (var property0 in property.Value.EnumerateObject())
 121                    {
 0122                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 123                    }
 0124                    parameters = dictionary;
 0125                    continue;
 126                }
 0127                if (property.NameEquals("annotations"))
 128                {
 0129                    List<object> array = new List<object>();
 0130                    foreach (var item in property.Value.EnumerateArray())
 131                    {
 0132                        array.Add(item.GetObject());
 133                    }
 0134                    annotations = array;
 0135                    continue;
 136                }
 0137                if (property.NameEquals("folder"))
 138                {
 0139                    folder = DatasetFolder.DeserializeDatasetFolder(property.Value);
 0140                    continue;
 141                }
 0142                if (property.NameEquals("typeProperties"))
 143                {
 0144                    foreach (var property0 in property.Value.EnumerateObject())
 145                    {
 0146                        if (property0.NameEquals("collection"))
 147                        {
 0148                            collection = property0.Value.GetObject();
 149                            continue;
 150                        }
 151                    }
 152                    continue;
 153                }
 0154                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0155                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 156            }
 0157            additionalProperties = additionalPropertiesDictionary;
 0158            return new MongoDbV2CollectionDataset(type, description.Value, structure.Value, schema.Value, linkedServiceN
 159        }
 160    }
 161}