class RDSRaiderImpl implements RDSRaider {

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

        List<String> subnetIds = this.getSubnetIds(dbName);

        if (subnetIds != null && subnetIds.contains(subnetId)) {
            subnetIds.remove(subnetId);

            ModifyDBSubnetGroupRequest modifyDBSubnetGroupRequest = new ModifyDBSubnetGroupRequest()
                    .withSubnetIds(subnetIds)
                    .withDBSubnetGroupName(getSubnetGroupName(dbName));
            rdsDelegator.getAmazonRds().modifyDBSubnetGroup(modifyDBSubnetGroupRequest);
        } else {
            throw new com.intuit.cloudraider.exceptions.ResourceNotFoundException("Unable to detach Subnet: " + subnetId);
        }
    }

    public  RDSRaiderImpl();

}