# 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
    #
    # 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 Required to specify MSI, if using Workspace resource id for
      # databricks REST API. Type: string (or Expression with resultType
      # string).
      attr_accessor :authentication

      # @return Workspace resource id for databricks REST API. Type: string (or
      # Expression with resultType string).
      attr_accessor :workspace_resource_id

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

      # @return The id of an existing instance pool that will be used for all
      # runs of this activity. Type: string (or Expression with resultType
      # string).
      attr_accessor :instance_pool_id

      # @return If not using an existing interactive cluster, this specifies
      # the Spark version of a new job cluster or instance pool nodes created
      # for each run of this activity. Required if instancePoolId is specified.
      # Type: string (or Expression with resultType string).
      attr_accessor :new_cluster_version

      # @return If not using an existing interactive cluster, this specifies
      # the number of worker nodes to use for the new job cluster or instance
      # pool. For new job clusters, this a string-formatted Int32, like '1'
      # means numOfWorker is 1 or '1:10' means auto-scale from 1 (min) to 10
      # (max). For instance pools, this is a string-formatted Int32, and can
      # only specify a fixed number of worker nodes, such as '2'. Required if
      # newClusterVersion is specified. Type: string (or Expression with
      # resultType string).
      attr_accessor :new_cluster_num_of_worker

      # @return The node type of the new job cluster. This property is required
      # if newClusterVersion is specified and instancePoolId is not specified.
      # If instancePoolId is specified, this property is ignored. 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 A set of optional, user-specified Spark environment variables
      # key-value pairs.
      attr_accessor :new_cluster_spark_env_vars

      # @return Additional tags for cluster resources. This property is ignored
      # in instance pool configurations.
      attr_accessor :new_cluster_custom_tags

      # @return Specify a location to deliver Spark driver, worker, and event
      # logs. Type: string (or Expression with resultType string).
      attr_accessor :new_cluster_log_destination

      # @return The driver node type for the new job cluster. This property is
      # ignored in instance pool configurations. Type: string (or Expression
      # with resultType string).
      attr_accessor :new_cluster_driver_node_type

      # @return User-defined initialization scripts for the new cluster. Type:
      # array of strings (or Expression with resultType array of strings).
      attr_accessor :new_cluster_init_scripts

      # @return Enable the elastic disk on the new cluster. This property is
      # now ignored, and takes the default elastic disk behavior in Databricks
      # (elastic disks are always enabled). Type: boolean (or Expression with
      # resultType boolean).
      attr_accessor :new_cluster_enable_elastic_disk

      # @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 The policy id for limiting the ability to configure clusters
      # based on a user defined set of rules. Type: string (or Expression with
      # resultType string).
      attr_accessor :policy_id


      #
      # 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: false,
                serialized_name: 'typeProperties.accessToken',
                type: {
                  name: 'Composite',
                  polymorphic_discriminator: 'type',
                  uber_parent: 'SecretBase',
                  class_name: 'SecretBase'
                }
              },
              authentication: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.authentication',
                type: {
                  name: 'Object'
                }
              },
              workspace_resource_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.workspaceResourceId',
                type: {
                  name: 'Object'
                }
              },
              existing_cluster_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.existingClusterId',
                type: {
                  name: 'Object'
                }
              },
              instance_pool_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.instancePoolId',
                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'
                      }
                  }
                }
              },
              new_cluster_spark_env_vars: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.newClusterSparkEnvVars',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ObjectElementType',
                      type: {
                        name: 'Object'
                      }
                  }
                }
              },
              new_cluster_custom_tags: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.newClusterCustomTags',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ObjectElementType',
                      type: {
                        name: 'Object'
                      }
                  }
                }
              },
              new_cluster_log_destination: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.newClusterLogDestination',
                type: {
                  name: 'Object'
                }
              },
              new_cluster_driver_node_type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.newClusterDriverNodeType',
                type: {
                  name: 'Object'
                }
              },
              new_cluster_init_scripts: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.newClusterInitScripts',
                type: {
                  name: 'Object'
                }
              },
              new_cluster_enable_elastic_disk: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.newClusterEnableElasticDisk',
                type: {
                  name: 'Object'
                }
              },
              encrypted_credential: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.encryptedCredential',
                type: {
                  name: 'Object'
                }
              },
              policy_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.policyId',
                type: {
                  name: 'Object'
                }
              }
            }
          }
        }
      end
    end
  end
end
