< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Timeout()-0%100%
get_Retry()-0%100%
get_RetryIntervalInSeconds()-0%100%
get_SecureInput()-0%100%
get_SecureOutput()-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%
DeserializeActivityPolicy(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\ActivityPolicy.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> Execution policy for an activity. </summary>
 15    public partial class ActivityPolicy : IDictionary<string, object>
 16    {
 17        /// <summary> Initializes a new instance of ActivityPolicy. </summary>
 018        public ActivityPolicy()
 19        {
 020            AdditionalProperties = new ChangeTrackingDictionary<string, object>();
 021        }
 22
 23        /// <summary> Initializes a new instance of ActivityPolicy. </summary>
 24        /// <param name="timeout"> Specifies the timeout for the activity to run. The default timeout is 7 days. Type: s
 25        /// <param name="retry"> Maximum ordinary retry attempts. Default is 0. Type: integer (or Expression with result
 26        /// <param name="retryIntervalInSeconds"> Interval between each retry attempt (in seconds). The default is 30 se
 27        /// <param name="secureInput"> When set to true, Input from activity is considered as secure and will not be log
 28        /// <param name="secureOutput"> When set to true, Output from activity is considered as secure and will not be l
 29        /// <param name="additionalProperties"> . </param>
 030        internal ActivityPolicy(object timeout, object retry, int? retryIntervalInSeconds, bool? secureInput, bool? secu
 31        {
 032            Timeout = timeout;
 033            Retry = retry;
 034            RetryIntervalInSeconds = retryIntervalInSeconds;
 035            SecureInput = secureInput;
 036            SecureOutput = secureOutput;
 037            AdditionalProperties = additionalProperties;
 038        }
 39
 40        /// <summary> Specifies the timeout for the activity to run. The default timeout is 7 days. Type: string (or Exp
 041        public object Timeout { get; set; }
 42        /// <summary> Maximum ordinary retry attempts. Default is 0. Type: integer (or Expression with resultType intege
 043        public object Retry { get; set; }
 44        /// <summary> Interval between each retry attempt (in seconds). The default is 30 sec. </summary>
 045        public int? RetryIntervalInSeconds { get; set; }
 46        /// <summary> When set to true, Input from activity is considered as secure and will not be logged to monitoring
 047        public bool? SecureInput { get; set; }
 48        /// <summary> When set to true, Output from activity is considered as secure and will not be logged to monitorin
 049        public bool? SecureOutput { get; set; }
 050        internal IDictionary<string, object> AdditionalProperties { get; }
 51        /// <inheritdoc />
 052        public IEnumerator<KeyValuePair<string, object>> GetEnumerator() => AdditionalProperties.GetEnumerator();
 53        /// <inheritdoc />
 054        IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator();
 55        /// <inheritdoc />
 056        public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value);
 57        /// <inheritdoc />
 058        public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key);
 59        /// <inheritdoc />
 060        public ICollection<string> Keys => AdditionalProperties.Keys;
 61        /// <inheritdoc />
 062        public ICollection<object> Values => AdditionalProperties.Values;
 63        /// <inheritdoc />
 064        int ICollection<KeyValuePair<string, object>>.Count => AdditionalProperties.Count;
 65        /// <inheritdoc />
 066        public void Add(string key, object value) => AdditionalProperties.Add(key, value);
 67        /// <inheritdoc />
 068        public bool Remove(string key) => AdditionalProperties.Remove(key);
 69        /// <inheritdoc />
 070        bool ICollection<KeyValuePair<string, object>>.IsReadOnly => AdditionalProperties.IsReadOnly;
 71        /// <inheritdoc />
 072        void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> value) => AdditionalProperties.A
 73        /// <inheritdoc />
 074        bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> value) => AdditionalPropertie
 75        /// <inheritdoc />
 076        bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> value) => AdditionalPropert
 77        /// <inheritdoc />
 078        void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] destination, int offset) =>
 79        /// <inheritdoc />
 080        void ICollection<KeyValuePair<string, object>>.Clear() => AdditionalProperties.Clear();
 81        /// <inheritdoc />
 82        public object this[string key]
 83        {
 084            get => AdditionalProperties[key];
 085            set => AdditionalProperties[key] = value;
 86        }
 87    }
 88}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\ActivityPolicy.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 ActivityPolicy : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Optional.IsDefined(Timeout))
 20            {
 021                writer.WritePropertyName("timeout");
 022                writer.WriteObjectValue(Timeout);
 23            }
 024            if (Optional.IsDefined(Retry))
 25            {
 026                writer.WritePropertyName("retry");
 027                writer.WriteObjectValue(Retry);
 28            }
 029            if (Optional.IsDefined(RetryIntervalInSeconds))
 30            {
 031                writer.WritePropertyName("retryIntervalInSeconds");
 032                writer.WriteNumberValue(RetryIntervalInSeconds.Value);
 33            }
 034            if (Optional.IsDefined(SecureInput))
 35            {
 036                writer.WritePropertyName("secureInput");
 037                writer.WriteBooleanValue(SecureInput.Value);
 38            }
 039            if (Optional.IsDefined(SecureOutput))
 40            {
 041                writer.WritePropertyName("secureOutput");
 042                writer.WriteBooleanValue(SecureOutput.Value);
 43            }
 044            foreach (var item in AdditionalProperties)
 45            {
 046                writer.WritePropertyName(item.Key);
 047                writer.WriteObjectValue(item.Value);
 48            }
 049            writer.WriteEndObject();
 050        }
 51
 52        internal static ActivityPolicy DeserializeActivityPolicy(JsonElement element)
 53        {
 054            Optional<object> timeout = default;
 055            Optional<object> retry = default;
 056            Optional<int> retryIntervalInSeconds = default;
 057            Optional<bool> secureInput = default;
 058            Optional<bool> secureOutput = default;
 059            IDictionary<string, object> additionalProperties = default;
 060            Dictionary<string, object> additionalPropertiesDictionary = default;
 061            foreach (var property in element.EnumerateObject())
 62            {
 063                if (property.NameEquals("timeout"))
 64                {
 065                    timeout = property.Value.GetObject();
 066                    continue;
 67                }
 068                if (property.NameEquals("retry"))
 69                {
 070                    retry = property.Value.GetObject();
 071                    continue;
 72                }
 073                if (property.NameEquals("retryIntervalInSeconds"))
 74                {
 075                    retryIntervalInSeconds = property.Value.GetInt32();
 076                    continue;
 77                }
 078                if (property.NameEquals("secureInput"))
 79                {
 080                    secureInput = property.Value.GetBoolean();
 081                    continue;
 82                }
 083                if (property.NameEquals("secureOutput"))
 84                {
 085                    secureOutput = property.Value.GetBoolean();
 086                    continue;
 87                }
 088                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 089                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 90            }
 091            additionalProperties = additionalPropertiesDictionary;
 092            return new ActivityPolicy(timeout.Value, retry.Value, Optional.ToNullable(retryIntervalInSeconds), Optional.
 93        }
 94    }
 95}