namespace SatelliteProvider.Common.DTO;

// AZ-488 / `uav-tile-upload.md` v1.0.0 — per-item response shape. Status and
// RejectReason strings are part of the frozen contract; any change requires a
// contract minor-version bump.
public record UavTileBatchUploadResponse
{
    public List<UavTileUploadResultItem> Items { get; init; } = new();
}

public record UavTileUploadResultItem
{
    public int Index { get; init; }
    public string Status { get; init; } = string.Empty;
    public Guid? TileId { get; init; }
    public string? RejectReason { get; init; }
    public string? RejectDetails { get; init; }
}

public static class UavTileUploadStatus
{
    public const string Accepted = "accepted";
    public const string Rejected = "rejected";
}

// AZ-488: closed enumeration of reject reasons exposed through the v1.0.0
// contract. Adding a new code REQUIRES a minor contract bump per the
// Versioning Rules in `_docs/02_document/contracts/api/uav-tile-upload.md`.
public static class UavTileRejectReasons
{
    public const string InvalidFormat = "INVALID_FORMAT";
    public const string SizeOutOfBand = "SIZE_OUT_OF_BAND";
    public const string WrongDimensions = "WRONG_DIMENSIONS";
    public const string CapturedAtFuture = "CAPTURED_AT_FUTURE";
    public const string CapturedAtTooOld = "CAPTURED_AT_TOO_OLD";
    public const string ImageTooUniform = "IMAGE_TOO_UNIFORM";
    public const string MetadataMissing = "METADATA_MISSING";
    public const string StorageFailure = "STORAGE_FAILURE";
}
