< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_ClusterSize()-0%100%
get_TimeToLive()-0%100%
get_Version()-0%100%
get_LinkedServiceName()-0%100%
get_HostSubscriptionId()-0%100%
get_ServicePrincipalId()-0%100%
get_ServicePrincipalKey()-0%100%
get_Tenant()-0%100%
get_ClusterResourceGroup()-0%100%
get_ClusterNamePrefix()-0%100%
get_ClusterUserName()-0%100%
get_ClusterPassword()-0%100%
get_ClusterSshUserName()-0%100%
get_ClusterSshPassword()-0%100%
get_AdditionalLinkedServiceNames()-0%100%
get_HcatalogLinkedServiceName()-0%100%
get_ClusterType()-0%100%
get_SparkVersion()-0%100%
get_CoreConfiguration()-0%100%
get_HBaseConfiguration()-0%100%
get_HdfsConfiguration()-0%100%
get_HiveConfiguration()-0%100%
get_MapReduceConfiguration()-0%100%
get_OozieConfiguration()-0%100%
get_StormConfiguration()-0%100%
get_YarnConfiguration()-0%100%
get_EncryptedCredential()-0%100%
get_HeadNodeSize()-0%100%
get_DataNodeSize()-0%100%
get_ZookeeperNodeSize()-0%100%
get_ScriptActions()-0%100%
get_VirtualNetworkId()-0%100%
get_SubnetName()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeHDInsightOnDemandLinkedService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\HDInsightOnDemandLinkedService.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;
 10using Azure.Core;
 11
 12namespace Azure.Analytics.Synapse.Artifacts.Models
 13{
 14    /// <summary> HDInsight ondemand linked service. </summary>
 15    public partial class HDInsightOnDemandLinkedService : LinkedService
 16    {
 17        /// <summary> Initializes a new instance of HDInsightOnDemandLinkedService. </summary>
 18        /// <param name="clusterSize"> Number of worker/data nodes in the cluster. Suggestion value: 4. Type: string (or
 19        /// <param name="timeToLive"> The allowed idle time for the on-demand HDInsight cluster. Specifies how long the 
 20        /// <param name="version"> Version of the HDInsight cluster.  Type: string (or Expression with resultType string
 21        /// <param name="linkedServiceName"> Azure Storage linked service to be used by the on-demand cluster for storin
 22        /// <param name="hostSubscriptionId"> The customer’s subscription to host the cluster. Type: string (or Expressi
 23        /// <param name="tenant"> The Tenant id/name to which the service principal belongs. Type: string (or Expression
 24        /// <param name="clusterResourceGroup"> The resource group where the cluster belongs. Type: string (or Expressio
 25        /// <exception cref="ArgumentNullException"> <paramref name="clusterSize"/>, <paramref name="timeToLive"/>, <par
 026        public HDInsightOnDemandLinkedService(object clusterSize, object timeToLive, object version, LinkedServiceRefere
 27        {
 028            if (clusterSize == null)
 29            {
 030                throw new ArgumentNullException(nameof(clusterSize));
 31            }
 032            if (timeToLive == null)
 33            {
 034                throw new ArgumentNullException(nameof(timeToLive));
 35            }
 036            if (version == null)
 37            {
 038                throw new ArgumentNullException(nameof(version));
 39            }
 040            if (linkedServiceName == null)
 41            {
 042                throw new ArgumentNullException(nameof(linkedServiceName));
 43            }
 044            if (hostSubscriptionId == null)
 45            {
 046                throw new ArgumentNullException(nameof(hostSubscriptionId));
 47            }
 048            if (tenant == null)
 49            {
 050                throw new ArgumentNullException(nameof(tenant));
 51            }
 052            if (clusterResourceGroup == null)
 53            {
 054                throw new ArgumentNullException(nameof(clusterResourceGroup));
 55            }
 56
 057            ClusterSize = clusterSize;
 058            TimeToLive = timeToLive;
 059            Version = version;
 060            LinkedServiceName = linkedServiceName;
 061            HostSubscriptionId = hostSubscriptionId;
 062            Tenant = tenant;
 063            ClusterResourceGroup = clusterResourceGroup;
 064            AdditionalLinkedServiceNames = new ChangeTrackingList<LinkedServiceReference>();
 065            ScriptActions = new ChangeTrackingList<ScriptAction>();
 066            Type = "HDInsightOnDemand";
 067        }
 68
 69        /// <summary> Initializes a new instance of HDInsightOnDemandLinkedService. </summary>
 70        /// <param name="type"> Type of linked service. </param>
 71        /// <param name="connectVia"> The integration runtime reference. </param>
 72        /// <param name="description"> Linked service description. </param>
 73        /// <param name="parameters"> Parameters for linked service. </param>
 74        /// <param name="annotations"> List of tags that can be used for describing the linked service. </param>
 75        /// <param name="additionalProperties"> . </param>
 76        /// <param name="clusterSize"> Number of worker/data nodes in the cluster. Suggestion value: 4. Type: string (or
 77        /// <param name="timeToLive"> The allowed idle time for the on-demand HDInsight cluster. Specifies how long the 
 78        /// <param name="version"> Version of the HDInsight cluster.  Type: string (or Expression with resultType string
 79        /// <param name="linkedServiceName"> Azure Storage linked service to be used by the on-demand cluster for storin
 80        /// <param name="hostSubscriptionId"> The customer’s subscription to host the cluster. Type: string (or Expressi
 81        /// <param name="servicePrincipalId"> The service principal id for the hostSubscriptionId. Type: string (or Expr
 82        /// <param name="servicePrincipalKey"> The key for the service principal id. </param>
 83        /// <param name="tenant"> The Tenant id/name to which the service principal belongs. Type: string (or Expression
 84        /// <param name="clusterResourceGroup"> The resource group where the cluster belongs. Type: string (or Expressio
 85        /// <param name="clusterNamePrefix"> The prefix of cluster name, postfix will be distinct with timestamp. Type: 
 86        /// <param name="clusterUserName"> The username to access the cluster. Type: string (or Expression with resultTy
 87        /// <param name="clusterPassword"> The password to access the cluster. </param>
 88        /// <param name="clusterSshUserName"> The username to SSH remotely connect to cluster’s node (for Linux). Type: 
 89        /// <param name="clusterSshPassword"> The password to SSH remotely connect cluster’s node (for Linux). </param>
 90        /// <param name="additionalLinkedServiceNames"> Specifies additional storage accounts for the HDInsight linked s
 91        /// <param name="hcatalogLinkedServiceName"> The name of Azure SQL linked service that point to the HCatalog dat
 92        /// <param name="clusterType"> The cluster type. Type: string (or Expression with resultType string). </param>
 93        /// <param name="sparkVersion"> The version of spark if the cluster type is &apos;spark&apos;. Type: string (or 
 94        /// <param name="coreConfiguration"> Specifies the core configuration parameters (as in core-site.xml) for the H
 95        /// <param name="hBaseConfiguration"> Specifies the HBase configuration parameters (hbase-site.xml) for the HDIn
 96        /// <param name="hdfsConfiguration"> Specifies the HDFS configuration parameters (hdfs-site.xml) for the HDInsig
 97        /// <param name="hiveConfiguration"> Specifies the hive configuration parameters (hive-site.xml) for the HDInsig
 98        /// <param name="mapReduceConfiguration"> Specifies the MapReduce configuration parameters (mapred-site.xml) for
 99        /// <param name="oozieConfiguration"> Specifies the Oozie configuration parameters (oozie-site.xml) for the HDIn
 100        /// <param name="stormConfiguration"> Specifies the Storm configuration parameters (storm-site.xml) for the HDIn
 101        /// <param name="yarnConfiguration"> Specifies the Yarn configuration parameters (yarn-site.xml) for the HDInsig
 102        /// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypt
 103        /// <param name="headNodeSize"> Specifies the size of the head node for the HDInsight cluster. </param>
 104        /// <param name="dataNodeSize"> Specifies the size of the data node for the HDInsight cluster. </param>
 105        /// <param name="zookeeperNodeSize"> Specifies the size of the Zoo Keeper node for the HDInsight cluster. </para
 106        /// <param name="scriptActions"> Custom script actions to run on HDI ondemand cluster once it&apos;s up. Please 
 107        /// <param name="virtualNetworkId"> The ARM resource ID for the vNet to which the cluster should be joined after
 108        /// <param name="subnetName"> The ARM resource ID for the subnet in the vNet. If virtualNetworkId was specified,
 0109        internal HDInsightOnDemandLinkedService(string type, IntegrationRuntimeReference connectVia, string description,
 110        {
 0111            ClusterSize = clusterSize;
 0112            TimeToLive = timeToLive;
 0113            Version = version;
 0114            LinkedServiceName = linkedServiceName;
 0115            HostSubscriptionId = hostSubscriptionId;
 0116            ServicePrincipalId = servicePrincipalId;
 0117            ServicePrincipalKey = servicePrincipalKey;
 0118            Tenant = tenant;
 0119            ClusterResourceGroup = clusterResourceGroup;
 0120            ClusterNamePrefix = clusterNamePrefix;
 0121            ClusterUserName = clusterUserName;
 0122            ClusterPassword = clusterPassword;
 0123            ClusterSshUserName = clusterSshUserName;
 0124            ClusterSshPassword = clusterSshPassword;
 0125            AdditionalLinkedServiceNames = additionalLinkedServiceNames;
 0126            HcatalogLinkedServiceName = hcatalogLinkedServiceName;
 0127            ClusterType = clusterType;
 0128            SparkVersion = sparkVersion;
 0129            CoreConfiguration = coreConfiguration;
 0130            HBaseConfiguration = hBaseConfiguration;
 0131            HdfsConfiguration = hdfsConfiguration;
 0132            HiveConfiguration = hiveConfiguration;
 0133            MapReduceConfiguration = mapReduceConfiguration;
 0134            OozieConfiguration = oozieConfiguration;
 0135            StormConfiguration = stormConfiguration;
 0136            YarnConfiguration = yarnConfiguration;
 0137            EncryptedCredential = encryptedCredential;
 0138            HeadNodeSize = headNodeSize;
 0139            DataNodeSize = dataNodeSize;
 0140            ZookeeperNodeSize = zookeeperNodeSize;
 0141            ScriptActions = scriptActions;
 0142            VirtualNetworkId = virtualNetworkId;
 0143            SubnetName = subnetName;
 0144            Type = type ?? "HDInsightOnDemand";
 0145        }
 146
 147        /// <summary> Number of worker/data nodes in the cluster. Suggestion value: 4. Type: string (or Expression with 
 0148        public object ClusterSize { get; set; }
 149        /// <summary> The allowed idle time for the on-demand HDInsight cluster. Specifies how long the on-demand HDInsi
 0150        public object TimeToLive { get; set; }
 151        /// <summary> Version of the HDInsight cluster.  Type: string (or Expression with resultType string). </summary>
 0152        public object Version { get; set; }
 153        /// <summary> Azure Storage linked service to be used by the on-demand cluster for storing and processing data. 
 0154        public LinkedServiceReference LinkedServiceName { get; set; }
 155        /// <summary> The customer’s subscription to host the cluster. Type: string (or Expression with resultType strin
 0156        public object HostSubscriptionId { get; set; }
 157        /// <summary> The service principal id for the hostSubscriptionId. Type: string (or Expression with resultType s
 0158        public object ServicePrincipalId { get; set; }
 159        /// <summary> The key for the service principal id. </summary>
 0160        public SecretBase ServicePrincipalKey { get; set; }
 161        /// <summary> The Tenant id/name to which the service principal belongs. Type: string (or Expression with result
 0162        public object Tenant { get; set; }
 163        /// <summary> The resource group where the cluster belongs. Type: string (or Expression with resultType string).
 0164        public object ClusterResourceGroup { get; set; }
 165        /// <summary> The prefix of cluster name, postfix will be distinct with timestamp. Type: string (or Expression w
 0166        public object ClusterNamePrefix { get; set; }
 167        /// <summary> The username to access the cluster. Type: string (or Expression with resultType string). </summary
 0168        public object ClusterUserName { get; set; }
 169        /// <summary> The password to access the cluster. </summary>
 0170        public SecretBase ClusterPassword { get; set; }
 171        /// <summary> The username to SSH remotely connect to cluster’s node (for Linux). Type: string (or Expression wi
 0172        public object ClusterSshUserName { get; set; }
 173        /// <summary> The password to SSH remotely connect cluster’s node (for Linux). </summary>
 0174        public SecretBase ClusterSshPassword { get; set; }
 175        /// <summary> Specifies additional storage accounts for the HDInsight linked service so that the Data Factory se
 0176        public IList<LinkedServiceReference> AdditionalLinkedServiceNames { get; }
 177        /// <summary> The name of Azure SQL linked service that point to the HCatalog database. The on-demand HDInsight 
 0178        public LinkedServiceReference HcatalogLinkedServiceName { get; set; }
 179        /// <summary> The cluster type. Type: string (or Expression with resultType string). </summary>
 0180        public object ClusterType { get; set; }
 181        /// <summary> The version of spark if the cluster type is &apos;spark&apos;. Type: string (or Expression with re
 0182        public object SparkVersion { get; set; }
 183        /// <summary> Specifies the core configuration parameters (as in core-site.xml) for the HDInsight cluster to be 
 0184        public object CoreConfiguration { get; set; }
 185        /// <summary> Specifies the HBase configuration parameters (hbase-site.xml) for the HDInsight cluster. </summary
 0186        public object HBaseConfiguration { get; set; }
 187        /// <summary> Specifies the HDFS configuration parameters (hdfs-site.xml) for the HDInsight cluster. </summary>
 0188        public object HdfsConfiguration { get; set; }
 189        /// <summary> Specifies the hive configuration parameters (hive-site.xml) for the HDInsight cluster. </summary>
 0190        public object HiveConfiguration { get; set; }
 191        /// <summary> Specifies the MapReduce configuration parameters (mapred-site.xml) for the HDInsight cluster. </su
 0192        public object MapReduceConfiguration { get; set; }
 193        /// <summary> Specifies the Oozie configuration parameters (oozie-site.xml) for the HDInsight cluster. </summary
 0194        public object OozieConfiguration { get; set; }
 195        /// <summary> Specifies the Storm configuration parameters (storm-site.xml) for the HDInsight cluster. </summary
 0196        public object StormConfiguration { get; set; }
 197        /// <summary> Specifies the Yarn configuration parameters (yarn-site.xml) for the HDInsight cluster. </summary>
 0198        public object YarnConfiguration { get; set; }
 199        /// <summary> The encrypted credential used for authentication. Credentials are encrypted using the integration 
 0200        public object EncryptedCredential { get; set; }
 201        /// <summary> Specifies the size of the head node for the HDInsight cluster. </summary>
 0202        public object HeadNodeSize { get; set; }
 203        /// <summary> Specifies the size of the data node for the HDInsight cluster. </summary>
 0204        public object DataNodeSize { get; set; }
 205        /// <summary> Specifies the size of the Zoo Keeper node for the HDInsight cluster. </summary>
 0206        public object ZookeeperNodeSize { get; set; }
 207        /// <summary> Custom script actions to run on HDI ondemand cluster once it&apos;s up. Please refer to https://do
 0208        public IList<ScriptAction> ScriptActions { get; }
 209        /// <summary> The ARM resource ID for the vNet to which the cluster should be joined after creation. Type: strin
 0210        public object VirtualNetworkId { get; set; }
 211        /// <summary> The ARM resource ID for the subnet in the vNet. If virtualNetworkId was specified, then this prope
 0212        public object SubnetName { get; set; }
 213    }
 214}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\HDInsightOnDemandLinkedService.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 HDInsightOnDemandLinkedService : 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("clusterSize");
 055            writer.WriteObjectValue(ClusterSize);
 056            writer.WritePropertyName("timeToLive");
 057            writer.WriteObjectValue(TimeToLive);
 058            writer.WritePropertyName("version");
 059            writer.WriteObjectValue(Version);
 060            writer.WritePropertyName("linkedServiceName");
 061            writer.WriteObjectValue(LinkedServiceName);
 062            writer.WritePropertyName("hostSubscriptionId");
 063            writer.WriteObjectValue(HostSubscriptionId);
 064            if (Optional.IsDefined(ServicePrincipalId))
 65            {
 066                writer.WritePropertyName("servicePrincipalId");
 067                writer.WriteObjectValue(ServicePrincipalId);
 68            }
 069            if (Optional.IsDefined(ServicePrincipalKey))
 70            {
 071                writer.WritePropertyName("servicePrincipalKey");
 072                writer.WriteObjectValue(ServicePrincipalKey);
 73            }
 074            writer.WritePropertyName("tenant");
 075            writer.WriteObjectValue(Tenant);
 076            writer.WritePropertyName("clusterResourceGroup");
 077            writer.WriteObjectValue(ClusterResourceGroup);
 078            if (Optional.IsDefined(ClusterNamePrefix))
 79            {
 080                writer.WritePropertyName("clusterNamePrefix");
 081                writer.WriteObjectValue(ClusterNamePrefix);
 82            }
 083            if (Optional.IsDefined(ClusterUserName))
 84            {
 085                writer.WritePropertyName("clusterUserName");
 086                writer.WriteObjectValue(ClusterUserName);
 87            }
 088            if (Optional.IsDefined(ClusterPassword))
 89            {
 090                writer.WritePropertyName("clusterPassword");
 091                writer.WriteObjectValue(ClusterPassword);
 92            }
 093            if (Optional.IsDefined(ClusterSshUserName))
 94            {
 095                writer.WritePropertyName("clusterSshUserName");
 096                writer.WriteObjectValue(ClusterSshUserName);
 97            }
 098            if (Optional.IsDefined(ClusterSshPassword))
 99            {
 0100                writer.WritePropertyName("clusterSshPassword");
 0101                writer.WriteObjectValue(ClusterSshPassword);
 102            }
 0103            if (Optional.IsCollectionDefined(AdditionalLinkedServiceNames))
 104            {
 0105                writer.WritePropertyName("additionalLinkedServiceNames");
 0106                writer.WriteStartArray();
 0107                foreach (var item in AdditionalLinkedServiceNames)
 108                {
 0109                    writer.WriteObjectValue(item);
 110                }
 0111                writer.WriteEndArray();
 112            }
 0113            if (Optional.IsDefined(HcatalogLinkedServiceName))
 114            {
 0115                writer.WritePropertyName("hcatalogLinkedServiceName");
 0116                writer.WriteObjectValue(HcatalogLinkedServiceName);
 117            }
 0118            if (Optional.IsDefined(ClusterType))
 119            {
 0120                writer.WritePropertyName("clusterType");
 0121                writer.WriteObjectValue(ClusterType);
 122            }
 0123            if (Optional.IsDefined(SparkVersion))
 124            {
 0125                writer.WritePropertyName("sparkVersion");
 0126                writer.WriteObjectValue(SparkVersion);
 127            }
 0128            if (Optional.IsDefined(CoreConfiguration))
 129            {
 0130                writer.WritePropertyName("coreConfiguration");
 0131                writer.WriteObjectValue(CoreConfiguration);
 132            }
 0133            if (Optional.IsDefined(HBaseConfiguration))
 134            {
 0135                writer.WritePropertyName("hBaseConfiguration");
 0136                writer.WriteObjectValue(HBaseConfiguration);
 137            }
 0138            if (Optional.IsDefined(HdfsConfiguration))
 139            {
 0140                writer.WritePropertyName("hdfsConfiguration");
 0141                writer.WriteObjectValue(HdfsConfiguration);
 142            }
 0143            if (Optional.IsDefined(HiveConfiguration))
 144            {
 0145                writer.WritePropertyName("hiveConfiguration");
 0146                writer.WriteObjectValue(HiveConfiguration);
 147            }
 0148            if (Optional.IsDefined(MapReduceConfiguration))
 149            {
 0150                writer.WritePropertyName("mapReduceConfiguration");
 0151                writer.WriteObjectValue(MapReduceConfiguration);
 152            }
 0153            if (Optional.IsDefined(OozieConfiguration))
 154            {
 0155                writer.WritePropertyName("oozieConfiguration");
 0156                writer.WriteObjectValue(OozieConfiguration);
 157            }
 0158            if (Optional.IsDefined(StormConfiguration))
 159            {
 0160                writer.WritePropertyName("stormConfiguration");
 0161                writer.WriteObjectValue(StormConfiguration);
 162            }
 0163            if (Optional.IsDefined(YarnConfiguration))
 164            {
 0165                writer.WritePropertyName("yarnConfiguration");
 0166                writer.WriteObjectValue(YarnConfiguration);
 167            }
 0168            if (Optional.IsDefined(EncryptedCredential))
 169            {
 0170                writer.WritePropertyName("encryptedCredential");
 0171                writer.WriteObjectValue(EncryptedCredential);
 172            }
 0173            if (Optional.IsDefined(HeadNodeSize))
 174            {
 0175                writer.WritePropertyName("headNodeSize");
 0176                writer.WriteObjectValue(HeadNodeSize);
 177            }
 0178            if (Optional.IsDefined(DataNodeSize))
 179            {
 0180                writer.WritePropertyName("dataNodeSize");
 0181                writer.WriteObjectValue(DataNodeSize);
 182            }
 0183            if (Optional.IsDefined(ZookeeperNodeSize))
 184            {
 0185                writer.WritePropertyName("zookeeperNodeSize");
 0186                writer.WriteObjectValue(ZookeeperNodeSize);
 187            }
 0188            if (Optional.IsCollectionDefined(ScriptActions))
 189            {
 0190                writer.WritePropertyName("scriptActions");
 0191                writer.WriteStartArray();
 0192                foreach (var item in ScriptActions)
 193                {
 0194                    writer.WriteObjectValue(item);
 195                }
 0196                writer.WriteEndArray();
 197            }
 0198            if (Optional.IsDefined(VirtualNetworkId))
 199            {
 0200                writer.WritePropertyName("virtualNetworkId");
 0201                writer.WriteObjectValue(VirtualNetworkId);
 202            }
 0203            if (Optional.IsDefined(SubnetName))
 204            {
 0205                writer.WritePropertyName("subnetName");
 0206                writer.WriteObjectValue(SubnetName);
 207            }
 0208            writer.WriteEndObject();
 0209            foreach (var item in AdditionalProperties)
 210            {
 0211                writer.WritePropertyName(item.Key);
 0212                writer.WriteObjectValue(item.Value);
 213            }
 0214            writer.WriteEndObject();
 0215        }
 216
 217        internal static HDInsightOnDemandLinkedService DeserializeHDInsightOnDemandLinkedService(JsonElement element)
 218        {
 0219            string type = default;
 0220            Optional<IntegrationRuntimeReference> connectVia = default;
 0221            Optional<string> description = default;
 0222            Optional<IDictionary<string, ParameterSpecification>> parameters = default;
 0223            Optional<IList<object>> annotations = default;
 0224            object clusterSize = default;
 0225            object timeToLive = default;
 0226            object version = default;
 0227            LinkedServiceReference linkedServiceName = default;
 0228            object hostSubscriptionId = default;
 0229            Optional<object> servicePrincipalId = default;
 0230            Optional<SecretBase> servicePrincipalKey = default;
 0231            object tenant = default;
 0232            object clusterResourceGroup = default;
 0233            Optional<object> clusterNamePrefix = default;
 0234            Optional<object> clusterUserName = default;
 0235            Optional<SecretBase> clusterPassword = default;
 0236            Optional<object> clusterSshUserName = default;
 0237            Optional<SecretBase> clusterSshPassword = default;
 0238            Optional<IList<LinkedServiceReference>> additionalLinkedServiceNames = default;
 0239            Optional<LinkedServiceReference> hcatalogLinkedServiceName = default;
 0240            Optional<object> clusterType = default;
 0241            Optional<object> sparkVersion = default;
 0242            Optional<object> coreConfiguration = default;
 0243            Optional<object> hBaseConfiguration = default;
 0244            Optional<object> hdfsConfiguration = default;
 0245            Optional<object> hiveConfiguration = default;
 0246            Optional<object> mapReduceConfiguration = default;
 0247            Optional<object> oozieConfiguration = default;
 0248            Optional<object> stormConfiguration = default;
 0249            Optional<object> yarnConfiguration = default;
 0250            Optional<object> encryptedCredential = default;
 0251            Optional<object> headNodeSize = default;
 0252            Optional<object> dataNodeSize = default;
 0253            Optional<object> zookeeperNodeSize = default;
 0254            Optional<IList<ScriptAction>> scriptActions = default;
 0255            Optional<object> virtualNetworkId = default;
 0256            Optional<object> subnetName = default;
 0257            IDictionary<string, object> additionalProperties = default;
 0258            Dictionary<string, object> additionalPropertiesDictionary = default;
 0259            foreach (var property in element.EnumerateObject())
 260            {
 0261                if (property.NameEquals("type"))
 262                {
 0263                    type = property.Value.GetString();
 0264                    continue;
 265                }
 0266                if (property.NameEquals("connectVia"))
 267                {
 0268                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
 0269                    continue;
 270                }
 0271                if (property.NameEquals("description"))
 272                {
 0273                    description = property.Value.GetString();
 0274                    continue;
 275                }
 0276                if (property.NameEquals("parameters"))
 277                {
 0278                    Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio
 0279                    foreach (var property0 in property.Value.EnumerateObject())
 280                    {
 0281                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property
 282                    }
 0283                    parameters = dictionary;
 0284                    continue;
 285                }
 0286                if (property.NameEquals("annotations"))
 287                {
 0288                    List<object> array = new List<object>();
 0289                    foreach (var item in property.Value.EnumerateArray())
 290                    {
 0291                        array.Add(item.GetObject());
 292                    }
 0293                    annotations = array;
 0294                    continue;
 295                }
 0296                if (property.NameEquals("typeProperties"))
 297                {
 0298                    foreach (var property0 in property.Value.EnumerateObject())
 299                    {
 0300                        if (property0.NameEquals("clusterSize"))
 301                        {
 0302                            clusterSize = property0.Value.GetObject();
 0303                            continue;
 304                        }
 0305                        if (property0.NameEquals("timeToLive"))
 306                        {
 0307                            timeToLive = property0.Value.GetObject();
 0308                            continue;
 309                        }
 0310                        if (property0.NameEquals("version"))
 311                        {
 0312                            version = property0.Value.GetObject();
 0313                            continue;
 314                        }
 0315                        if (property0.NameEquals("linkedServiceName"))
 316                        {
 0317                            linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value
 0318                            continue;
 319                        }
 0320                        if (property0.NameEquals("hostSubscriptionId"))
 321                        {
 0322                            hostSubscriptionId = property0.Value.GetObject();
 0323                            continue;
 324                        }
 0325                        if (property0.NameEquals("servicePrincipalId"))
 326                        {
 0327                            servicePrincipalId = property0.Value.GetObject();
 0328                            continue;
 329                        }
 0330                        if (property0.NameEquals("servicePrincipalKey"))
 331                        {
 0332                            servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value);
 0333                            continue;
 334                        }
 0335                        if (property0.NameEquals("tenant"))
 336                        {
 0337                            tenant = property0.Value.GetObject();
 0338                            continue;
 339                        }
 0340                        if (property0.NameEquals("clusterResourceGroup"))
 341                        {
 0342                            clusterResourceGroup = property0.Value.GetObject();
 0343                            continue;
 344                        }
 0345                        if (property0.NameEquals("clusterNamePrefix"))
 346                        {
 0347                            clusterNamePrefix = property0.Value.GetObject();
 0348                            continue;
 349                        }
 0350                        if (property0.NameEquals("clusterUserName"))
 351                        {
 0352                            clusterUserName = property0.Value.GetObject();
 0353                            continue;
 354                        }
 0355                        if (property0.NameEquals("clusterPassword"))
 356                        {
 0357                            clusterPassword = SecretBase.DeserializeSecretBase(property0.Value);
 0358                            continue;
 359                        }
 0360                        if (property0.NameEquals("clusterSshUserName"))
 361                        {
 0362                            clusterSshUserName = property0.Value.GetObject();
 0363                            continue;
 364                        }
 0365                        if (property0.NameEquals("clusterSshPassword"))
 366                        {
 0367                            clusterSshPassword = SecretBase.DeserializeSecretBase(property0.Value);
 0368                            continue;
 369                        }
 0370                        if (property0.NameEquals("additionalLinkedServiceNames"))
 371                        {
 0372                            List<LinkedServiceReference> array = new List<LinkedServiceReference>();
 0373                            foreach (var item in property0.Value.EnumerateArray())
 374                            {
 0375                                array.Add(LinkedServiceReference.DeserializeLinkedServiceReference(item));
 376                            }
 0377                            additionalLinkedServiceNames = array;
 0378                            continue;
 379                        }
 0380                        if (property0.NameEquals("hcatalogLinkedServiceName"))
 381                        {
 0382                            hcatalogLinkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(propert
 0383                            continue;
 384                        }
 0385                        if (property0.NameEquals("clusterType"))
 386                        {
 0387                            clusterType = property0.Value.GetObject();
 0388                            continue;
 389                        }
 0390                        if (property0.NameEquals("sparkVersion"))
 391                        {
 0392                            sparkVersion = property0.Value.GetObject();
 0393                            continue;
 394                        }
 0395                        if (property0.NameEquals("coreConfiguration"))
 396                        {
 0397                            coreConfiguration = property0.Value.GetObject();
 0398                            continue;
 399                        }
 0400                        if (property0.NameEquals("hBaseConfiguration"))
 401                        {
 0402                            hBaseConfiguration = property0.Value.GetObject();
 0403                            continue;
 404                        }
 0405                        if (property0.NameEquals("hdfsConfiguration"))
 406                        {
 0407                            hdfsConfiguration = property0.Value.GetObject();
 0408                            continue;
 409                        }
 0410                        if (property0.NameEquals("hiveConfiguration"))
 411                        {
 0412                            hiveConfiguration = property0.Value.GetObject();
 0413                            continue;
 414                        }
 0415                        if (property0.NameEquals("mapReduceConfiguration"))
 416                        {
 0417                            mapReduceConfiguration = property0.Value.GetObject();
 0418                            continue;
 419                        }
 0420                        if (property0.NameEquals("oozieConfiguration"))
 421                        {
 0422                            oozieConfiguration = property0.Value.GetObject();
 0423                            continue;
 424                        }
 0425                        if (property0.NameEquals("stormConfiguration"))
 426                        {
 0427                            stormConfiguration = property0.Value.GetObject();
 0428                            continue;
 429                        }
 0430                        if (property0.NameEquals("yarnConfiguration"))
 431                        {
 0432                            yarnConfiguration = property0.Value.GetObject();
 0433                            continue;
 434                        }
 0435                        if (property0.NameEquals("encryptedCredential"))
 436                        {
 0437                            encryptedCredential = property0.Value.GetObject();
 0438                            continue;
 439                        }
 0440                        if (property0.NameEquals("headNodeSize"))
 441                        {
 0442                            headNodeSize = property0.Value.GetObject();
 0443                            continue;
 444                        }
 0445                        if (property0.NameEquals("dataNodeSize"))
 446                        {
 0447                            dataNodeSize = property0.Value.GetObject();
 0448                            continue;
 449                        }
 0450                        if (property0.NameEquals("zookeeperNodeSize"))
 451                        {
 0452                            zookeeperNodeSize = property0.Value.GetObject();
 0453                            continue;
 454                        }
 0455                        if (property0.NameEquals("scriptActions"))
 456                        {
 0457                            List<ScriptAction> array = new List<ScriptAction>();
 0458                            foreach (var item in property0.Value.EnumerateArray())
 459                            {
 0460                                array.Add(ScriptAction.DeserializeScriptAction(item));
 461                            }
 0462                            scriptActions = array;
 0463                            continue;
 464                        }
 0465                        if (property0.NameEquals("virtualNetworkId"))
 466                        {
 0467                            virtualNetworkId = property0.Value.GetObject();
 0468                            continue;
 469                        }
 0470                        if (property0.NameEquals("subnetName"))
 471                        {
 0472                            subnetName = property0.Value.GetObject();
 473                            continue;
 474                        }
 475                    }
 476                    continue;
 477                }
 0478                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0479                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 480            }
 0481            additionalProperties = additionalPropertiesDictionary;
 0482            return new HDInsightOnDemandLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(p
 483        }
 484    }
 485}