package com.cfdeployer.model;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

@Data
public class ChunkUploadRequest {

    @NotBlank(message = "Upload session ID is required")
    private String uploadSessionId;

    @NotBlank(message = "File type is required (jarFile or manifest)")
    private String fileType; // "jarFile" or "manifest"

    @NotNull(message = "Chunk index is required")
    @Min(value = 0, message = "Chunk index must be non-negative")
    private Integer chunkIndex;

    @NotNull(message = "Total chunks is required")
    @Min(value = 1, message = "Total chunks must be at least 1")
    private Integer totalChunks;

    private String fileName;
}
