< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%0%
get_AccessKeyId()-0%100%
get_SecretAccessKey()-0%100%
get_ServiceUrl()-0%100%
get_EncryptedCredential()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeAmazonS3LinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AmazonS3LinkedService.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;
 9
 10namespace Azure.Analytics.Synapse.Artifacts.Models
 11{
 12    /// <summary> Linked service for Amazon S3. </summary>
 13    public partial class AmazonS3LinkedService : LinkedService
 14    {
 15        /// <summary> Initializes a new instance of AmazonS3LinkedService. </summary>
 016        public AmazonS3LinkedService()
 17        {
 018            Type = "AmazonS3";
 019        }
 20
 21        /// <summary> Initializes a new instance of AmazonS3LinkedService. </summary>
 22        /// <param name="type"> Type of linked service. </param>
 23        /// <param name="connectVia"> The integration runtime reference. </param>
 24        /// <param name="description"> Linked service description. </param>
 25        /// <param name="parameters"> Parameters for linked service. </param>
 26        /// <param name="annotations"> List of tags that can be used for describing the linked service. </param>
 27        /// <param name="additionalProperties"> . </param>
 28        /// <param name="accessKeyId"> The access key identifier of the Amazon S3 Identity and Access Management (IAM) u
 29        /// <param name="secretAccessKey"> The secret access key of the Amazon S3 Identity and Access Management (IAM) u
 30        /// <param name="serviceUrl"> This value specifies the endpoint to access with the S3 Connector. This is an opti
 31        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 032        internal AmazonS3LinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDiction
 33        {
 034            AccessKeyId = accessKeyId;
 035            SecretAccessKey = secretAccessKey;
 036            ServiceUrl = serviceUrl;
 037            EncryptedCredential = encryptedCredential;
 038            Type = type ?? "AmazonS3";
 039        }
 40
 41        /// <summary> The access key identifier of the Amazon S3 Identity and Access Management (IAM) user. Type: string
 042        public object AccessKeyId { get; set; }
 43        /// <summary> The secret access key of the Amazon S3 Identity and Access Management (IAM) user. </summary>
 044        public SecretBase SecretAccessKey { get; set; }
 45        /// <summary> This value specifies the endpoint to access with the S3 Connector. This is an optional property; c
 046        public object ServiceUrl { get; set; }
 47        /// <summary> The encrypted credential used for authentication. Credentials are encrypted using the integration 
 048        public object EncryptedCredential { get; set; }
 49    }
 50}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AmazonS3LinkedService.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 AmazonS3LinkedService : 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            if (Optional.IsDefined(AccessKeyId))
 55            {
 056                writer.WritePropertyName("accessKeyId");
 057                writer.WriteObjectValue(AccessKeyId);
 58            }
 059            if (Optional.IsDefined(SecretAccessKey))
 60            {
 061                writer.WritePropertyName("secretAccessKey");
 062                writer.WriteObjectValue(SecretAccessKey);
 63            }
 064            if (Optional.IsDefined(ServiceUrl))
 65            {
 066                writer.WritePropertyName("serviceUrl");
 067                writer.WriteObjectValue(ServiceUrl);
 68            }
 069            if (Optional.IsDefined(EncryptedCredential))
 70            {
 071                writer.WritePropertyName("encryptedCredential");
 072                writer.WriteObjectValue(EncryptedCredential);
 73            }
 074            writer.WriteEndObject();
 075            foreach (var item in AdditionalProperties)
 76            {
 077                writer.WritePropertyName(item.Key);
 078                writer.WriteObjectValue(item.Value);
 79            }
 080            writer.WriteEndObject();
 081        }
 82
 83        internal static AmazonS3LinkedService DeserializeAmazonS3LinkedService(JsonElement element)
 84        {
 085            string type = default;
 086            Optional<IntegrationRuntimeReference> connectVia = default;
 087            Optional<string> description = default;
 088            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 089            Optional<IList<object>> annotations = default;
 090            Optional<object> accessKeyId = default;
 091            Optional<SecretBase> secretAccessKey = default;
 092            Optional<object> serviceUrl = default;
 093            Optional<object> encryptedCredential = default;
 094            IDictionary<string, object> additionalProperties = default;
 095            Dictionary<string, object> additionalPropertiesDictionary = default;
 096            foreach (var property in element.EnumerateObject())
 97            {
 098                if (property.NameEquals("type"))
 99                {
 0100                    type = property.Value.GetString();
 0101                    continue;
 102                }
 0103                if (property.NameEquals("connectVia"))
 104                {
 0105                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
 0106                    continue;
 107                }
 0108                if (property.NameEquals("description"))
 109                {
 0110                    description = property.Value.GetString();
 0111                    continue;
 112                }
 0113                if (property.NameEquals("parameters"))
 114                {
 0115                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0116                    foreach (var property0 in property.Value.EnumerateObject())
 117                    {
 0118                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 119                    }
 0120                    parameters = dictionary;
 0121                    continue;
 122                }
 0123                if (property.NameEquals("annotations"))
 124                {
 0125                    List<object> array = new List<object>();
 0126                    foreach (var item in property.Value.EnumerateArray())
 127                    {
 0128                        array.Add(item.GetObject());
 129                    }
 0130                    annotations = array;
 0131                    continue;
 132                }
 0133                if (property.NameEquals("typeProperties"))
 134                {
 0135                    foreach (var property0 in property.Value.EnumerateObject())
 136                    {
 0137                        if (property0.NameEquals("accessKeyId"))
 138                        {
 0139                            accessKeyId = property0.Value.GetObject();
 0140                            continue;
 141                        }
 0142                        if (property0.NameEquals("secretAccessKey"))
 143                        {
 0144                            secretAccessKey = SecretBase.DeserializeSecretBase(property0.Value);
 0145                            continue;
 146                        }
 0147                        if (property0.NameEquals("serviceUrl"))
 148                        {
 0149                            serviceUrl = property0.Value.GetObject();
 0150                            continue;
 151                        }
 0152                        if (property0.NameEquals("encryptedCredential"))
 153                        {
 0154                            encryptedCredential = property0.Value.GetObject();
 155                            continue;
 156                        }
 157                    }
 158                    continue;
 159                }
 0160                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0161                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 162            }
 0163            additionalProperties = additionalPropertiesDictionary;
 0164            return new AmazonS3LinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters
 165        }
 166    }
 167}