class StorageClassValidator implements IParameterValidator {

  @Override
  public void validate(String name, String value) throws ParameterException {
    try {
      AwsUtil.toStorageClass(value);
    } catch (IllegalArgumentException e) {
      throw new ParameterException("Parameter " + name + " is not a valid AWS S3 storage class (found " + value + ")",
          e);
    }
  }

}