Files
fil/packages/java/dev/kreuzberg/DetectionResult.java
Henrik Jess Nielsen b4c07d3693
All checks were successful
Deploy fil (kreuzberg) / deploy (push) Successful in 49s
Nomad changes
2026-06-01 23:40:55 +02:00

70 lines
2.2 KiB
Java
Generated

// This file is auto-generated by alef — DO NOT EDIT.
// alef:hash:4e15143f4af1ae8bafbdb1506ef057da924484c66a19483966333558ad437e75
// To regenerate: alef generate
// To verify freshness: alef verify --exit-code
// Issues & docs: https://github.com/kreuzberg-dev/alef
package dev.kreuzberg;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
/**
* Page-level detection result containing all detections and page metadata.
*/
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = DetectionResult.Builder.class)
public record DetectionResult(
@JsonProperty("page_width") int pageWidth,
@JsonProperty("page_height") int pageHeight,
@JsonProperty("detections") List<LayoutDetection> detections
) {
public static Builder builder() {
return new Builder();
}
// CPD-OFF
@JsonPOJOBuilder(withPrefix = "with", buildMethodName = "build")
public static final class Builder {
@JsonProperty("page_width")
private int pageWidth = 0;
@JsonProperty("page_height")
private int pageHeight = 0;
private List<LayoutDetection> detections = List.of();
/** Sets the pageWidth field. */
@JsonProperty("page_width")
public Builder withPageWidth(final int value) {
this.pageWidth = value;
return this;
}
/** Sets the pageHeight field. */
@JsonProperty("page_height")
public Builder withPageHeight(final int value) {
this.pageHeight = value;
return this;
}
/** Sets the detections field. */
@JsonProperty("detections")
public Builder withDetections(final List<LayoutDetection> value) {
this.detections = value;
return this;
}
/** Builds the DetectionResult instance. */
public DetectionResult build() {
return new DetectionResult(
pageWidth,
pageHeight,
detections
);
}
}
// CPD-ON
}