< Summary

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

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_UseSystemTrustStore()-0%100%
get_AllowHostNameCNMismatch()-0%100%
get_AllowSelfSignedServerCert()-0%100%
get_EncryptedCredential()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializePhoenixLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\PhoenixLinkedService.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> Phoenix server linked service. </summary>
 14    public partial class PhoenixLinkedService : LinkedService
 15    {
 16        /// <summary> Initializes a new instance of PhoenixLinkedService. </summary>
 17        /// <param name="host"> The IP address or host name of the Phoenix server. (i.e. 192.168.222.160). </param>
 18        /// <param name="authenticationType"> The authentication mechanism used to connect to the Phoenix server. </para
 19        /// <exception cref="ArgumentNullException"> <paramref name="host"/> is null. </exception>
 020        public PhoenixLinkedService(object host, PhoenixAuthenticationType authenticationType)
 21        {
 022            if (host == null)
 23            {
 024                throw new ArgumentNullException(nameof(host));
 25            }
 26
 027            Host = host;
 028            AuthenticationType = authenticationType;
 029            Type = "Phoenix";
 030        }
 31
 32        /// <summary> Initializes a new instance of PhoenixLinkedService. </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 Phoenix server. (i.e. 192.168.222.160). </param>
 40        /// <param name="port"> The TCP port that the Phoenix server uses to listen for client connections. The default 
 41        /// <param name="httpPath"> The partial URL corresponding to the Phoenix server. (i.e. /gateway/sandbox/phoenix/
 42        /// <param name="authenticationType"> The authentication mechanism used to connect to the Phoenix server. </para
 43        /// <param name="username"> The user name used to connect to the Phoenix server. </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="useSystemTrustStore"> Specifies whether to use a CA certificate from the system trust store or 
 48        /// <param name="allowHostNameCNMismatch"> Specifies whether to require a CA-issued SSL certificate name to matc
 49        /// <param name="allowSelfSignedServerCert"> Specifies whether to allow self-signed certificates from the server
 50        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 051        internal PhoenixLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictiona
 52        {
 053            Host = host;
 054            Port = port;
 055            HttpPath = httpPath;
 056            AuthenticationType = authenticationType;
 057            Username = username;
 058            Password = password;
 059            EnableSsl = enableSsl;
 060            TrustedCertPath = trustedCertPath;
 061            UseSystemTrustStore = useSystemTrustStore;
 062            AllowHostNameCNMismatch = allowHostNameCNMismatch;
 063            AllowSelfSignedServerCert = allowSelfSignedServerCert;
 064            EncryptedCredential = encryptedCredential;
 065            Type = type ?? "Phoenix";
 066        }
 67
 68        /// <summary> The IP address or host name of the Phoenix server. (i.e. 192.168.222.160). </summary>
 069        public object Host { get; set; }
 70        /// <summary> The TCP port that the Phoenix server uses to listen for client connections. The default value is 8
 071        public object Port { get; set; }
 72        /// <summary> The partial URL corresponding to the Phoenix server. (i.e. /gateway/sandbox/phoenix/version). The 
 073        public object HttpPath { get; set; }
 74        /// <summary> The authentication mechanism used to connect to the Phoenix server. </summary>
 075        public PhoenixAuthenticationType AuthenticationType { get; set; }
 76        /// <summary> The user name used to connect to the Phoenix server. </summary>
 077        public object Username { get; set; }
 78        /// <summary> The password corresponding to the user name. </summary>
 079        public SecretBase Password { get; set; }
 80        /// <summary> Specifies whether the connections to the server are encrypted using SSL. The default value is fals
 081        public object EnableSsl { get; set; }
 82        /// <summary> The full path of the .pem file containing trusted CA certificates for verifying the server when co
 083        public object TrustedCertPath { get; set; }
 84        /// <summary> Specifies whether to use a CA certificate from the system trust store or from a specified PEM file
 085        public object UseSystemTrustStore { get; set; }
 86        /// <summary> Specifies whether to require a CA-issued SSL certificate name to match the host name of the server
 087        public object AllowHostNameCNMismatch { get; set; }
 88        /// <summary> Specifies whether to allow self-signed certificates from the server. The default value is false. <
 089        public object AllowSelfSignedServerCert { get; set; }
 90        /// <summary> The encrypted credential used for authentication. Credentials are encrypted using the integration 
 091        public object EncryptedCredential { get; set; }
 92    }
 93}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\PhoenixLinkedService.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 PhoenixLinkedService : 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(UseSystemTrustStore))
 89            {
 090                writer.WritePropertyName("useSystemTrustStore");
 091                writer.WriteObjectValue(UseSystemTrustStore);
 92            }
 093            if (Optional.IsDefined(AllowHostNameCNMismatch))
 94            {
 095                writer.WritePropertyName("allowHostNameCNMismatch");
 096                writer.WriteObjectValue(AllowHostNameCNMismatch);
 97            }
 098            if (Optional.IsDefined(AllowSelfSignedServerCert))
 99            {
 0100                writer.WritePropertyName("allowSelfSignedServerCert");
 0101                writer.WriteObjectValue(AllowSelfSignedServerCert);
 102            }
 0103            if (Optional.IsDefined(EncryptedCredential))
 104            {
 0105                writer.WritePropertyName("encryptedCredential");
 0106                writer.WriteObjectValue(EncryptedCredential);
 107            }
 0108            writer.WriteEndObject();
 0109            foreach (var item in AdditionalProperties)
 110            {
 0111                writer.WritePropertyName(item.Key);
 0112                writer.WriteObjectValue(item.Value);
 113            }
 0114            writer.WriteEndObject();
 0115        }
 116
 117        internal static PhoenixLinkedService DeserializePhoenixLinkedService(JsonElement element)
 118        {
 0119            string type = default;
 0120            Optional<IntegrationRuntimeReference> connectVia = default;
 0121            Optional<string> description = default;
 0122            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 0123            Optional<IList<object>> annotations = default;
 0124            object host = default;
 0125            Optional<object> port = default;
 0126            Optional<object> httpPath = default;
 0127            PhoenixAuthenticationType authenticationType = default;
 0128            Optional<object> username = default;
 0129            Optional<SecretBase> password = default;
 0130            Optional<object> enableSsl = default;
 0131            Optional<object> trustedCertPath = default;
 0132            Optional<object> useSystemTrustStore = default;
 0133            Optional<object> allowHostNameCNMismatch = default;
 0134            Optional<object> allowSelfSignedServerCert = default;
 0135            Optional<object> encryptedCredential = default;
 0136            IDictionary<string, object> additionalProperties = default;
 0137            Dictionary<string, object> additionalPropertiesDictionary = default;
 0138            foreach (var property in element.EnumerateObject())
 139            {
 0140                if (property.NameEquals("type"))
 141                {
 0142                    type = property.Value.GetString();
 0143                    continue;
 144                }
 0145                if (property.NameEquals("connectVia"))
 146                {
 0147                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
 0148                    continue;
 149                }
 0150                if (property.NameEquals("description"))
 151                {
 0152                    description = property.Value.GetString();
 0153                    continue;
 154                }
 0155                if (property.NameEquals("parameters"))
 156                {
 0157                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0158                    foreach (var property0 in property.Value.EnumerateObject())
 159                    {
 0160                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 161                    }
 0162                    parameters = dictionary;
 0163                    continue;
 164                }
 0165                if (property.NameEquals("annotations"))
 166                {
 0167                    List<object> array = new List<object>();
 0168                    foreach (var item in property.Value.EnumerateArray())
 169                    {
 0170                        array.Add(item.GetObject());
 171                    }
 0172                    annotations = array;
 0173                    continue;
 174                }
 0175                if (property.NameEquals("typeProperties"))
 176                {
 0177                    foreach (var property0 in property.Value.EnumerateObject())
 178                    {
 0179                        if (property0.NameEquals("host"))
 180                        {
 0181                            host = property0.Value.GetObject();
 0182                            continue;
 183                        }
 0184                        if (property0.NameEquals("port"))
 185                        {
 0186                            port = property0.Value.GetObject();
 0187                            continue;
 188                        }
 0189                        if (property0.NameEquals("httpPath"))
 190                        {
 0191                            httpPath = property0.Value.GetObject();
 0192                            continue;
 193                        }
 0194                        if (property0.NameEquals("authenticationType"))
 195                        {
 0196                            authenticationType = new PhoenixAuthenticationType(property0.Value.GetString());
 0197                            continue;
 198                        }
 0199                        if (property0.NameEquals("username"))
 200                        {
 0201                            username = property0.Value.GetObject();
 0202                            continue;
 203                        }
 0204                        if (property0.NameEquals("password"))
 205                        {
 0206                            password = SecretBase.DeserializeSecretBase(property0.Value);
 0207                            continue;
 208                        }
 0209                        if (property0.NameEquals("enableSsl"))
 210                        {
 0211                            enableSsl = property0.Value.GetObject();
 0212                            continue;
 213                        }
 0214                        if (property0.NameEquals("trustedCertPath"))
 215                        {
 0216                            trustedCertPath = property0.Value.GetObject();
 0217                            continue;
 218                        }
 0219                        if (property0.NameEquals("useSystemTrustStore"))
 220                        {
 0221                            useSystemTrustStore = property0.Value.GetObject();
 0222                            continue;
 223                        }
 0224                        if (property0.NameEquals("allowHostNameCNMismatch"))
 225                        {
 0226                            allowHostNameCNMismatch = property0.Value.GetObject();
 0227                            continue;
 228                        }
 0229                        if (property0.NameEquals("allowSelfSignedServerCert"))
 230                        {
 0231                            allowSelfSignedServerCert = property0.Value.GetObject();
 0232                            continue;
 233                        }
 0234                        if (property0.NameEquals("encryptedCredential"))
 235                        {
 0236                            encryptedCredential = property0.Value.GetObject();
 237                            continue;
 238                        }
 239                    }
 240                    continue;
 241                }
 0242                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0243                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 244            }
 0245            additionalProperties = additionalPropertiesDictionary;
 0246            return new PhoenixLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters)
 247        }
 248    }
 249}