namespace ZB.MOM.WW.MxGateway.Server.Configuration;

public sealed class GatewayOptions
{
    public const string SectionName = "MxGateway";

    /// <summary>
    /// Gets authentication configuration options.
    /// </summary>
    public AuthenticationOptions Authentication { get; init; } = new();

    /// <summary>Gets LDAP configuration options.</summary>
    public LdapOptions Ldap { get; init; } = new();

    /// <summary>
    /// Gets worker process configuration options.
    /// </summary>
    public WorkerOptions Worker { get; init; } = new();

    /// <summary>
    /// Gets session management configuration options.
    /// </summary>
    public SessionOptions Sessions { get; init; } = new();

    /// <summary>
    /// Gets event stream configuration options.
    /// </summary>
    public EventOptions Events { get; init; } = new();

    /// <summary>
    /// Gets dashboard configuration options.
    /// </summary>
    public DashboardOptions Dashboard { get; init; } = new();

    /// <summary>
    /// Gets protocol configuration options.
    /// </summary>
    public ProtocolOptions Protocol { get; init; } = new();

    /// <summary>
    /// Gets alarm-subsystem configuration options. Drives the gateway's
    /// auto-subscribe-on-session-open hook; default values preserve legacy
    /// behaviour (alarms disabled).
    /// </summary>
    public AlarmsOptions Alarms { get; init; } = new();

    /// <summary>Gets self-signed TLS certificate auto-generation options.</summary>
    public TlsOptions Tls { get; init; } = new();

    /// <summary>
    /// Gets security hot-path options (API-key verification cache / last-used coalescing and
    /// login / API-key rate limiting).
    /// </summary>
    public SecurityOptions Security { get; init; } = new();
}
