class RDSRaiderImpl implements RDSRaider {

    @Override
    public void detachSecurityGroups(String dbName, String... securityGroups) {
        if (dbName.isEmpty() || dbName == null) {
            throw new InvalidInputDataException("Empty/Null dbName provided in request");
        } else if (securityGroups.length <= 0 || securityGroups == null) {
            throw new InvalidInputDataException("Empty/Null securityGroups provided in request");
        }

        List<String> existingSecurityGroups = this.getSecurityGroups(dbName);

        if (existingSecurityGroups != null && existingSecurityGroups.containsAll(Arrays.asList(securityGroups))) {
            existingSecurityGroups.removeAll(Arrays.asList(securityGroups));
            rdsDelegator.getAmazonRds().modifyDBInstance(new ModifyDBInstanceRequest().withDBInstanceIdentifier(dbName).withVpcSecurityGroupIds(existingSecurityGroups));
        } else {
            throw new com.intuit.cloudraider.exceptions.ResourceNotFoundException("Unable to detach SecurityGroups: " + securityGroups);
        }
    }

    public  RDSRaiderImpl();

}