< Summary

Class:Azure.Analytics.Synapse.Artifacts.Models.HBaseLinkedService
Assembly:Azure.Analytics.Synapse.Artifacts
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\HBaseLinkedService.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\HBaseLinkedService.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_HttpPath()-0%100%
get_AuthenticationType()-0%100%
get_Username()-0%100%
get_Password()-0%100%
get_EnableSsl()-0%100%
get_TrustedCertPath()-0%100%
get_AllowHostNameCNMismatch()-0%100%
get_AllowSelfSignedServerCert()-0%100%
get_EncryptedCredential()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeHBaseLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\HBaseLinkedService.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> HBase server linked service. </summary>
 14    public partial class HBaseLinkedService : LinkedService
 15    {
 16        /// <summary> Initializes a new instance of HBaseLinkedService. </summary>
 17        /// <param name="host"> The IP address or host name of the HBase server. (i.e. 192.168.222.160). </param>
 18        /// <param name="authenticationType"> The authentication mechanism to use to connect to the HBase server. </para
 19        /// <exception cref="ArgumentNullException"> <paramref name="host"/> is null. </exception>
 020        public HBaseLinkedService(object host, HBaseAuthenticationType authenticationType)
 21        {
 022            if (host == null)
 23            {
 024                throw new ArgumentNullException(nameof(host));
 25            }
 26
 027            Host = host;
 028            AuthenticationType = authenticationType;
 029            Type = "HBase";
 030        }
 31
 32        /// <summary> Initializes a new instance of HBaseLinkedService. </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 HBase server. (i.e. 192.168.222.160). </param>
 40        /// <param name="port"> The TCP port that the HBase instance uses to listen for client connections. The default 
 41        /// <param name="httpPath"> The partial URL corresponding to the HBase server. (i.e. /gateway/sandbox/hbase/vers
 42        /// <param name="authenticationType"> The authentication mechanism to use to connect to the HBase server. </para
 43        /// <param name="username"> The user name used to connect to the HBase instance. </param>
 44        /// <param name="password"> The password corresponding to the user name. </param>
 45        /// <param name="enableSsl"> Specifies whether the connections to the server are encrypted using SSL. The defaul
 46        /// <param name="trustedCertPath"> The full path of the .pem file containing trusted CA certificates for verifyi
 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 HBaseLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary
 51        {
 052            Host = host;
 053            Port = port;
 054            HttpPath = httpPath;
 055            AuthenticationType = authenticationType;
 056            Username = username;
 057            Password = password;
 058            EnableSsl = enableSsl;
 059            TrustedCertPath = trustedCertPath;
 060            AllowHostNameCNMismatch = allowHostNameCNMismatch;
 061            AllowSelfSignedServerCert = allowSelfSignedServerCert;
 062            EncryptedCredential = encryptedCredential;
 063            Type = type ?? "HBase";
 064        }
 65
 66        /// <summary> The IP address or host name of the HBase server. (i.e. 192.168.222.160). </summary>
 067        public object Host { get; set; }
 68        /// <summary> The TCP port that the HBase instance uses to listen for client connections. The default value is 9
 069        public object Port { get; set; }
 70        /// <summary> The partial URL corresponding to the HBase server. (i.e. /gateway/sandbox/hbase/version). </summar
 071        public object HttpPath { get; set; }
 72        /// <summary> The authentication mechanism to use to connect to the HBase server. </summary>
 073        public HBaseAuthenticationType AuthenticationType { get; set; }
 74        /// <summary> The user name used to connect to the HBase instance. </summary>
 075        public object Username { get; set; }
 76        /// <summary> The password corresponding to the user name. </summary>
 077        public SecretBase Password { get; set; }
 78        /// <summary> Specifies whether the connections to the server are encrypted using SSL. The default value is fals
 079        public object EnableSsl { get; set; }
 80        /// <summary> The full path of the .pem file containing trusted CA certificates for verifying the server when co
 081        public object TrustedCertPath { 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\HBaseLinkedService.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 HBaseLinkedService : 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(HttpPath))
 62            {
 063                writer.WritePropertyName("httpPath");
 064                writer.WriteObjectValue(HttpPath);
 65            }
 066            writer.WritePropertyName("authenticationType");
 067            writer.WriteStringValue(AuthenticationType.ToString());
 068            if (Optional.IsDefined(Username))
 69            {
 070                writer.WritePropertyName("username");
 071                writer.WriteObjectValue(Username);
 72            }
 073            if (Optional.IsDefined(Password))
 74            {
 075                writer.WritePropertyName("password");
 076                writer.WriteObjectValue(Password);
 77            }
 078            if (Optional.IsDefined(EnableSsl))
 79            {
 080                writer.WritePropertyName("enableSsl");
 081                writer.WriteObjectValue(EnableSsl);
 82            }
 083            if (Optional.IsDefined(TrustedCertPath))
 84            {
 085                writer.WritePropertyName("trustedCertPath");
 086                writer.WriteObjectValue(TrustedCertPath);
 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 HBaseLinkedService DeserializeHBaseLinkedService(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            Optional<object> httpPath = default;
 0122            HBaseAuthenticationType authenticationType = default;
 0123            Optional<object> username = default;
 0124            Optional<SecretBase> password = default;
 0125            Optional<object> enableSsl = default;
 0126            Optional<object> trustedCertPath = 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("httpPath"))
 184                        {
 0185                            httpPath = property0.Value.GetObject();
 0186                            continue;
 187                        }
 0188                        if (property0.NameEquals("authenticationType"))
 189                        {
 0190                            authenticationType = new HBaseAuthenticationType(property0.Value.GetString());
 0191                            continue;
 192                        }
 0193                        if (property0.NameEquals("username"))
 194                        {
 0195                            username = property0.Value.GetObject();
 0196                            continue;
 197                        }
 0198                        if (property0.NameEquals("password"))
 199                        {
 0200                            password = SecretBase.DeserializeSecretBase(property0.Value);
 0201                            continue;
 202                        }
 0203                        if (property0.NameEquals("enableSsl"))
 204                        {
 0205                            enableSsl = property0.Value.GetObject();
 0206                            continue;
 207                        }
 0208                        if (property0.NameEquals("trustedCertPath"))
 209                        {
 0210                            trustedCertPath = 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 HBaseLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), 
 236        }
 237    }
 238}