< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_Url()-0%100%
get_ServicePrincipalId()-0%100%
get_ServicePrincipalKey()-0%100%
get_Tenant()-0%100%
get_AadResourceId()-0%100%
get_EncryptedCredential()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeDynamicsAXLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\DynamicsAXLinkedService.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> Dynamics AX linked service. </summary>
 14    public partial class DynamicsAXLinkedService : LinkedService
 15    {
 16        /// <summary> Initializes a new instance of DynamicsAXLinkedService. </summary>
 17        /// <param name="url"> The Dynamics AX (or Dynamics 365 Finance and Operations) instance OData endpoint. </param
 18        /// <param name="servicePrincipalId"> Specify the application&apos;s client ID. Type: string (or Expression with
 19        /// <param name="servicePrincipalKey"> Specify the application&apos;s key. Mark this field as a SecureString to 
 20        /// <param name="tenant"> Specify the tenant information (domain name or tenant ID) under which your application
 21        /// <param name="aadResourceId"> Specify the resource you are requesting authorization. Type: string (or Express
 22        /// <exception cref="ArgumentNullException"> <paramref name="url"/>, <paramref name="servicePrincipalId"/>, <par
 023        public DynamicsAXLinkedService(object url, object servicePrincipalId, SecretBase servicePrincipalKey, object ten
 24        {
 025            if (url == null)
 26            {
 027                throw new ArgumentNullException(nameof(url));
 28            }
 029            if (servicePrincipalId == null)
 30            {
 031                throw new ArgumentNullException(nameof(servicePrincipalId));
 32            }
 033            if (servicePrincipalKey == null)
 34            {
 035                throw new ArgumentNullException(nameof(servicePrincipalKey));
 36            }
 037            if (tenant == null)
 38            {
 039                throw new ArgumentNullException(nameof(tenant));
 40            }
 041            if (aadResourceId == null)
 42            {
 043                throw new ArgumentNullException(nameof(aadResourceId));
 44            }
 45
 046            Url = url;
 047            ServicePrincipalId = servicePrincipalId;
 048            ServicePrincipalKey = servicePrincipalKey;
 049            Tenant = tenant;
 050            AadResourceId = aadResourceId;
 051            Type = "DynamicsAX";
 052        }
 53
 54        /// <summary> Initializes a new instance of DynamicsAXLinkedService. </summary>
 55        /// <param name="type"> Type of linked service. </param>
 56        /// <param name="connectVia"> The integration runtime reference. </param>
 57        /// <param name="description"> Linked service description. </param>
 58        /// <param name="parameters"> Parameters for linked service. </param>
 59        /// <param name="annotations"> List of tags that can be used for describing the linked service. </param>
 60        /// <param name="additionalProperties"> . </param>
 61        /// <param name="url"> The Dynamics AX (or Dynamics 365 Finance and Operations) instance OData endpoint. </param
 62        /// <param name="servicePrincipalId"> Specify the application&apos;s client ID. Type: string (or Expression with
 63        /// <param name="servicePrincipalKey"> Specify the application&apos;s key. Mark this field as a SecureString to 
 64        /// <param name="tenant"> Specify the tenant information (domain name or tenant ID) under which your application
 65        /// <param name="aadResourceId"> Specify the resource you are requesting authorization. Type: string (or Express
 66        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 067        internal DynamicsAXLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDicti
 68        {
 069            Url = url;
 070            ServicePrincipalId = servicePrincipalId;
 071            ServicePrincipalKey = servicePrincipalKey;
 072            Tenant = tenant;
 073            AadResourceId = aadResourceId;
 074            EncryptedCredential = encryptedCredential;
 075            Type = type ?? "DynamicsAX";
 076        }
 77
 78        /// <summary> The Dynamics AX (or Dynamics 365 Finance and Operations) instance OData endpoint. </summary>
 079        public object Url { get; set; }
 80        /// <summary> Specify the application&apos;s client ID. Type: string (or Expression with resultType string). </s
 081        public object ServicePrincipalId { get; set; }
 82        /// <summary> Specify the application&apos;s key. Mark this field as a SecureString to store it securely in Data
 083        public SecretBase ServicePrincipalKey { get; set; }
 84        /// <summary> Specify the tenant information (domain name or tenant ID) under which your application resides. Re
 085        public object Tenant { get; set; }
 86        /// <summary> Specify the resource you are requesting authorization. Type: string (or Expression with resultType
 087        public object AadResourceId { get; set; }
 88        /// <summary> The encrypted credential used for authentication. Credentials are encrypted using the integration 
 089        public object EncryptedCredential { get; set; }
 90    }
 91}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\DynamicsAXLinkedService.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 DynamicsAXLinkedService : 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("url");
 055            writer.WriteObjectValue(Url);
 056            writer.WritePropertyName("servicePrincipalId");
 057            writer.WriteObjectValue(ServicePrincipalId);
 058            writer.WritePropertyName("servicePrincipalKey");
 059            writer.WriteObjectValue(ServicePrincipalKey);
 060            writer.WritePropertyName("tenant");
 061            writer.WriteObjectValue(Tenant);
 062            writer.WritePropertyName("aadResourceId");
 063            writer.WriteObjectValue(AadResourceId);
 064            if (Optional.IsDefined(EncryptedCredential))
 65            {
 066                writer.WritePropertyName("encryptedCredential");
 067                writer.WriteObjectValue(EncryptedCredential);
 68            }
 069            writer.WriteEndObject();
 070            foreach (var item in AdditionalProperties)
 71            {
 072                writer.WritePropertyName(item.Key);
 073                writer.WriteObjectValue(item.Value);
 74            }
 075            writer.WriteEndObject();
 076        }
 77
 78        internal static DynamicsAXLinkedService DeserializeDynamicsAXLinkedService(JsonElement element)
 79        {
 080            string type = default;
 081            Optional<IntegrationRuntimeReference> connectVia = default;
 082            Optional<string> description = default;
 083            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 084            Optional<IList<object>> annotations = default;
 085            object url = default;
 086            object servicePrincipalId = default;
 087            SecretBase servicePrincipalKey = default;
 088            object tenant = default;
 089            object aadResourceId = default;
 090            Optional<object> encryptedCredential = default;
 091            IDictionary<string, object> additionalProperties = default;
 092            Dictionary<string, object> additionalPropertiesDictionary = default;
 093            foreach (var property in element.EnumerateObject())
 94            {
 095                if (property.NameEquals("type"))
 96                {
 097                    type = property.Value.GetString();
 098                    continue;
 99                }
 0100                if (property.NameEquals("connectVia"))
 101                {
 0102                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
 0103                    continue;
 104                }
 0105                if (property.NameEquals("description"))
 106                {
 0107                    description = property.Value.GetString();
 0108                    continue;
 109                }
 0110                if (property.NameEquals("parameters"))
 111                {
 0112                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0113                    foreach (var property0 in property.Value.EnumerateObject())
 114                    {
 0115                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 116                    }
 0117                    parameters = dictionary;
 0118                    continue;
 119                }
 0120                if (property.NameEquals("annotations"))
 121                {
 0122                    List<object> array = new List<object>();
 0123                    foreach (var item in property.Value.EnumerateArray())
 124                    {
 0125                        array.Add(item.GetObject());
 126                    }
 0127                    annotations = array;
 0128                    continue;
 129                }
 0130                if (property.NameEquals("typeProperties"))
 131                {
 0132                    foreach (var property0 in property.Value.EnumerateObject())
 133                    {
 0134                        if (property0.NameEquals("url"))
 135                        {
 0136                            url = property0.Value.GetObject();
 0137                            continue;
 138                        }
 0139                        if (property0.NameEquals("servicePrincipalId"))
 140                        {
 0141                            servicePrincipalId = property0.Value.GetObject();
 0142                            continue;
 143                        }
 0144                        if (property0.NameEquals("servicePrincipalKey"))
 145                        {
 0146                            servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value);
 0147                            continue;
 148                        }
 0149                        if (property0.NameEquals("tenant"))
 150                        {
 0151                            tenant = property0.Value.GetObject();
 0152                            continue;
 153                        }
 0154                        if (property0.NameEquals("aadResourceId"))
 155                        {
 0156                            aadResourceId = property0.Value.GetObject();
 0157                            continue;
 158                        }
 0159                        if (property0.NameEquals("encryptedCredential"))
 160                        {
 0161                            encryptedCredential = property0.Value.GetObject();
 162                            continue;
 163                        }
 164                    }
 165                    continue;
 166                }
 0167                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0168                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 169            }
 0170            additionalProperties = additionalPropertiesDictionary;
 0171            return new DynamicsAXLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(paramete
 172        }
 173    }
 174}