< Summary

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

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\XeroLinkedService.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> Xero Service linked service. </summary>
 14    public partial class XeroLinkedService : LinkedService
 15    {
 16        /// <summary> Initializes a new instance of XeroLinkedService. </summary>
 17        /// <param name="host"> The endpoint of the Xero server. (i.e. api.xero.com). </param>
 18        /// <exception cref="ArgumentNullException"> <paramref name="host"/> is null. </exception>
 019        public XeroLinkedService(object host)
 20        {
 021            if (host == null)
 22            {
 023                throw new ArgumentNullException(nameof(host));
 24            }
 25
 026            Host = host;
 027            Type = "Xero";
 028        }
 29
 30        /// <summary> Initializes a new instance of XeroLinkedService. </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 Xero server. (i.e. api.xero.com). </param>
 38        /// <param name="consumerKey"> The consumer key associated with the Xero application. </param>
 39        /// <param name="privateKey">
 40        /// The private key from the .pem file that was generated for your Xero private application. You must include al
 41        /// ).
 42        /// </param>
 43        /// <param name="useEncryptedEndpoints"> Specifies whether the data source endpoints are encrypted using HTTPS. 
 44        /// <param name="useHostVerification"> Specifies whether to require the host name in the server&apos;s certifica
 45        /// <param name="usePeerVerification"> Specifies whether to verify the identity of the server when connecting ov
 46        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 047        internal XeroLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary<
 48        {
 049            Host = host;
 050            ConsumerKey = consumerKey;
 051            PrivateKey = privateKey;
 052            UseEncryptedEndpoints = useEncryptedEndpoints;
 053            UseHostVerification = useHostVerification;
 054            UsePeerVerification = usePeerVerification;
 055            EncryptedCredential = encryptedCredential;
 056            Type = type ?? "Xero";
 057        }
 58
 59        /// <summary> The endpoint of the Xero server. (i.e. api.xero.com). </summary>
 060        public object Host { get; set; }
 61        /// <summary> The consumer key associated with the Xero application. </summary>
 062        public SecretBase ConsumerKey { get; set; }
 63        /// <summary>
 64        /// The private key from the .pem file that was generated for your Xero private application. You must include al
 65        /// ).
 66        /// </summary>
 067        public SecretBase PrivateKey { 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\XeroLinkedService.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 XeroLinkedService : 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(ConsumerKey))
 57            {
 058                writer.WritePropertyName("consumerKey");
 059                writer.WriteObjectValue(ConsumerKey);
 60            }
 061            if (Optional.IsDefined(PrivateKey))
 62            {
 063                writer.WritePropertyName("privateKey");
 064                writer.WriteObjectValue(PrivateKey);
 65            }
 066            if (Optional.IsDefined(UseEncryptedEndpoints))
 67            {
 068                writer.WritePropertyName("useEncryptedEndpoints");
 069                writer.WriteObjectValue(UseEncryptedEndpoints);
 70            }
 071            if (Optional.IsDefined(UseHostVerification))
 72            {
 073                writer.WritePropertyName("useHostVerification");
 074                writer.WriteObjectValue(UseHostVerification);
 75            }
 076            if (Optional.IsDefined(UsePeerVerification))
 77            {
 078                writer.WritePropertyName("usePeerVerification");
 079                writer.WriteObjectValue(UsePeerVerification);
 80            }
 081            if (Optional.IsDefined(EncryptedCredential))
 82            {
 083                writer.WritePropertyName("encryptedCredential");
 084                writer.WriteObjectValue(EncryptedCredential);
 85            }
 086            writer.WriteEndObject();
 087            foreach (var item in AdditionalProperties)
 88            {
 089                writer.WritePropertyName(item.Key);
 090                writer.WriteObjectValue(item.Value);
 91            }
 092            writer.WriteEndObject();
 093        }
 94
 95        internal static XeroLinkedService DeserializeXeroLinkedService(JsonElement element)
 96        {
 097            string type = default;
 098            Optional<IntegrationRuntimeReference> connectVia = default;
 099            Optional<string> description = default;
 0100            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 0101            Optional<IList<object>> annotations = default;
 0102            object host = default;
 0103            Optional<SecretBase> consumerKey = default;
 0104            Optional<SecretBase> privateKey = default;
 0105            Optional<object> useEncryptedEndpoints = default;
 0106            Optional<object> useHostVerification = default;
 0107            Optional<object> usePeerVerification = default;
 0108            Optional<object> encryptedCredential = default;
 0109            IDictionary<string, object> additionalProperties = default;
 0110            Dictionary<string, object> additionalPropertiesDictionary = default;
 0111            foreach (var property in element.EnumerateObject())
 112            {
 0113                if (property.NameEquals("type"))
 114                {
 0115                    type = property.Value.GetString();
 0116                    continue;
 117                }
 0118                if (property.NameEquals("connectVia"))
 119                {
 0120                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
 0121                    continue;
 122                }
 0123                if (property.NameEquals("description"))
 124                {
 0125                    description = property.Value.GetString();
 0126                    continue;
 127                }
 0128                if (property.NameEquals("parameters"))
 129                {
 0130                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0131                    foreach (var property0 in property.Value.EnumerateObject())
 132                    {
 0133                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 134                    }
 0135                    parameters = dictionary;
 0136                    continue;
 137                }
 0138                if (property.NameEquals("annotations"))
 139                {
 0140                    List<object> array = new List<object>();
 0141                    foreach (var item in property.Value.EnumerateArray())
 142                    {
 0143                        array.Add(item.GetObject());
 144                    }
 0145                    annotations = array;
 0146                    continue;
 147                }
 0148                if (property.NameEquals("typeProperties"))
 149                {
 0150                    foreach (var property0 in property.Value.EnumerateObject())
 151                    {
 0152                        if (property0.NameEquals("host"))
 153                        {
 0154                            host = property0.Value.GetObject();
 0155                            continue;
 156                        }
 0157                        if (property0.NameEquals("consumerKey"))
 158                        {
 0159                            consumerKey = SecretBase.DeserializeSecretBase(property0.Value);
 0160                            continue;
 161                        }
 0162                        if (property0.NameEquals("privateKey"))
 163                        {
 0164                            privateKey = SecretBase.DeserializeSecretBase(property0.Value);
 0165                            continue;
 166                        }
 0167                        if (property0.NameEquals("useEncryptedEndpoints"))
 168                        {
 0169                            useEncryptedEndpoints = property0.Value.GetObject();
 0170                            continue;
 171                        }
 0172                        if (property0.NameEquals("useHostVerification"))
 173                        {
 0174                            useHostVerification = property0.Value.GetObject();
 0175                            continue;
 176                        }
 0177                        if (property0.NameEquals("usePeerVerification"))
 178                        {
 0179                            usePeerVerification = property0.Value.GetObject();
 0180                            continue;
 181                        }
 0182                        if (property0.NameEquals("encryptedCredential"))
 183                        {
 0184                            encryptedCredential = property0.Value.GetObject();
 185                            continue;
 186                        }
 187                    }
 188                    continue;
 189                }
 0190                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0191                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 192            }
 0193            additionalProperties = additionalPropertiesDictionary;
 0194            return new XeroLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), O
 195        }
 196    }
 197}