using System.ComponentModel.DataAnnotations;

namespace FrameProcessor.Configuration;

/// <summary>
/// Bound from the <c>UrlFetch</c> section of <c>appsettings.json</c>. See SPEC.md §6.1, §8.
/// </summary>
public sealed class UrlFetchOptions
{
    public const string SectionName = "UrlFetch";

    [Range(1, long.MaxValue)]
    public long MaxBytes { get; set; } = 52_428_800L;

    [Range(1, int.MaxValue)]
    public int TimeoutSeconds { get; set; } = 30;

    [Range(0, int.MaxValue)]
    public int MaxRedirects { get; set; } = 3;
}
