private static Values fromValue(String value) {
            if (value == null || "".equals(value)) {
                throw new IllegalArgumentException("Value cannot be null or empty!");
            }

            for (Values enumEntry : Values.values()) {
                if (value.equals(enumEntry.toString())) {
                    return enumEntry;
                }
            }

            return SDK_UNKNOWN;
        }
Use this in place of valueOf.

@param value real value
@return Values enum corresponding to the value
aws-java-sdk-kinesisvideo/src/main/java/com/amazonaws/services/kinesisvideo/model/AckEventType.java