< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%0%
get_Type()-0%100%
get_AdditionalProperties()-0%100%
GetEnumerator()-0%100%
System.Collections.IEnumerable.GetEnumerator()-0%100%
TryGetValue(...)-0%100%
ContainsKey(...)-0%100%
get_Keys()-0%100%
get_Values()-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.get_Count()-0%100%
Add(...)-0%100%
Remove(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.get_IsReadOnly()-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Add(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Remove(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Contains(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.CopyTo(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Clear()-0%100%
get_Item(...)-0%100%
set_Item(...)-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeDatasetCompression(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\DatasetCompression.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;
 9using System.Collections.Generic;
 10using Azure.Core;
 11
 12namespace Azure.Analytics.Synapse.Artifacts.Models
 13{
 14    /// <summary> The compression method used on a dataset. </summary>
 15    public partial class DatasetCompression : IDictionary<string, object>
 16    {
 17        /// <summary> Initializes a new instance of DatasetCompression. </summary>
 018        public DatasetCompression()
 19        {
 020            AdditionalProperties = new ChangeTrackingDictionary<string, object>();
 021            Type = "DatasetCompression";
 022        }
 23
 24        /// <summary> Initializes a new instance of DatasetCompression. </summary>
 25        /// <param name="type"> Type of dataset compression. </param>
 26        /// <param name="additionalProperties"> . </param>
 027        internal DatasetCompression(string type, IDictionary<string, object> additionalProperties)
 28        {
 029            Type = type ?? "DatasetCompression";
 030            AdditionalProperties = additionalProperties;
 031        }
 32
 33        /// <summary> Type of dataset compression. </summary>
 034        internal string Type { get; set; }
 035        internal IDictionary<string, object> AdditionalProperties { get; }
 36        /// <inheritdoc />
 037        public IEnumerator<KeyValuePair<string, object>> GetEnumerator() => AdditionalProperties.GetEnumerator();
 38        /// <inheritdoc />
 039        IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator();
 40        /// <inheritdoc />
 041        public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value);
 42        /// <inheritdoc />
 043        public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key);
 44        /// <inheritdoc />
 045        public ICollection<string> Keys => AdditionalProperties.Keys;
 46        /// <inheritdoc />
 047        public ICollection<object> Values => AdditionalProperties.Values;
 48        /// <inheritdoc />
 049        int ICollection<KeyValuePair<string, object>>.Count => AdditionalProperties.Count;
 50        /// <inheritdoc />
 051        public void Add(string key, object value) => AdditionalProperties.Add(key, value);
 52        /// <inheritdoc />
 053        public bool Remove(string key) => AdditionalProperties.Remove(key);
 54        /// <inheritdoc />
 055        bool ICollection<KeyValuePair<string, object>>.IsReadOnly => AdditionalProperties.IsReadOnly;
 56        /// <inheritdoc />
 057        void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> value) => AdditionalProperties.A
 58        /// <inheritdoc />
 059        bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> value) => AdditionalPropertie
 60        /// <inheritdoc />
 061        bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> value) => AdditionalPropert
 62        /// <inheritdoc />
 063        void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] destination, int offset) =>
 64        /// <inheritdoc />
 065        void ICollection<KeyValuePair<string, object>>.Clear() => AdditionalProperties.Clear();
 66        /// <inheritdoc />
 67        public object this[string key]
 68        {
 069            get => AdditionalProperties[key];
 070            set => AdditionalProperties[key] = value;
 71        }
 72    }
 73}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\DatasetCompression.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 DatasetCompression : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            writer.WritePropertyName("type");
 020            writer.WriteStringValue(Type);
 021            foreach (var item in AdditionalProperties)
 22            {
 023                writer.WritePropertyName(item.Key);
 024                writer.WriteObjectValue(item.Value);
 25            }
 026            writer.WriteEndObject();
 027        }
 28
 29        internal static DatasetCompression DeserializeDatasetCompression(JsonElement element)
 30        {
 031            if (element.TryGetProperty("type", out JsonElement discriminator))
 32            {
 033                switch (discriminator.GetString())
 34                {
 035                    case "BZip2": return DatasetBZip2Compression.DeserializeDatasetBZip2Compression(element);
 036                    case "Deflate": return DatasetDeflateCompression.DeserializeDatasetDeflateCompression(element);
 037                    case "GZip": return DatasetGZipCompression.DeserializeDatasetGZipCompression(element);
 038                    case "ZipDeflate": return DatasetZipDeflateCompression.DeserializeDatasetZipDeflateCompression(eleme
 39                }
 40            }
 041            string type = default;
 042            IDictionary<string, object> additionalProperties = default;
 043            Dictionary<string, object> additionalPropertiesDictionary = default;
 044            foreach (var property in element.EnumerateObject())
 45            {
 046                if (property.NameEquals("type"))
 47                {
 048                    type = property.Value.GetString();
 049                    continue;
 50                }
 051                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 052                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 53            }
 054            additionalProperties = additionalPropertiesDictionary;
 055            return new DatasetCompression(type, additionalProperties);
 56        }
 57    }
 58}