< Summary

Class:Azure.Analytics.Synapse.Artifacts.Models.ShopifyLinkedService
Assembly:Azure.Analytics.Synapse.Artifacts
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\ShopifyLinkedService.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\ShopifyLinkedService.Serialization.cs
Covered lines:0
Uncovered lines:126
Coverable lines:126
Total lines:253
Line coverage:0% (0 of 126)
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_Host()-0%100%
get_AccessToken()-0%100%
get_UseEncryptedEndpoints()-0%100%
get_UseHostVerification()-0%100%
get_UsePeerVerification()-0%100%
get_EncryptedCredential()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeShopifyLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\ShopifyLinkedService.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> Shopify Service linked service. </summary>
 14    public partial class ShopifyLinkedService : LinkedService
 15    {
 16        /// <summary> Initializes a new instance of ShopifyLinkedService. </summary>
 17        /// <param name="host"> The endpoint of the Shopify server. (i.e. mystore.myshopify.com). </param>
 18        /// <exception cref="ArgumentNullException"> <paramref name="host"/> is null. </exception>
 019        public ShopifyLinkedService(object host)
 20        {
 021            if (host == null)
 22            {
 023                throw new ArgumentNullException(nameof(host));
 24            }
 25
 026            Host = host;
 027            Type = "Shopify";
 028        }
 29
 30        /// <summary> Initializes a new instance of ShopifyLinkedService. </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="host"> The endpoint of the Shopify server. (i.e. mystore.myshopify.com). </param>
 38        /// <param name="accessToken"> The API access token that can be used to access Shopify’s data. The token won&apo
 39        /// <param name="useEncryptedEndpoints"> Specifies whether the data source endpoints are encrypted using HTTPS. 
 40        /// <param name="useHostVerification"> Specifies whether to require the host name in the server&apos;s certifica
 41        /// <param name="usePeerVerification"> Specifies whether to verify the identity of the server when connecting ov
 42        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 043        internal ShopifyLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictiona
 44        {
 045            Host = host;
 046            AccessToken = accessToken;
 047            UseEncryptedEndpoints = useEncryptedEndpoints;
 048            UseHostVerification = useHostVerification;
 049            UsePeerVerification = usePeerVerification;
 050            EncryptedCredential = encryptedCredential;
 051            Type = type ?? "Shopify";
 052        }
 53
 54        /// <summary> The endpoint of the Shopify server. (i.e. mystore.myshopify.com). </summary>
 055        public object Host { get; set; }
 56        /// <summary> The API access token that can be used to access Shopify’s data. The token won&apos;t expire if it 
 057        public SecretBase AccessToken { get; set; }
 58        /// <summary> Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. 
 059        public object UseEncryptedEndpoints { get; set; }
 60        /// <summary> Specifies whether to require the host name in the server&apos;s certificate to match the host name
 061        public object UseHostVerification { get; set; }
 62        /// <summary> Specifies whether to verify the identity of the server when connecting over SSL. The default value
 063        public object UsePeerVerification { get; set; }
 64        /// <summary> The encrypted credential used for authentication. Credentials are encrypted using the integration 
 065        public object EncryptedCredential { get; set; }
 66    }
 67}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\ShopifyLinkedService.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 ShopifyLinkedService : 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            if (Optional.IsDefined(AccessToken))
 57            {
 058                writer.WritePropertyName("accessToken");
 059                writer.WriteObjectValue(AccessToken);
 60            }
 061            if (Optional.IsDefined(UseEncryptedEndpoints))
 62            {
 063                writer.WritePropertyName("useEncryptedEndpoints");
 064                writer.WriteObjectValue(UseEncryptedEndpoints);
 65            }
 066            if (Optional.IsDefined(UseHostVerification))
 67            {
 068                writer.WritePropertyName("useHostVerification");
 069                writer.WriteObjectValue(UseHostVerification);
 70            }
 071            if (Optional.IsDefined(UsePeerVerification))
 72            {
 073                writer.WritePropertyName("usePeerVerification");
 074                writer.WriteObjectValue(UsePeerVerification);
 75            }
 076            if (Optional.IsDefined(EncryptedCredential))
 77            {
 078                writer.WritePropertyName("encryptedCredential");
 079                writer.WriteObjectValue(EncryptedCredential);
 80            }
 081            writer.WriteEndObject();
 082            foreach (var item in AdditionalProperties)
 83            {
 084                writer.WritePropertyName(item.Key);
 085                writer.WriteObjectValue(item.Value);
 86            }
 087            writer.WriteEndObject();
 088        }
 89
 90        internal static ShopifyLinkedService DeserializeShopifyLinkedService(JsonElement element)
 91        {
 092            string type = default;
 093            Optional<IntegrationRuntimeReference> connectVia = default;
 094            Optional<string> description = default;
 095            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 096            Optional<IList<object>> annotations = default;
 097            object host = default;
 098            Optional<SecretBase> accessToken = default;
 099            Optional<object> useEncryptedEndpoints = default;
 0100            Optional<object> useHostVerification = default;
 0101            Optional<object> usePeerVerification = default;
 0102            Optional<object> encryptedCredential = default;
 0103            IDictionary<string, object> additionalProperties = default;
 0104            Dictionary<string, object> additionalPropertiesDictionary = default;
 0105            foreach (var property in element.EnumerateObject())
 106            {
 0107                if (property.NameEquals("type"))
 108                {
 0109                    type = property.Value.GetString();
 0110                    continue;
 111                }
 0112                if (property.NameEquals("connectVia"))
 113                {
 0114                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
 0115                    continue;
 116                }
 0117                if (property.NameEquals("description"))
 118                {
 0119                    description = property.Value.GetString();
 0120                    continue;
 121                }
 0122                if (property.NameEquals("parameters"))
 123                {
 0124                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0125                    foreach (var property0 in property.Value.EnumerateObject())
 126                    {
 0127                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 128                    }
 0129                    parameters = dictionary;
 0130                    continue;
 131                }
 0132                if (property.NameEquals("annotations"))
 133                {
 0134                    List<object> array = new List<object>();
 0135                    foreach (var item in property.Value.EnumerateArray())
 136                    {
 0137                        array.Add(item.GetObject());
 138                    }
 0139                    annotations = array;
 0140                    continue;
 141                }
 0142                if (property.NameEquals("typeProperties"))
 143                {
 0144                    foreach (var property0 in property.Value.EnumerateObject())
 145                    {
 0146                        if (property0.NameEquals("host"))
 147                        {
 0148                            host = property0.Value.GetObject();
 0149                            continue;
 150                        }
 0151                        if (property0.NameEquals("accessToken"))
 152                        {
 0153                            accessToken = SecretBase.DeserializeSecretBase(property0.Value);
 0154                            continue;
 155                        }
 0156                        if (property0.NameEquals("useEncryptedEndpoints"))
 157                        {
 0158                            useEncryptedEndpoints = property0.Value.GetObject();
 0159                            continue;
 160                        }
 0161                        if (property0.NameEquals("useHostVerification"))
 162                        {
 0163                            useHostVerification = property0.Value.GetObject();
 0164                            continue;
 165                        }
 0166                        if (property0.NameEquals("usePeerVerification"))
 167                        {
 0168                            usePeerVerification = property0.Value.GetObject();
 0169                            continue;
 170                        }
 0171                        if (property0.NameEquals("encryptedCredential"))
 172                        {
 0173                            encryptedCredential = property0.Value.GetObject();
 174                            continue;
 175                        }
 176                    }
 177                    continue;
 178                }
 0179                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0180                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 181            }
 0182            additionalProperties = additionalPropertiesDictionary;
 0183            return new ShopifyLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters)
 184        }
 185    }
 186}