< Summary

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

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\Office365Dataset.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 Office365 account. </summary>
 14    public partial class Office365Dataset : Dataset
 15    {
 16        /// <summary> Initializes a new instance of Office365Dataset. </summary>
 17        /// <param name="linkedServiceName"> Linked service reference. </param>
 18        /// <param name="tableName"> Name of the dataset to extract from Office 365. Type: string (or Expression with re
 19        /// <exception cref="ArgumentNullException"> <paramref name="linkedServiceName"/> or <paramref name="tableName"/
 020        public Office365Dataset(LinkedServiceReference linkedServiceName, object tableName) : base(linkedServiceName)
 21        {
 022            if (linkedServiceName == null)
 23            {
 024                throw new ArgumentNullException(nameof(linkedServiceName));
 25            }
 026            if (tableName == null)
 27            {
 028                throw new ArgumentNullException(nameof(tableName));
 29            }
 30
 031            TableName = tableName;
 032            Type = "Office365Table";
 033        }
 34
 35        /// <summary> Initializes a new instance of Office365Dataset. </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="tableName"> Name of the dataset to extract from Office 365. Type: string (or Expression with re
 46        /// <param name="predicate"> A predicate expression that can be used to filter the specific rows to extract from
 047        internal Office365Dataset(string type, string description, object structure, object schema, LinkedServiceReferen
 48        {
 049            TableName = tableName;
 050            Predicate = predicate;
 051            Type = type ?? "Office365Table";
 052        }
 53
 54        /// <summary> Name of the dataset to extract from Office 365. Type: string (or Expression with resultType string
 055        public object TableName { get; set; }
 56        /// <summary> A predicate expression that can be used to filter the specific rows to extract from Office 365. Ty
 057        public object Predicate { get; set; }
 58    }
 59}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\Office365Dataset.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 Office365Dataset : 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("tableName");
 067            writer.WriteObjectValue(TableName);
 068            if (Optional.IsDefined(Predicate))
 69            {
 070                writer.WritePropertyName("predicate");
 071                writer.WriteObjectValue(Predicate);
 72            }
 073            writer.WriteEndObject();
 074            foreach (var item in AdditionalProperties)
 75            {
 076                writer.WritePropertyName(item.Key);
 077                writer.WriteObjectValue(item.Value);
 78            }
 079            writer.WriteEndObject();
 080        }
 81
 82        internal static Office365Dataset DeserializeOffice365Dataset(JsonElement element)
 83        {
 084            string type = default;
 085            Optional<string> description = default;
 086            Optional<object> structure = default;
 087            Optional<object> schema = default;
 088            LinkedServiceReference linkedServiceName = default;
 089            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 090            Optional<IList<object>> annotations = default;
 091            Optional<DatasetFolder> folder = default;
 092            object tableName = default;
 093            Optional<object> predicate = default;
 094            IDictionary<string, object> additionalProperties = default;
 095            Dictionary<string, object> additionalPropertiesDictionary = default;
 096            foreach (var property in element.EnumerateObject())
 97            {
 098                if (property.NameEquals("type"))
 99                {
 0100                    type = property.Value.GetString();
 0101                    continue;
 102                }
 0103                if (property.NameEquals("description"))
 104                {
 0105                    description = property.Value.GetString();
 0106                    continue;
 107                }
 0108                if (property.NameEquals("structure"))
 109                {
 0110                    structure = property.Value.GetObject();
 0111                    continue;
 112                }
 0113                if (property.NameEquals("schema"))
 114                {
 0115                    schema = property.Value.GetObject();
 0116                    continue;
 117                }
 0118                if (property.NameEquals("linkedServiceName"))
 119                {
 0120                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
 0121                    continue;
 122                }
 0123                if (property.NameEquals("parameters"))
 124                {
 0125                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0126                    foreach (var property0 in property.Value.EnumerateObject())
 127                    {
 0128                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 129                    }
 0130                    parameters = dictionary;
 0131                    continue;
 132                }
 0133                if (property.NameEquals("annotations"))
 134                {
 0135                    List<object> array = new List<object>();
 0136                    foreach (var item in property.Value.EnumerateArray())
 137                    {
 0138                        array.Add(item.GetObject());
 139                    }
 0140                    annotations = array;
 0141                    continue;
 142                }
 0143                if (property.NameEquals("folder"))
 144                {
 0145                    folder = DatasetFolder.DeserializeDatasetFolder(property.Value);
 0146                    continue;
 147                }
 0148                if (property.NameEquals("typeProperties"))
 149                {
 0150                    foreach (var property0 in property.Value.EnumerateObject())
 151                    {
 0152                        if (property0.NameEquals("tableName"))
 153                        {
 0154                            tableName = property0.Value.GetObject();
 0155                            continue;
 156                        }
 0157                        if (property0.NameEquals("predicate"))
 158                        {
 0159                            predicate = property0.Value.GetObject();
 160                            continue;
 161                        }
 162                    }
 163                    continue;
 164                }
 0165                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0166                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 167            }
 0168            additionalProperties = additionalPropertiesDictionary;
 0169            return new Office365Dataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optio
 170        }
 171    }
 172}