public static AllowedMethods fromValue(String allowedMethod) throws IllegalArgumentException {
              for (AllowedMethods method : AllowedMethods.values()) {
                  String methodString = method.toString();
                  if (methodString != null && methodString.equals
                          (allowedMethod)) {
                      return method;
                  }
              }

              throw new IllegalArgumentException(
                  "Cannot create enum from " + allowedMethod + " value!");
         }
Enumeration of names of the all the allowed methods.
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/CORSRule.java