// 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;

/**
 * YAKE-specific parameters.
 */
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = YakeParams.Builder.class)
public record YakeParams(@JsonProperty("window_size") long windowSize) {
    public static Builder builder() {
        return new Builder();
    }
    public YakeParams{
        if (windowSize == 0) windowSize = 2;
    }

    // CPD-OFF
    @JsonPOJOBuilder(withPrefix = "with", buildMethodName = "build")
    public static final class Builder {

        @JsonProperty("window_size")
private long windowSize = 0;

        /** Sets the windowSize field. */
        @JsonProperty("window_size")
        public Builder withWindowSize(final long value) {
            this.windowSize = value;
            return this;
        }

        /** Builds the YakeParams instance. */
        public YakeParams build() {
            return new YakeParams(
                windowSize
            );
        }
    }
    // CPD-ON
    public static YakeParams defaultInstance() {
        throw new UnsupportedOperationException("defaultInstance is not yet bridged via JNI; use the Builder instead.");
    }
}
