< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_Host()-0%100%
get_Port()-0%100%
get_ServerType()-0%100%
get_ThriftTransportProtocol()-0%100%
get_AuthenticationType()-0%100%
get_ServiceDiscoveryMode()-0%100%
get_ZooKeeperNameSpace()-0%100%
get_UseNativeQuery()-0%100%
get_Username()-0%100%
get_Password()-0%100%
get_HttpPath()-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%
DeserializeHiveLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\HiveLinkedService.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> Hive Server linked service. </summary>
 14    public partial class HiveLinkedService : LinkedService
 15    {
 16        /// <summary> Initializes a new instance of HiveLinkedService. </summary>
 17        /// <param name="host"> IP address or host name of the Hive server, separated by &apos;;&apos; for multiple host
 18        /// <param name="authenticationType"> The authentication method used to access the Hive server. </param>
 19        /// <exception cref="ArgumentNullException"> <paramref name="host"/> is null. </exception>
 020        public HiveLinkedService(object host, HiveAuthenticationType authenticationType)
 21        {
 022            if (host == null)
 23            {
 024                throw new ArgumentNullException(nameof(host));
 25            }
 26
 027            Host = host;
 028            AuthenticationType = authenticationType;
 029            Type = "Hive";
 030        }
 31
 32        /// <summary> Initializes a new instance of HiveLinkedService. </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"> IP address or host name of the Hive server, separated by &apos;;&apos; for multiple host
 40        /// <param name="port"> The TCP port that the Hive server uses to listen for client connections. </param>
 41        /// <param name="serverType"> The type of Hive server. </param>
 42        /// <param name="thriftTransportProtocol"> The transport protocol to use in the Thrift layer. </param>
 43        /// <param name="authenticationType"> The authentication method used to access the Hive server. </param>
 44        /// <param name="serviceDiscoveryMode"> true to indicate using the ZooKeeper service, false not. </param>
 45        /// <param name="zooKeeperNameSpace"> The namespace on ZooKeeper under which Hive Server 2 nodes are added. </pa
 46        /// <param name="useNativeQuery"> Specifies whether the driver uses native HiveQL queries,or converts them into 
 47        /// <param name="username"> The user name that you use to access Hive Server. </param>
 48        /// <param name="password"> The password corresponding to the user name that you provided in the Username field.
 49        /// <param name="httpPath"> The partial URL corresponding to the Hive server. </param>
 50        /// <param name="enableSsl"> Specifies whether the connections to the server are encrypted using SSL. The defaul
 51        /// <param name="trustedCertPath"> The full path of the .pem file containing trusted CA certificates for verifyi
 52        /// <param name="useSystemTrustStore"> Specifies whether to use a CA certificate from the system trust store or 
 53        /// <param name="allowHostNameCNMismatch"> Specifies whether to require a CA-issued SSL certificate name to matc
 54        /// <param name="allowSelfSignedServerCert"> Specifies whether to allow self-signed certificates from the server
 55        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 056        internal HiveLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary<
 57        {
 058            Host = host;
 059            Port = port;
 060            ServerType = serverType;
 061            ThriftTransportProtocol = thriftTransportProtocol;
 062            AuthenticationType = authenticationType;
 063            ServiceDiscoveryMode = serviceDiscoveryMode;
 064            ZooKeeperNameSpace = zooKeeperNameSpace;
 065            UseNativeQuery = useNativeQuery;
 066            Username = username;
 067            Password = password;
 068            HttpPath = httpPath;
 069            EnableSsl = enableSsl;
 070            TrustedCertPath = trustedCertPath;
 071            UseSystemTrustStore = useSystemTrustStore;
 072            AllowHostNameCNMismatch = allowHostNameCNMismatch;
 073            AllowSelfSignedServerCert = allowSelfSignedServerCert;
 074            EncryptedCredential = encryptedCredential;
 075            Type = type ?? "Hive";
 076        }
 77
 78        /// <summary> IP address or host name of the Hive server, separated by &apos;;&apos; for multiple hosts (only wh
 079        public object Host { get; set; }
 80        /// <summary> The TCP port that the Hive server uses to listen for client connections. </summary>
 081        public object Port { get; set; }
 82        /// <summary> The type of Hive server. </summary>
 083        public HiveServerType? ServerType { get; set; }
 84        /// <summary> The transport protocol to use in the Thrift layer. </summary>
 085        public HiveThriftTransportProtocol? ThriftTransportProtocol { get; set; }
 86        /// <summary> The authentication method used to access the Hive server. </summary>
 087        public HiveAuthenticationType AuthenticationType { get; set; }
 88        /// <summary> true to indicate using the ZooKeeper service, false not. </summary>
 089        public object ServiceDiscoveryMode { get; set; }
 90        /// <summary> The namespace on ZooKeeper under which Hive Server 2 nodes are added. </summary>
 091        public object ZooKeeperNameSpace { get; set; }
 92        /// <summary> Specifies whether the driver uses native HiveQL queries,or converts them into an equivalent form i
 093        public object UseNativeQuery { get; set; }
 94        /// <summary> The user name that you use to access Hive Server. </summary>
 095        public object Username { get; set; }
 96        /// <summary> The password corresponding to the user name that you provided in the Username field. </summary>
 097        public SecretBase Password { get; set; }
 98        /// <summary> The partial URL corresponding to the Hive server. </summary>
 099        public object HttpPath { get; set; }
 100        /// <summary> Specifies whether the connections to the server are encrypted using SSL. The default value is fals
 0101        public object EnableSsl { get; set; }
 102        /// <summary> The full path of the .pem file containing trusted CA certificates for verifying the server when co
 0103        public object TrustedCertPath { get; set; }
 104        /// <summary> Specifies whether to use a CA certificate from the system trust store or from a specified PEM file
 0105        public object UseSystemTrustStore { get; set; }
 106        /// <summary> Specifies whether to require a CA-issued SSL certificate name to match the host name of the server
 0107        public object AllowHostNameCNMismatch { get; set; }
 108        /// <summary> Specifies whether to allow self-signed certificates from the server. The default value is false. <
 0109        public object AllowSelfSignedServerCert { get; set; }
 110        /// <summary> The encrypted credential used for authentication. Credentials are encrypted using the integration 
 0111        public object EncryptedCredential { get; set; }
 112    }
 113}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\HiveLinkedService.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 HiveLinkedService : 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            if (Optional.IsDefined(ServerType))
 62            {
 063                writer.WritePropertyName("serverType");
 064                writer.WriteStringValue(ServerType.Value.ToString());
 65            }
 066            if (Optional.IsDefined(ThriftTransportProtocol))
 67            {
 068                writer.WritePropertyName("thriftTransportProtocol");
 069                writer.WriteStringValue(ThriftTransportProtocol.Value.ToString());
 70            }
 071            writer.WritePropertyName("authenticationType");
 072            writer.WriteStringValue(AuthenticationType.ToString());
 073            if (Optional.IsDefined(ServiceDiscoveryMode))
 74            {
 075                writer.WritePropertyName("serviceDiscoveryMode");
 076                writer.WriteObjectValue(ServiceDiscoveryMode);
 77            }
 078            if (Optional.IsDefined(ZooKeeperNameSpace))
 79            {
 080                writer.WritePropertyName("zooKeeperNameSpace");
 081                writer.WriteObjectValue(ZooKeeperNameSpace);
 82            }
 083            if (Optional.IsDefined(UseNativeQuery))
 84            {
 085                writer.WritePropertyName("useNativeQuery");
 086                writer.WriteObjectValue(UseNativeQuery);
 87            }
 088            if (Optional.IsDefined(Username))
 89            {
 090                writer.WritePropertyName("username");
 091                writer.WriteObjectValue(Username);
 92            }
 093            if (Optional.IsDefined(Password))
 94            {
 095                writer.WritePropertyName("password");
 096                writer.WriteObjectValue(Password);
 97            }
 098            if (Optional.IsDefined(HttpPath))
 99            {
 0100                writer.WritePropertyName("httpPath");
 0101                writer.WriteObjectValue(HttpPath);
 102            }
 0103            if (Optional.IsDefined(EnableSsl))
 104            {
 0105                writer.WritePropertyName("enableSsl");
 0106                writer.WriteObjectValue(EnableSsl);
 107            }
 0108            if (Optional.IsDefined(TrustedCertPath))
 109            {
 0110                writer.WritePropertyName("trustedCertPath");
 0111                writer.WriteObjectValue(TrustedCertPath);
 112            }
 0113            if (Optional.IsDefined(UseSystemTrustStore))
 114            {
 0115                writer.WritePropertyName("useSystemTrustStore");
 0116                writer.WriteObjectValue(UseSystemTrustStore);
 117            }
 0118            if (Optional.IsDefined(AllowHostNameCNMismatch))
 119            {
 0120                writer.WritePropertyName("allowHostNameCNMismatch");
 0121                writer.WriteObjectValue(AllowHostNameCNMismatch);
 122            }
 0123            if (Optional.IsDefined(AllowSelfSignedServerCert))
 124            {
 0125                writer.WritePropertyName("allowSelfSignedServerCert");
 0126                writer.WriteObjectValue(AllowSelfSignedServerCert);
 127            }
 0128            if (Optional.IsDefined(EncryptedCredential))
 129            {
 0130                writer.WritePropertyName("encryptedCredential");
 0131                writer.WriteObjectValue(EncryptedCredential);
 132            }
 0133            writer.WriteEndObject();
 0134            foreach (var item in AdditionalProperties)
 135            {
 0136                writer.WritePropertyName(item.Key);
 0137                writer.WriteObjectValue(item.Value);
 138            }
 0139            writer.WriteEndObject();
 0140        }
 141
 142        internal static HiveLinkedService DeserializeHiveLinkedService(JsonElement element)
 143        {
 0144            string type = default;
 0145            Optional<IntegrationRuntimeReference> connectVia = default;
 0146            Optional<string> description = default;
 0147            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 0148            Optional<IList<object>> annotations = default;
 0149            object host = default;
 0150            Optional<object> port = default;
 0151            Optional<HiveServerType> serverType = default;
 0152            Optional<HiveThriftTransportProtocol> thriftTransportProtocol = default;
 0153            HiveAuthenticationType authenticationType = default;
 0154            Optional<object> serviceDiscoveryMode = default;
 0155            Optional<object> zooKeeperNameSpace = default;
 0156            Optional<object> useNativeQuery = default;
 0157            Optional<object> username = default;
 0158            Optional<SecretBase> password = default;
 0159            Optional<object> httpPath = default;
 0160            Optional<object> enableSsl = default;
 0161            Optional<object> trustedCertPath = default;
 0162            Optional<object> useSystemTrustStore = default;
 0163            Optional<object> allowHostNameCNMismatch = default;
 0164            Optional<object> allowSelfSignedServerCert = default;
 0165            Optional<object> encryptedCredential = default;
 0166            IDictionary<string, object> additionalProperties = default;
 0167            Dictionary<string, object> additionalPropertiesDictionary = default;
 0168            foreach (var property in element.EnumerateObject())
 169            {
 0170                if (property.NameEquals("type"))
 171                {
 0172                    type = property.Value.GetString();
 0173                    continue;
 174                }
 0175                if (property.NameEquals("connectVia"))
 176                {
 0177                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
 0178                    continue;
 179                }
 0180                if (property.NameEquals("description"))
 181                {
 0182                    description = property.Value.GetString();
 0183                    continue;
 184                }
 0185                if (property.NameEquals("parameters"))
 186                {
 0187                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0188                    foreach (var property0 in property.Value.EnumerateObject())
 189                    {
 0190                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 191                    }
 0192                    parameters = dictionary;
 0193                    continue;
 194                }
 0195                if (property.NameEquals("annotations"))
 196                {
 0197                    List<object> array = new List<object>();
 0198                    foreach (var item in property.Value.EnumerateArray())
 199                    {
 0200                        array.Add(item.GetObject());
 201                    }
 0202                    annotations = array;
 0203                    continue;
 204                }
 0205                if (property.NameEquals("typeProperties"))
 206                {
 0207                    foreach (var property0 in property.Value.EnumerateObject())
 208                    {
 0209                        if (property0.NameEquals("host"))
 210                        {
 0211                            host = property0.Value.GetObject();
 0212                            continue;
 213                        }
 0214                        if (property0.NameEquals("port"))
 215                        {
 0216                            port = property0.Value.GetObject();
 0217                            continue;
 218                        }
 0219                        if (property0.NameEquals("serverType"))
 220                        {
 0221                            serverType = new HiveServerType(property0.Value.GetString());
 0222                            continue;
 223                        }
 0224                        if (property0.NameEquals("thriftTransportProtocol"))
 225                        {
 0226                            thriftTransportProtocol = new HiveThriftTransportProtocol(property0.Value.GetString());
 0227                            continue;
 228                        }
 0229                        if (property0.NameEquals("authenticationType"))
 230                        {
 0231                            authenticationType = new HiveAuthenticationType(property0.Value.GetString());
 0232                            continue;
 233                        }
 0234                        if (property0.NameEquals("serviceDiscoveryMode"))
 235                        {
 0236                            serviceDiscoveryMode = property0.Value.GetObject();
 0237                            continue;
 238                        }
 0239                        if (property0.NameEquals("zooKeeperNameSpace"))
 240                        {
 0241                            zooKeeperNameSpace = property0.Value.GetObject();
 0242                            continue;
 243                        }
 0244                        if (property0.NameEquals("useNativeQuery"))
 245                        {
 0246                            useNativeQuery = property0.Value.GetObject();
 0247                            continue;
 248                        }
 0249                        if (property0.NameEquals("username"))
 250                        {
 0251                            username = property0.Value.GetObject();
 0252                            continue;
 253                        }
 0254                        if (property0.NameEquals("password"))
 255                        {
 0256                            password = SecretBase.DeserializeSecretBase(property0.Value);
 0257                            continue;
 258                        }
 0259                        if (property0.NameEquals("httpPath"))
 260                        {
 0261                            httpPath = property0.Value.GetObject();
 0262                            continue;
 263                        }
 0264                        if (property0.NameEquals("enableSsl"))
 265                        {
 0266                            enableSsl = property0.Value.GetObject();
 0267                            continue;
 268                        }
 0269                        if (property0.NameEquals("trustedCertPath"))
 270                        {
 0271                            trustedCertPath = property0.Value.GetObject();
 0272                            continue;
 273                        }
 0274                        if (property0.NameEquals("useSystemTrustStore"))
 275                        {
 0276                            useSystemTrustStore = property0.Value.GetObject();
 0277                            continue;
 278                        }
 0279                        if (property0.NameEquals("allowHostNameCNMismatch"))
 280                        {
 0281                            allowHostNameCNMismatch = property0.Value.GetObject();
 0282                            continue;
 283                        }
 0284                        if (property0.NameEquals("allowSelfSignedServerCert"))
 285                        {
 0286                            allowSelfSignedServerCert = property0.Value.GetObject();
 0287                            continue;
 288                        }
 0289                        if (property0.NameEquals("encryptedCredential"))
 290                        {
 0291                            encryptedCredential = property0.Value.GetObject();
 292                            continue;
 293                        }
 294                    }
 295                    continue;
 296                }
 0297                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0298                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 299            }
 0300            additionalProperties = additionalPropertiesDictionary;
 0301            return new HiveLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), O
 302        }
 303    }
 304}