class AwsDatabaseServerParameterSetter implements DatabaseServerParameterSetter {

    @Override
    public void setParameters(DatabaseServerV4StackRequest request, SdxDatabaseAvailabilityType availabilityType) {
        AwsDatabaseServerV4Parameters parameters = new AwsDatabaseServerV4Parameters();
        if (SdxDatabaseAvailabilityType.HA.equals(availabilityType)) {
            parameters.setBackupRetentionPeriod(backupRetentionPeriodHa);
            parameters.setMultiAZ("true");
        } else if (SdxDatabaseAvailabilityType.NON_HA.equals(availabilityType)) {
            parameters.setBackupRetentionPeriod(backupRetentionPeriodNonHa);
            parameters.setMultiAZ("false");
        } else {
            throw new IllegalArgumentException(availabilityType + " database availability type is not supported on AWS.");
        }
        parameters.setEngineVersion(engineVersion);
        request.setAws(parameters);
    }

}