< Summary

Class:Azure.Analytics.Synapse.Artifacts.Models.WebLinkedServiceTypeProperties
Assembly:Azure.Analytics.Synapse.Artifacts
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\WebLinkedServiceTypeProperties.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\WebLinkedServiceTypeProperties.Serialization.cs
Covered lines:0
Uncovered lines:32
Coverable lines:32
Total lines:96
Line coverage:0% (0 of 32)
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_Url()-0%100%
get_AuthenticationType()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%100%
DeserializeWebLinkedServiceTypeProperties(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\WebLinkedServiceTypeProperties.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;
 9
 10namespace Azure.Analytics.Synapse.Artifacts.Models
 11{
 12    /// <summary> Base definition of WebLinkedServiceTypeProperties, this typeProperties is polymorphic based on authent
 13    public partial class WebLinkedServiceTypeProperties
 14    {
 15        /// <summary> Initializes a new instance of WebLinkedServiceTypeProperties. </summary>
 16        /// <param name="url"> The URL of the web service endpoint, e.g. http://www.microsoft.com . Type: string (or Exp
 17        /// <exception cref="ArgumentNullException"> <paramref name="url"/> is null. </exception>
 018        public WebLinkedServiceTypeProperties(object url)
 19        {
 020            if (url == null)
 21            {
 022                throw new ArgumentNullException(nameof(url));
 23            }
 24
 025            Url = url;
 026        }
 27
 28        /// <summary> Initializes a new instance of WebLinkedServiceTypeProperties. </summary>
 29        /// <param name="url"> The URL of the web service endpoint, e.g. http://www.microsoft.com . Type: string (or Exp
 30        /// <param name="authenticationType"> Type of authentication used to connect to the web table source. </param>
 031        internal WebLinkedServiceTypeProperties(object url, WebAuthenticationType authenticationType)
 32        {
 033            Url = url;
 034            AuthenticationType = authenticationType;
 035        }
 36
 37        /// <summary> The URL of the web service endpoint, e.g. http://www.microsoft.com . Type: string (or Expression w
 038        public object Url { get; set; }
 39        /// <summary> Type of authentication used to connect to the web table source. </summary>
 040        internal WebAuthenticationType AuthenticationType { get; set; }
 41    }
 42}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\WebLinkedServiceTypeProperties.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 WebLinkedServiceTypeProperties : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("url");
 019            writer.WriteObjectValue(Url);
 020            writer.WritePropertyName("authenticationType");
 021            writer.WriteStringValue(AuthenticationType.ToString());
 022            writer.WriteEndObject();
 023        }
 24
 25        internal static WebLinkedServiceTypeProperties DeserializeWebLinkedServiceTypeProperties(JsonElement element)
 26        {
 027            if (element.TryGetProperty("authenticationType", out JsonElement discriminator))
 28            {
 029                switch (discriminator.GetString())
 30                {
 031                    case "Anonymous": return WebAnonymousAuthentication.DeserializeWebAnonymousAuthentication(element);
 032                    case "Basic": return WebBasicAuthentication.DeserializeWebBasicAuthentication(element);
 033                    case "ClientCertificate": return WebClientCertificateAuthentication.DeserializeWebClientCertificateA
 34                }
 35            }
 036            object url = default;
 037            WebAuthenticationType authenticationType = default;
 038            foreach (var property in element.EnumerateObject())
 39            {
 040                if (property.NameEquals("url"))
 41                {
 042                    url = property.Value.GetObject();
 043                    continue;
 44                }
 045                if (property.NameEquals("authenticationType"))
 46                {
 047                    authenticationType = new WebAuthenticationType(property.Value.GetString());
 48                    continue;
 49                }
 50            }
 051            return new WebLinkedServiceTypeProperties(url, authenticationType);
 52        }
 53    }
 54}