< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_Url()-0%100%
get_Username()-0%100%
get_Password()-0%100%
get_EncryptedCredential()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeSapEccLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SapEccLinkedService.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> Linked service for SAP ERP Central Component(SAP ECC). </summary>
 14    public partial class SapEccLinkedService : LinkedService
 15    {
 16        /// <summary> Initializes a new instance of SapEccLinkedService. </summary>
 17        /// <param name="url"> The URL of SAP ECC OData API. For example, &apos;[https://hostname:port/sap/opu/odata/sap
 18        /// <exception cref="ArgumentNullException"> <paramref name="url"/> is null. </exception>
 019        public SapEccLinkedService(string url)
 20        {
 021            if (url == null)
 22            {
 023                throw new ArgumentNullException(nameof(url));
 24            }
 25
 026            Url = url;
 027            Type = "SapEcc";
 028        }
 29
 30        /// <summary> Initializes a new instance of SapEccLinkedService. </summary>
 31        /// <param name="type"> Type of linked service. </param>
 32        /// <param name="connectVia"> The integration runtime reference. </param>
 33        /// <param name="description"> Linked service description. </param>
 34        /// <param name="parameters"> Parameters for linked service. </param>
 35        /// <param name="annotations"> List of tags that can be used for describing the linked service. </param>
 36        /// <param name="additionalProperties"> . </param>
 37        /// <param name="url"> The URL of SAP ECC OData API. For example, &apos;[https://hostname:port/sap/opu/odata/sap
 38        /// <param name="username"> The username for Basic authentication. Type: string (or Expression with resultType s
 39        /// <param name="password"> The password for Basic authentication. </param>
 40        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 041        internal SapEccLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionar
 42        {
 043            Url = url;
 044            Username = username;
 045            Password = password;
 046            EncryptedCredential = encryptedCredential;
 047            Type = type ?? "SapEcc";
 048        }
 49
 50        /// <summary> The URL of SAP ECC OData API. For example, &apos;[https://hostname:port/sap/opu/odata/sap/servicen
 051        public string Url { get; set; }
 52        /// <summary> The username for Basic authentication. Type: string (or Expression with resultType string). </summ
 053        public string Username { get; set; }
 54        /// <summary> The password for Basic authentication. </summary>
 055        public SecretBase Password { get; set; }
 56        /// <summary> The encrypted credential used for authentication. Credentials are encrypted using the integration 
 057        public string EncryptedCredential { get; set; }
 58    }
 59}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SapEccLinkedService.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 SapEccLinkedService : 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.WriteStringValue(Url);
 056            if (Optional.IsDefined(Username))
 57            {
 058                writer.WritePropertyName("username");
 059                writer.WriteStringValue(Username);
 60            }
 061            if (Optional.IsDefined(Password))
 62            {
 063                writer.WritePropertyName("password");
 064                writer.WriteObjectValue(Password);
 65            }
 066            if (Optional.IsDefined(EncryptedCredential))
 67            {
 068                writer.WritePropertyName("encryptedCredential");
 069                writer.WriteStringValue(EncryptedCredential);
 70            }
 071            writer.WriteEndObject();
 072            foreach (var item in AdditionalProperties)
 73            {
 074                writer.WritePropertyName(item.Key);
 075                writer.WriteObjectValue(item.Value);
 76            }
 077            writer.WriteEndObject();
 078        }
 79
 80        internal static SapEccLinkedService DeserializeSapEccLinkedService(JsonElement element)
 81        {
 082            string type = default;
 083            Optional<IntegrationRuntimeReference> connectVia = default;
 084            Optional<string> description = default;
 085            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 086            Optional<IList<object>> annotations = default;
 087            string url = default;
 088            Optional<string> username = default;
 089            Optional<SecretBase> password = default;
 090            Optional<string> 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.GetString();
 0137                            continue;
 138                        }
 0139                        if (property0.NameEquals("username"))
 140                        {
 0141                            username = property0.Value.GetString();
 0142                            continue;
 143                        }
 0144                        if (property0.NameEquals("password"))
 145                        {
 0146                            password = SecretBase.DeserializeSecretBase(property0.Value);
 0147                            continue;
 148                        }
 0149                        if (property0.NameEquals("encryptedCredential"))
 150                        {
 0151                            encryptedCredential = property0.Value.GetString();
 152                            continue;
 153                        }
 154                    }
 155                    continue;
 156                }
 0157                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0158                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 159            }
 0160            additionalProperties = additionalPropertiesDictionary;
 0161            return new SapEccLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters),
 162        }
 163    }
 164}