// Per-account JetStream resource limits.
// Go reference: accounts.go JetStreamAccountLimits struct.
namespace NATS.Server.Auth;
///
/// Per-account limits on JetStream resources: storage, streams, consumers, and ack pending.
/// A value of 0 means unlimited for all fields.
///
public sealed record AccountLimits
{
/// Maximum total storage in bytes (0 = unlimited).
public long MaxStorage { get; init; }
/// Maximum number of streams (0 = unlimited).
public int MaxStreams { get; init; }
/// Maximum number of consumers (0 = unlimited).
public int MaxConsumers { get; init; }
/// Maximum pending ack count per consumer (0 = unlimited).
public int MaxAckPending { get; init; }
/// Maximum memory-based storage in bytes (0 = unlimited).
public long MaxMemoryStorage { get; init; }
/// Maximum disk-based storage in bytes (0 = unlimited).
public long MaxDiskStorage { get; init; }
/// Default instance with all limits set to unlimited (0).
public static AccountLimits Unlimited { get; } = new();
}