< Summary

Class:Azure.Analytics.Synapse.Artifacts.Models.SapOpenHubTableDataset
Assembly:Azure.Analytics.Synapse.Artifacts
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SapOpenHubTableDataset.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SapOpenHubTableDataset.Serialization.cs
Covered lines:0
Uncovered lines:121
Coverable lines:121
Total lines:246
Line coverage:0% (0 of 121)
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_OpenHubDestinationName()-0%100%
get_ExcludeLastRequest()-0%100%
get_BaseRequestId()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeSapOpenHubTableDataset(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SapOpenHubTableDataset.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> Sap Business Warehouse Open Hub Destination Table properties. </summary>
 14    public partial class SapOpenHubTableDataset : Dataset
 15    {
 16        /// <summary> Initializes a new instance of SapOpenHubTableDataset. </summary>
 17        /// <param name="linkedServiceName"> Linked service reference. </param>
 18        /// <param name="openHubDestinationName"> The name of the Open Hub Destination with destination type as Database
 19        /// <exception cref="ArgumentNullException"> <paramref name="linkedServiceName"/> or <paramref name="openHubDest
 020        public SapOpenHubTableDataset(LinkedServiceReference linkedServiceName, object openHubDestinationName) : base(li
 21        {
 022            if (linkedServiceName == null)
 23            {
 024                throw new ArgumentNullException(nameof(linkedServiceName));
 25            }
 026            if (openHubDestinationName == null)
 27            {
 028                throw new ArgumentNullException(nameof(openHubDestinationName));
 29            }
 30
 031            OpenHubDestinationName = openHubDestinationName;
 032            Type = "SapOpenHubTable";
 033        }
 34
 35        /// <summary> Initializes a new instance of SapOpenHubTableDataset. </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="openHubDestinationName"> The name of the Open Hub Destination with destination type as Database
 46        /// <param name="excludeLastRequest"> Whether to exclude the records of the last request. The default value is t
 47        /// <param name="baseRequestId"> The ID of request for delta loading. Once it is set, only data with requestId l
 048        internal SapOpenHubTableDataset(string type, string description, object structure, object schema, LinkedServiceR
 49        {
 050            OpenHubDestinationName = openHubDestinationName;
 051            ExcludeLastRequest = excludeLastRequest;
 052            BaseRequestId = baseRequestId;
 053            Type = type ?? "SapOpenHubTable";
 054        }
 55
 56        /// <summary> The name of the Open Hub Destination with destination type as Database Table. Type: string (or Exp
 057        public object OpenHubDestinationName { get; set; }
 58        /// <summary> Whether to exclude the records of the last request. The default value is true. Type: boolean (or E
 059        public object ExcludeLastRequest { get; set; }
 60        /// <summary> The ID of request for delta loading. Once it is set, only data with requestId larger than the valu
 061        public object BaseRequestId { get; set; }
 62    }
 63}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SapOpenHubTableDataset.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 SapOpenHubTableDataset : 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("openHubDestinationName");
 067            writer.WriteObjectValue(OpenHubDestinationName);
 068            if (Optional.IsDefined(ExcludeLastRequest))
 69            {
 070                writer.WritePropertyName("excludeLastRequest");
 071                writer.WriteObjectValue(ExcludeLastRequest);
 72            }
 073            if (Optional.IsDefined(BaseRequestId))
 74            {
 075                writer.WritePropertyName("baseRequestId");
 076                writer.WriteObjectValue(BaseRequestId);
 77            }
 078            writer.WriteEndObject();
 079            foreach (var item in AdditionalProperties)
 80            {
 081                writer.WritePropertyName(item.Key);
 082                writer.WriteObjectValue(item.Value);
 83            }
 084            writer.WriteEndObject();
 085        }
 86
 87        internal static SapOpenHubTableDataset DeserializeSapOpenHubTableDataset(JsonElement element)
 88        {
 089            string type = default;
 090            Optional<string> description = default;
 091            Optional<object> structure = default;
 092            Optional<object> schema = default;
 093            LinkedServiceReference linkedServiceName = default;
 094            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 095            Optional<IList<object>> annotations = default;
 096            Optional<DatasetFolder> folder = default;
 097            object openHubDestinationName = default;
 098            Optional<object> excludeLastRequest = default;
 099            Optional<object> baseRequestId = default;
 0100            IDictionary<string, object> additionalProperties = default;
 0101            Dictionary<string, object> additionalPropertiesDictionary = default;
 0102            foreach (var property in element.EnumerateObject())
 103            {
 0104                if (property.NameEquals("type"))
 105                {
 0106                    type = property.Value.GetString();
 0107                    continue;
 108                }
 0109                if (property.NameEquals("description"))
 110                {
 0111                    description = property.Value.GetString();
 0112                    continue;
 113                }
 0114                if (property.NameEquals("structure"))
 115                {
 0116                    structure = property.Value.GetObject();
 0117                    continue;
 118                }
 0119                if (property.NameEquals("schema"))
 120                {
 0121                    schema = property.Value.GetObject();
 0122                    continue;
 123                }
 0124                if (property.NameEquals("linkedServiceName"))
 125                {
 0126                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
 0127                    continue;
 128                }
 0129                if (property.NameEquals("parameters"))
 130                {
 0131                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0132                    foreach (var property0 in property.Value.EnumerateObject())
 133                    {
 0134                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 135                    }
 0136                    parameters = dictionary;
 0137                    continue;
 138                }
 0139                if (property.NameEquals("annotations"))
 140                {
 0141                    List<object> array = new List<object>();
 0142                    foreach (var item in property.Value.EnumerateArray())
 143                    {
 0144                        array.Add(item.GetObject());
 145                    }
 0146                    annotations = array;
 0147                    continue;
 148                }
 0149                if (property.NameEquals("folder"))
 150                {
 0151                    folder = DatasetFolder.DeserializeDatasetFolder(property.Value);
 0152                    continue;
 153                }
 0154                if (property.NameEquals("typeProperties"))
 155                {
 0156                    foreach (var property0 in property.Value.EnumerateObject())
 157                    {
 0158                        if (property0.NameEquals("openHubDestinationName"))
 159                        {
 0160                            openHubDestinationName = property0.Value.GetObject();
 0161                            continue;
 162                        }
 0163                        if (property0.NameEquals("excludeLastRequest"))
 164                        {
 0165                            excludeLastRequest = property0.Value.GetObject();
 0166                            continue;
 167                        }
 0168                        if (property0.NameEquals("baseRequestId"))
 169                        {
 0170                            baseRequestId = property0.Value.GetObject();
 171                            continue;
 172                        }
 173                    }
 174                    continue;
 175                }
 0176                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0177                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 178            }
 0179            additionalProperties = additionalPropertiesDictionary;
 0180            return new SapOpenHubTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName,
 181        }
 182    }
 183}