< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_Host()-0%100%
get_Port()-0%100%
get_AuthenticationType()-0%100%
get_Username()-0%100%
get_Password()-0%100%
get_EnableSsl()-0%100%
get_TrustedCertPath()-0%100%
get_UseSystemTrustStore()-0%100%
get_AllowHostNameCNMismatch()-0%100%
get_AllowSelfSignedServerCert()-0%100%
get_EncryptedCredential()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeImpalaLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\ImpalaLinkedService.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> Impala server linked service. </summary>
 14    public partial class ImpalaLinkedService : LinkedService
 15    {
 16        /// <summary> Initializes a new instance of ImpalaLinkedService. </summary>
 17        /// <param name="host"> The IP address or host name of the Impala server. (i.e. 192.168.222.160). </param>
 18        /// <param name="authenticationType"> The authentication type to use. </param>
 19        /// <exception cref="ArgumentNullException"> <paramref name="host"/> is null. </exception>
 020        public ImpalaLinkedService(object host, ImpalaAuthenticationType authenticationType)
 21        {
 022            if (host == null)
 23            {
 024                throw new ArgumentNullException(nameof(host));
 25            }
 26
 027            Host = host;
 028            AuthenticationType = authenticationType;
 029            Type = "Impala";
 030        }
 31
 32        /// <summary> Initializes a new instance of ImpalaLinkedService. </summary>
 33        /// <param name="type"> Type of linked service. </param>
 34        /// <param name="connectVia"> The integration runtime reference. </param>
 35        /// <param name="description"> Linked service description. </param>
 36        /// <param name="parameters"> Parameters for linked service. </param>
 37        /// <param name="annotations"> List of tags that can be used for describing the linked service. </param>
 38        /// <param name="additionalProperties"> . </param>
 39        /// <param name="host"> The IP address or host name of the Impala server. (i.e. 192.168.222.160). </param>
 40        /// <param name="port"> The TCP port that the Impala server uses to listen for client connections. The default v
 41        /// <param name="authenticationType"> The authentication type to use. </param>
 42        /// <param name="username"> The user name used to access the Impala server. The default value is anonymous when 
 43        /// <param name="password"> The password corresponding to the user name when using UsernameAndPassword. </param>
 44        /// <param name="enableSsl"> Specifies whether the connections to the server are encrypted using SSL. The defaul
 45        /// <param name="trustedCertPath"> The full path of the .pem file containing trusted CA certificates for verifyi
 46        /// <param name="useSystemTrustStore"> Specifies whether to use a CA certificate from the system trust store or 
 47        /// <param name="allowHostNameCNMismatch"> Specifies whether to require a CA-issued SSL certificate name to matc
 48        /// <param name="allowSelfSignedServerCert"> Specifies whether to allow self-signed certificates from the server
 49        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 050        internal ImpalaLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionar
 51        {
 052            Host = host;
 053            Port = port;
 054            AuthenticationType = authenticationType;
 055            Username = username;
 056            Password = password;
 057            EnableSsl = enableSsl;
 058            TrustedCertPath = trustedCertPath;
 059            UseSystemTrustStore = useSystemTrustStore;
 060            AllowHostNameCNMismatch = allowHostNameCNMismatch;
 061            AllowSelfSignedServerCert = allowSelfSignedServerCert;
 062            EncryptedCredential = encryptedCredential;
 063            Type = type ?? "Impala";
 064        }
 65
 66        /// <summary> The IP address or host name of the Impala server. (i.e. 192.168.222.160). </summary>
 067        public object Host { get; set; }
 68        /// <summary> The TCP port that the Impala server uses to listen for client connections. The default value is 21
 069        public object Port { get; set; }
 70        /// <summary> The authentication type to use. </summary>
 071        public ImpalaAuthenticationType AuthenticationType { get; set; }
 72        /// <summary> The user name used to access the Impala server. The default value is anonymous when using SASLUser
 073        public object Username { get; set; }
 74        /// <summary> The password corresponding to the user name when using UsernameAndPassword. </summary>
 075        public SecretBase Password { get; set; }
 76        /// <summary> Specifies whether the connections to the server are encrypted using SSL. The default value is fals
 077        public object EnableSsl { get; set; }
 78        /// <summary> The full path of the .pem file containing trusted CA certificates for verifying the server when co
 079        public object TrustedCertPath { get; set; }
 80        /// <summary> Specifies whether to use a CA certificate from the system trust store or from a specified PEM file
 081        public object UseSystemTrustStore { get; set; }
 82        /// <summary> Specifies whether to require a CA-issued SSL certificate name to match the host name of the server
 083        public object AllowHostNameCNMismatch { get; set; }
 84        /// <summary> Specifies whether to allow self-signed certificates from the server. The default value is false. <
 085        public object AllowSelfSignedServerCert { get; set; }
 86        /// <summary> The encrypted credential used for authentication. Credentials are encrypted using the integration 
 087        public object EncryptedCredential { get; set; }
 88    }
 89}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\ImpalaLinkedService.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 ImpalaLinkedService : 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(Port))
 57            {
 058                writer.WritePropertyName("port");
 059                writer.WriteObjectValue(Port);
 60            }
 061            writer.WritePropertyName("authenticationType");
 062            writer.WriteStringValue(AuthenticationType.ToString());
 063            if (Optional.IsDefined(Username))
 64            {
 065                writer.WritePropertyName("username");
 066                writer.WriteObjectValue(Username);
 67            }
 068            if (Optional.IsDefined(Password))
 69            {
 070                writer.WritePropertyName("password");
 071                writer.WriteObjectValue(Password);
 72            }
 073            if (Optional.IsDefined(EnableSsl))
 74            {
 075                writer.WritePropertyName("enableSsl");
 076                writer.WriteObjectValue(EnableSsl);
 77            }
 078            if (Optional.IsDefined(TrustedCertPath))
 79            {
 080                writer.WritePropertyName("trustedCertPath");
 081                writer.WriteObjectValue(TrustedCertPath);
 82            }
 083            if (Optional.IsDefined(UseSystemTrustStore))
 84            {
 085                writer.WritePropertyName("useSystemTrustStore");
 086                writer.WriteObjectValue(UseSystemTrustStore);
 87            }
 088            if (Optional.IsDefined(AllowHostNameCNMismatch))
 89            {
 090                writer.WritePropertyName("allowHostNameCNMismatch");
 091                writer.WriteObjectValue(AllowHostNameCNMismatch);
 92            }
 093            if (Optional.IsDefined(AllowSelfSignedServerCert))
 94            {
 095                writer.WritePropertyName("allowSelfSignedServerCert");
 096                writer.WriteObjectValue(AllowSelfSignedServerCert);
 97            }
 098            if (Optional.IsDefined(EncryptedCredential))
 99            {
 0100                writer.WritePropertyName("encryptedCredential");
 0101                writer.WriteObjectValue(EncryptedCredential);
 102            }
 0103            writer.WriteEndObject();
 0104            foreach (var item in AdditionalProperties)
 105            {
 0106                writer.WritePropertyName(item.Key);
 0107                writer.WriteObjectValue(item.Value);
 108            }
 0109            writer.WriteEndObject();
 0110        }
 111
 112        internal static ImpalaLinkedService DeserializeImpalaLinkedService(JsonElement element)
 113        {
 0114            string type = default;
 0115            Optional<IntegrationRuntimeReference> connectVia = default;
 0116            Optional<string> description = default;
 0117            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 0118            Optional<IList<object>> annotations = default;
 0119            object host = default;
 0120            Optional<object> port = default;
 0121            ImpalaAuthenticationType authenticationType = default;
 0122            Optional<object> username = default;
 0123            Optional<SecretBase> password = default;
 0124            Optional<object> enableSsl = default;
 0125            Optional<object> trustedCertPath = default;
 0126            Optional<object> useSystemTrustStore = default;
 0127            Optional<object> allowHostNameCNMismatch = default;
 0128            Optional<object> allowSelfSignedServerCert = default;
 0129            Optional<object> encryptedCredential = default;
 0130            IDictionary<string, object> additionalProperties = default;
 0131            Dictionary<string, object> additionalPropertiesDictionary = default;
 0132            foreach (var property in element.EnumerateObject())
 133            {
 0134                if (property.NameEquals("type"))
 135                {
 0136                    type = property.Value.GetString();
 0137                    continue;
 138                }
 0139                if (property.NameEquals("connectVia"))
 140                {
 0141                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
 0142                    continue;
 143                }
 0144                if (property.NameEquals("description"))
 145                {
 0146                    description = property.Value.GetString();
 0147                    continue;
 148                }
 0149                if (property.NameEquals("parameters"))
 150                {
 0151                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0152                    foreach (var property0 in property.Value.EnumerateObject())
 153                    {
 0154                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 155                    }
 0156                    parameters = dictionary;
 0157                    continue;
 158                }
 0159                if (property.NameEquals("annotations"))
 160                {
 0161                    List<object> array = new List<object>();
 0162                    foreach (var item in property.Value.EnumerateArray())
 163                    {
 0164                        array.Add(item.GetObject());
 165                    }
 0166                    annotations = array;
 0167                    continue;
 168                }
 0169                if (property.NameEquals("typeProperties"))
 170                {
 0171                    foreach (var property0 in property.Value.EnumerateObject())
 172                    {
 0173                        if (property0.NameEquals("host"))
 174                        {
 0175                            host = property0.Value.GetObject();
 0176                            continue;
 177                        }
 0178                        if (property0.NameEquals("port"))
 179                        {
 0180                            port = property0.Value.GetObject();
 0181                            continue;
 182                        }
 0183                        if (property0.NameEquals("authenticationType"))
 184                        {
 0185                            authenticationType = new ImpalaAuthenticationType(property0.Value.GetString());
 0186                            continue;
 187                        }
 0188                        if (property0.NameEquals("username"))
 189                        {
 0190                            username = property0.Value.GetObject();
 0191                            continue;
 192                        }
 0193                        if (property0.NameEquals("password"))
 194                        {
 0195                            password = SecretBase.DeserializeSecretBase(property0.Value);
 0196                            continue;
 197                        }
 0198                        if (property0.NameEquals("enableSsl"))
 199                        {
 0200                            enableSsl = property0.Value.GetObject();
 0201                            continue;
 202                        }
 0203                        if (property0.NameEquals("trustedCertPath"))
 204                        {
 0205                            trustedCertPath = property0.Value.GetObject();
 0206                            continue;
 207                        }
 0208                        if (property0.NameEquals("useSystemTrustStore"))
 209                        {
 0210                            useSystemTrustStore = property0.Value.GetObject();
 0211                            continue;
 212                        }
 0213                        if (property0.NameEquals("allowHostNameCNMismatch"))
 214                        {
 0215                            allowHostNameCNMismatch = property0.Value.GetObject();
 0216                            continue;
 217                        }
 0218                        if (property0.NameEquals("allowSelfSignedServerCert"))
 219                        {
 0220                            allowSelfSignedServerCert = property0.Value.GetObject();
 0221                            continue;
 222                        }
 0223                        if (property0.NameEquals("encryptedCredential"))
 224                        {
 0225                            encryptedCredential = property0.Value.GetObject();
 226                            continue;
 227                        }
 228                    }
 229                    continue;
 230                }
 0231                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0232                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 233            }
 0234            additionalProperties = additionalPropertiesDictionary;
 0235            return new ImpalaLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters),
 236        }
 237    }
 238}