/** * Required. The reason for which the XML elements or attributes were sanitized. * * @param reason * Required. The reason for which the XML elements or attributes were sanitized. * @return Returns a reference to this object so that method calls can be chained together. * @see SanitizationWarningReason */ public SanitizationWarning withReason(SanitizationWarningReason reason) { this.reason = reason.toString(); return this; }
/** * Use this in place of valueOf. * * @param value * real value * @return SanitizationWarningReason corresponding to the value * * @throws IllegalArgumentException * If the specified value does not map to one of the known values in this enum. */ public static SanitizationWarningReason fromValue(String value) { if (value == null || "".equals(value)) { throw new IllegalArgumentException("Value cannot be null or empty!"); } for (SanitizationWarningReason enumEntry : SanitizationWarningReason.values()) { if (enumEntry.toString().equals(value)) { return enumEntry; } } throw new IllegalArgumentException("Cannot create enum from " + value + " value!"); } }
/** * Required. The reason for which the XML elements or attributes were sanitized. * * @param reason * Required. The reason for which the XML elements or attributes were sanitized. * @return Returns a reference to this object so that method calls can be chained together. * @see SanitizationWarningReason */ public SanitizationWarning withReason(SanitizationWarningReason reason) { this.reason = reason.toString(); return this; }
/** * Use this in place of valueOf. * * @param value * real value * @return SanitizationWarningReason corresponding to the value * * @throws IllegalArgumentException * If the specified value does not map to one of the known values in this enum. */ public static SanitizationWarningReason fromValue(String value) { if (value == null || "".equals(value)) { throw new IllegalArgumentException("Value cannot be null or empty!"); } for (SanitizationWarningReason enumEntry : SanitizationWarningReason.values()) { if (enumEntry.toString().equals(value)) { return enumEntry; } } throw new IllegalArgumentException("Cannot create enum from " + value + " value!"); } }