This commit is contained in:
85
packages/java/dev/kreuzberg/DiffOptions.java
generated
Normal file
85
packages/java/dev/kreuzberg/DiffOptions.java
generated
Normal file
@@ -0,0 +1,85 @@
|
||||
// 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 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;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Options controlling how two {@code ExtractionResult} values are compared.
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_ABSENT)
|
||||
@JsonDeserialize(builder = DiffOptions.Builder.class)
|
||||
public record DiffOptions(
|
||||
/**
|
||||
* Include metadata changes in the diff. Default: {@code true}.
|
||||
*/
|
||||
@JsonProperty("include_metadata") boolean includeMetadata,
|
||||
/**
|
||||
* Include embedded-children changes in the diff. Default: {@code true}.
|
||||
*/
|
||||
@JsonProperty("include_embedded") boolean includeEmbedded,
|
||||
/**
|
||||
* Truncate content to this many characters before diffing.
|
||||
*
|
||||
* Useful for very large documents where only the first N characters matter.
|
||||
* {@code None} means no truncation.
|
||||
*/
|
||||
@Nullable @JsonProperty("max_content_chars") Long maxContentChars
|
||||
) {
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
// CPD-OFF
|
||||
@JsonPOJOBuilder(withPrefix = "with", buildMethodName = "build")
|
||||
public static final class Builder {
|
||||
|
||||
@JsonProperty("include_metadata")
|
||||
private boolean includeMetadata = true;
|
||||
@JsonProperty("include_embedded")
|
||||
private boolean includeEmbedded = true;
|
||||
@JsonProperty("max_content_chars")
|
||||
private Long maxContentChars = null;
|
||||
|
||||
/** Sets the includeMetadata field. */
|
||||
@JsonProperty("include_metadata")
|
||||
public Builder withIncludeMetadata(final boolean value) {
|
||||
this.includeMetadata = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Sets the includeEmbedded field. */
|
||||
@JsonProperty("include_embedded")
|
||||
public Builder withIncludeEmbedded(final boolean value) {
|
||||
this.includeEmbedded = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Sets the maxContentChars field. */
|
||||
@JsonProperty("max_content_chars")
|
||||
public Builder withMaxContentChars(final @Nullable long value) {
|
||||
this.maxContentChars = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Builds the DiffOptions instance. */
|
||||
public DiffOptions build() {
|
||||
return new DiffOptions(
|
||||
includeMetadata,
|
||||
includeEmbedded,
|
||||
maxContentChars
|
||||
);
|
||||
}
|
||||
}
|
||||
// CPD-ON
|
||||
public static DiffOptions defaultInstance() {
|
||||
throw new UnsupportedOperationException("defaultInstance is not yet bridged via JNI; use the Builder instead.");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user