using System.Linq.Expressions;
namespace AIStudio.Settings.DataModel;
///
/// Settings which apply to all mailboxes, as opposed to the settings of each one.
///
public sealed class DataMailboxes(Expression>? configSelection = null)
{
///
/// The default constructor for the JSON deserializer.
///
public DataMailboxes() : this(null)
{
}
///
/// The least strict outbound data restriction a mailbox may have.
///
///
/// Only an organization sets it; the default leaves every level to the user. A mailbox set to a
/// less strict level gets this one when its mails reach a chat, see
/// MailToolResults.GetRequirements, and its dialog no longer offers the less strict levels.
///
public OutboundDataRestriction MinimumOutboundDataRestriction { get; set; } = ManagedConfiguration.Register(configSelection, n => n.MinimumOutboundDataRestriction, OutboundDataRestriction.UNRESTRICTED);
///
/// Whether mailboxes may only be on the mail servers which configuration plugins offer.
///
///
/// Only an organization sets it. AI Studio then connects to no other server, and the mail tools
/// leave a mailbox on another server out, see MailServerPolicy. Its index stays, so the mailbox
/// comes back as it was once the organization allows its server again.
///
public bool AllowOnlyOrganizationMailServers { get; set; } = ManagedConfiguration.Register(configSelection, n => n.AllowOnlyOrganizationMailServers, false);
}