< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%0%
get_Type()-0%100%
get_WriteBatchSize()-0%100%
get_WriteBatchTimeout()-0%100%
get_SinkRetryCount()-0%100%
get_SinkRetryWait()-0%100%
get_MaxConcurrentConnections()-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%
DeserializeCopySink(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\CopySink.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> A copy activity sink. </summary>
 15    public partial class CopySink : IDictionary<string, object>
 16    {
 17        /// <summary> Initializes a new instance of CopySink. </summary>
 018        public CopySink()
 19        {
 020            AdditionalProperties = new ChangeTrackingDictionary<string, object>();
 021            Type = "CopySink";
 022        }
 23
 24        /// <summary> Initializes a new instance of CopySink. </summary>
 25        /// <param name="type"> Copy sink type. </param>
 26        /// <param name="writeBatchSize"> Write batch size. Type: integer (or Expression with resultType integer), minim
 27        /// <param name="writeBatchTimeout"> Write batch timeout. Type: string (or Expression with resultType string), p
 28        /// <param name="sinkRetryCount"> Sink retry count. Type: integer (or Expression with resultType integer). </par
 29        /// <param name="sinkRetryWait"> Sink retry wait. Type: string (or Expression with resultType string), pattern: 
 30        /// <param name="maxConcurrentConnections"> The maximum concurrent connection count for the sink data store. Typ
 31        /// <param name="additionalProperties"> . </param>
 032        internal CopySink(string type, object writeBatchSize, object writeBatchTimeout, object sinkRetryCount, object si
 33        {
 034            Type = type ?? "CopySink";
 035            WriteBatchSize = writeBatchSize;
 036            WriteBatchTimeout = writeBatchTimeout;
 037            SinkRetryCount = sinkRetryCount;
 038            SinkRetryWait = sinkRetryWait;
 039            MaxConcurrentConnections = maxConcurrentConnections;
 040            AdditionalProperties = additionalProperties;
 041        }
 42
 43        /// <summary> Copy sink type. </summary>
 044        internal string Type { get; set; }
 45        /// <summary> Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. </summary>
 046        public object WriteBatchSize { get; set; }
 47        /// <summary> Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d
 048        public object WriteBatchTimeout { get; set; }
 49        /// <summary> Sink retry count. Type: integer (or Expression with resultType integer). </summary>
 050        public object SinkRetryCount { get; set; }
 51        /// <summary> Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(6
 052        public object SinkRetryWait { get; set; }
 53        /// <summary> The maximum concurrent connection count for the sink data store. Type: integer (or Expression with
 054        public object MaxConcurrentConnections { get; set; }
 055        internal IDictionary<string, object> AdditionalProperties { get; }
 56        /// <inheritdoc />
 057        public IEnumerator<KeyValuePair<string, object>> GetEnumerator() => AdditionalProperties.GetEnumerator();
 58        /// <inheritdoc />
 059        IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator();
 60        /// <inheritdoc />
 061        public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value);
 62        /// <inheritdoc />
 063        public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key);
 64        /// <inheritdoc />
 065        public ICollection<string> Keys => AdditionalProperties.Keys;
 66        /// <inheritdoc />
 067        public ICollection<object> Values => AdditionalProperties.Values;
 68        /// <inheritdoc />
 069        int ICollection<KeyValuePair<string, object>>.Count => AdditionalProperties.Count;
 70        /// <inheritdoc />
 071        public void Add(string key, object value) => AdditionalProperties.Add(key, value);
 72        /// <inheritdoc />
 073        public bool Remove(string key) => AdditionalProperties.Remove(key);
 74        /// <inheritdoc />
 075        bool ICollection<KeyValuePair<string, object>>.IsReadOnly => AdditionalProperties.IsReadOnly;
 76        /// <inheritdoc />
 077        void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> value) => AdditionalProperties.A
 78        /// <inheritdoc />
 079        bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> value) => AdditionalPropertie
 80        /// <inheritdoc />
 081        bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> value) => AdditionalPropert
 82        /// <inheritdoc />
 083        void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] destination, int offset) =>
 84        /// <inheritdoc />
 085        void ICollection<KeyValuePair<string, object>>.Clear() => AdditionalProperties.Clear();
 86        /// <inheritdoc />
 87        public object this[string key]
 88        {
 089            get => AdditionalProperties[key];
 090            set => AdditionalProperties[key] = value;
 91        }
 92    }
 93}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\CopySink.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 CopySink : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            writer.WritePropertyName("type");
 020            writer.WriteStringValue(Type);
 021            if (Optional.IsDefined(WriteBatchSize))
 22            {
 023                writer.WritePropertyName("writeBatchSize");
 024                writer.WriteObjectValue(WriteBatchSize);
 25            }
 026            if (Optional.IsDefined(WriteBatchTimeout))
 27            {
 028                writer.WritePropertyName("writeBatchTimeout");
 029                writer.WriteObjectValue(WriteBatchTimeout);
 30            }
 031            if (Optional.IsDefined(SinkRetryCount))
 32            {
 033                writer.WritePropertyName("sinkRetryCount");
 034                writer.WriteObjectValue(SinkRetryCount);
 35            }
 036            if (Optional.IsDefined(SinkRetryWait))
 37            {
 038                writer.WritePropertyName("sinkRetryWait");
 039                writer.WriteObjectValue(SinkRetryWait);
 40            }
 041            if (Optional.IsDefined(MaxConcurrentConnections))
 42            {
 043                writer.WritePropertyName("maxConcurrentConnections");
 044                writer.WriteObjectValue(MaxConcurrentConnections);
 45            }
 046            foreach (var item in AdditionalProperties)
 47            {
 048                writer.WritePropertyName(item.Key);
 049                writer.WriteObjectValue(item.Value);
 50            }
 051            writer.WriteEndObject();
 052        }
 53
 54        internal static CopySink DeserializeCopySink(JsonElement element)
 55        {
 056            string type = default;
 057            Optional<object> writeBatchSize = default;
 058            Optional<object> writeBatchTimeout = default;
 059            Optional<object> sinkRetryCount = default;
 060            Optional<object> sinkRetryWait = default;
 061            Optional<object> maxConcurrentConnections = default;
 062            IDictionary<string, object> additionalProperties = default;
 063            Dictionary<string, object> additionalPropertiesDictionary = default;
 064            foreach (var property in element.EnumerateObject())
 65            {
 066                if (property.NameEquals("type"))
 67                {
 068                    type = property.Value.GetString();
 069                    continue;
 70                }
 071                if (property.NameEquals("writeBatchSize"))
 72                {
 073                    writeBatchSize = property.Value.GetObject();
 074                    continue;
 75                }
 076                if (property.NameEquals("writeBatchTimeout"))
 77                {
 078                    writeBatchTimeout = property.Value.GetObject();
 079                    continue;
 80                }
 081                if (property.NameEquals("sinkRetryCount"))
 82                {
 083                    sinkRetryCount = property.Value.GetObject();
 084                    continue;
 85                }
 086                if (property.NameEquals("sinkRetryWait"))
 87                {
 088                    sinkRetryWait = property.Value.GetObject();
 089                    continue;
 90                }
 091                if (property.NameEquals("maxConcurrentConnections"))
 92                {
 093                    maxConcurrentConnections = property.Value.GetObject();
 094                    continue;
 95                }
 096                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 097                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 98            }
 099            additionalProperties = additionalPropertiesDictionary;
 0100            return new CopySink(type, writeBatchSize.Value, writeBatchTimeout.Value, sinkRetryCount.Value, sinkRetryWait
 101        }
 102    }
 103}