< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%100%
get_LinkedServiceName()-0%100%
get_Path()-0%100%
get_EnableCompression()-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%
DeserializeStagingSettings(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\StagingSettings.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;
 10using System.Collections.Generic;
 11using Azure.Core;
 12
 13namespace Azure.Analytics.Synapse.Artifacts.Models
 14{
 15    /// <summary> Staging settings. </summary>
 16    public partial class StagingSettings : IDictionary<string, object>
 17    {
 18        /// <summary> Initializes a new instance of StagingSettings. </summary>
 19        /// <param name="linkedServiceName"> Staging linked service reference. </param>
 20        /// <exception cref="ArgumentNullException"> <paramref name="linkedServiceName"/> is null. </exception>
 021        public StagingSettings(LinkedServiceReference linkedServiceName)
 22        {
 023            if (linkedServiceName == null)
 24            {
 025                throw new ArgumentNullException(nameof(linkedServiceName));
 26            }
 27
 028            LinkedServiceName = linkedServiceName;
 029            AdditionalProperties = new ChangeTrackingDictionary<string, object>();
 030        }
 31
 32        /// <summary> Initializes a new instance of StagingSettings. </summary>
 33        /// <param name="linkedServiceName"> Staging linked service reference. </param>
 34        /// <param name="path"> The path to storage for storing the interim data. Type: string (or Expression with resul
 35        /// <param name="enableCompression"> Specifies whether to use compression when copying data via an interim stagi
 36        /// <param name="additionalProperties"> . </param>
 037        internal StagingSettings(LinkedServiceReference linkedServiceName, object path, object enableCompression, IDicti
 38        {
 039            LinkedServiceName = linkedServiceName;
 040            Path = path;
 041            EnableCompression = enableCompression;
 042            AdditionalProperties = additionalProperties;
 043        }
 44
 45        /// <summary> Staging linked service reference. </summary>
 046        public LinkedServiceReference LinkedServiceName { get; set; }
 47        /// <summary> The path to storage for storing the interim data. Type: string (or Expression with resultType stri
 048        public object Path { get; set; }
 49        /// <summary> Specifies whether to use compression when copying data via an interim staging. Default value is fa
 050        public object EnableCompression { get; set; }
 051        internal IDictionary<string, object> AdditionalProperties { get; }
 52        /// <inheritdoc />
 053        public IEnumerator<KeyValuePair<string, object>> GetEnumerator() => AdditionalProperties.GetEnumerator();
 54        /// <inheritdoc />
 055        IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator();
 56        /// <inheritdoc />
 057        public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value);
 58        /// <inheritdoc />
 059        public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key);
 60        /// <inheritdoc />
 061        public ICollection<string> Keys => AdditionalProperties.Keys;
 62        /// <inheritdoc />
 063        public ICollection<object> Values => AdditionalProperties.Values;
 64        /// <inheritdoc />
 065        int ICollection<KeyValuePair<string, object>>.Count => AdditionalProperties.Count;
 66        /// <inheritdoc />
 067        public void Add(string key, object value) => AdditionalProperties.Add(key, value);
 68        /// <inheritdoc />
 069        public bool Remove(string key) => AdditionalProperties.Remove(key);
 70        /// <inheritdoc />
 071        bool ICollection<KeyValuePair<string, object>>.IsReadOnly => AdditionalProperties.IsReadOnly;
 72        /// <inheritdoc />
 073        void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> value) => AdditionalProperties.A
 74        /// <inheritdoc />
 075        bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> value) => AdditionalPropertie
 76        /// <inheritdoc />
 077        bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> value) => AdditionalPropert
 78        /// <inheritdoc />
 079        void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] destination, int offset) =>
 80        /// <inheritdoc />
 081        void ICollection<KeyValuePair<string, object>>.Clear() => AdditionalProperties.Clear();
 82        /// <inheritdoc />
 83        public object this[string key]
 84        {
 085            get => AdditionalProperties[key];
 086            set => AdditionalProperties[key] = value;
 87        }
 88    }
 89}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\StagingSettings.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 StagingSettings : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            writer.WritePropertyName("linkedServiceName");
 020            writer.WriteObjectValue(LinkedServiceName);
 021            if (Optional.IsDefined(Path))
 22            {
 023                writer.WritePropertyName("path");
 024                writer.WriteObjectValue(Path);
 25            }
 026            if (Optional.IsDefined(EnableCompression))
 27            {
 028                writer.WritePropertyName("enableCompression");
 029                writer.WriteObjectValue(EnableCompression);
 30            }
 031            foreach (var item in AdditionalProperties)
 32            {
 033                writer.WritePropertyName(item.Key);
 034                writer.WriteObjectValue(item.Value);
 35            }
 036            writer.WriteEndObject();
 037        }
 38
 39        internal static StagingSettings DeserializeStagingSettings(JsonElement element)
 40        {
 041            LinkedServiceReference linkedServiceName = default;
 042            Optional<object> path = default;
 043            Optional<object> enableCompression = default;
 044            IDictionary<string, object> additionalProperties = default;
 045            Dictionary<string, object> additionalPropertiesDictionary = default;
 046            foreach (var property in element.EnumerateObject())
 47            {
 048                if (property.NameEquals("linkedServiceName"))
 49                {
 050                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
 051                    continue;
 52                }
 053                if (property.NameEquals("path"))
 54                {
 055                    path = property.Value.GetObject();
 056                    continue;
 57                }
 058                if (property.NameEquals("enableCompression"))
 59                {
 060                    enableCompression = property.Value.GetObject();
 061                    continue;
 62                }
 063                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 064                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 65            }
 066            additionalProperties = additionalPropertiesDictionary;
 067            return new StagingSettings(linkedServiceName, path.Value, enableCompression.Value, additionalProperties);
 68        }
 69    }
 70}