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

/**
 * Document orientation detection result.
 */
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = OrientationResult.Builder.class)
public record OrientationResult(
    /**
     * Detected orientation in degrees (0, 90, 180, or 270).
     */
    @JsonProperty("degrees") int degrees,
    /**
     * Confidence score (0.0-1.0).
     */
    @JsonProperty("confidence") float confidence
) {
    public static Builder builder() {
        return new Builder();
    }

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

private int degrees = 0;
private float confidence = 0.0f;

        /** Sets the degrees field. */
        @JsonProperty("degrees")
        public Builder withDegrees(final int value) {
            this.degrees = value;
            return this;
        }

        /** Sets the confidence field. */
        @JsonProperty("confidence")
        public Builder withConfidence(final float value) {
            this.confidence = value;
            return this;
        }

        /** Builds the OrientationResult instance. */
        public OrientationResult build() {
            return new OrientationResult(
                degrees,
                confidence
            );
        }
    }
    // CPD-ON
}
