// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

// <auto-generated/>

#nullable disable

using System;
using System.Collections.Generic;
using Azure.Core;

namespace Azure.Analytics.Synapse.Artifacts.Models
{
    /// <summary> DatabricksNotebook activity. </summary>
    public partial class DatabricksNotebookActivity : ExecutionActivity
    {
        /// <summary> Initializes a new instance of DatabricksNotebookActivity. </summary>
        /// <param name="name"> Activity name. </param>
        /// <param name="notebookPath"> The absolute path of the notebook to be run in the Databricks Workspace. This path must begin with a slash. Type: string (or Expression with resultType string). </param>
        /// <exception cref="ArgumentNullException"> <paramref name="name"/> or <paramref name="notebookPath"/> is null. </exception>
        public DatabricksNotebookActivity(string name, object notebookPath) : base(name)
        {
            if (name == null)
            {
                throw new ArgumentNullException(nameof(name));
            }
            if (notebookPath == null)
            {
                throw new ArgumentNullException(nameof(notebookPath));
            }

            NotebookPath = notebookPath;
            BaseParameters = new ChangeTrackingDictionary<string, object>();
            Libraries = new ChangeTrackingList<IDictionary<string, object>>();
            Type = "DatabricksNotebook";
        }

        /// <summary> Initializes a new instance of DatabricksNotebookActivity. </summary>
        /// <param name="name"> Activity name. </param>
        /// <param name="type"> Type of activity. </param>
        /// <param name="description"> Activity description. </param>
        /// <param name="dependsOn"> Activity depends on condition. </param>
        /// <param name="userProperties"> Activity user properties. </param>
        /// <param name="additionalProperties"> Additional Properties. </param>
        /// <param name="linkedServiceName"> Linked service reference. </param>
        /// <param name="policy"> Activity policy. </param>
        /// <param name="notebookPath"> The absolute path of the notebook to be run in the Databricks Workspace. This path must begin with a slash. Type: string (or Expression with resultType string). </param>
        /// <param name="baseParameters"> Base parameters to be used for each run of this job.If the notebook takes a parameter that is not specified, the default value from the notebook will be used. </param>
        /// <param name="libraries"> A list of libraries to be installed on the cluster that will execute the job. </param>
        internal DatabricksNotebookActivity(string name, string type, string description, IList<ActivityDependency> dependsOn, IList<UserProperty> userProperties, IDictionary<string, object> additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object notebookPath, IDictionary<string, object> baseParameters, IList<IDictionary<string, object>> libraries) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy)
        {
            NotebookPath = notebookPath;
            BaseParameters = baseParameters;
            Libraries = libraries;
            Type = type ?? "DatabricksNotebook";
        }

        /// <summary> The absolute path of the notebook to be run in the Databricks Workspace. This path must begin with a slash. Type: string (or Expression with resultType string). </summary>
        public object NotebookPath { get; set; }
        /// <summary> Base parameters to be used for each run of this job.If the notebook takes a parameter that is not specified, the default value from the notebook will be used. </summary>
        public IDictionary<string, object> BaseParameters { get; }
        /// <summary> A list of libraries to be installed on the cluster that will execute the job. </summary>
        public IList<IDictionary<string, object>> Libraries { get; }
    }
}
