# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::DataFactory::Mgmt::V2018_06_01
  module Models
    #
    # HDInsight ondemand linked service.
    #
    class HDInsightOnDemandLinkedService < LinkedService

      include MsRestAzure


      def initialize
        @type = "HDInsightOnDemand"
      end

      attr_accessor :type

      # @return Number of worker/data nodes in the cluster. Suggestion value:
      # 4. Type: string (or Expression with resultType string).
      attr_accessor :cluster_size

      # @return The allowed idle time for the on-demand HDInsight cluster.
      # Specifies how long the on-demand HDInsight cluster stays alive after
      # completion of an activity run if there are no other active jobs in the
      # cluster. The minimum value is 5 mins. Type: string (or Expression with
      # resultType string).
      attr_accessor :time_to_live

      # @return Version of the HDInsight cluster.  Type: string (or Expression
      # with resultType string).
      attr_accessor :version

      # @return [LinkedServiceReference] Azure Storage linked service to be
      # used by the on-demand cluster for storing and processing data.
      attr_accessor :linked_service_name

      # @return The customer’s subscription to host the cluster. Type: string
      # (or Expression with resultType string).
      attr_accessor :host_subscription_id

      # @return The service principal id for the hostSubscriptionId. Type:
      # string (or Expression with resultType string).
      attr_accessor :service_principal_id

      # @return [SecretBase] The key for the service principal id.
      attr_accessor :service_principal_key

      # @return The Tenant id/name to which the service principal belongs.
      # Type: string (or Expression with resultType string).
      attr_accessor :tenant

      # @return The resource group where the cluster belongs. Type: string (or
      # Expression with resultType string).
      attr_accessor :cluster_resource_group

      # @return The prefix of cluster name, postfix will be distinct with
      # timestamp. Type: string (or Expression with resultType string).
      attr_accessor :cluster_name_prefix

      # @return The username to access the cluster. Type: string (or Expression
      # with resultType string).
      attr_accessor :cluster_user_name

      # @return [SecretBase] The password to access the cluster.
      attr_accessor :cluster_password

      # @return The username to SSH remotely connect to cluster’s node (for
      # Linux). Type: string (or Expression with resultType string).
      attr_accessor :cluster_ssh_user_name

      # @return [SecretBase] The password to SSH remotely connect cluster’s
      # node (for Linux).
      attr_accessor :cluster_ssh_password

      # @return [Array<LinkedServiceReference>] Specifies additional storage
      # accounts for the HDInsight linked service so that the Data Factory
      # service can register them on your behalf.
      attr_accessor :additional_linked_service_names

      # @return [LinkedServiceReference] The name of Azure SQL linked service
      # that point to the HCatalog database. The on-demand HDInsight cluster is
      # created by using the Azure SQL database as the metastore.
      attr_accessor :hcatalog_linked_service_name

      # @return The cluster type. Type: string (or Expression with resultType
      # string).
      attr_accessor :cluster_type

      # @return The version of spark if the cluster type is 'spark'. Type:
      # string (or Expression with resultType string).
      attr_accessor :spark_version

      # @return Specifies the core configuration parameters (as in
      # core-site.xml) for the HDInsight cluster to be created.
      attr_accessor :core_configuration

      # @return Specifies the HBase configuration parameters (hbase-site.xml)
      # for the HDInsight cluster.
      attr_accessor :h_base_configuration

      # @return Specifies the HDFS configuration parameters (hdfs-site.xml) for
      # the HDInsight cluster.
      attr_accessor :hdfs_configuration

      # @return Specifies the hive configuration parameters (hive-site.xml) for
      # the HDInsight cluster.
      attr_accessor :hive_configuration

      # @return Specifies the MapReduce configuration parameters
      # (mapred-site.xml) for the HDInsight cluster.
      attr_accessor :map_reduce_configuration

      # @return Specifies the Oozie configuration parameters (oozie-site.xml)
      # for the HDInsight cluster.
      attr_accessor :oozie_configuration

      # @return Specifies the Storm configuration parameters (storm-site.xml)
      # for the HDInsight cluster.
      attr_accessor :storm_configuration

      # @return Specifies the Yarn configuration parameters (yarn-site.xml) for
      # the HDInsight cluster.
      attr_accessor :yarn_configuration

      # @return The encrypted credential used for authentication. Credentials
      # are encrypted using the integration runtime credential manager. Type:
      # string (or Expression with resultType string).
      attr_accessor :encrypted_credential

      # @return Specifies the size of the head node for the HDInsight cluster.
      attr_accessor :head_node_size

      # @return Specifies the size of the data node for the HDInsight cluster.
      attr_accessor :data_node_size

      # @return Specifies the size of the Zoo Keeper node for the HDInsight
      # cluster.
      attr_accessor :zookeeper_node_size

      # @return [Array<ScriptAction>] Custom script actions to run on HDI
      # ondemand cluster once it's up. Please refer to
      # https://docs.microsoft.com/en-us/azure/hdinsight/hdinsight-hadoop-customize-cluster-linux?toc=%2Fen-us%2Fazure%2Fhdinsight%2Fr-server%2FTOC.json&bc=%2Fen-us%2Fazure%2Fbread%2Ftoc.json#understanding-script-actions.
      attr_accessor :script_actions

      # @return The ARM resource ID for the vNet to which the cluster should be
      # joined after creation. Type: string (or Expression with resultType
      # string).
      attr_accessor :virtual_network_id

      # @return The ARM resource ID for the subnet in the vNet. If
      # virtualNetworkId was specified, then this property is required. Type:
      # string (or Expression with resultType string).
      attr_accessor :subnet_name


      #
      # Mapper for HDInsightOnDemandLinkedService class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'HDInsightOnDemand',
          type: {
            name: 'Composite',
            class_name: 'HDInsightOnDemandLinkedService',
            model_properties: {
              additional_properties: {
                client_side_validation: true,
                required: false,
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ObjectElementType',
                      type: {
                        name: 'Object'
                      }
                  }
                }
              },
              connect_via: {
                client_side_validation: true,
                required: false,
                serialized_name: 'connectVia',
                type: {
                  name: 'Composite',
                  class_name: 'IntegrationRuntimeReference'
                }
              },
              description: {
                client_side_validation: true,
                required: false,
                serialized_name: 'description',
                type: {
                  name: 'String'
                }
              },
              parameters: {
                client_side_validation: true,
                required: false,
                serialized_name: 'parameters',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ParameterSpecificationElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'ParameterSpecification'
                      }
                  }
                }
              },
              annotations: {
                client_side_validation: true,
                required: false,
                serialized_name: 'annotations',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ObjectElementType',
                      type: {
                        name: 'Object'
                      }
                  }
                }
              },
              type: {
                client_side_validation: true,
                required: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              cluster_size: {
                client_side_validation: true,
                required: true,
                serialized_name: 'typeProperties.clusterSize',
                type: {
                  name: 'Object'
                }
              },
              time_to_live: {
                client_side_validation: true,
                required: true,
                serialized_name: 'typeProperties.timeToLive',
                type: {
                  name: 'Object'
                }
              },
              version: {
                client_side_validation: true,
                required: true,
                serialized_name: 'typeProperties.version',
                type: {
                  name: 'Object'
                }
              },
              linked_service_name: {
                client_side_validation: true,
                required: true,
                serialized_name: 'typeProperties.linkedServiceName',
                default_value: {},
                type: {
                  name: 'Composite',
                  class_name: 'LinkedServiceReference'
                }
              },
              host_subscription_id: {
                client_side_validation: true,
                required: true,
                serialized_name: 'typeProperties.hostSubscriptionId',
                type: {
                  name: 'Object'
                }
              },
              service_principal_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.servicePrincipalId',
                type: {
                  name: 'Object'
                }
              },
              service_principal_key: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.servicePrincipalKey',
                type: {
                  name: 'Composite',
                  polymorphic_discriminator: 'type',
                  uber_parent: 'SecretBase',
                  class_name: 'SecretBase'
                }
              },
              tenant: {
                client_side_validation: true,
                required: true,
                serialized_name: 'typeProperties.tenant',
                type: {
                  name: 'Object'
                }
              },
              cluster_resource_group: {
                client_side_validation: true,
                required: true,
                serialized_name: 'typeProperties.clusterResourceGroup',
                type: {
                  name: 'Object'
                }
              },
              cluster_name_prefix: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.clusterNamePrefix',
                type: {
                  name: 'Object'
                }
              },
              cluster_user_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.clusterUserName',
                type: {
                  name: 'Object'
                }
              },
              cluster_password: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.clusterPassword',
                type: {
                  name: 'Composite',
                  polymorphic_discriminator: 'type',
                  uber_parent: 'SecretBase',
                  class_name: 'SecretBase'
                }
              },
              cluster_ssh_user_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.clusterSshUserName',
                type: {
                  name: 'Object'
                }
              },
              cluster_ssh_password: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.clusterSshPassword',
                type: {
                  name: 'Composite',
                  polymorphic_discriminator: 'type',
                  uber_parent: 'SecretBase',
                  class_name: 'SecretBase'
                }
              },
              additional_linked_service_names: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.additionalLinkedServiceNames',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'LinkedServiceReferenceElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'LinkedServiceReference'
                      }
                  }
                }
              },
              hcatalog_linked_service_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.hcatalogLinkedServiceName',
                type: {
                  name: 'Composite',
                  class_name: 'LinkedServiceReference'
                }
              },
              cluster_type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.clusterType',
                type: {
                  name: 'Object'
                }
              },
              spark_version: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.sparkVersion',
                type: {
                  name: 'Object'
                }
              },
              core_configuration: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.coreConfiguration',
                type: {
                  name: 'Object'
                }
              },
              h_base_configuration: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.hBaseConfiguration',
                type: {
                  name: 'Object'
                }
              },
              hdfs_configuration: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.hdfsConfiguration',
                type: {
                  name: 'Object'
                }
              },
              hive_configuration: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.hiveConfiguration',
                type: {
                  name: 'Object'
                }
              },
              map_reduce_configuration: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.mapReduceConfiguration',
                type: {
                  name: 'Object'
                }
              },
              oozie_configuration: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.oozieConfiguration',
                type: {
                  name: 'Object'
                }
              },
              storm_configuration: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.stormConfiguration',
                type: {
                  name: 'Object'
                }
              },
              yarn_configuration: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.yarnConfiguration',
                type: {
                  name: 'Object'
                }
              },
              encrypted_credential: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.encryptedCredential',
                type: {
                  name: 'Object'
                }
              },
              head_node_size: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.headNodeSize',
                type: {
                  name: 'Object'
                }
              },
              data_node_size: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.dataNodeSize',
                type: {
                  name: 'Object'
                }
              },
              zookeeper_node_size: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.zookeeperNodeSize',
                type: {
                  name: 'Object'
                }
              },
              script_actions: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.scriptActions',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ScriptActionElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'ScriptAction'
                      }
                  }
                }
              },
              virtual_network_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.virtualNetworkId',
                type: {
                  name: 'Object'
                }
              },
              subnet_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.subnetName',
                type: {
                  name: 'Object'
                }
              }
            }
          }
        }
      end
    end
  end
end
