< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_TypeProperties()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeWebLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\WebLinkedService.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;
 10
 11namespace Azure.Analytics.Synapse.Artifacts.Models
 12{
 13    /// <summary> Web linked service. </summary>
 14    public partial class WebLinkedService : LinkedService
 15    {
 16        /// <summary> Initializes a new instance of WebLinkedService. </summary>
 17        /// <param name="typeProperties"> Web linked service properties. </param>
 18        /// <exception cref="ArgumentNullException"> <paramref name="typeProperties"/> is null. </exception>
 019        public WebLinkedService(WebLinkedServiceTypeProperties typeProperties)
 20        {
 021            if (typeProperties == null)
 22            {
 023                throw new ArgumentNullException(nameof(typeProperties));
 24            }
 25
 026            TypeProperties = typeProperties;
 027            Type = "Web";
 028        }
 29
 30        /// <summary> Initializes a new instance of WebLinkedService. </summary>
 31        /// <param name="type"> Type of linked service. </param>
 32        /// <param name="connectVia"> The integration runtime reference. </param>
 33        /// <param name="description"> Linked service description. </param>
 34        /// <param name="parameters"> Parameters for linked service. </param>
 35        /// <param name="annotations"> List of tags that can be used for describing the linked service. </param>
 36        /// <param name="additionalProperties"> . </param>
 37        /// <param name="typeProperties"> Web linked service properties. </param>
 038        internal WebLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary<s
 39        {
 040            TypeProperties = typeProperties;
 041            Type = type ?? "Web";
 042        }
 43
 44        /// <summary> Web linked service properties. </summary>
 045        public WebLinkedServiceTypeProperties TypeProperties { get; set; }
 46    }
 47}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\WebLinkedService.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 WebLinkedService : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            writer.WritePropertyName("typeProperties");
 020            writer.WriteObjectValue(TypeProperties);
 021            writer.WritePropertyName("type");
 022            writer.WriteStringValue(Type);
 023            if (Optional.IsDefined(ConnectVia))
 24            {
 025                writer.WritePropertyName("connectVia");
 026                writer.WriteObjectValue(ConnectVia);
 27            }
 028            if (Optional.IsDefined(Description))
 29            {
 030                writer.WritePropertyName("description");
 031                writer.WriteStringValue(Description);
 32            }
 033            if (Optional.IsCollectionDefined(Parameters))
 34            {
 035                writer.WritePropertyName("parameters");
 036                writer.WriteStartObject();
 037                foreach (var item in Parameters)
 38                {
 039                    writer.WritePropertyName(item.Key);
 040                    writer.WriteObjectValue(item.Value);
 41                }
 042                writer.WriteEndObject();
 43            }
 044            if (Optional.IsCollectionDefined(Annotations))
 45            {
 046                writer.WritePropertyName("annotations");
 047                writer.WriteStartArray();
 048                foreach (var item in Annotations)
 49                {
 050                    writer.WriteObjectValue(item);
 51                }
 052                writer.WriteEndArray();
 53            }
 054            foreach (var item in AdditionalProperties)
 55            {
 056                writer.WritePropertyName(item.Key);
 057                writer.WriteObjectValue(item.Value);
 58            }
 059            writer.WriteEndObject();
 060        }
 61
 62        internal static WebLinkedService DeserializeWebLinkedService(JsonElement element)
 63        {
 064            WebLinkedServiceTypeProperties typeProperties = default;
 065            string type = default;
 066            Optional<IntegrationRuntimeReference> connectVia = default;
 067            Optional<string> description = default;
 068            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 069            Optional<IList<object>> annotations = default;
 070            IDictionary<string, object> additionalProperties = default;
 071            Dictionary<string, object> additionalPropertiesDictionary = default;
 072            foreach (var property in element.EnumerateObject())
 73            {
 074                if (property.NameEquals("typeProperties"))
 75                {
 076                    typeProperties = WebLinkedServiceTypeProperties.DeserializeWebLinkedServiceTypeProperties(property.V
 077                    continue;
 78                }
 079                if (property.NameEquals("type"))
 80                {
 081                    type = property.Value.GetString();
 082                    continue;
 83                }
 084                if (property.NameEquals("connectVia"))
 85                {
 086                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
 087                    continue;
 88                }
 089                if (property.NameEquals("description"))
 90                {
 091                    description = property.Value.GetString();
 092                    continue;
 93                }
 094                if (property.NameEquals("parameters"))
 95                {
 096                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 097                    foreach (var property0 in property.Value.EnumerateObject())
 98                    {
 099                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 100                    }
 0101                    parameters = dictionary;
 0102                    continue;
 103                }
 0104                if (property.NameEquals("annotations"))
 105                {
 0106                    List<object> array = new List<object>();
 0107                    foreach (var item in property.Value.EnumerateArray())
 108                    {
 0109                        array.Add(item.GetObject());
 110                    }
 0111                    annotations = array;
 0112                    continue;
 113                }
 0114                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0115                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 116            }
 0117            additionalProperties = additionalPropertiesDictionary;
 0118            return new WebLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Op
 119        }
 120    }
 121}