< Summary

Class:Azure.Analytics.Synapse.Artifacts.Models.SalesforceServiceCloudLinkedService
Assembly:Azure.Analytics.Synapse.Artifacts
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SalesforceServiceCloudLinkedService.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SalesforceServiceCloudLinkedService.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_EnvironmentUrl()-0%100%
get_Username()-0%100%
get_Password()-0%100%
get_SecurityToken()-0%100%
get_ExtendedProperties()-0%100%
get_EncryptedCredential()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeSalesforceServiceCloudLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SalesforceServiceCloudLinkedService.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 Salesforce Service Cloud. </summary>
 13    public partial class SalesforceServiceCloudLinkedService : LinkedService
 14    {
 15        /// <summary> Initializes a new instance of SalesforceServiceCloudLinkedService. </summary>
 016        public SalesforceServiceCloudLinkedService()
 17        {
 018            Type = "SalesforceServiceCloud";
 019        }
 20
 21        /// <summary> Initializes a new instance of SalesforceServiceCloudLinkedService. </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="environmentUrl"> The URL of Salesforce Service Cloud instance. Default is &apos;https://login.s
 29        /// <param name="username"> The username for Basic authentication of the Salesforce instance. Type: string (or E
 30        /// <param name="password"> The password for Basic authentication of the Salesforce instance. </param>
 31        /// <param name="securityToken"> The security token is required to remotely access Salesforce instance. </param>
 32        /// <param name="extendedProperties"> Extended properties appended to the connection string. Type: string (or Ex
 33        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 034        internal SalesforceServiceCloudLinkedService(string type, IntegrationRuntimeReference connectVia, string descrip
 35        {
 036            EnvironmentUrl = environmentUrl;
 037            Username = username;
 038            Password = password;
 039            SecurityToken = securityToken;
 040            ExtendedProperties = extendedProperties;
 041            EncryptedCredential = encryptedCredential;
 042            Type = type ?? "SalesforceServiceCloud";
 043        }
 44
 45        /// <summary> The URL of Salesforce Service Cloud instance. Default is &apos;https://login.salesforce.com&apos;.
 046        public object EnvironmentUrl { get; set; }
 47        /// <summary> The username for Basic authentication of the Salesforce instance. Type: string (or Expression with
 048        public object Username { get; set; }
 49        /// <summary> The password for Basic authentication of the Salesforce instance. </summary>
 050        public SecretBase Password { get; set; }
 51        /// <summary> The security token is required to remotely access Salesforce instance. </summary>
 052        public SecretBase SecurityToken { get; set; }
 53        /// <summary> Extended properties appended to the connection string. Type: string (or Expression with resultType
 054        public object ExtendedProperties { 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\SalesforceServiceCloudLinkedService.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 SalesforceServiceCloudLinkedService : 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(EnvironmentUrl))
 55            {
 056                writer.WritePropertyName("environmentUrl");
 057                writer.WriteObjectValue(EnvironmentUrl);
 58            }
 059            if (Optional.IsDefined(Username))
 60            {
 061                writer.WritePropertyName("username");
 062                writer.WriteObjectValue(Username);
 63            }
 064            if (Optional.IsDefined(Password))
 65            {
 066                writer.WritePropertyName("password");
 067                writer.WriteObjectValue(Password);
 68            }
 069            if (Optional.IsDefined(SecurityToken))
 70            {
 071                writer.WritePropertyName("securityToken");
 072                writer.WriteObjectValue(SecurityToken);
 73            }
 074            if (Optional.IsDefined(ExtendedProperties))
 75            {
 076                writer.WritePropertyName("extendedProperties");
 077                writer.WriteObjectValue(ExtendedProperties);
 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 SalesforceServiceCloudLinkedService DeserializeSalesforceServiceCloudLinkedService(JsonElement e
 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> environmentUrl = default;
 0101            Optional<object> username = default;
 0102            Optional<SecretBase> password = default;
 0103            Optional<SecretBase> securityToken = default;
 0104            Optional<object> extendedProperties = 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("environmentUrl"))
 150                        {
 0151                            environmentUrl = property0.Value.GetObject();
 0152                            continue;
 153                        }
 0154                        if (property0.NameEquals("username"))
 155                        {
 0156                            username = property0.Value.GetObject();
 0157                            continue;
 158                        }
 0159                        if (property0.NameEquals("password"))
 160                        {
 0161                            password = SecretBase.DeserializeSecretBase(property0.Value);
 0162                            continue;
 163                        }
 0164                        if (property0.NameEquals("securityToken"))
 165                        {
 0166                            securityToken = SecretBase.DeserializeSecretBase(property0.Value);
 0167                            continue;
 168                        }
 0169                        if (property0.NameEquals("extendedProperties"))
 170                        {
 0171                            extendedProperties = property0.Value.GetObject();
 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 SalesforceServiceCloudLinkedService(type, connectVia.Value, description.Value, Optional.ToDiction
 187        }
 188    }
 189}