class VrfValidation {

    protected void aaiVpnBindingValidation(String relatedVpnId, org.onap.aai.domain.yang.VpnBinding aaiVpnBinding)
            throws VrfBondingServiceException {
        if (aaiVpnBinding == null) {
            throw new VrfBondingServiceException("The infrastructure vpn " + relatedVpnId + " does not exist in A&AI.");
        } else if (aaiVpnBinding.getVpnType() != null
                && !aaiVpnBinding.getVpnType().equalsIgnoreCase("SERVICE-INFRASTRUCTURE")) {
            throw new VrfBondingServiceException(
                    "VpnBinding: " + relatedVpnId + " does not have a vpn type of SERVICE-INFRASTRUCTURE.");
        }
    }

}