package dev.photosync.core.provider;

import java.nio.file.Path;
import java.time.Instant;

/**
 * One file to push to the backend.
 *
 * <p>Carries no checksum and no device identifier: those are backend-specific
 * and are derived inside the provider that needs them.
 */
public record UploadRequest(
        Path file,
        String fileName,
        Instant capturedAt,
        Instant modifiedAt,
        AlbumRef album,
        String description) {

    public UploadRequest {
        album = album == null ? AlbumRef.library() : album;
        modifiedAt = modifiedAt == null ? capturedAt : modifiedAt;
        description = description == null ? "" : description;
    }
}
