using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;

namespace StellaOps.Scanner.Sbomer.BuildXPlugin.Descriptor;

/// <summary>
/// Root payload describing BuildX generator output with provenance placeholders.
/// </summary>
public sealed record DescriptorDocument(
    [property: JsonPropertyName("schema")] string Schema,
    [property: JsonPropertyName("generatedAt")] DateTimeOffset GeneratedAt,
    [property: JsonPropertyName("generator")] DescriptorGeneratorMetadata Generator,
    [property: JsonPropertyName("subject")] DescriptorSubject Subject,
    [property: JsonPropertyName("artifact")] DescriptorArtifact Artifact,
    [property: JsonPropertyName("provenance")] DescriptorProvenance Provenance,
    [property: JsonPropertyName("metadata")] IReadOnlyDictionary<string, string> Metadata);
