// 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;
import org.jspecify.annotations.Nullable;

/**
 * Post-processor configuration.
 */
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = PostProcessorConfig.Builder.class)
public record PostProcessorConfig(
    /**
     * Enable post-processors
     */
    @Nullable @JsonProperty("enabled") Boolean enabled,
    /**
     * Whitelist of processor names to run (null = all enabled)
     */
    @Nullable @JsonProperty("enabled_processors") List<String> enabledProcessors,
    /**
     * Blacklist of processor names to skip (null = none disabled)
     */
    @Nullable @JsonProperty("disabled_processors") List<String> disabledProcessors,
    /**
     * Pre-computed AHashSet for O(1) enabled processor lookup
     */
    @Nullable @JsonProperty("enabled_set") List<String> enabledSet,
    /**
     * Pre-computed AHashSet for O(1) disabled processor lookup
     */
    @Nullable @JsonProperty("disabled_set") List<String> disabledSet
) {
    public static Builder builder() {
        return new Builder();
    }

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

private Boolean enabled = null;
        @JsonProperty("enabled_processors")
private List<String> enabledProcessors = null;
        @JsonProperty("disabled_processors")
private List<String> disabledProcessors = null;
        @JsonProperty("enabled_set")
private List<String> enabledSet = null;
        @JsonProperty("disabled_set")
private List<String> disabledSet = null;

        /** Sets the enabled field. */
        @JsonProperty("enabled")
        public Builder withEnabled(final @Nullable Boolean value) {
            this.enabled = value;
            return this;
        }

        /** Sets the enabledProcessors field. */
        @JsonProperty("enabled_processors")
        public Builder withEnabledProcessors(final @Nullable List<String> value) {
            this.enabledProcessors = value;
            return this;
        }

        /** Sets the disabledProcessors field. */
        @JsonProperty("disabled_processors")
        public Builder withDisabledProcessors(final @Nullable List<String> value) {
            this.disabledProcessors = value;
            return this;
        }

        /** Sets the enabledSet field. */
        @JsonProperty("enabled_set")
        public Builder withEnabledSet(final @Nullable List<String> value) {
            this.enabledSet = value;
            return this;
        }

        /** Sets the disabledSet field. */
        @JsonProperty("disabled_set")
        public Builder withDisabledSet(final @Nullable List<String> value) {
            this.disabledSet = value;
            return this;
        }

        /** Builds the PostProcessorConfig instance. */
        public PostProcessorConfig build() {
            return new PostProcessorConfig(
                enabled,
                enabledProcessors,
                disabledProcessors,
                enabledSet,
                disabledSet
            );
        }
    }
    // CPD-ON
    public static PostProcessorConfig defaultInstance() {
        throw new UnsupportedOperationException("defaultInstance is not yet bridged via JNI; use the Builder instead.");
    }
}
