< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_Host()-0%100%
get_ClientId()-0%100%
get_ClientSecret()-0%100%
get_UseEncryptedEndpoints()-0%100%
get_UseHostVerification()-0%100%
get_UsePeerVerification()-0%100%
get_EncryptedCredential()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializePaypalLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\PaypalLinkedService.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> Paypal Service linked service. </summary>
 14    public partial class PaypalLinkedService : LinkedService
 15    {
 16        /// <summary> Initializes a new instance of PaypalLinkedService. </summary>
 17        /// <param name="host"> The URL of the PayPal instance. (i.e. api.sandbox.paypal.com). </param>
 18        /// <param name="clientId"> The client ID associated with your PayPal application. </param>
 19        /// <exception cref="ArgumentNullException"> <paramref name="host"/> or <paramref name="clientId"/> is null. </e
 020        public PaypalLinkedService(object host, object clientId)
 21        {
 022            if (host == null)
 23            {
 024                throw new ArgumentNullException(nameof(host));
 25            }
 026            if (clientId == null)
 27            {
 028                throw new ArgumentNullException(nameof(clientId));
 29            }
 30
 031            Host = host;
 032            ClientId = clientId;
 033            Type = "Paypal";
 034        }
 35
 36        /// <summary> Initializes a new instance of PaypalLinkedService. </summary>
 37        /// <param name="type"> Type of linked service. </param>
 38        /// <param name="connectVia"> The integration runtime reference. </param>
 39        /// <param name="description"> Linked service description. </param>
 40        /// <param name="parameters"> Parameters for linked service. </param>
 41        /// <param name="annotations"> List of tags that can be used for describing the linked service. </param>
 42        /// <param name="additionalProperties"> . </param>
 43        /// <param name="host"> The URL of the PayPal instance. (i.e. api.sandbox.paypal.com). </param>
 44        /// <param name="clientId"> The client ID associated with your PayPal application. </param>
 45        /// <param name="clientSecret"> The client secret associated with your PayPal application. </param>
 46        /// <param name="useEncryptedEndpoints"> Specifies whether the data source endpoints are encrypted using HTTPS. 
 47        /// <param name="useHostVerification"> Specifies whether to require the host name in the server&apos;s certifica
 48        /// <param name="usePeerVerification"> Specifies whether to verify the identity of the server when connecting ov
 49        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 050        internal PaypalLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionar
 51        {
 052            Host = host;
 053            ClientId = clientId;
 054            ClientSecret = clientSecret;
 055            UseEncryptedEndpoints = useEncryptedEndpoints;
 056            UseHostVerification = useHostVerification;
 057            UsePeerVerification = usePeerVerification;
 058            EncryptedCredential = encryptedCredential;
 059            Type = type ?? "Paypal";
 060        }
 61
 62        /// <summary> The URL of the PayPal instance. (i.e. api.sandbox.paypal.com). </summary>
 063        public object Host { get; set; }
 64        /// <summary> The client ID associated with your PayPal application. </summary>
 065        public object ClientId { get; set; }
 66        /// <summary> The client secret associated with your PayPal application. </summary>
 067        public SecretBase ClientSecret { get; set; }
 68        /// <summary> Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. 
 069        public object UseEncryptedEndpoints { get; set; }
 70        /// <summary> Specifies whether to require the host name in the server&apos;s certificate to match the host name
 071        public object UseHostVerification { get; set; }
 72        /// <summary> Specifies whether to verify the identity of the server when connecting over SSL. The default value
 073        public object UsePeerVerification { get; set; }
 74        /// <summary> The encrypted credential used for authentication. Credentials are encrypted using the integration 
 075        public object EncryptedCredential { get; set; }
 76    }
 77}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\PaypalLinkedService.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 PaypalLinkedService : 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("host");
 055            writer.WriteObjectValue(Host);
 056            writer.WritePropertyName("clientId");
 057            writer.WriteObjectValue(ClientId);
 058            if (Optional.IsDefined(ClientSecret))
 59            {
 060                writer.WritePropertyName("clientSecret");
 061                writer.WriteObjectValue(ClientSecret);
 62            }
 063            if (Optional.IsDefined(UseEncryptedEndpoints))
 64            {
 065                writer.WritePropertyName("useEncryptedEndpoints");
 066                writer.WriteObjectValue(UseEncryptedEndpoints);
 67            }
 068            if (Optional.IsDefined(UseHostVerification))
 69            {
 070                writer.WritePropertyName("useHostVerification");
 071                writer.WriteObjectValue(UseHostVerification);
 72            }
 073            if (Optional.IsDefined(UsePeerVerification))
 74            {
 075                writer.WritePropertyName("usePeerVerification");
 076                writer.WriteObjectValue(UsePeerVerification);
 77            }
 078            if (Optional.IsDefined(EncryptedCredential))
 79            {
 080                writer.WritePropertyName("encryptedCredential");
 081                writer.WriteObjectValue(EncryptedCredential);
 82            }
 083            writer.WriteEndObject();
 084            foreach (var item in AdditionalProperties)
 85            {
 086                writer.WritePropertyName(item.Key);
 087                writer.WriteObjectValue(item.Value);
 88            }
 089            writer.WriteEndObject();
 090        }
 91
 92        internal static PaypalLinkedService DeserializePaypalLinkedService(JsonElement element)
 93        {
 094            string type = default;
 095            Optional<IntegrationRuntimeReference> connectVia = default;
 096            Optional<string> description = default;
 097            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 098            Optional<IList<object>> annotations = default;
 099            object host = default;
 0100            object clientId = default;
 0101            Optional<SecretBase> clientSecret = default;
 0102            Optional<object> useEncryptedEndpoints = default;
 0103            Optional<object> useHostVerification = default;
 0104            Optional<object> usePeerVerification = 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("host"))
 150                        {
 0151                            host = property0.Value.GetObject();
 0152                            continue;
 153                        }
 0154                        if (property0.NameEquals("clientId"))
 155                        {
 0156                            clientId = property0.Value.GetObject();
 0157                            continue;
 158                        }
 0159                        if (property0.NameEquals("clientSecret"))
 160                        {
 0161                            clientSecret = SecretBase.DeserializeSecretBase(property0.Value);
 0162                            continue;
 163                        }
 0164                        if (property0.NameEquals("useEncryptedEndpoints"))
 165                        {
 0166                            useEncryptedEndpoints = property0.Value.GetObject();
 0167                            continue;
 168                        }
 0169                        if (property0.NameEquals("useHostVerification"))
 170                        {
 0171                            useHostVerification = property0.Value.GetObject();
 0172                            continue;
 173                        }
 0174                        if (property0.NameEquals("usePeerVerification"))
 175                        {
 0176                            usePeerVerification = property0.Value.GetObject();
 0177                            continue;
 178                        }
 0179                        if (property0.NameEquals("encryptedCredential"))
 180                        {
 0181                            encryptedCredential = property0.Value.GetObject();
 182                            continue;
 183                        }
 184                    }
 185                    continue;
 186                }
 0187                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0188                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 189            }
 0190            additionalProperties = additionalPropertiesDictionary;
 0191            return new PaypalLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters),
 192        }
 193    }
 194}