package org.apereo.cas.consent;

import java.util.Arrays;

/**
 * This is {@link ConsentReminderOptions}.
 *
 * @author Misagh Moayyed
 * @since 5.2.0
 */
public enum ConsentReminderOptions {
    /**
     * Always ask for consent.
     */
    ALWAYS(0),
    /**
     * Always ask for consent.
     */
    ATTRIBUTE_NAME(1),
    /**
     * Always ask for consent.
     */
    ATTRIBUTE_VALUE(2);

    private final int value;

    ConsentReminderOptions(final int value) {
        this.value = value;
    }

    /**
     * Value of consent options.
     *
     * @param value the value
     * @return the consent options
     */
    public static ConsentReminderOptions valueOf(final int value) {
        return Arrays.stream(values())
            .filter(v -> v.getValue() == value)
            .findFirst()
            .orElseThrow(IllegalArgumentException::new);
    }

    public int getValue() {
        return value;
    }
}

@@ -267,100 +267,307 @@
  * A
-lways ask for consent.%0A     */%0A    ATTRIBUTE_NAME(1),%0A    /**%0A     * Always ask for consent.
+sk for consent when there is modification in one of the attribute names or %0A     * if consent is expired.%0A     */%0A    ATTRIBUTE_NAME(1),%0A    /**%0A     * Ask for consent when there is modification in one of the attribute names, %0A     * the values contain inside the attributes or if consent is expired
 %0A   

Add description to ConsentReminderOptions enum (#4055)