< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%100%
get_Type()-0%100%
get_ReferenceName()-0%100%
get_Parameters()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeIntegrationRuntimeReference(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\IntegrationRuntimeReference.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.Generic;
 10using Azure.Core;
 11
 12namespace Azure.Analytics.Synapse.Artifacts.Models
 13{
 14    /// <summary> Integration runtime reference type. </summary>
 15    public partial class IntegrationRuntimeReference
 16    {
 17        /// <summary> Initializes a new instance of IntegrationRuntimeReference. </summary>
 18        /// <param name="type"> Type of integration runtime. </param>
 19        /// <param name="referenceName"> Reference integration runtime name. </param>
 20        /// <exception cref="ArgumentNullException"> <paramref name="referenceName"/> is null. </exception>
 021        public IntegrationRuntimeReference(IntegrationRuntimeReferenceType type, string referenceName)
 22        {
 023            if (referenceName == null)
 24            {
 025                throw new ArgumentNullException(nameof(referenceName));
 26            }
 27
 028            Type = type;
 029            ReferenceName = referenceName;
 030            Parameters = new ChangeTrackingDictionary<string, object>();
 031        }
 32
 33        /// <summary> Initializes a new instance of IntegrationRuntimeReference. </summary>
 34        /// <param name="type"> Type of integration runtime. </param>
 35        /// <param name="referenceName"> Reference integration runtime name. </param>
 36        /// <param name="parameters"> Arguments for integration runtime. </param>
 037        internal IntegrationRuntimeReference(IntegrationRuntimeReferenceType type, string referenceName, IDictionary<str
 38        {
 039            Type = type;
 040            ReferenceName = referenceName;
 041            Parameters = parameters;
 042        }
 43
 44        /// <summary> Type of integration runtime. </summary>
 045        public IntegrationRuntimeReferenceType Type { get; set; }
 46        /// <summary> Reference integration runtime name. </summary>
 047        public string ReferenceName { get; set; }
 48        /// <summary> Arguments for integration runtime. </summary>
 049        public IDictionary<string, object> Parameters { get; }
 50    }
 51}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\IntegrationRuntimeReference.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 IntegrationRuntimeReference : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            writer.WritePropertyName("type");
 020            writer.WriteStringValue(Type.ToString());
 021            writer.WritePropertyName("referenceName");
 022            writer.WriteStringValue(ReferenceName);
 023            if (Optional.IsCollectionDefined(Parameters))
 24            {
 025                writer.WritePropertyName("parameters");
 026                writer.WriteStartObject();
 027                foreach (var item in Parameters)
 28                {
 029                    writer.WritePropertyName(item.Key);
 030                    writer.WriteObjectValue(item.Value);
 31                }
 032                writer.WriteEndObject();
 33            }
 034            writer.WriteEndObject();
 035        }
 36
 37        internal static IntegrationRuntimeReference DeserializeIntegrationRuntimeReference(JsonElement element)
 38        {
 039            IntegrationRuntimeReferenceType type = default;
 040            string referenceName = default;
 041            Optional<IDictionary<string, object>> parameters = default;
 042            foreach (var property in element.EnumerateObject())
 43            {
 044                if (property.NameEquals("type"))
 45                {
 046                    type = new IntegrationRuntimeReferenceType(property.Value.GetString());
 047                    continue;
 48                }
 049                if (property.NameEquals("referenceName"))
 50                {
 051                    referenceName = property.Value.GetString();
 052                    continue;
 53                }
 054                if (property.NameEquals("parameters"))
 55                {
 056                    Dictionary<string, object> dictionary = new Dictionary<string, object>();
 057                    foreach (var property0 in property.Value.EnumerateObject())
 58                    {
 059                        dictionary.Add(property0.Name, property0.Value.GetObject());
 60                    }
 061                    parameters = dictionary;
 62                    continue;
 63                }
 64            }
 065            return new IntegrationRuntimeReference(type, referenceName, Optional.ToDictionary(parameters));
 66        }
 67    }
 68}