// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // using System.Collections.Generic; using Microsoft.SqlTools.Hosting.Protocol.Contracts; namespace Microsoft.SqlTools.ServiceLayer.Scripting.Contracts { /// /// Parameters for a script request. /// public class ScriptingParams { /// /// Gets or sets the file path used when writing out the script. /// public string FilePath { get; set; } /// /// Gets or sets whether scripting to a single file or file per object. /// public string ScriptDestination { get; set; } /// /// Gets or sets connection string of the target database the scripting operation will run against. /// public string ConnectionString { get; set; } /// /// Gets or sets a list of scripting objects to script. /// public List ScriptingObjects { get; set; } /// /// Gets or sets a list of scripting object which specify the include criteria of objects to script. /// public List IncludeObjectCriteria { get; set; } /// /// Gets or sets a list of scripting object which specify the exclude criteria of objects to not script. /// public List ExcludeObjectCriteria { get; set; } /// /// Gets or sets a list of schema name of objects to script. /// public List IncludeSchemas { get; set; } /// /// Gets or sets a list of schema name of objects to not script. /// public List ExcludeSchemas { get; set; } /// /// Gets or sets a list of type name of objects to script. /// public List IncludeTypes { get; set; } /// /// Gets or sets a list of type name of objects to not script /// public List ExcludeTypes { get; set; } /// /// Gets or sets the scripting options. /// public ScriptOptions ScriptOptions { get; set; } /// /// Gets or sets the connection owner URI /// public string OwnerUri { get; set; } /// /// The script operation /// public ScriptingOperationType Operation { get; set; } = ScriptingOperationType.Create; } /// /// Parameters returned from a script request. /// public class ScriptingResult { public string OperationId { get; set; } public string Script { get; set; } } /// /// Defines the scripting request type. /// public class ScriptingRequest { public static readonly RequestType Type = RequestType.Create("scripting/script"); } }