< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_Url()-0%100%
get_AuthenticationType()-0%100%
get_EncryptedCredential()-0%100%
get_UserName()-0%100%
get_Password()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeHdfsLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\HdfsLinkedService.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> Hadoop Distributed File System (HDFS) linked service. </summary>
 14    public partial class HdfsLinkedService : LinkedService
 15    {
 16        /// <summary> Initializes a new instance of HdfsLinkedService. </summary>
 17        /// <param name="url"> The URL of the HDFS service endpoint, e.g. http://myhostname:50070/webhdfs/v1 . Type: str
 18        /// <exception cref="ArgumentNullException"> <paramref name="url"/> is null. </exception>
 019        public HdfsLinkedService(object url)
 20        {
 021            if (url == null)
 22            {
 023                throw new ArgumentNullException(nameof(url));
 24            }
 25
 026            Url = url;
 027            Type = "Hdfs";
 028        }
 29
 30        /// <summary> Initializes a new instance of HdfsLinkedService. </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="url"> The URL of the HDFS service endpoint, e.g. http://myhostname:50070/webhdfs/v1 . Type: str
 38        /// <param name="authenticationType"> Type of authentication used to connect to the HDFS. Possible values are: A
 39        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 40        /// <param name="userName"> User name for Windows authentication. Type: string (or Expression with resultType st
 41        /// <param name="password"> Password for Windows authentication. </param>
 042        internal HdfsLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary<
 43        {
 044            Url = url;
 045            AuthenticationType = authenticationType;
 046            EncryptedCredential = encryptedCredential;
 047            UserName = userName;
 048            Password = password;
 049            Type = type ?? "Hdfs";
 050        }
 51
 52        /// <summary> The URL of the HDFS service endpoint, e.g. http://myhostname:50070/webhdfs/v1 . Type: string (or E
 053        public object Url { get; set; }
 54        /// <summary> Type of authentication used to connect to the HDFS. Possible values are: Anonymous and Windows. Ty
 055        public object AuthenticationType { get; set; }
 56        /// <summary> The encrypted credential used for authentication. Credentials are encrypted using the integration 
 057        public object EncryptedCredential { get; set; }
 58        /// <summary> User name for Windows authentication. Type: string (or Expression with resultType string). </summa
 059        public object UserName { get; set; }
 60        /// <summary> Password for Windows authentication. </summary>
 061        public SecretBase Password { get; set; }
 62    }
 63}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\HdfsLinkedService.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 HdfsLinkedService : 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("url");
 055            writer.WriteObjectValue(Url);
 056            if (Optional.IsDefined(AuthenticationType))
 57            {
 058                writer.WritePropertyName("authenticationType");
 059                writer.WriteObjectValue(AuthenticationType);
 60            }
 061            if (Optional.IsDefined(EncryptedCredential))
 62            {
 063                writer.WritePropertyName("encryptedCredential");
 064                writer.WriteObjectValue(EncryptedCredential);
 65            }
 066            if (Optional.IsDefined(UserName))
 67            {
 068                writer.WritePropertyName("userName");
 069                writer.WriteObjectValue(UserName);
 70            }
 071            if (Optional.IsDefined(Password))
 72            {
 073                writer.WritePropertyName("password");
 074                writer.WriteObjectValue(Password);
 75            }
 076            writer.WriteEndObject();
 077            foreach (var item in AdditionalProperties)
 78            {
 079                writer.WritePropertyName(item.Key);
 080                writer.WriteObjectValue(item.Value);
 81            }
 082            writer.WriteEndObject();
 083        }
 84
 85        internal static HdfsLinkedService DeserializeHdfsLinkedService(JsonElement element)
 86        {
 087            string type = default;
 088            Optional<IntegrationRuntimeReference> connectVia = default;
 089            Optional<string> description = default;
 090            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 091            Optional<IList<object>> annotations = default;
 092            object url = default;
 093            Optional<object> authenticationType = default;
 094            Optional<object> encryptedCredential = default;
 095            Optional<object> userName = default;
 096            Optional<SecretBase> password = default;
 097            IDictionary<string, object> additionalProperties = default;
 098            Dictionary<string, object> additionalPropertiesDictionary = default;
 099            foreach (var property in element.EnumerateObject())
 100            {
 0101                if (property.NameEquals("type"))
 102                {
 0103                    type = property.Value.GetString();
 0104                    continue;
 105                }
 0106                if (property.NameEquals("connectVia"))
 107                {
 0108                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
 0109                    continue;
 110                }
 0111                if (property.NameEquals("description"))
 112                {
 0113                    description = property.Value.GetString();
 0114                    continue;
 115                }
 0116                if (property.NameEquals("parameters"))
 117                {
 0118                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0119                    foreach (var property0 in property.Value.EnumerateObject())
 120                    {
 0121                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 122                    }
 0123                    parameters = dictionary;
 0124                    continue;
 125                }
 0126                if (property.NameEquals("annotations"))
 127                {
 0128                    List<object> array = new List<object>();
 0129                    foreach (var item in property.Value.EnumerateArray())
 130                    {
 0131                        array.Add(item.GetObject());
 132                    }
 0133                    annotations = array;
 0134                    continue;
 135                }
 0136                if (property.NameEquals("typeProperties"))
 137                {
 0138                    foreach (var property0 in property.Value.EnumerateObject())
 139                    {
 0140                        if (property0.NameEquals("url"))
 141                        {
 0142                            url = property0.Value.GetObject();
 0143                            continue;
 144                        }
 0145                        if (property0.NameEquals("authenticationType"))
 146                        {
 0147                            authenticationType = property0.Value.GetObject();
 0148                            continue;
 149                        }
 0150                        if (property0.NameEquals("encryptedCredential"))
 151                        {
 0152                            encryptedCredential = property0.Value.GetObject();
 0153                            continue;
 154                        }
 0155                        if (property0.NameEquals("userName"))
 156                        {
 0157                            userName = property0.Value.GetObject();
 0158                            continue;
 159                        }
 0160                        if (property0.NameEquals("password"))
 161                        {
 0162                            password = SecretBase.DeserializeSecretBase(property0.Value);
 163                            continue;
 164                        }
 165                    }
 166                    continue;
 167                }
 0168                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0169                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 170            }
 0171            additionalProperties = additionalPropertiesDictionary;
 0172            return new HdfsLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), O
 173        }
 174    }
 175}