< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_Endpoint()-0%100%
get_MarketplaceID()-0%100%
get_SellerID()-0%100%
get_MwsAuthToken()-0%100%
get_AccessKeyId()-0%100%
get_SecretKey()-0%100%
get_UseEncryptedEndpoints()-0%100%
get_UseHostVerification()-0%100%
get_UsePeerVerification()-0%100%
get_EncryptedCredential()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeAmazonMWSLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AmazonMWSLinkedService.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> Amazon Marketplace Web Service linked service. </summary>
 14    public partial class AmazonMWSLinkedService : LinkedService
 15    {
 16        /// <summary> Initializes a new instance of AmazonMWSLinkedService. </summary>
 17        /// <param name="endpoint"> The endpoint of the Amazon MWS server, (i.e. mws.amazonservices.com). </param>
 18        /// <param name="marketplaceID"> The Amazon Marketplace ID you want to retrieve data from. To retrieve data from
 19        /// <param name="sellerID"> The Amazon seller ID. </param>
 20        /// <param name="accessKeyId"> The access key id used to access data. </param>
 21        /// <exception cref="ArgumentNullException"> <paramref name="endpoint"/>, <paramref name="marketplaceID"/>, <par
 022        public AmazonMWSLinkedService(object endpoint, object marketplaceID, object sellerID, object accessKeyId)
 23        {
 024            if (endpoint == null)
 25            {
 026                throw new ArgumentNullException(nameof(endpoint));
 27            }
 028            if (marketplaceID == null)
 29            {
 030                throw new ArgumentNullException(nameof(marketplaceID));
 31            }
 032            if (sellerID == null)
 33            {
 034                throw new ArgumentNullException(nameof(sellerID));
 35            }
 036            if (accessKeyId == null)
 37            {
 038                throw new ArgumentNullException(nameof(accessKeyId));
 39            }
 40
 041            Endpoint = endpoint;
 042            MarketplaceID = marketplaceID;
 043            SellerID = sellerID;
 044            AccessKeyId = accessKeyId;
 045            Type = "AmazonMWS";
 046        }
 47
 48        /// <summary> Initializes a new instance of AmazonMWSLinkedService. </summary>
 49        /// <param name="type"> Type of linked service. </param>
 50        /// <param name="connectVia"> The integration runtime reference. </param>
 51        /// <param name="description"> Linked service description. </param>
 52        /// <param name="parameters"> Parameters for linked service. </param>
 53        /// <param name="annotations"> List of tags that can be used for describing the linked service. </param>
 54        /// <param name="additionalProperties"> . </param>
 55        /// <param name="endpoint"> The endpoint of the Amazon MWS server, (i.e. mws.amazonservices.com). </param>
 56        /// <param name="marketplaceID"> The Amazon Marketplace ID you want to retrieve data from. To retrieve data from
 57        /// <param name="sellerID"> The Amazon seller ID. </param>
 58        /// <param name="mwsAuthToken"> The Amazon MWS authentication token. </param>
 59        /// <param name="accessKeyId"> The access key id used to access data. </param>
 60        /// <param name="secretKey"> The secret key used to access data. </param>
 61        /// <param name="useEncryptedEndpoints"> Specifies whether the data source endpoints are encrypted using HTTPS. 
 62        /// <param name="useHostVerification"> Specifies whether to require the host name in the server&apos;s certifica
 63        /// <param name="usePeerVerification"> Specifies whether to verify the identity of the server when connecting ov
 64        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 065        internal AmazonMWSLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictio
 66        {
 067            Endpoint = endpoint;
 068            MarketplaceID = marketplaceID;
 069            SellerID = sellerID;
 070            MwsAuthToken = mwsAuthToken;
 071            AccessKeyId = accessKeyId;
 072            SecretKey = secretKey;
 073            UseEncryptedEndpoints = useEncryptedEndpoints;
 074            UseHostVerification = useHostVerification;
 075            UsePeerVerification = usePeerVerification;
 076            EncryptedCredential = encryptedCredential;
 077            Type = type ?? "AmazonMWS";
 078        }
 79
 80        /// <summary> The endpoint of the Amazon MWS server, (i.e. mws.amazonservices.com). </summary>
 081        public object Endpoint { get; set; }
 82        /// <summary> The Amazon Marketplace ID you want to retrieve data from. To retrieve data from multiple Marketpla
 083        public object MarketplaceID { get; set; }
 84        /// <summary> The Amazon seller ID. </summary>
 085        public object SellerID { get; set; }
 86        /// <summary> The Amazon MWS authentication token. </summary>
 087        public SecretBase MwsAuthToken { get; set; }
 88        /// <summary> The access key id used to access data. </summary>
 089        public object AccessKeyId { get; set; }
 90        /// <summary> The secret key used to access data. </summary>
 091        public SecretBase SecretKey { get; set; }
 92        /// <summary> Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. 
 093        public object UseEncryptedEndpoints { get; set; }
 94        /// <summary> Specifies whether to require the host name in the server&apos;s certificate to match the host name
 095        public object UseHostVerification { get; set; }
 96        /// <summary> Specifies whether to verify the identity of the server when connecting over SSL. The default value
 097        public object UsePeerVerification { get; set; }
 98        /// <summary> The encrypted credential used for authentication. Credentials are encrypted using the integration 
 099        public object EncryptedCredential { get; set; }
 100    }
 101}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AmazonMWSLinkedService.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 AmazonMWSLinkedService : 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("endpoint");
 055            writer.WriteObjectValue(Endpoint);
 056            writer.WritePropertyName("marketplaceID");
 057            writer.WriteObjectValue(MarketplaceID);
 058            writer.WritePropertyName("sellerID");
 059            writer.WriteObjectValue(SellerID);
 060            if (Optional.IsDefined(MwsAuthToken))
 61            {
 062                writer.WritePropertyName("mwsAuthToken");
 063                writer.WriteObjectValue(MwsAuthToken);
 64            }
 065            writer.WritePropertyName("accessKeyId");
 066            writer.WriteObjectValue(AccessKeyId);
 067            if (Optional.IsDefined(SecretKey))
 68            {
 069                writer.WritePropertyName("secretKey");
 070                writer.WriteObjectValue(SecretKey);
 71            }
 072            if (Optional.IsDefined(UseEncryptedEndpoints))
 73            {
 074                writer.WritePropertyName("useEncryptedEndpoints");
 075                writer.WriteObjectValue(UseEncryptedEndpoints);
 76            }
 077            if (Optional.IsDefined(UseHostVerification))
 78            {
 079                writer.WritePropertyName("useHostVerification");
 080                writer.WriteObjectValue(UseHostVerification);
 81            }
 082            if (Optional.IsDefined(UsePeerVerification))
 83            {
 084                writer.WritePropertyName("usePeerVerification");
 085                writer.WriteObjectValue(UsePeerVerification);
 86            }
 087            if (Optional.IsDefined(EncryptedCredential))
 88            {
 089                writer.WritePropertyName("encryptedCredential");
 090                writer.WriteObjectValue(EncryptedCredential);
 91            }
 092            writer.WriteEndObject();
 093            foreach (var item in AdditionalProperties)
 94            {
 095                writer.WritePropertyName(item.Key);
 096                writer.WriteObjectValue(item.Value);
 97            }
 098            writer.WriteEndObject();
 099        }
 100
 101        internal static AmazonMWSLinkedService DeserializeAmazonMWSLinkedService(JsonElement element)
 102        {
 0103            string type = default;
 0104            Optional<IntegrationRuntimeReference> connectVia = default;
 0105            Optional<string> description = default;
 0106            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 0107            Optional<IList<object>> annotations = default;
 0108            object endpoint = default;
 0109            object marketplaceID = default;
 0110            object sellerID = default;
 0111            Optional<SecretBase> mwsAuthToken = default;
 0112            object accessKeyId = default;
 0113            Optional<SecretBase> secretKey = default;
 0114            Optional<object> useEncryptedEndpoints = default;
 0115            Optional<object> useHostVerification = default;
 0116            Optional<object> usePeerVerification = default;
 0117            Optional<object> encryptedCredential = default;
 0118            IDictionary<string, object> additionalProperties = default;
 0119            Dictionary<string, object> additionalPropertiesDictionary = default;
 0120            foreach (var property in element.EnumerateObject())
 121            {
 0122                if (property.NameEquals("type"))
 123                {
 0124                    type = property.Value.GetString();
 0125                    continue;
 126                }
 0127                if (property.NameEquals("connectVia"))
 128                {
 0129                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
 0130                    continue;
 131                }
 0132                if (property.NameEquals("description"))
 133                {
 0134                    description = property.Value.GetString();
 0135                    continue;
 136                }
 0137                if (property.NameEquals("parameters"))
 138                {
 0139                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0140                    foreach (var property0 in property.Value.EnumerateObject())
 141                    {
 0142                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 143                    }
 0144                    parameters = dictionary;
 0145                    continue;
 146                }
 0147                if (property.NameEquals("annotations"))
 148                {
 0149                    List<object> array = new List<object>();
 0150                    foreach (var item in property.Value.EnumerateArray())
 151                    {
 0152                        array.Add(item.GetObject());
 153                    }
 0154                    annotations = array;
 0155                    continue;
 156                }
 0157                if (property.NameEquals("typeProperties"))
 158                {
 0159                    foreach (var property0 in property.Value.EnumerateObject())
 160                    {
 0161                        if (property0.NameEquals("endpoint"))
 162                        {
 0163                            endpoint = property0.Value.GetObject();
 0164                            continue;
 165                        }
 0166                        if (property0.NameEquals("marketplaceID"))
 167                        {
 0168                            marketplaceID = property0.Value.GetObject();
 0169                            continue;
 170                        }
 0171                        if (property0.NameEquals("sellerID"))
 172                        {
 0173                            sellerID = property0.Value.GetObject();
 0174                            continue;
 175                        }
 0176                        if (property0.NameEquals("mwsAuthToken"))
 177                        {
 0178                            mwsAuthToken = SecretBase.DeserializeSecretBase(property0.Value);
 0179                            continue;
 180                        }
 0181                        if (property0.NameEquals("accessKeyId"))
 182                        {
 0183                            accessKeyId = property0.Value.GetObject();
 0184                            continue;
 185                        }
 0186                        if (property0.NameEquals("secretKey"))
 187                        {
 0188                            secretKey = SecretBase.DeserializeSecretBase(property0.Value);
 0189                            continue;
 190                        }
 0191                        if (property0.NameEquals("useEncryptedEndpoints"))
 192                        {
 0193                            useEncryptedEndpoints = property0.Value.GetObject();
 0194                            continue;
 195                        }
 0196                        if (property0.NameEquals("useHostVerification"))
 197                        {
 0198                            useHostVerification = property0.Value.GetObject();
 0199                            continue;
 200                        }
 0201                        if (property0.NameEquals("usePeerVerification"))
 202                        {
 0203                            usePeerVerification = property0.Value.GetObject();
 0204                            continue;
 205                        }
 0206                        if (property0.NameEquals("encryptedCredential"))
 207                        {
 0208                            encryptedCredential = property0.Value.GetObject();
 209                            continue;
 210                        }
 211                    }
 212                    continue;
 213                }
 0214                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0215                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 216            }
 0217            additionalProperties = additionalPropertiesDictionary;
 0218            return new AmazonMWSLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameter
 219        }
 220    }
 221}