namespace NATS.Server.JetStream.Models; public sealed class StreamConfig { public string Name { get; set; } = string.Empty; public List Subjects { get; set; } = []; public int MaxMsgs { get; set; } public long MaxBytes { get; set; } public int MaxMsgsPer { get; set; } public int MaxAgeMs { get; set; } public int MaxMsgSize { get; set; } public int MaxConsumers { get; set; } public int DuplicateWindowMs { get; set; } public bool Sealed { get; set; } public bool DenyDelete { get; set; } public bool DenyPurge { get; set; } public bool AllowDirect { get; set; } public RetentionPolicy Retention { get; set; } = RetentionPolicy.Limits; public DiscardPolicy Discard { get; set; } = DiscardPolicy.Old; public StorageType Storage { get; set; } = StorageType.Memory; public int Replicas { get; set; } = 1; public string? Mirror { get; set; } public string? Source { get; set; } public List Sources { get; set; } = []; } public enum StorageType { Memory, File, } public sealed class StreamSourceConfig { public string Name { get; set; } = string.Empty; public string? SubjectTransformPrefix { get; set; } public string? SourceAccount { get; set; } // Go: StreamSource.FilterSubject — only forward messages matching this subject filter. public string? FilterSubject { get; set; } // Deduplication window in milliseconds for Nats-Msg-Id header-based dedup. // Defaults to 0 (disabled). When > 0, duplicate messages with the same Nats-Msg-Id // within this window are silently dropped. public int DuplicateWindowMs { get; set; } }