namespace PSProxmox.Models
{
///
/// Represents connection information for a Proxmox VE server.
///
public class ProxmoxConnectionInfo
{
///
/// Gets or sets the server hostname or IP address.
///
public string Server { get; set; }
///
/// Gets or sets the port number.
///
public int Port { get; set; }
///
/// Gets or sets a value indicating whether the connection uses HTTPS.
///
public bool UseSSL { get; set; }
///
/// Gets or sets the username used for authentication.
///
public string Username { get; set; }
///
/// Gets or sets the realm used for authentication.
///
public string Realm { get; set; }
///
/// Gets or sets a value indicating whether the connection is authenticated.
///
public bool IsAuthenticated { get; set; }
///
/// Creates a new instance of the class from a object.
///
/// The connection object.
/// A new connection information object.
public static ProxmoxConnectionInfo FromConnection(Session.ProxmoxConnection connection)
{
return new ProxmoxConnectionInfo
{
Server = connection.Server,
Port = connection.Port,
UseSSL = connection.UseSSL,
Username = connection.Username,
Realm = connection.Realm,
IsAuthenticated = connection.IsAuthenticated
};
}
}
}