This commit is contained in:
47
packages/java/dev/kreuzberg/HeadingContext.java
generated
Normal file
47
packages/java/dev/kreuzberg/HeadingContext.java
generated
Normal file
@@ -0,0 +1,47 @@
|
||||
// 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;
|
||||
|
||||
/**
|
||||
* Heading context for a chunk within a Markdown document.
|
||||
*
|
||||
* Contains the heading hierarchy from document root to this chunk's section.
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_ABSENT)
|
||||
@JsonDeserialize(builder = HeadingContext.Builder.class)
|
||||
public record HeadingContext(@JsonProperty("headings") List<HeadingLevel> headings) {
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
// CPD-OFF
|
||||
@JsonPOJOBuilder(withPrefix = "with", buildMethodName = "build")
|
||||
public static final class Builder {
|
||||
|
||||
private List<HeadingLevel> headings = List.of();
|
||||
|
||||
/** Sets the headings field. */
|
||||
@JsonProperty("headings")
|
||||
public Builder withHeadings(final List<HeadingLevel> value) {
|
||||
this.headings = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Builds the HeadingContext instance. */
|
||||
public HeadingContext build() {
|
||||
return new HeadingContext(
|
||||
headings
|
||||
);
|
||||
}
|
||||
}
|
||||
// CPD-ON
|
||||
}
|
||||
Reference in New Issue
Block a user