namespace ScadaLink.Commons.Entities.Notifications;

public class SmtpConfiguration
{
    public int Id { get; set; }
    public string Host { get; set; }
    public int Port { get; set; }
    public string AuthType { get; set; }
    public string? Credentials { get; set; }
    public string? TlsMode { get; set; }
    public string FromAddress { get; set; }
    public int ConnectionTimeoutSeconds { get; set; }
    public int MaxConcurrentConnections { get; set; }
    public int MaxRetries { get; set; }
    public TimeSpan RetryDelay { get; set; }

    public SmtpConfiguration(string host, string authType, string fromAddress)
    {
        Host = host ?? throw new ArgumentNullException(nameof(host));
        AuthType = authType ?? throw new ArgumentNullException(nameof(authType));
        FromAddress = fromAddress ?? throw new ArgumentNullException(nameof(fromAddress));
    }
}
