< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_Host()-0%100%
get_UserId()-0%100%
get_Password()-0%100%
get_EncryptedCredential()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeAzureFileStorageLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureFileStorageLinkedService.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 File Storage linked service. </summary>
 14    public partial class AzureFileStorageLinkedService : LinkedService
 15    {
 16        /// <summary> Initializes a new instance of AzureFileStorageLinkedService. </summary>
 17        /// <param name="host"> Host name of the server. Type: string (or Expression with resultType string). </param>
 18        /// <exception cref="ArgumentNullException"> <paramref name="host"/> is null. </exception>
 019        public AzureFileStorageLinkedService(object host)
 20        {
 021            if (host == null)
 22            {
 023                throw new ArgumentNullException(nameof(host));
 24            }
 25
 026            Host = host;
 027            Type = "AzureFileStorage";
 028        }
 29
 30        /// <summary> Initializes a new instance of AzureFileStorageLinkedService. </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="host"> Host name of the server. Type: string (or Expression with resultType string). </param>
 38        /// <param name="userId"> User ID to logon the server. Type: string (or Expression with resultType string). </pa
 39        /// <param name="password"> Password to logon the server. </param>
 40        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 041        internal AzureFileStorageLinkedService(string type, IntegrationRuntimeReference connectVia, string description, 
 42        {
 043            Host = host;
 044            UserId = userId;
 045            Password = password;
 046            EncryptedCredential = encryptedCredential;
 047            Type = type ?? "AzureFileStorage";
 048        }
 49
 50        /// <summary> Host name of the server. Type: string (or Expression with resultType string). </summary>
 051        public object Host { get; set; }
 52        /// <summary> User ID to logon the server. Type: string (or Expression with resultType string). </summary>
 053        public object UserId { get; set; }
 54        /// <summary> Password to logon the server. </summary>
 055        public SecretBase Password { get; set; }
 56        /// <summary> The encrypted credential used for authentication. Credentials are encrypted using the integration 
 057        public object EncryptedCredential { get; set; }
 58    }
 59}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureFileStorageLinkedService.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 AzureFileStorageLinkedService : 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("host");
 055            writer.WriteObjectValue(Host);
 056            if (Optional.IsDefined(UserId))
 57            {
 058                writer.WritePropertyName("userId");
 059                writer.WriteObjectValue(UserId);
 60            }
 061            if (Optional.IsDefined(Password))
 62            {
 063                writer.WritePropertyName("password");
 064                writer.WriteObjectValue(Password);
 65            }
 066            if (Optional.IsDefined(EncryptedCredential))
 67            {
 068                writer.WritePropertyName("encryptedCredential");
 069                writer.WriteObjectValue(EncryptedCredential);
 70            }
 071            writer.WriteEndObject();
 072            foreach (var item in AdditionalProperties)
 73            {
 074                writer.WritePropertyName(item.Key);
 075                writer.WriteObjectValue(item.Value);
 76            }
 077            writer.WriteEndObject();
 078        }
 79
 80        internal static AzureFileStorageLinkedService DeserializeAzureFileStorageLinkedService(JsonElement element)
 81        {
 082            string type = default;
 083            Optional<IntegrationRuntimeReference> connectVia = default;
 084            Optional<string> description = default;
 085            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 086            Optional<IList<object>> annotations = default;
 087            object host = default;
 088            Optional<object> userId = default;
 089            Optional<SecretBase> password = default;
 090            Optional<object> encryptedCredential = default;
 091            IDictionary<string, object> additionalProperties = default;
 092            Dictionary<string, object> additionalPropertiesDictionary = default;
 093            foreach (var property in element.EnumerateObject())
 94            {
 095                if (property.NameEquals("type"))
 96                {
 097                    type = property.Value.GetString();
 098                    continue;
 99                }
 0100                if (property.NameEquals("connectVia"))
 101                {
 0102                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
 0103                    continue;
 104                }
 0105                if (property.NameEquals("description"))
 106                {
 0107                    description = property.Value.GetString();
 0108                    continue;
 109                }
 0110                if (property.NameEquals("parameters"))
 111                {
 0112                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0113                    foreach (var property0 in property.Value.EnumerateObject())
 114                    {
 0115                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 116                    }
 0117                    parameters = dictionary;
 0118                    continue;
 119                }
 0120                if (property.NameEquals("annotations"))
 121                {
 0122                    List<object> array = new List<object>();
 0123                    foreach (var item in property.Value.EnumerateArray())
 124                    {
 0125                        array.Add(item.GetObject());
 126                    }
 0127                    annotations = array;
 0128                    continue;
 129                }
 0130                if (property.NameEquals("typeProperties"))
 131                {
 0132                    foreach (var property0 in property.Value.EnumerateObject())
 133                    {
 0134                        if (property0.NameEquals("host"))
 135                        {
 0136                            host = property0.Value.GetObject();
 0137                            continue;
 138                        }
 0139                        if (property0.NameEquals("userId"))
 140                        {
 0141                            userId = property0.Value.GetObject();
 0142                            continue;
 143                        }
 0144                        if (property0.NameEquals("password"))
 145                        {
 0146                            password = SecretBase.DeserializeSecretBase(property0.Value);
 0147                            continue;
 148                        }
 0149                        if (property0.NameEquals("encryptedCredential"))
 150                        {
 0151                            encryptedCredential = property0.Value.GetObject();
 152                            continue;
 153                        }
 154                    }
 155                    continue;
 156                }
 0157                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0158                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 159            }
 0160            additionalProperties = additionalPropertiesDictionary;
 0161            return new AzureFileStorageLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(pa
 162        }
 163    }
 164}