class AuditVServer extends AbstractAudit {

    public Optional<AAIObjectAuditList> auditVserversThroughRelationships(String genericVnfId, String vfModuleName) {
        AAIObjectAuditList auditList = new AAIObjectAuditList();
        AAIPluralResourceUri uri =
                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(genericVnfId).vfModules())
                        .queryParam("vf-module-name", vfModuleName);
        Optional<AAIResultWrapper> wrapper = getAaiClient().getFirstWrapper(VfModules.class, VfModule.class, uri);
        if (wrapper.isPresent() && wrapper.get().getRelationships().isPresent()) {
            List<AAIResourceUri> relatedVservers = wrapper.get().getRelationships().get().getRelatedUris(Types.VSERVER);
            if (!relatedVservers.isEmpty()) {
                relatedVservers.forEach(vserverUri -> {
                    Optional<Vserver> vserver = getAaiClient().get(vserverUri).asBean(Vserver.class);
                    Vserver vServerShallow = new Vserver();
                    BeanUtils.copyProperties(vserver, vServerShallow);
                    AAIObjectAudit vServerAudit = new AAIObjectAudit();
                    vServerAudit.setAaiObject(vServerShallow);
                    vServerAudit.setAaiObjectType(Types.VSERVER.typeName());
                    vServerAudit.setDoesObjectExist(true);
                    auditList.getAuditList().add(vServerAudit);
                });
            }
        }
        return Optional.of(auditList);
    }

}