< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%100%
.ctor(...)-0%0%
get_DeploymentType()-0%100%
get_HostName()-0%100%
get_Port()-0%100%
get_ServiceUri()-0%100%
get_OrganizationName()-0%100%
get_AuthenticationType()-0%100%
get_Username()-0%100%
get_Password()-0%100%
get_ServicePrincipalId()-0%100%
get_ServicePrincipalCredentialType()-0%100%
get_ServicePrincipalCredential()-0%100%
get_EncryptedCredential()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeCommonDataServiceForAppsLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\CommonDataServiceForAppsLinkedService.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> Common Data Service for Apps linked service. </summary>
 13    public partial class CommonDataServiceForAppsLinkedService : LinkedService
 14    {
 15        /// <summary> Initializes a new instance of CommonDataServiceForAppsLinkedService. </summary>
 16        /// <param name="deploymentType"> The deployment type of the Common Data Service for Apps instance. &apos;Online
 17        /// <param name="authenticationType"> The authentication type to connect to Common Data Service for Apps server.
 018        public CommonDataServiceForAppsLinkedService(DynamicsDeploymentType deploymentType, DynamicsAuthenticationType a
 19        {
 020            DeploymentType = deploymentType;
 021            AuthenticationType = authenticationType;
 022            Type = "CommonDataServiceForApps";
 023        }
 24
 25        /// <summary> Initializes a new instance of CommonDataServiceForAppsLinkedService. </summary>
 26        /// <param name="type"> Type of linked service. </param>
 27        /// <param name="connectVia"> The integration runtime reference. </param>
 28        /// <param name="description"> Linked service description. </param>
 29        /// <param name="parameters"> Parameters for linked service. </param>
 30        /// <param name="annotations"> List of tags that can be used for describing the linked service. </param>
 31        /// <param name="additionalProperties"> . </param>
 32        /// <param name="deploymentType"> The deployment type of the Common Data Service for Apps instance. &apos;Online
 33        /// <param name="hostName"> The host name of the on-premises Common Data Service for Apps server. The property i
 34        /// <param name="port"> The port of on-premises Common Data Service for Apps server. The property is required fo
 35        /// <param name="serviceUri"> The URL to the Microsoft Common Data Service for Apps server. The property is requ
 36        /// <param name="organizationName"> The organization name of the Common Data Service for Apps instance. The prop
 37        /// <param name="authenticationType"> The authentication type to connect to Common Data Service for Apps server.
 38        /// <param name="username"> User name to access the Common Data Service for Apps instance. Type: string (or Expr
 39        /// <param name="password"> Password to access the Common Data Service for Apps instance. </param>
 40        /// <param name="servicePrincipalId"> The client ID of the application in Azure Active Directory used for Server
 41        /// <param name="servicePrincipalCredentialType"> The service principal credential type to use in Server-To-Serv
 42        /// <param name="servicePrincipalCredential"> The credential of the service principal object in Azure Active Dir
 43        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 044        internal CommonDataServiceForAppsLinkedService(string type, IntegrationRuntimeReference connectVia, string descr
 45        {
 046            DeploymentType = deploymentType;
 047            HostName = hostName;
 048            Port = port;
 049            ServiceUri = serviceUri;
 050            OrganizationName = organizationName;
 051            AuthenticationType = authenticationType;
 052            Username = username;
 053            Password = password;
 054            ServicePrincipalId = servicePrincipalId;
 055            ServicePrincipalCredentialType = servicePrincipalCredentialType;
 056            ServicePrincipalCredential = servicePrincipalCredential;
 057            EncryptedCredential = encryptedCredential;
 058            Type = type ?? "CommonDataServiceForApps";
 059        }
 60
 61        /// <summary> The deployment type of the Common Data Service for Apps instance. &apos;Online&apos; for Common Da
 062        public DynamicsDeploymentType DeploymentType { get; set; }
 63        /// <summary> The host name of the on-premises Common Data Service for Apps server. The property is required for
 064        public object HostName { get; set; }
 65        /// <summary> The port of on-premises Common Data Service for Apps server. The property is required for on-prem 
 066        public object Port { get; set; }
 67        /// <summary> The URL to the Microsoft Common Data Service for Apps server. The property is required for on-line
 068        public object ServiceUri { get; set; }
 69        /// <summary> The organization name of the Common Data Service for Apps instance. The property is required for o
 070        public object OrganizationName { get; set; }
 71        /// <summary> The authentication type to connect to Common Data Service for Apps server. &apos;Office365&apos; f
 072        public DynamicsAuthenticationType AuthenticationType { get; set; }
 73        /// <summary> User name to access the Common Data Service for Apps instance. Type: string (or Expression with re
 074        public object Username { get; set; }
 75        /// <summary> Password to access the Common Data Service for Apps instance. </summary>
 076        public SecretBase Password { get; set; }
 77        /// <summary> The client ID of the application in Azure Active Directory used for Server-To-Server authenticatio
 078        public object ServicePrincipalId { get; set; }
 79        /// <summary> The service principal credential type to use in Server-To-Server authentication. &apos;ServicePrin
 080        public DynamicsServicePrincipalCredentialType? ServicePrincipalCredentialType { get; set; }
 81        /// <summary> The credential of the service principal object in Azure Active Directory. If servicePrincipalCrede
 082        public SecretBase ServicePrincipalCredential { get; set; }
 83        /// <summary> The encrypted credential used for authentication. Credentials are encrypted using the integration 
 084        public object EncryptedCredential { get; set; }
 85    }
 86}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\CommonDataServiceForAppsLinkedService.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 CommonDataServiceForAppsLinkedService : 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("deploymentType");
 055            writer.WriteStringValue(DeploymentType.ToString());
 056            if (Optional.IsDefined(HostName))
 57            {
 058                writer.WritePropertyName("hostName");
 059                writer.WriteObjectValue(HostName);
 60            }
 061            if (Optional.IsDefined(Port))
 62            {
 063                writer.WritePropertyName("port");
 064                writer.WriteObjectValue(Port);
 65            }
 066            if (Optional.IsDefined(ServiceUri))
 67            {
 068                writer.WritePropertyName("serviceUri");
 069                writer.WriteObjectValue(ServiceUri);
 70            }
 071            if (Optional.IsDefined(OrganizationName))
 72            {
 073                writer.WritePropertyName("organizationName");
 074                writer.WriteObjectValue(OrganizationName);
 75            }
 076            writer.WritePropertyName("authenticationType");
 077            writer.WriteStringValue(AuthenticationType.ToString());
 078            if (Optional.IsDefined(Username))
 79            {
 080                writer.WritePropertyName("username");
 081                writer.WriteObjectValue(Username);
 82            }
 083            if (Optional.IsDefined(Password))
 84            {
 085                writer.WritePropertyName("password");
 086                writer.WriteObjectValue(Password);
 87            }
 088            if (Optional.IsDefined(ServicePrincipalId))
 89            {
 090                writer.WritePropertyName("servicePrincipalId");
 091                writer.WriteObjectValue(ServicePrincipalId);
 92            }
 093            if (Optional.IsDefined(ServicePrincipalCredentialType))
 94            {
 095                writer.WritePropertyName("servicePrincipalCredentialType");
 096                writer.WriteStringValue(ServicePrincipalCredentialType.Value.ToString());
 97            }
 098            if (Optional.IsDefined(ServicePrincipalCredential))
 99            {
 0100                writer.WritePropertyName("servicePrincipalCredential");
 0101                writer.WriteObjectValue(ServicePrincipalCredential);
 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 CommonDataServiceForAppsLinkedService DeserializeCommonDataServiceForAppsLinkedService(JsonEleme
 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            DynamicsDeploymentType deploymentType = default;
 0125            Optional<object> hostName = default;
 0126            Optional<object> port = default;
 0127            Optional<object> serviceUri = default;
 0128            Optional<object> organizationName = default;
 0129            DynamicsAuthenticationType authenticationType = default;
 0130            Optional<object> username = default;
 0131            Optional<SecretBase> password = default;
 0132            Optional<object> servicePrincipalId = default;
 0133            Optional<DynamicsServicePrincipalCredentialType> servicePrincipalCredentialType = default;
 0134            Optional<SecretBase> servicePrincipalCredential = 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("deploymentType"))
 180                        {
 0181                            deploymentType = new DynamicsDeploymentType(property0.Value.GetString());
 0182                            continue;
 183                        }
 0184                        if (property0.NameEquals("hostName"))
 185                        {
 0186                            hostName = property0.Value.GetObject();
 0187                            continue;
 188                        }
 0189                        if (property0.NameEquals("port"))
 190                        {
 0191                            port = property0.Value.GetObject();
 0192                            continue;
 193                        }
 0194                        if (property0.NameEquals("serviceUri"))
 195                        {
 0196                            serviceUri = property0.Value.GetObject();
 0197                            continue;
 198                        }
 0199                        if (property0.NameEquals("organizationName"))
 200                        {
 0201                            organizationName = property0.Value.GetObject();
 0202                            continue;
 203                        }
 0204                        if (property0.NameEquals("authenticationType"))
 205                        {
 0206                            authenticationType = new DynamicsAuthenticationType(property0.Value.GetString());
 0207                            continue;
 208                        }
 0209                        if (property0.NameEquals("username"))
 210                        {
 0211                            username = property0.Value.GetObject();
 0212                            continue;
 213                        }
 0214                        if (property0.NameEquals("password"))
 215                        {
 0216                            password = SecretBase.DeserializeSecretBase(property0.Value);
 0217                            continue;
 218                        }
 0219                        if (property0.NameEquals("servicePrincipalId"))
 220                        {
 0221                            servicePrincipalId = property0.Value.GetObject();
 0222                            continue;
 223                        }
 0224                        if (property0.NameEquals("servicePrincipalCredentialType"))
 225                        {
 0226                            servicePrincipalCredentialType = new DynamicsServicePrincipalCredentialType(property0.Value.
 0227                            continue;
 228                        }
 0229                        if (property0.NameEquals("servicePrincipalCredential"))
 230                        {
 0231                            servicePrincipalCredential = SecretBase.DeserializeSecretBase(property0.Value);
 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 CommonDataServiceForAppsLinkedService(type, connectVia.Value, description.Value, Optional.ToDicti
 247        }
 248    }
 249}