< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_AccountName()-0%100%
get_AccessKey()-0%100%
get_BatchUri()-0%100%
get_PoolName()-0%100%
get_LinkedServiceName()-0%100%
get_EncryptedCredential()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeAzureBatchLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureBatchLinkedService.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> Azure Batch linked service. </summary>
 14    public partial class AzureBatchLinkedService : LinkedService
 15    {
 16        /// <summary> Initializes a new instance of AzureBatchLinkedService. </summary>
 17        /// <param name="accountName"> The Azure Batch account name. Type: string (or Expression with resultType string)
 18        /// <param name="batchUri"> The Azure Batch URI. Type: string (or Expression with resultType string). </param>
 19        /// <param name="poolName"> The Azure Batch pool name. Type: string (or Expression with resultType string). </pa
 20        /// <param name="linkedServiceName"> The Azure Storage linked service reference. </param>
 21        /// <exception cref="ArgumentNullException"> <paramref name="accountName"/>, <paramref name="batchUri"/>, <param
 022        public AzureBatchLinkedService(object accountName, object batchUri, object poolName, LinkedServiceReference link
 23        {
 024            if (accountName == null)
 25            {
 026                throw new ArgumentNullException(nameof(accountName));
 27            }
 028            if (batchUri == null)
 29            {
 030                throw new ArgumentNullException(nameof(batchUri));
 31            }
 032            if (poolName == null)
 33            {
 034                throw new ArgumentNullException(nameof(poolName));
 35            }
 036            if (linkedServiceName == null)
 37            {
 038                throw new ArgumentNullException(nameof(linkedServiceName));
 39            }
 40
 041            AccountName = accountName;
 042            BatchUri = batchUri;
 043            PoolName = poolName;
 044            LinkedServiceName = linkedServiceName;
 045            Type = "AzureBatch";
 046        }
 47
 48        /// <summary> Initializes a new instance of AzureBatchLinkedService. </summary>
 49        /// <param name="type"> Type of linked service. </param>
 50        /// <param name="connectVia"> The integration runtime reference. </param>
 51        /// <param name="description"> Linked service description. </param>
 52        /// <param name="parameters"> Parameters for linked service. </param>
 53        /// <param name="annotations"> List of tags that can be used for describing the linked service. </param>
 54        /// <param name="additionalProperties"> . </param>
 55        /// <param name="accountName"> The Azure Batch account name. Type: string (or Expression with resultType string)
 56        /// <param name="accessKey"> The Azure Batch account access key. </param>
 57        /// <param name="batchUri"> The Azure Batch URI. Type: string (or Expression with resultType string). </param>
 58        /// <param name="poolName"> The Azure Batch pool name. Type: string (or Expression with resultType string). </pa
 59        /// <param name="linkedServiceName"> The Azure Storage linked service reference. </param>
 60        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 061        internal AzureBatchLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDicti
 62        {
 063            AccountName = accountName;
 064            AccessKey = accessKey;
 065            BatchUri = batchUri;
 066            PoolName = poolName;
 067            LinkedServiceName = linkedServiceName;
 068            EncryptedCredential = encryptedCredential;
 069            Type = type ?? "AzureBatch";
 070        }
 71
 72        /// <summary> The Azure Batch account name. Type: string (or Expression with resultType string). </summary>
 073        public object AccountName { get; set; }
 74        /// <summary> The Azure Batch account access key. </summary>
 075        public SecretBase AccessKey { get; set; }
 76        /// <summary> The Azure Batch URI. Type: string (or Expression with resultType string). </summary>
 077        public object BatchUri { get; set; }
 78        /// <summary> The Azure Batch pool name. Type: string (or Expression with resultType string). </summary>
 079        public object PoolName { get; set; }
 80        /// <summary> The Azure Storage linked service reference. </summary>
 081        public LinkedServiceReference LinkedServiceName { get; set; }
 82        /// <summary> The encrypted credential used for authentication. Credentials are encrypted using the integration 
 083        public object EncryptedCredential { get; set; }
 84    }
 85}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureBatchLinkedService.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 AzureBatchLinkedService : 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("accountName");
 055            writer.WriteObjectValue(AccountName);
 056            if (Optional.IsDefined(AccessKey))
 57            {
 058                writer.WritePropertyName("accessKey");
 059                writer.WriteObjectValue(AccessKey);
 60            }
 061            writer.WritePropertyName("batchUri");
 062            writer.WriteObjectValue(BatchUri);
 063            writer.WritePropertyName("poolName");
 064            writer.WriteObjectValue(PoolName);
 065            writer.WritePropertyName("linkedServiceName");
 066            writer.WriteObjectValue(LinkedServiceName);
 067            if (Optional.IsDefined(EncryptedCredential))
 68            {
 069                writer.WritePropertyName("encryptedCredential");
 070                writer.WriteObjectValue(EncryptedCredential);
 71            }
 072            writer.WriteEndObject();
 073            foreach (var item in AdditionalProperties)
 74            {
 075                writer.WritePropertyName(item.Key);
 076                writer.WriteObjectValue(item.Value);
 77            }
 078            writer.WriteEndObject();
 079        }
 80
 81        internal static AzureBatchLinkedService DeserializeAzureBatchLinkedService(JsonElement element)
 82        {
 083            string type = default;
 084            Optional<IntegrationRuntimeReference> connectVia = default;
 085            Optional<string> description = default;
 086            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 087            Optional<IList<object>> annotations = default;
 088            object accountName = default;
 089            Optional<SecretBase> accessKey = default;
 090            object batchUri = default;
 091            object poolName = default;
 092            LinkedServiceReference linkedServiceName = 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("accountName"))
 138                        {
 0139                            accountName = property0.Value.GetObject();
 0140                            continue;
 141                        }
 0142                        if (property0.NameEquals("accessKey"))
 143                        {
 0144                            accessKey = SecretBase.DeserializeSecretBase(property0.Value);
 0145                            continue;
 146                        }
 0147                        if (property0.NameEquals("batchUri"))
 148                        {
 0149                            batchUri = property0.Value.GetObject();
 0150                            continue;
 151                        }
 0152                        if (property0.NameEquals("poolName"))
 153                        {
 0154                            poolName = property0.Value.GetObject();
 0155                            continue;
 156                        }
 0157                        if (property0.NameEquals("linkedServiceName"))
 158                        {
 0159                            linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value
 0160                            continue;
 161                        }
 0162                        if (property0.NameEquals("encryptedCredential"))
 163                        {
 0164                            encryptedCredential = property0.Value.GetObject();
 165                            continue;
 166                        }
 167                    }
 168                    continue;
 169                }
 0170                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0171                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 172            }
 0173            additionalProperties = additionalPropertiesDictionary;
 0174            return new AzureBatchLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(paramete
 175        }
 176    }
 177}