using System.ComponentModel.DataAnnotations; namespace FrameProcessor.Configuration; /// /// Bound from the Mqtt section of appsettings.json. See SPEC.md ยง6.1. /// public sealed class MqttOptions { public const string SectionName = "Mqtt"; [Required(AllowEmptyStrings = false)] public string Host { get; set; } = string.Empty; [Range(1, 65535)] public int Port { get; set; } = 1883; [Required(AllowEmptyStrings = false)] public string ClientId { get; set; } = string.Empty; public string? Username { get; set; } public string? Password { get; set; } public bool UseTls { get; set; } [Required(AllowEmptyStrings = false)] public string BaseTopic { get; set; } = "frames"; [Range(0, 2)] public int PublishQos { get; set; } = 1; [MinLength(1)] public int[] RetryBackoffSeconds { get; set; } = Array.Empty(); }