< Summary

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

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SapBwCubeDataset.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 SAP BW cube dataset. </summary>
 14    public partial class SapBwCubeDataset : Dataset
 15    {
 16        /// <summary> Initializes a new instance of SapBwCubeDataset. </summary>
 17        /// <param name="linkedServiceName"> Linked service reference. </param>
 18        /// <exception cref="ArgumentNullException"> <paramref name="linkedServiceName"/> is null. </exception>
 019        public SapBwCubeDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName)
 20        {
 021            if (linkedServiceName == null)
 22            {
 023                throw new ArgumentNullException(nameof(linkedServiceName));
 24            }
 25
 026            Type = "SapBwCube";
 027        }
 28
 29        /// <summary> Initializes a new instance of SapBwCubeDataset. </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>
 039        internal SapBwCubeDataset(string type, string description, object structure, object schema, LinkedServiceReferen
 40        {
 041            Type = type ?? "SapBwCube";
 042        }
 43    }
 44}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SapBwCubeDataset.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 SapBwCubeDataset : 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 SapBwCubeDataset DeserializeSapBwCubeDataset(JsonElement element)
 73        {
 074            string type = default;
 075            Optional<string> description = default;
 076            Optional<object> structure = default;
 077            Optional<object> schema = default;
 078            LinkedServiceReference linkedServiceName = default;
 079            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 080            Optional<IList<object>> annotations = default;
 081            Optional<DatasetFolder> folder = default;
 082            IDictionary<string, object> additionalProperties = default;
 083            Dictionary<string, object> additionalPropertiesDictionary = default;
 084            foreach (var property in element.EnumerateObject())
 85            {
 086                if (property.NameEquals("type"))
 87                {
 088                    type = property.Value.GetString();
 089                    continue;
 90                }
 091                if (property.NameEquals("description"))
 92                {
 093                    description = property.Value.GetString();
 094                    continue;
 95                }
 096                if (property.NameEquals("structure"))
 97                {
 098                    structure = property.Value.GetObject();
 099                    continue;
 100                }
 0101                if (property.NameEquals("schema"))
 102                {
 0103                    schema = property.Value.GetObject();
 0104                    continue;
 105                }
 0106                if (property.NameEquals("linkedServiceName"))
 107                {
 0108                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
 0109                    continue;
 110                }
 0111                if (property.NameEquals("parameters"))
 112                {
 0113                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0114                    foreach (var property0 in property.Value.EnumerateObject())
 115                    {
 0116                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 117                    }
 0118                    parameters = dictionary;
 0119                    continue;
 120                }
 0121                if (property.NameEquals("annotations"))
 122                {
 0123                    List<object> array = new List<object>();
 0124                    foreach (var item in property.Value.EnumerateArray())
 125                    {
 0126                        array.Add(item.GetObject());
 127                    }
 0128                    annotations = array;
 0129                    continue;
 130                }
 0131                if (property.NameEquals("folder"))
 132                {
 0133                    folder = DatasetFolder.DeserializeDatasetFolder(property.Value);
 0134                    continue;
 135                }
 0136                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0137                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 138            }
 0139            additionalProperties = additionalPropertiesDictionary;
 0140            return new SapBwCubeDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optio
 141        }
 142    }
 143}