< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%0%
get_ConnectionString()-0%100%
get_Server()-0%100%
get_AuthenticationType()-0%100%
get_Username()-0%100%
get_Password()-0%100%
get_EncryptedCredential()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeTeradataLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\TeradataLinkedService.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;
 9
 10namespace Azure.Analytics.Synapse.Artifacts.Models
 11{
 12    /// <summary> Linked service for Teradata data source. </summary>
 13    public partial class TeradataLinkedService : LinkedService
 14    {
 15        /// <summary> Initializes a new instance of TeradataLinkedService. </summary>
 016        public TeradataLinkedService()
 17        {
 018            Type = "Teradata";
 019        }
 20
 21        /// <summary> Initializes a new instance of TeradataLinkedService. </summary>
 22        /// <param name="type"> Type of linked service. </param>
 23        /// <param name="connectVia"> The integration runtime reference. </param>
 24        /// <param name="description"> Linked service description. </param>
 25        /// <param name="parameters"> Parameters for linked service. </param>
 26        /// <param name="annotations"> List of tags that can be used for describing the linked service. </param>
 27        /// <param name="additionalProperties"> . </param>
 28        /// <param name="connectionString"> Teradata ODBC connection string. Type: string, SecureString or AzureKeyVault
 29        /// <param name="server"> Server name for connection. Type: string (or Expression with resultType string). </par
 30        /// <param name="authenticationType"> AuthenticationType to be used for connection. </param>
 31        /// <param name="username"> Username for authentication. Type: string (or Expression with resultType string). </
 32        /// <param name="password"> Password for authentication. </param>
 33        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 034        internal TeradataLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDiction
 35        {
 036            ConnectionString = connectionString;
 037            Server = server;
 038            AuthenticationType = authenticationType;
 039            Username = username;
 040            Password = password;
 041            EncryptedCredential = encryptedCredential;
 042            Type = type ?? "Teradata";
 043        }
 44
 45        /// <summary> Teradata ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. </sum
 046        public object ConnectionString { get; set; }
 47        /// <summary> Server name for connection. Type: string (or Expression with resultType string). </summary>
 048        public object Server { get; set; }
 49        /// <summary> AuthenticationType to be used for connection. </summary>
 050        public TeradataAuthenticationType? AuthenticationType { get; set; }
 51        /// <summary> Username for authentication. Type: string (or Expression with resultType string). </summary>
 052        public object Username { get; set; }
 53        /// <summary> Password for authentication. </summary>
 054        public SecretBase Password { get; set; }
 55        /// <summary> The encrypted credential used for authentication. Credentials are encrypted using the integration 
 056        public object EncryptedCredential { get; set; }
 57    }
 58}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\TeradataLinkedService.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 TeradataLinkedService : 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            if (Optional.IsDefined(ConnectionString))
 55            {
 056                writer.WritePropertyName("connectionString");
 057                writer.WriteObjectValue(ConnectionString);
 58            }
 059            if (Optional.IsDefined(Server))
 60            {
 061                writer.WritePropertyName("server");
 062                writer.WriteObjectValue(Server);
 63            }
 064            if (Optional.IsDefined(AuthenticationType))
 65            {
 066                writer.WritePropertyName("authenticationType");
 067                writer.WriteStringValue(AuthenticationType.Value.ToString());
 68            }
 069            if (Optional.IsDefined(Username))
 70            {
 071                writer.WritePropertyName("username");
 072                writer.WriteObjectValue(Username);
 73            }
 074            if (Optional.IsDefined(Password))
 75            {
 076                writer.WritePropertyName("password");
 077                writer.WriteObjectValue(Password);
 78            }
 079            if (Optional.IsDefined(EncryptedCredential))
 80            {
 081                writer.WritePropertyName("encryptedCredential");
 082                writer.WriteObjectValue(EncryptedCredential);
 83            }
 084            writer.WriteEndObject();
 085            foreach (var item in AdditionalProperties)
 86            {
 087                writer.WritePropertyName(item.Key);
 088                writer.WriteObjectValue(item.Value);
 89            }
 090            writer.WriteEndObject();
 091        }
 92
 93        internal static TeradataLinkedService DeserializeTeradataLinkedService(JsonElement element)
 94        {
 095            string type = default;
 096            Optional<IntegrationRuntimeReference> connectVia = default;
 097            Optional<string> description = default;
 098            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 099            Optional<IList<object>> annotations = default;
 0100            Optional<object> connectionString = default;
 0101            Optional<object> server = default;
 0102            Optional<TeradataAuthenticationType> authenticationType = default;
 0103            Optional<object> username = default;
 0104            Optional<SecretBase> password = default;
 0105            Optional<object> encryptedCredential = default;
 0106            IDictionary<string, object> additionalProperties = default;
 0107            Dictionary<string, object> additionalPropertiesDictionary = default;
 0108            foreach (var property in element.EnumerateObject())
 109            {
 0110                if (property.NameEquals("type"))
 111                {
 0112                    type = property.Value.GetString();
 0113                    continue;
 114                }
 0115                if (property.NameEquals("connectVia"))
 116                {
 0117                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
 0118                    continue;
 119                }
 0120                if (property.NameEquals("description"))
 121                {
 0122                    description = property.Value.GetString();
 0123                    continue;
 124                }
 0125                if (property.NameEquals("parameters"))
 126                {
 0127                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0128                    foreach (var property0 in property.Value.EnumerateObject())
 129                    {
 0130                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 131                    }
 0132                    parameters = dictionary;
 0133                    continue;
 134                }
 0135                if (property.NameEquals("annotations"))
 136                {
 0137                    List<object> array = new List<object>();
 0138                    foreach (var item in property.Value.EnumerateArray())
 139                    {
 0140                        array.Add(item.GetObject());
 141                    }
 0142                    annotations = array;
 0143                    continue;
 144                }
 0145                if (property.NameEquals("typeProperties"))
 146                {
 0147                    foreach (var property0 in property.Value.EnumerateObject())
 148                    {
 0149                        if (property0.NameEquals("connectionString"))
 150                        {
 0151                            connectionString = property0.Value.GetObject();
 0152                            continue;
 153                        }
 0154                        if (property0.NameEquals("server"))
 155                        {
 0156                            server = property0.Value.GetObject();
 0157                            continue;
 158                        }
 0159                        if (property0.NameEquals("authenticationType"))
 160                        {
 0161                            authenticationType = new TeradataAuthenticationType(property0.Value.GetString());
 0162                            continue;
 163                        }
 0164                        if (property0.NameEquals("username"))
 165                        {
 0166                            username = property0.Value.GetObject();
 0167                            continue;
 168                        }
 0169                        if (property0.NameEquals("password"))
 170                        {
 0171                            password = SecretBase.DeserializeSecretBase(property0.Value);
 0172                            continue;
 173                        }
 0174                        if (property0.NameEquals("encryptedCredential"))
 175                        {
 0176                            encryptedCredential = property0.Value.GetObject();
 177                            continue;
 178                        }
 179                    }
 180                    continue;
 181                }
 0182                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0183                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 184            }
 0185            additionalProperties = additionalPropertiesDictionary;
 0186            return new TeradataLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters
 187        }
 188    }
 189}