26 lines
732 B
Java
26 lines
732 B
Java
package p.packer.messages;
|
|
|
|
import java.nio.file.Path;
|
|
import java.util.Objects;
|
|
|
|
public record DeleteAssetResult(
|
|
PackerOperationStatus status,
|
|
String summary,
|
|
Path assetRoot,
|
|
Path manifestPath) {
|
|
|
|
public DeleteAssetResult {
|
|
Objects.requireNonNull(status, "status");
|
|
summary = Objects.requireNonNull(summary, "summary").trim();
|
|
if (summary.isBlank()) {
|
|
throw new IllegalArgumentException("summary must not be blank");
|
|
}
|
|
if (assetRoot != null) {
|
|
assetRoot = assetRoot.toAbsolutePath().normalize();
|
|
}
|
|
if (manifestPath != null) {
|
|
manifestPath = manifestPath.toAbsolutePath().normalize();
|
|
}
|
|
}
|
|
}
|