// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts; namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts { /// /// Parameters for the Connect Request. /// public class ConnectParams { /// /// A URI identifying the owner of the connection. This will most commonly be a file in the workspace /// or a virtual file representing an object in a database. /// public string OwnerUri { get; set; } /// /// Contains the required parameters to initialize a connection to a database. /// A connection will identified by its server name, database name and user name. /// This may be changed in the future to support multiple connections with different /// connection properties to the same database. /// public ConnectionDetails Connection { get; set; } } /// /// Message format for the connection result response /// public class ConnectResponse { /// /// A GUID representing a unique connection ID /// public string ConnectionId { get; set; } /// /// Gets or sets any connection error messages /// public string Messages { get; set; } } /// /// Provides high level information about a connection. /// public class ConnectionSummary { /// /// Gets or sets the connection server name /// public string ServerName { get; set; } /// /// Gets or sets the connection database name /// public string DatabaseName { get; set; } /// /// Gets or sets the connection user name /// public string UserName { get; set; } } /// /// Message format for the initial connection request /// public class ConnectionDetails : ConnectionSummary { /// /// Gets or sets the connection password /// /// public string Password { get; set; } // TODO Handle full set of properties } /// /// Connect request mapping entry /// public class ConnectionRequest { public static readonly RequestType Type = RequestType.Create("connection/connect"); } }