< Summary

Class:Azure.Analytics.Synapse.Artifacts.Models.SapBWLinkedService
Assembly:Azure.Analytics.Synapse.Artifacts
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SapBWLinkedService.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SapBWLinkedService.Serialization.cs
Covered lines:0
Uncovered lines:130
Coverable lines:130
Total lines:259
Line coverage:0% (0 of 130)
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_Server()-0%100%
get_SystemNumber()-0%100%
get_ClientId()-0%100%
get_UserName()-0%100%
get_Password()-0%100%
get_EncryptedCredential()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeSapBWLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SapBWLinkedService.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> SAP Business Warehouse Linked Service. </summary>
 14    public partial class SapBWLinkedService : LinkedService
 15    {
 16        /// <summary> Initializes a new instance of SapBWLinkedService. </summary>
 17        /// <param name="server"> Host name of the SAP BW instance. Type: string (or Expression with resultType string).
 18        /// <param name="systemNumber"> System number of the BW system. (Usually a two-digit decimal number represented 
 19        /// <param name="clientId"> Client ID of the client on the BW system. (Usually a three-digit decimal number repr
 20        /// <exception cref="ArgumentNullException"> <paramref name="server"/>, <paramref name="systemNumber"/>, or <par
 021        public SapBWLinkedService(object server, object systemNumber, object clientId)
 22        {
 023            if (server == null)
 24            {
 025                throw new ArgumentNullException(nameof(server));
 26            }
 027            if (systemNumber == null)
 28            {
 029                throw new ArgumentNullException(nameof(systemNumber));
 30            }
 031            if (clientId == null)
 32            {
 033                throw new ArgumentNullException(nameof(clientId));
 34            }
 35
 036            Server = server;
 037            SystemNumber = systemNumber;
 038            ClientId = clientId;
 039            Type = "SapBW";
 040        }
 41
 42        /// <summary> Initializes a new instance of SapBWLinkedService. </summary>
 43        /// <param name="type"> Type of linked service. </param>
 44        /// <param name="connectVia"> The integration runtime reference. </param>
 45        /// <param name="description"> Linked service description. </param>
 46        /// <param name="parameters"> Parameters for linked service. </param>
 47        /// <param name="annotations"> List of tags that can be used for describing the linked service. </param>
 48        /// <param name="additionalProperties"> . </param>
 49        /// <param name="server"> Host name of the SAP BW instance. Type: string (or Expression with resultType string).
 50        /// <param name="systemNumber"> System number of the BW system. (Usually a two-digit decimal number represented 
 51        /// <param name="clientId"> Client ID of the client on the BW system. (Usually a three-digit decimal number repr
 52        /// <param name="userName"> Username to access the SAP BW server. Type: string (or Expression with resultType st
 53        /// <param name="password"> Password to access the SAP BW server. </param>
 54        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 055        internal SapBWLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary
 56        {
 057            Server = server;
 058            SystemNumber = systemNumber;
 059            ClientId = clientId;
 060            UserName = userName;
 061            Password = password;
 062            EncryptedCredential = encryptedCredential;
 063            Type = type ?? "SapBW";
 064        }
 65
 66        /// <summary> Host name of the SAP BW instance. Type: string (or Expression with resultType string). </summary>
 067        public object Server { get; set; }
 68        /// <summary> System number of the BW system. (Usually a two-digit decimal number represented as a string.) Type
 069        public object SystemNumber { get; set; }
 70        /// <summary> Client ID of the client on the BW system. (Usually a three-digit decimal number represented as a s
 071        public object ClientId { get; set; }
 72        /// <summary> Username to access the SAP BW server. Type: string (or Expression with resultType string). </summa
 073        public object UserName { get; set; }
 74        /// <summary> Password to access the SAP BW server. </summary>
 075        public SecretBase Password { get; set; }
 76        /// <summary> The encrypted credential used for authentication. Credentials are encrypted using the integration 
 077        public object EncryptedCredential { get; set; }
 78    }
 79}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SapBWLinkedService.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 SapBWLinkedService : 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("server");
 055            writer.WriteObjectValue(Server);
 056            writer.WritePropertyName("systemNumber");
 057            writer.WriteObjectValue(SystemNumber);
 058            writer.WritePropertyName("clientId");
 059            writer.WriteObjectValue(ClientId);
 060            if (Optional.IsDefined(UserName))
 61            {
 062                writer.WritePropertyName("userName");
 063                writer.WriteObjectValue(UserName);
 64            }
 065            if (Optional.IsDefined(Password))
 66            {
 067                writer.WritePropertyName("password");
 068                writer.WriteObjectValue(Password);
 69            }
 070            if (Optional.IsDefined(EncryptedCredential))
 71            {
 072                writer.WritePropertyName("encryptedCredential");
 073                writer.WriteObjectValue(EncryptedCredential);
 74            }
 075            writer.WriteEndObject();
 076            foreach (var item in AdditionalProperties)
 77            {
 078                writer.WritePropertyName(item.Key);
 079                writer.WriteObjectValue(item.Value);
 80            }
 081            writer.WriteEndObject();
 082        }
 83
 84        internal static SapBWLinkedService DeserializeSapBWLinkedService(JsonElement element)
 85        {
 086            string type = default;
 087            Optional<IntegrationRuntimeReference> connectVia = default;
 088            Optional<string> description = default;
 089            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 090            Optional<IList<object>> annotations = default;
 091            object server = default;
 092            object systemNumber = default;
 093            object clientId = default;
 094            Optional<object> userName = default;
 095            Optional<SecretBase> password = default;
 096            Optional<object> encryptedCredential = default;
 097            IDictionary<string, object> additionalProperties = default;
 098            Dictionary<string, object> additionalPropertiesDictionary = default;
 099            foreach (var property in element.EnumerateObject())
 100            {
 0101                if (property.NameEquals("type"))
 102                {
 0103                    type = property.Value.GetString();
 0104                    continue;
 105                }
 0106                if (property.NameEquals("connectVia"))
 107                {
 0108                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
 0109                    continue;
 110                }
 0111                if (property.NameEquals("description"))
 112                {
 0113                    description = property.Value.GetString();
 0114                    continue;
 115                }
 0116                if (property.NameEquals("parameters"))
 117                {
 0118                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0119                    foreach (var property0 in property.Value.EnumerateObject())
 120                    {
 0121                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 122                    }
 0123                    parameters = dictionary;
 0124                    continue;
 125                }
 0126                if (property.NameEquals("annotations"))
 127                {
 0128                    List<object> array = new List<object>();
 0129                    foreach (var item in property.Value.EnumerateArray())
 130                    {
 0131                        array.Add(item.GetObject());
 132                    }
 0133                    annotations = array;
 0134                    continue;
 135                }
 0136                if (property.NameEquals("typeProperties"))
 137                {
 0138                    foreach (var property0 in property.Value.EnumerateObject())
 139                    {
 0140                        if (property0.NameEquals("server"))
 141                        {
 0142                            server = property0.Value.GetObject();
 0143                            continue;
 144                        }
 0145                        if (property0.NameEquals("systemNumber"))
 146                        {
 0147                            systemNumber = property0.Value.GetObject();
 0148                            continue;
 149                        }
 0150                        if (property0.NameEquals("clientId"))
 151                        {
 0152                            clientId = property0.Value.GetObject();
 0153                            continue;
 154                        }
 0155                        if (property0.NameEquals("userName"))
 156                        {
 0157                            userName = property0.Value.GetObject();
 0158                            continue;
 159                        }
 0160                        if (property0.NameEquals("password"))
 161                        {
 0162                            password = SecretBase.DeserializeSecretBase(property0.Value);
 0163                            continue;
 164                        }
 0165                        if (property0.NameEquals("encryptedCredential"))
 166                        {
 0167                            encryptedCredential = property0.Value.GetObject();
 168                            continue;
 169                        }
 170                    }
 171                    continue;
 172                }
 0173                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0174                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 175            }
 0176            additionalProperties = additionalPropertiesDictionary;
 0177            return new SapBWLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), 
 178        }
 179    }
 180}