class AAIObjectMapper {

    public org.onap.aai.domain.yang.GenericVnf mapVnf(GenericVnf vnf) {
        if (modelMapper.getTypeMap(GenericVnf.class, org.onap.aai.domain.yang.GenericVnf.class) == null) {
            modelMapper.addMappings(new PropertyMap<GenericVnf, org.onap.aai.domain.yang.GenericVnf>() {
                @Override
                protected void configure() {
                    map().setModelCustomizationId(source.getModelInfoGenericVnf().getModelCustomizationUuid());
                    map().setModelInvariantId(source.getModelInfoGenericVnf().getModelInvariantUuid());
                    map().setModelVersionId(source.getModelInfoGenericVnf().getModelUuid());
                    map().setNfRole(source.getModelInfoGenericVnf().getNfRole());
                    map().setNfType(source.getModelInfoGenericVnf().getNfType());
                    map().setNfFunction(source.getModelInfoGenericVnf().getNfFunction());
                    map().setNfNamingCode(source.getModelInfoGenericVnf().getNfNamingCode());
                }
            });
        }

        return modelMapper.map(vnf, org.onap.aai.domain.yang.GenericVnf.class);
    }

}