< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_Project()-0%100%
get_AdditionalProjects()-0%100%
get_RequestGoogleDriveScope()-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%
DeserializeGoogleBigQueryLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\GoogleBigQueryLinkedService.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 BigQuery service linked service. </summary>
 14    public partial class GoogleBigQueryLinkedService : LinkedService
 15    {
 16        /// <summary> Initializes a new instance of GoogleBigQueryLinkedService. </summary>
 17        /// <param name="project"> The default BigQuery project to query against. </param>
 18        /// <param name="authenticationType"> The OAuth 2.0 authentication mechanism used for authentication. ServiceAut
 19        /// <exception cref="ArgumentNullException"> <paramref name="project"/> is null. </exception>
 020        public GoogleBigQueryLinkedService(object project, GoogleBigQueryAuthenticationType authenticationType)
 21        {
 022            if (project == null)
 23            {
 024                throw new ArgumentNullException(nameof(project));
 25            }
 26
 027            Project = project;
 028            AuthenticationType = authenticationType;
 029            Type = "GoogleBigQuery";
 030        }
 31
 32        /// <summary> Initializes a new instance of GoogleBigQueryLinkedService. </summary>
 33        /// <param name="type"> Type of linked service. </param>
 34        /// <param name="connectVia"> The integration runtime reference. </param>
 35        /// <param name="description"> Linked service description. </param>
 36        /// <param name="parameters"> Parameters for linked service. </param>
 37        /// <param name="annotations"> List of tags that can be used for describing the linked service. </param>
 38        /// <param name="additionalProperties"> . </param>
 39        /// <param name="project"> The default BigQuery project to query against. </param>
 40        /// <param name="additionalProjects"> A comma-separated list of public BigQuery projects to access. </param>
 41        /// <param name="requestGoogleDriveScope"> Whether to request access to Google Drive. Allowing Google Drive acce
 42        /// <param name="authenticationType"> The OAuth 2.0 authentication mechanism used for authentication. ServiceAut
 43        /// <param name="refreshToken"> The refresh token obtained from Google for authorizing access to BigQuery for Us
 44        /// <param name="clientId"> The client id of the google application used to acquire the refresh token. Type: str
 45        /// <param name="clientSecret"> The client secret of the google application used to acquire the refresh token. <
 46        /// <param name="email"> The service account email ID that is used for ServiceAuthentication and can only be use
 47        /// <param name="keyFilePath"> The full path to the .p12 key file that is used to authenticate the service accou
 48        /// <param name="trustedCertPath"> The full path of the .pem file containing trusted CA certificates for verifyi
 49        /// <param name="useSystemTrustStore"> Specifies whether to use a CA certificate from the system trust store or 
 50        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 051        internal GoogleBigQueryLinkedService(string type, IntegrationRuntimeReference connectVia, string description, ID
 52        {
 053            Project = project;
 054            AdditionalProjects = additionalProjects;
 055            RequestGoogleDriveScope = requestGoogleDriveScope;
 056            AuthenticationType = authenticationType;
 057            RefreshToken = refreshToken;
 058            ClientId = clientId;
 059            ClientSecret = clientSecret;
 060            Email = email;
 061            KeyFilePath = keyFilePath;
 062            TrustedCertPath = trustedCertPath;
 063            UseSystemTrustStore = useSystemTrustStore;
 064            EncryptedCredential = encryptedCredential;
 065            Type = type ?? "GoogleBigQuery";
 066        }
 67
 68        /// <summary> The default BigQuery project to query against. </summary>
 069        public object Project { get; set; }
 70        /// <summary> A comma-separated list of public BigQuery projects to access. </summary>
 071        public object AdditionalProjects { get; set; }
 72        /// <summary> Whether to request access to Google Drive. Allowing Google Drive access enables support for federa
 073        public object RequestGoogleDriveScope { get; set; }
 74        /// <summary> The OAuth 2.0 authentication mechanism used for authentication. ServiceAuthentication can only be 
 075        public GoogleBigQueryAuthenticationType AuthenticationType { get; set; }
 76        /// <summary> The refresh token obtained from Google for authorizing access to BigQuery for UserAuthentication. 
 077        public SecretBase RefreshToken { get; set; }
 78        /// <summary> The client id of the google application used to acquire the refresh token. Type: string (or Expres
 079        public object ClientId { get; set; }
 80        /// <summary> The client secret of the google application used to acquire the refresh token. </summary>
 081        public SecretBase ClientSecret { get; set; }
 82        /// <summary> The service account email ID that is used for ServiceAuthentication and can only be used on self-h
 083        public object Email { get; set; }
 84        /// <summary> The full path to the .p12 key file that is used to authenticate the service account email address 
 085        public object KeyFilePath { get; set; }
 86        /// <summary> The full path of the .pem file containing trusted CA certificates for verifying the server when co
 087        public object TrustedCertPath { get; set; }
 88        /// <summary> Specifies whether to use a CA certificate from the system trust store or from a specified PEM file
 089        public object UseSystemTrustStore { get; set; }
 90        /// <summary> The encrypted credential used for authentication. Credentials are encrypted using the integration 
 091        public object EncryptedCredential { get; set; }
 92    }
 93}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\GoogleBigQueryLinkedService.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 GoogleBigQueryLinkedService : 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("project");
 055            writer.WriteObjectValue(Project);
 056            if (Optional.IsDefined(AdditionalProjects))
 57            {
 058                writer.WritePropertyName("additionalProjects");
 059                writer.WriteObjectValue(AdditionalProjects);
 60            }
 061            if (Optional.IsDefined(RequestGoogleDriveScope))
 62            {
 063                writer.WritePropertyName("requestGoogleDriveScope");
 064                writer.WriteObjectValue(RequestGoogleDriveScope);
 65            }
 066            writer.WritePropertyName("authenticationType");
 067            writer.WriteStringValue(AuthenticationType.ToString());
 068            if (Optional.IsDefined(RefreshToken))
 69            {
 070                writer.WritePropertyName("refreshToken");
 071                writer.WriteObjectValue(RefreshToken);
 72            }
 073            if (Optional.IsDefined(ClientId))
 74            {
 075                writer.WritePropertyName("clientId");
 076                writer.WriteObjectValue(ClientId);
 77            }
 078            if (Optional.IsDefined(ClientSecret))
 79            {
 080                writer.WritePropertyName("clientSecret");
 081                writer.WriteObjectValue(ClientSecret);
 82            }
 083            if (Optional.IsDefined(Email))
 84            {
 085                writer.WritePropertyName("email");
 086                writer.WriteObjectValue(Email);
 87            }
 088            if (Optional.IsDefined(KeyFilePath))
 89            {
 090                writer.WritePropertyName("keyFilePath");
 091                writer.WriteObjectValue(KeyFilePath);
 92            }
 093            if (Optional.IsDefined(TrustedCertPath))
 94            {
 095                writer.WritePropertyName("trustedCertPath");
 096                writer.WriteObjectValue(TrustedCertPath);
 97            }
 098            if (Optional.IsDefined(UseSystemTrustStore))
 99            {
 0100                writer.WritePropertyName("useSystemTrustStore");
 0101                writer.WriteObjectValue(UseSystemTrustStore);
 102            }
 0103            if (Optional.IsDefined(EncryptedCredential))
 104            {
 0105                writer.WritePropertyName("encryptedCredential");
 0106                writer.WriteObjectValue(EncryptedCredential);
 107            }
 0108            writer.WriteEndObject();
 0109            foreach (var item in AdditionalProperties)
 110            {
 0111                writer.WritePropertyName(item.Key);
 0112                writer.WriteObjectValue(item.Value);
 113            }
 0114            writer.WriteEndObject();
 0115        }
 116
 117        internal static GoogleBigQueryLinkedService DeserializeGoogleBigQueryLinkedService(JsonElement element)
 118        {
 0119            string type = default;
 0120            Optional<IntegrationRuntimeReference> connectVia = default;
 0121            Optional<string> description = default;
 0122            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 0123            Optional<IList<object>> annotations = default;
 0124            object project = default;
 0125            Optional<object> additionalProjects = default;
 0126            Optional<object> requestGoogleDriveScope = default;
 0127            GoogleBigQueryAuthenticationType authenticationType = default;
 0128            Optional<SecretBase> refreshToken = default;
 0129            Optional<object> clientId = default;
 0130            Optional<SecretBase> clientSecret = default;
 0131            Optional<object> email = default;
 0132            Optional<object> keyFilePath = default;
 0133            Optional<object> trustedCertPath = default;
 0134            Optional<object> useSystemTrustStore = default;
 0135            Optional<object> encryptedCredential = default;
 0136            IDictionary<string, object> additionalProperties = default;
 0137            Dictionary<string, object> additionalPropertiesDictionary = default;
 0138            foreach (var property in element.EnumerateObject())
 139            {
 0140                if (property.NameEquals("type"))
 141                {
 0142                    type = property.Value.GetString();
 0143                    continue;
 144                }
 0145                if (property.NameEquals("connectVia"))
 146                {
 0147                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
 0148                    continue;
 149                }
 0150                if (property.NameEquals("description"))
 151                {
 0152                    description = property.Value.GetString();
 0153                    continue;
 154                }
 0155                if (property.NameEquals("parameters"))
 156                {
 0157                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0158                    foreach (var property0 in property.Value.EnumerateObject())
 159                    {
 0160                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 161                    }
 0162                    parameters = dictionary;
 0163                    continue;
 164                }
 0165                if (property.NameEquals("annotations"))
 166                {
 0167                    List<object> array = new List<object>();
 0168                    foreach (var item in property.Value.EnumerateArray())
 169                    {
 0170                        array.Add(item.GetObject());
 171                    }
 0172                    annotations = array;
 0173                    continue;
 174                }
 0175                if (property.NameEquals("typeProperties"))
 176                {
 0177                    foreach (var property0 in property.Value.EnumerateObject())
 178                    {
 0179                        if (property0.NameEquals("project"))
 180                        {
 0181                            project = property0.Value.GetObject();
 0182                            continue;
 183                        }
 0184                        if (property0.NameEquals("additionalProjects"))
 185                        {
 0186                            additionalProjects = property0.Value.GetObject();
 0187                            continue;
 188                        }
 0189                        if (property0.NameEquals("requestGoogleDriveScope"))
 190                        {
 0191                            requestGoogleDriveScope = property0.Value.GetObject();
 0192                            continue;
 193                        }
 0194                        if (property0.NameEquals("authenticationType"))
 195                        {
 0196                            authenticationType = new GoogleBigQueryAuthenticationType(property0.Value.GetString());
 0197                            continue;
 198                        }
 0199                        if (property0.NameEquals("refreshToken"))
 200                        {
 0201                            refreshToken = SecretBase.DeserializeSecretBase(property0.Value);
 0202                            continue;
 203                        }
 0204                        if (property0.NameEquals("clientId"))
 205                        {
 0206                            clientId = property0.Value.GetObject();
 0207                            continue;
 208                        }
 0209                        if (property0.NameEquals("clientSecret"))
 210                        {
 0211                            clientSecret = SecretBase.DeserializeSecretBase(property0.Value);
 0212                            continue;
 213                        }
 0214                        if (property0.NameEquals("email"))
 215                        {
 0216                            email = property0.Value.GetObject();
 0217                            continue;
 218                        }
 0219                        if (property0.NameEquals("keyFilePath"))
 220                        {
 0221                            keyFilePath = property0.Value.GetObject();
 0222                            continue;
 223                        }
 0224                        if (property0.NameEquals("trustedCertPath"))
 225                        {
 0226                            trustedCertPath = property0.Value.GetObject();
 0227                            continue;
 228                        }
 0229                        if (property0.NameEquals("useSystemTrustStore"))
 230                        {
 0231                            useSystemTrustStore = property0.Value.GetObject();
 0232                            continue;
 233                        }
 0234                        if (property0.NameEquals("encryptedCredential"))
 235                        {
 0236                            encryptedCredential = property0.Value.GetObject();
 237                            continue;
 238                        }
 239                    }
 240                    continue;
 241                }
 0242                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0243                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 244            }
 0245            additionalProperties = additionalPropertiesDictionary;
 0246            return new GoogleBigQueryLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(para
 247        }
 248    }
 249}