class Builder {

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

        /**
         * Creates new {@link RestoreArgs} and set the TTL.
         *
         * @return new {@link RestoreArgs} with min idle time set.
         * @see RestoreArgs#ttl(long)
         */
        public static RestoreArgs ttl(long milliseconds) {
            return new RestoreArgs().ttl(milliseconds);
        }

        /**
         * Creates new {@link RestoreArgs} and set the minimum idle time.
         *
         * @return new {@link RestoreArgs} with min idle time set.
         * @see RestoreArgs#ttl(Duration)
         */
        public static RestoreArgs ttl(Duration ttl) {

            LettuceAssert.notNull(ttl, "Time to live must not be null");

            return ttl(ttl.toMillis());
        }

    }

    /**
     * Set TTL in {@code milliseconds} after restoring the key.
     *
     * @param milliseconds time to live.
     * @return {@code this}.
     */
    public RestoreArgs ttl(long milliseconds) {

        this.ttl = milliseconds;
        return this;
    }

    /**
     * Set TTL in {@code milliseconds} after restoring the key.
     *
     * @param ttl time to live.
     * @return {@code this}.
     */
    public RestoreArgs ttl(Duration ttl) {<FILL_FUNCTION_BODY>


        LettuceAssert.notNull(ttl, "Time to live must not be null");

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