< Summary

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

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\DatasetZipDeflateCompression.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;
 9
 10namespace Azure.Analytics.Synapse.Artifacts.Models
 11{
 12    /// <summary> The ZipDeflate compression method used on a dataset. </summary>
 13    public partial class DatasetZipDeflateCompression : DatasetCompression
 14    {
 15        /// <summary> Initializes a new instance of DatasetZipDeflateCompression. </summary>
 016        public DatasetZipDeflateCompression()
 17        {
 018            Type = "ZipDeflate";
 019        }
 20
 21        /// <summary> Initializes a new instance of DatasetZipDeflateCompression. </summary>
 22        /// <param name="type"> Type of dataset compression. </param>
 23        /// <param name="additionalProperties"> . </param>
 24        /// <param name="level"> The ZipDeflate compression level. </param>
 025        internal DatasetZipDeflateCompression(string type, IDictionary<string, object> additionalProperties, DatasetComp
 26        {
 027            Level = level;
 028            Type = type ?? "ZipDeflate";
 029        }
 30
 31        /// <summary> The ZipDeflate compression level. </summary>
 032        public DatasetCompressionLevel? Level { get; set; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\DatasetZipDeflateCompression.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 DatasetZipDeflateCompression : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Optional.IsDefined(Level))
 20            {
 021                writer.WritePropertyName("level");
 022                writer.WriteStringValue(Level.Value.ToString());
 23            }
 024            writer.WritePropertyName("type");
 025            writer.WriteStringValue(Type);
 026            foreach (var item in AdditionalProperties)
 27            {
 028                writer.WritePropertyName(item.Key);
 029                writer.WriteObjectValue(item.Value);
 30            }
 031            writer.WriteEndObject();
 032        }
 33
 34        internal static DatasetZipDeflateCompression DeserializeDatasetZipDeflateCompression(JsonElement element)
 35        {
 036            Optional<DatasetCompressionLevel> level = default;
 037            string type = default;
 038            IDictionary<string, object> additionalProperties = default;
 039            Dictionary<string, object> additionalPropertiesDictionary = default;
 040            foreach (var property in element.EnumerateObject())
 41            {
 042                if (property.NameEquals("level"))
 43                {
 044                    level = new DatasetCompressionLevel(property.Value.GetString());
 045                    continue;
 46                }
 047                if (property.NameEquals("type"))
 48                {
 049                    type = property.Value.GetString();
 050                    continue;
 51                }
 052                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 053                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 54            }
 055            additionalProperties = additionalPropertiesDictionary;
 056            return new DatasetZipDeflateCompression(type, additionalProperties, Optional.ToNullable(level));
 57        }
 58    }
 59}