using FluentValidation; using VigilCare.ClinicalContracts.Sync; public class GatewayHeartbeatRequestValidator : AbstractValidator { private static readonly string[] AllowedStatuses = ["ONLINE", "DEGRADED", "OFFLINE"]; public GatewayHeartbeatRequestValidator() { RuleFor(x => x.Status).NotEmpty() .Must(s => AllowedStatuses.Contains(s.ToUpperInvariant())) .WithMessage("Status must be ONLINE, DEGRADED, or OFFLINE."); RuleFor(x => x.BufferDepth).GreaterThanOrEqualTo(0); RuleFor(x => x.ReportedAtUtc).NotEmpty(); } }