using StellaOps.Scheduler.Models; using System.Text.Json.Serialization; namespace StellaOps.Scheduler.WebService.GraphJobs; public sealed record GraphJobQuery { [JsonConverter(typeof(JsonStringEnumConverter))] public GraphJobQueryType? Type { get; init; } [JsonConverter(typeof(JsonStringEnumConverter))] public GraphJobStatus? Status { get; init; } public int? Limit { get; init; } internal GraphJobQuery Normalize() => this with { Limit = Limit is null or <= 0 or > 200 ? 50 : Limit }; } public enum GraphJobQueryType { Build, Overlay }