< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_Endpoint()-0%100%
get_CompanyId()-0%100%
get_ConsumerKey()-0%100%
get_ConsumerSecret()-0%100%
get_AccessToken()-0%100%
get_AccessTokenSecret()-0%100%
get_UseEncryptedEndpoints()-0%100%
get_EncryptedCredential()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeQuickBooksLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\QuickBooksLinkedService.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> QuickBooks server linked service. </summary>
 14    public partial class QuickBooksLinkedService : LinkedService
 15    {
 16        /// <summary> Initializes a new instance of QuickBooksLinkedService. </summary>
 17        /// <param name="endpoint"> The endpoint of the QuickBooks server. (i.e. quickbooks.api.intuit.com). </param>
 18        /// <param name="companyId"> The company ID of the QuickBooks company to authorize. </param>
 19        /// <param name="consumerKey"> The consumer key for OAuth 1.0 authentication. </param>
 20        /// <param name="consumerSecret"> The consumer secret for OAuth 1.0 authentication. </param>
 21        /// <param name="accessToken"> The access token for OAuth 1.0 authentication. </param>
 22        /// <param name="accessTokenSecret"> The access token secret for OAuth 1.0 authentication. </param>
 23        /// <exception cref="ArgumentNullException"> <paramref name="endpoint"/>, <paramref name="companyId"/>, <paramre
 024        public QuickBooksLinkedService(object endpoint, object companyId, object consumerKey, SecretBase consumerSecret,
 25        {
 026            if (endpoint == null)
 27            {
 028                throw new ArgumentNullException(nameof(endpoint));
 29            }
 030            if (companyId == null)
 31            {
 032                throw new ArgumentNullException(nameof(companyId));
 33            }
 034            if (consumerKey == null)
 35            {
 036                throw new ArgumentNullException(nameof(consumerKey));
 37            }
 038            if (consumerSecret == null)
 39            {
 040                throw new ArgumentNullException(nameof(consumerSecret));
 41            }
 042            if (accessToken == null)
 43            {
 044                throw new ArgumentNullException(nameof(accessToken));
 45            }
 046            if (accessTokenSecret == null)
 47            {
 048                throw new ArgumentNullException(nameof(accessTokenSecret));
 49            }
 50
 051            Endpoint = endpoint;
 052            CompanyId = companyId;
 053            ConsumerKey = consumerKey;
 054            ConsumerSecret = consumerSecret;
 055            AccessToken = accessToken;
 056            AccessTokenSecret = accessTokenSecret;
 057            Type = "QuickBooks";
 058        }
 59
 60        /// <summary> Initializes a new instance of QuickBooksLinkedService. </summary>
 61        /// <param name="type"> Type of linked service. </param>
 62        /// <param name="connectVia"> The integration runtime reference. </param>
 63        /// <param name="description"> Linked service description. </param>
 64        /// <param name="parameters"> Parameters for linked service. </param>
 65        /// <param name="annotations"> List of tags that can be used for describing the linked service. </param>
 66        /// <param name="additionalProperties"> . </param>
 67        /// <param name="endpoint"> The endpoint of the QuickBooks server. (i.e. quickbooks.api.intuit.com). </param>
 68        /// <param name="companyId"> The company ID of the QuickBooks company to authorize. </param>
 69        /// <param name="consumerKey"> The consumer key for OAuth 1.0 authentication. </param>
 70        /// <param name="consumerSecret"> The consumer secret for OAuth 1.0 authentication. </param>
 71        /// <param name="accessToken"> The access token for OAuth 1.0 authentication. </param>
 72        /// <param name="accessTokenSecret"> The access token secret for OAuth 1.0 authentication. </param>
 73        /// <param name="useEncryptedEndpoints"> Specifies whether the data source endpoints are encrypted using HTTPS. 
 74        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 075        internal QuickBooksLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDicti
 76        {
 077            Endpoint = endpoint;
 078            CompanyId = companyId;
 079            ConsumerKey = consumerKey;
 080            ConsumerSecret = consumerSecret;
 081            AccessToken = accessToken;
 082            AccessTokenSecret = accessTokenSecret;
 083            UseEncryptedEndpoints = useEncryptedEndpoints;
 084            EncryptedCredential = encryptedCredential;
 085            Type = type ?? "QuickBooks";
 086        }
 87
 88        /// <summary> The endpoint of the QuickBooks server. (i.e. quickbooks.api.intuit.com). </summary>
 089        public object Endpoint { get; set; }
 90        /// <summary> The company ID of the QuickBooks company to authorize. </summary>
 091        public object CompanyId { get; set; }
 92        /// <summary> The consumer key for OAuth 1.0 authentication. </summary>
 093        public object ConsumerKey { get; set; }
 94        /// <summary> The consumer secret for OAuth 1.0 authentication. </summary>
 095        public SecretBase ConsumerSecret { get; set; }
 96        /// <summary> The access token for OAuth 1.0 authentication. </summary>
 097        public SecretBase AccessToken { get; set; }
 98        /// <summary> The access token secret for OAuth 1.0 authentication. </summary>
 099        public SecretBase AccessTokenSecret { get; set; }
 100        /// <summary> Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. 
 0101        public object UseEncryptedEndpoints { get; set; }
 102        /// <summary> The encrypted credential used for authentication. Credentials are encrypted using the integration 
 0103        public object EncryptedCredential { get; set; }
 104    }
 105}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\QuickBooksLinkedService.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 QuickBooksLinkedService : 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("companyId");
 057            writer.WriteObjectValue(CompanyId);
 058            writer.WritePropertyName("consumerKey");
 059            writer.WriteObjectValue(ConsumerKey);
 060            writer.WritePropertyName("consumerSecret");
 061            writer.WriteObjectValue(ConsumerSecret);
 062            writer.WritePropertyName("accessToken");
 063            writer.WriteObjectValue(AccessToken);
 064            writer.WritePropertyName("accessTokenSecret");
 065            writer.WriteObjectValue(AccessTokenSecret);
 066            if (Optional.IsDefined(UseEncryptedEndpoints))
 67            {
 068                writer.WritePropertyName("useEncryptedEndpoints");
 069                writer.WriteObjectValue(UseEncryptedEndpoints);
 70            }
 071            if (Optional.IsDefined(EncryptedCredential))
 72            {
 073                writer.WritePropertyName("encryptedCredential");
 074                writer.WriteObjectValue(EncryptedCredential);
 75            }
 076            writer.WriteEndObject();
 077            foreach (var item in AdditionalProperties)
 78            {
 079                writer.WritePropertyName(item.Key);
 080                writer.WriteObjectValue(item.Value);
 81            }
 082            writer.WriteEndObject();
 083        }
 84
 85        internal static QuickBooksLinkedService DeserializeQuickBooksLinkedService(JsonElement element)
 86        {
 087            string type = default;
 088            Optional<IntegrationRuntimeReference> connectVia = default;
 089            Optional<string> description = default;
 090            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 091            Optional<IList<object>> annotations = default;
 092            object endpoint = default;
 093            object companyId = default;
 094            object consumerKey = default;
 095            SecretBase consumerSecret = default;
 096            SecretBase accessToken = default;
 097            SecretBase accessTokenSecret = default;
 098            Optional<object> useEncryptedEndpoints = default;
 099            Optional<object> encryptedCredential = default;
 0100            IDictionary<string, object> additionalProperties = default;
 0101            Dictionary<string, object> additionalPropertiesDictionary = default;
 0102            foreach (var property in element.EnumerateObject())
 103            {
 0104                if (property.NameEquals("type"))
 105                {
 0106                    type = property.Value.GetString();
 0107                    continue;
 108                }
 0109                if (property.NameEquals("connectVia"))
 110                {
 0111                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
 0112                    continue;
 113                }
 0114                if (property.NameEquals("description"))
 115                {
 0116                    description = property.Value.GetString();
 0117                    continue;
 118                }
 0119                if (property.NameEquals("parameters"))
 120                {
 0121                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0122                    foreach (var property0 in property.Value.EnumerateObject())
 123                    {
 0124                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 125                    }
 0126                    parameters = dictionary;
 0127                    continue;
 128                }
 0129                if (property.NameEquals("annotations"))
 130                {
 0131                    List<object> array = new List<object>();
 0132                    foreach (var item in property.Value.EnumerateArray())
 133                    {
 0134                        array.Add(item.GetObject());
 135                    }
 0136                    annotations = array;
 0137                    continue;
 138                }
 0139                if (property.NameEquals("typeProperties"))
 140                {
 0141                    foreach (var property0 in property.Value.EnumerateObject())
 142                    {
 0143                        if (property0.NameEquals("endpoint"))
 144                        {
 0145                            endpoint = property0.Value.GetObject();
 0146                            continue;
 147                        }
 0148                        if (property0.NameEquals("companyId"))
 149                        {
 0150                            companyId = property0.Value.GetObject();
 0151                            continue;
 152                        }
 0153                        if (property0.NameEquals("consumerKey"))
 154                        {
 0155                            consumerKey = property0.Value.GetObject();
 0156                            continue;
 157                        }
 0158                        if (property0.NameEquals("consumerSecret"))
 159                        {
 0160                            consumerSecret = SecretBase.DeserializeSecretBase(property0.Value);
 0161                            continue;
 162                        }
 0163                        if (property0.NameEquals("accessToken"))
 164                        {
 0165                            accessToken = SecretBase.DeserializeSecretBase(property0.Value);
 0166                            continue;
 167                        }
 0168                        if (property0.NameEquals("accessTokenSecret"))
 169                        {
 0170                            accessTokenSecret = SecretBase.DeserializeSecretBase(property0.Value);
 0171                            continue;
 172                        }
 0173                        if (property0.NameEquals("useEncryptedEndpoints"))
 174                        {
 0175                            useEncryptedEndpoints = property0.Value.GetObject();
 0176                            continue;
 177                        }
 0178                        if (property0.NameEquals("encryptedCredential"))
 179                        {
 0180                            encryptedCredential = property0.Value.GetObject();
 181                            continue;
 182                        }
 183                    }
 184                    continue;
 185                }
 0186                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0187                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 188            }
 0189            additionalProperties = additionalPropertiesDictionary;
 0190            return new QuickBooksLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(paramete
 191        }
 192    }
 193}