# 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::V2017_09_01_preview
  module Models
    #
    # Azure Databricks linked service.
    #
    class AzureDatabricksLinkedService < LinkedService

      include MsRestAzure


      def initialize
        @type = "AzureDatabricks"
      end

      attr_accessor :type

      # @return <REGION>.azuredatabricks.net, domain name of your Databricks
      # deployment. Type: string (or Expression with resultType string).
      attr_accessor :domain

      # @return [SecretBase] Access token for databricks REST API. Refer to
      # https://docs.azuredatabricks.net/api/latest/authentication.html. Type:
      # string (or Expression with resultType string).
      attr_accessor :access_token

      # @return The id of an existing cluster that will be used for all runs of
      # this job. Type: string (or Expression with resultType string).
      attr_accessor :existing_cluster_id

      # @return The Spark version of new cluster. Type: string (or Expression
      # with resultType string).
      attr_accessor :new_cluster_version

      # @return Number of worker nodes that new cluster should have. A string
      # formatted Int32, like '1' means numOfWorker is 1 or '1:10' means
      # auto-scale from 1 as min and 10 as max. Type: string (or Expression
      # with resultType string).
      attr_accessor :new_cluster_num_of_worker

      # @return The node types of new cluster. Type: string (or Expression with
      # resultType string).
      attr_accessor :new_cluster_node_type

      # @return a set of optional, user-specified Spark configuration key-value
      # pairs.
      attr_accessor :new_cluster_spark_conf

      # @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


      #
      # Mapper for AzureDatabricksLinkedService class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'AzureDatabricks',
          type: {
            name: 'Composite',
            class_name: 'AzureDatabricksLinkedService',
            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'
                }
              },
              domain: {
                client_side_validation: true,
                required: true,
                serialized_name: 'typeProperties.domain',
                type: {
                  name: 'Object'
                }
              },
              access_token: {
                client_side_validation: true,
                required: true,
                serialized_name: 'typeProperties.accessToken',
                type: {
                  name: 'Composite',
                  polymorphic_discriminator: 'type',
                  uber_parent: 'SecretBase',
                  class_name: 'SecretBase'
                }
              },
              existing_cluster_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.existingClusterId',
                type: {
                  name: 'Object'
                }
              },
              new_cluster_version: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.newClusterVersion',
                type: {
                  name: 'Object'
                }
              },
              new_cluster_num_of_worker: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.newClusterNumOfWorker',
                type: {
                  name: 'Object'
                }
              },
              new_cluster_node_type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.newClusterNodeType',
                type: {
                  name: 'Object'
                }
              },
              new_cluster_spark_conf: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.newClusterSparkConf',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ObjectElementType',
                      type: {
                        name: 'Object'
                      }
                  }
                }
              },
              encrypted_credential: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.encryptedCredential',
                type: {
                  name: 'Object'
                }
              }
            }
          }
        }
      end
    end
  end
end
