< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_ClientCustomerID()-0%100%
get_DeveloperToken()-0%100%
get_AuthenticationType()-0%100%
get_RefreshToken()-0%100%
get_ClientId()-0%100%
get_ClientSecret()-0%100%
get_Email()-0%100%
get_KeyFilePath()-0%100%
get_TrustedCertPath()-0%100%
get_UseSystemTrustStore()-0%100%
get_EncryptedCredential()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeGoogleAdWordsLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\GoogleAdWordsLinkedService.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> Google AdWords service linked service. </summary>
 14    public partial class GoogleAdWordsLinkedService : LinkedService
 15    {
 16        /// <summary> Initializes a new instance of GoogleAdWordsLinkedService. </summary>
 17        /// <param name="clientCustomerID"> The Client customer ID of the AdWords account that you want to fetch report 
 18        /// <param name="developerToken"> The developer token associated with the manager account that you use to grant 
 19        /// <param name="authenticationType"> The OAuth 2.0 authentication mechanism used for authentication. ServiceAut
 20        /// <exception cref="ArgumentNullException"> <paramref name="clientCustomerID"/> or <paramref name="developerTok
 021        public GoogleAdWordsLinkedService(object clientCustomerID, SecretBase developerToken, GoogleAdWordsAuthenticatio
 22        {
 023            if (clientCustomerID == null)
 24            {
 025                throw new ArgumentNullException(nameof(clientCustomerID));
 26            }
 027            if (developerToken == null)
 28            {
 029                throw new ArgumentNullException(nameof(developerToken));
 30            }
 31
 032            ClientCustomerID = clientCustomerID;
 033            DeveloperToken = developerToken;
 034            AuthenticationType = authenticationType;
 035            Type = "GoogleAdWords";
 036        }
 37
 38        /// <summary> Initializes a new instance of GoogleAdWordsLinkedService. </summary>
 39        /// <param name="type"> Type of linked service. </param>
 40        /// <param name="connectVia"> The integration runtime reference. </param>
 41        /// <param name="description"> Linked service description. </param>
 42        /// <param name="parameters"> Parameters for linked service. </param>
 43        /// <param name="annotations"> List of tags that can be used for describing the linked service. </param>
 44        /// <param name="additionalProperties"> . </param>
 45        /// <param name="clientCustomerID"> The Client customer ID of the AdWords account that you want to fetch report 
 46        /// <param name="developerToken"> The developer token associated with the manager account that you use to grant 
 47        /// <param name="authenticationType"> The OAuth 2.0 authentication mechanism used for authentication. ServiceAut
 48        /// <param name="refreshToken"> The refresh token obtained from Google for authorizing access to AdWords for Use
 49        /// <param name="clientId"> The client id of the google application used to acquire the refresh token. Type: str
 50        /// <param name="clientSecret"> The client secret of the google application used to acquire the refresh token. <
 51        /// <param name="email"> The service account email ID that is used for ServiceAuthentication and can only be use
 52        /// <param name="keyFilePath"> The full path to the .p12 key file that is used to authenticate the service accou
 53        /// <param name="trustedCertPath"> The full path of the .pem file containing trusted CA certificates for verifyi
 54        /// <param name="useSystemTrustStore"> Specifies whether to use a CA certificate from the system trust store or 
 55        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 056        internal GoogleAdWordsLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDi
 57        {
 058            ClientCustomerID = clientCustomerID;
 059            DeveloperToken = developerToken;
 060            AuthenticationType = authenticationType;
 061            RefreshToken = refreshToken;
 062            ClientId = clientId;
 063            ClientSecret = clientSecret;
 064            Email = email;
 065            KeyFilePath = keyFilePath;
 066            TrustedCertPath = trustedCertPath;
 067            UseSystemTrustStore = useSystemTrustStore;
 068            EncryptedCredential = encryptedCredential;
 069            Type = type ?? "GoogleAdWords";
 070        }
 71
 72        /// <summary> The Client customer ID of the AdWords account that you want to fetch report data for. </summary>
 073        public object ClientCustomerID { get; set; }
 74        /// <summary> The developer token associated with the manager account that you use to grant access to the AdWord
 075        public SecretBase DeveloperToken { get; set; }
 76        /// <summary> The OAuth 2.0 authentication mechanism used for authentication. ServiceAuthentication can only be 
 077        public GoogleAdWordsAuthenticationType AuthenticationType { get; set; }
 78        /// <summary> The refresh token obtained from Google for authorizing access to AdWords for UserAuthentication. <
 079        public SecretBase RefreshToken { get; set; }
 80        /// <summary> The client id of the google application used to acquire the refresh token. Type: string (or Expres
 081        public object ClientId { get; set; }
 82        /// <summary> The client secret of the google application used to acquire the refresh token. </summary>
 083        public SecretBase ClientSecret { get; set; }
 84        /// <summary> The service account email ID that is used for ServiceAuthentication and can only be used on self-h
 085        public object Email { get; set; }
 86        /// <summary> The full path to the .p12 key file that is used to authenticate the service account email address 
 087        public object KeyFilePath { get; set; }
 88        /// <summary> The full path of the .pem file containing trusted CA certificates for verifying the server when co
 089        public object TrustedCertPath { get; set; }
 90        /// <summary> Specifies whether to use a CA certificate from the system trust store or from a specified PEM file
 091        public object UseSystemTrustStore { get; set; }
 92        /// <summary> The encrypted credential used for authentication. Credentials are encrypted using the integration 
 093        public object EncryptedCredential { get; set; }
 94    }
 95}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\GoogleAdWordsLinkedService.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 GoogleAdWordsLinkedService : 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("clientCustomerID");
 055            writer.WriteObjectValue(ClientCustomerID);
 056            writer.WritePropertyName("developerToken");
 057            writer.WriteObjectValue(DeveloperToken);
 058            writer.WritePropertyName("authenticationType");
 059            writer.WriteStringValue(AuthenticationType.ToString());
 060            if (Optional.IsDefined(RefreshToken))
 61            {
 062                writer.WritePropertyName("refreshToken");
 063                writer.WriteObjectValue(RefreshToken);
 64            }
 065            if (Optional.IsDefined(ClientId))
 66            {
 067                writer.WritePropertyName("clientId");
 068                writer.WriteObjectValue(ClientId);
 69            }
 070            if (Optional.IsDefined(ClientSecret))
 71            {
 072                writer.WritePropertyName("clientSecret");
 073                writer.WriteObjectValue(ClientSecret);
 74            }
 075            if (Optional.IsDefined(Email))
 76            {
 077                writer.WritePropertyName("email");
 078                writer.WriteObjectValue(Email);
 79            }
 080            if (Optional.IsDefined(KeyFilePath))
 81            {
 082                writer.WritePropertyName("keyFilePath");
 083                writer.WriteObjectValue(KeyFilePath);
 84            }
 085            if (Optional.IsDefined(TrustedCertPath))
 86            {
 087                writer.WritePropertyName("trustedCertPath");
 088                writer.WriteObjectValue(TrustedCertPath);
 89            }
 090            if (Optional.IsDefined(UseSystemTrustStore))
 91            {
 092                writer.WritePropertyName("useSystemTrustStore");
 093                writer.WriteObjectValue(UseSystemTrustStore);
 94            }
 095            if (Optional.IsDefined(EncryptedCredential))
 96            {
 097                writer.WritePropertyName("encryptedCredential");
 098                writer.WriteObjectValue(EncryptedCredential);
 99            }
 0100            writer.WriteEndObject();
 0101            foreach (var item in AdditionalProperties)
 102            {
 0103                writer.WritePropertyName(item.Key);
 0104                writer.WriteObjectValue(item.Value);
 105            }
 0106            writer.WriteEndObject();
 0107        }
 108
 109        internal static GoogleAdWordsLinkedService DeserializeGoogleAdWordsLinkedService(JsonElement element)
 110        {
 0111            string type = default;
 0112            Optional<IntegrationRuntimeReference> connectVia = default;
 0113            Optional<string> description = default;
 0114            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 0115            Optional<IList<object>> annotations = default;
 0116            object clientCustomerID = default;
 0117            SecretBase developerToken = default;
 0118            GoogleAdWordsAuthenticationType authenticationType = default;
 0119            Optional<SecretBase> refreshToken = default;
 0120            Optional<object> clientId = default;
 0121            Optional<SecretBase> clientSecret = default;
 0122            Optional<object> email = default;
 0123            Optional<object> keyFilePath = default;
 0124            Optional<object> trustedCertPath = default;
 0125            Optional<object> useSystemTrustStore = default;
 0126            Optional<object> encryptedCredential = default;
 0127            IDictionary<string, object> additionalProperties = default;
 0128            Dictionary<string, object> additionalPropertiesDictionary = default;
 0129            foreach (var property in element.EnumerateObject())
 130            {
 0131                if (property.NameEquals("type"))
 132                {
 0133                    type = property.Value.GetString();
 0134                    continue;
 135                }
 0136                if (property.NameEquals("connectVia"))
 137                {
 0138                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
 0139                    continue;
 140                }
 0141                if (property.NameEquals("description"))
 142                {
 0143                    description = property.Value.GetString();
 0144                    continue;
 145                }
 0146                if (property.NameEquals("parameters"))
 147                {
 0148                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0149                    foreach (var property0 in property.Value.EnumerateObject())
 150                    {
 0151                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 152                    }
 0153                    parameters = dictionary;
 0154                    continue;
 155                }
 0156                if (property.NameEquals("annotations"))
 157                {
 0158                    List<object> array = new List<object>();
 0159                    foreach (var item in property.Value.EnumerateArray())
 160                    {
 0161                        array.Add(item.GetObject());
 162                    }
 0163                    annotations = array;
 0164                    continue;
 165                }
 0166                if (property.NameEquals("typeProperties"))
 167                {
 0168                    foreach (var property0 in property.Value.EnumerateObject())
 169                    {
 0170                        if (property0.NameEquals("clientCustomerID"))
 171                        {
 0172                            clientCustomerID = property0.Value.GetObject();
 0173                            continue;
 174                        }
 0175                        if (property0.NameEquals("developerToken"))
 176                        {
 0177                            developerToken = SecretBase.DeserializeSecretBase(property0.Value);
 0178                            continue;
 179                        }
 0180                        if (property0.NameEquals("authenticationType"))
 181                        {
 0182                            authenticationType = new GoogleAdWordsAuthenticationType(property0.Value.GetString());
 0183                            continue;
 184                        }
 0185                        if (property0.NameEquals("refreshToken"))
 186                        {
 0187                            refreshToken = SecretBase.DeserializeSecretBase(property0.Value);
 0188                            continue;
 189                        }
 0190                        if (property0.NameEquals("clientId"))
 191                        {
 0192                            clientId = property0.Value.GetObject();
 0193                            continue;
 194                        }
 0195                        if (property0.NameEquals("clientSecret"))
 196                        {
 0197                            clientSecret = SecretBase.DeserializeSecretBase(property0.Value);
 0198                            continue;
 199                        }
 0200                        if (property0.NameEquals("email"))
 201                        {
 0202                            email = property0.Value.GetObject();
 0203                            continue;
 204                        }
 0205                        if (property0.NameEquals("keyFilePath"))
 206                        {
 0207                            keyFilePath = property0.Value.GetObject();
 0208                            continue;
 209                        }
 0210                        if (property0.NameEquals("trustedCertPath"))
 211                        {
 0212                            trustedCertPath = property0.Value.GetObject();
 0213                            continue;
 214                        }
 0215                        if (property0.NameEquals("useSystemTrustStore"))
 216                        {
 0217                            useSystemTrustStore = property0.Value.GetObject();
 0218                            continue;
 219                        }
 0220                        if (property0.NameEquals("encryptedCredential"))
 221                        {
 0222                            encryptedCredential = property0.Value.GetObject();
 223                            continue;
 224                        }
 225                    }
 226                    continue;
 227                }
 0228                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0229                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 230            }
 0231            additionalProperties = additionalPropertiesDictionary;
 0232            return new GoogleAdWordsLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(param
 233        }
 234    }
 235}