< Summary

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

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureKeyVaultLinkedService.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> Azure Key Vault linked service. </summary>
 14    public partial class AzureKeyVaultLinkedService : LinkedService
 15    {
 16        /// <summary> Initializes a new instance of AzureKeyVaultLinkedService. </summary>
 17        /// <param name="baseUrl"> The base URL of the Azure Key Vault. e.g. https://myakv.vault.azure.net Type: string 
 18        /// <exception cref="ArgumentNullException"> <paramref name="baseUrl"/> is null. </exception>
 019        public AzureKeyVaultLinkedService(object baseUrl)
 20        {
 021            if (baseUrl == null)
 22            {
 023                throw new ArgumentNullException(nameof(baseUrl));
 24            }
 25
 026            BaseUrl = baseUrl;
 027            Type = "AzureKeyVault";
 028        }
 29
 30        /// <summary> Initializes a new instance of AzureKeyVaultLinkedService. </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="baseUrl"> The base URL of the Azure Key Vault. e.g. https://myakv.vault.azure.net Type: string 
 038        internal AzureKeyVaultLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDi
 39        {
 040            BaseUrl = baseUrl;
 041            Type = type ?? "AzureKeyVault";
 042        }
 43
 44        /// <summary> The base URL of the Azure Key Vault. e.g. https://myakv.vault.azure.net Type: string (or Expressio
 045        public object BaseUrl { get; set; }
 46    }
 47}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureKeyVaultLinkedService.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 AzureKeyVaultLinkedService : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            writer.WritePropertyName("type");
 020            writer.WriteStringValue(Type);
 021            if (Optional.IsDefined(ConnectVia))
 22            {
 023                writer.WritePropertyName("connectVia");
 024                writer.WriteObjectValue(ConnectVia);
 25            }
 026            if (Optional.IsDefined(Description))
 27            {
 028                writer.WritePropertyName("description");
 029                writer.WriteStringValue(Description);
 30            }
 031            if (Optional.IsCollectionDefined(Parameters))
 32            {
 033                writer.WritePropertyName("parameters");
 034                writer.WriteStartObject();
 035                foreach (var item in Parameters)
 36                {
 037                    writer.WritePropertyName(item.Key);
 038                    writer.WriteObjectValue(item.Value);
 39                }
 040                writer.WriteEndObject();
 41            }
 042            if (Optional.IsCollectionDefined(Annotations))
 43            {
 044                writer.WritePropertyName("annotations");
 045                writer.WriteStartArray();
 046                foreach (var item in Annotations)
 47                {
 048                    writer.WriteObjectValue(item);
 49                }
 050                writer.WriteEndArray();
 51            }
 052            writer.WritePropertyName("typeProperties");
 053            writer.WriteStartObject();
 054            writer.WritePropertyName("baseUrl");
 055            writer.WriteObjectValue(BaseUrl);
 056            writer.WriteEndObject();
 057            foreach (var item in AdditionalProperties)
 58            {
 059                writer.WritePropertyName(item.Key);
 060                writer.WriteObjectValue(item.Value);
 61            }
 062            writer.WriteEndObject();
 063        }
 64
 65        internal static AzureKeyVaultLinkedService DeserializeAzureKeyVaultLinkedService(JsonElement element)
 66        {
 067            string type = default;
 068            Optional<IntegrationRuntimeReference> connectVia = default;
 069            Optional<string> description = default;
 070            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 071            Optional<IList<object>> annotations = default;
 072            object baseUrl = default;
 073            IDictionary<string, object> additionalProperties = default;
 074            Dictionary<string, object> additionalPropertiesDictionary = default;
 075            foreach (var property in element.EnumerateObject())
 76            {
 077                if (property.NameEquals("type"))
 78                {
 079                    type = property.Value.GetString();
 080                    continue;
 81                }
 082                if (property.NameEquals("connectVia"))
 83                {
 084                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
 085                    continue;
 86                }
 087                if (property.NameEquals("description"))
 88                {
 089                    description = property.Value.GetString();
 090                    continue;
 91                }
 092                if (property.NameEquals("parameters"))
 93                {
 094                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 095                    foreach (var property0 in property.Value.EnumerateObject())
 96                    {
 097                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 98                    }
 099                    parameters = dictionary;
 0100                    continue;
 101                }
 0102                if (property.NameEquals("annotations"))
 103                {
 0104                    List<object> array = new List<object>();
 0105                    foreach (var item in property.Value.EnumerateArray())
 106                    {
 0107                        array.Add(item.GetObject());
 108                    }
 0109                    annotations = array;
 0110                    continue;
 111                }
 0112                if (property.NameEquals("typeProperties"))
 113                {
 0114                    foreach (var property0 in property.Value.EnumerateObject())
 115                    {
 0116                        if (property0.NameEquals("baseUrl"))
 117                        {
 0118                            baseUrl = property0.Value.GetObject();
 119                            continue;
 120                        }
 121                    }
 122                    continue;
 123                }
 0124                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0125                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 126            }
 0127            additionalProperties = additionalPropertiesDictionary;
 0128            return new AzureKeyVaultLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(param
 129        }
 130    }
 131}