@Mapping(from = HostNicVirtualFunctionsConfiguration.class, to = UpdateHostNicVfsConfigParameters.class) public static UpdateHostNicVfsConfigParameters map(HostNicVirtualFunctionsConfiguration apiModel, UpdateHostNicVfsConfigParameters params) { if (apiModel.isSetAllNetworksAllowed()) { params.setAllNetworksAllowed(apiModel.isAllNetworksAllowed()); } if (apiModel.isSetNumberOfVirtualFunctions()) { params.setNumOfVfs(apiModel.getNumberOfVirtualFunctions()); } return params; }
@Override public V3HostNicVirtualFunctionsConfiguration adapt(HostNicVirtualFunctionsConfiguration from) { V3HostNicVirtualFunctionsConfiguration to = new V3HostNicVirtualFunctionsConfiguration(); if (from.isSetAllNetworksAllowed()) { to.setAllNetworksAllowed(from.isAllNetworksAllowed()); } if (from.isSetMaxNumberOfVirtualFunctions()) { to.setMaxNumberOfVirtualFunctions(from.getMaxNumberOfVirtualFunctions()); } if (from.isSetNumberOfVirtualFunctions()) { to.setNumberOfVirtualFunctions(from.getNumberOfVirtualFunctions()); } return to; } }