class Builder {

        /**
         * Utility constructor.
         */
        private Builder() {
        }

        /**
         * Creates new {@link XAutoClaimArgs} and set the {@code JUSTID} flag to return just the message id and do not increment
         * the retry counter. The message body is not returned when calling {@code XAUTOCLAIM}.
         *
         * @param consumer
         * @param minIdleTime
         * @param startId
         * @param <K>
         * @return new {@link XAutoClaimArgs} with {@code minIdleTime} and {@code startId} configured.
         */
        public static <K> XAutoClaimArgs<K> justid(Consumer<K> consumer, long minIdleTime, String startId) {
            return new XAutoClaimArgs<K>().justid().consumer(consumer).minIdleTime(minIdleTime).startId(startId);
        }

        /**
         * Creates new {@link XAutoClaimArgs} and set the {@code JUSTID} flag to return just the message id and do not increment
         * the retry counter. The message body is not returned when calling {@code XAUTOCLAIM}.
         *
         * @param consumer
         * @param minIdleTime
         * @param startId
         * @param <K>
         * @return new {@link XAutoClaimArgs} with {@code minIdleTime} and {@code startId} configured.
         */
        public static <K> XAutoClaimArgs<K> justid(Consumer<K> consumer, Duration minIdleTime, String startId) {
            return new XAutoClaimArgs<K>().justid().consumer(consumer).minIdleTime(minIdleTime).startId(startId);
        }

        /**
         * Creates new {@link XAutoClaimArgs}.
         *
         * @param consumer
         * @param minIdleTime
         * @param startId
         * @param <K>
         * @return new {@link XAutoClaimArgs} with {@code minIdleTime} and {@code startId} configured.
         */
        public static <K> XAutoClaimArgs<K> xautoclaim(Consumer<K> consumer, long minIdleTime, String startId) {
            return new XAutoClaimArgs<K>().consumer(consumer).minIdleTime(minIdleTime).startId(startId);
        }

        /**
         * Creates new {@link XAutoClaimArgs}.
         *
         * @param consumer
         * @param minIdleTime
         * @param startId
         * @param <K>
         * @return new {@link XAutoClaimArgs} with {@code minIdleTime} and {@code startId} configured.
         */
        public static <K> XAutoClaimArgs<K> xautoclaim(Consumer<K> consumer, Duration minIdleTime, String startId) {
            return new XAutoClaimArgs<K>().consumer(consumer).minIdleTime(minIdleTime).startId(startId);
        }

    }

    /**
     * Configure the {@link Consumer}.
     *
     * @param consumer
     * @return {@code this}.
     */
    public XAutoClaimArgs<K> consumer(Consumer<K> consumer) {

        LettuceAssert.notNull(consumer, "Consumer must not be null");

        this.consumer = consumer;
        return this;
    }

    /**
     * The optional {@code count} argument, which defaults to {@code 100}, is the upper limit of the number of entries that the
     * command attempts to claim.
     *
     * @param count
     * @return {@code this}.
     */
    public XAutoClaimArgs<K> count(long count) {

        this.count = count;
        return this;
    }

    /**
     * The optional {@code JUSTID} argument changes the reply to return just an array of IDs of messages successfully claimed,
     * without returning the actual message. Using this option means the retry counter is not incremented.
     *
     * @return {@code this}.
     */
    public XAutoClaimArgs<K> justid() {

        this.justid = true;
        return this;
    }

    /**
     * Return only messages that are idle for at least {@code milliseconds}.
     *
     * @param milliseconds min idle time.
     * @return {@code this}.
     */
    public XAutoClaimArgs<K> minIdleTime(long milliseconds) {

        this.minIdleTime = milliseconds;
        return this;
    }

    /**
     * Return only messages that are idle for at least {@code minIdleTime}.
     *
     * @param minIdleTime min idle time.
     * @return {@code this}.
     */
    public XAutoClaimArgs<K> minIdleTime(Duration minIdleTime) {<FILL_FUNCTION_BODY>


        LettuceAssert.notNull(minIdleTime, "Min idle time must not be null");

        return minIdleTime(minIdleTime.toMillis());
    
<no_super_class>