< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%100%
.ctor(...)-0%100%
get_Type()-0%100%
get_DefaultValue()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeParameterSpecification(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\ParameterSpecification.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
 8namespace Azure.Analytics.Synapse.Artifacts.Models
 9{
 10    /// <summary> Definition of a single parameter for an entity. </summary>
 11    public partial class ParameterSpecification
 12    {
 13        /// <summary> Initializes a new instance of ParameterSpecification. </summary>
 14        /// <param name="type"> Parameter type. </param>
 015        public ParameterSpecification(ParameterType type)
 16        {
 017            Type = type;
 018        }
 19
 20        /// <summary> Initializes a new instance of ParameterSpecification. </summary>
 21        /// <param name="type"> Parameter type. </param>
 22        /// <param name="defaultValue"> Default value of parameter. </param>
 023        internal ParameterSpecification(ParameterType type, object defaultValue)
 24        {
 025            Type = type;
 026            DefaultValue = defaultValue;
 027        }
 28
 29        /// <summary> Parameter type. </summary>
 030        public ParameterType Type { get; set; }
 31        /// <summary> Default value of parameter. </summary>
 032        public object DefaultValue { get; set; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\ParameterSpecification.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.Text.Json;
 9using Azure.Core;
 10
 11namespace Azure.Analytics.Synapse.Artifacts.Models
 12{
 13    public partial class ParameterSpecification : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("type");
 019            writer.WriteStringValue(Type.ToString());
 020            if (Optional.IsDefined(DefaultValue))
 21            {
 022                writer.WritePropertyName("defaultValue");
 023                writer.WriteObjectValue(DefaultValue);
 24            }
 025            writer.WriteEndObject();
 026        }
 27
 28        internal static ParameterSpecification DeserializeParameterSpecification(JsonElement element)
 29        {
 030            ParameterType type = default;
 031            Optional<object> defaultValue = default;
 032            foreach (var property in element.EnumerateObject())
 33            {
 034                if (property.NameEquals("type"))
 35                {
 036                    type = new ParameterType(property.Value.GetString());
 037                    continue;
 38                }
 039                if (property.NameEquals("defaultValue"))
 40                {
 041                    defaultValue = property.Value.GetObject();
 42                    continue;
 43                }
 44            }
 045            return new ParameterSpecification(type, defaultValue.Value);
 46        }
 47    }
 48}