Source:
<code>public static org.ovirt.engine.core.common.businessentities.VmPool map(VmPool model, org.ovirt.engine.core.common.businessentities.VmPool template) { org.ovirt.engine.core.common.businessentities.VmPool entity = template != null ? template : new org.ovirt.engine.core.common.businessentities.VmPool(); if (model.isSetId()) { entity.setVmPoolId(GuidUtils.asGuid(model.getId())); } if (model.isSetName()) { entity.setName(model.getName()); } if (model.isSetDescription()) { entity.setVmPoolDescription(model.getDescription()); } if (model.isSetComment()) { entity.setComment(model.getComment()); } if (model.isSetSize()) { entity.setAssignedVmsCount(model.getSize()); } if (model.isSetCluster()) { if (model.getCluster().isSetId()) { entity.setVdsGroupId(GuidUtils.asGuid(model.getCluster().getId())); } else if (model.getCluster().isSetName()) { entity.setVdsGroupName(model.getCluster().getName()); } } if (model.isSetPrestartedVms()) { entity.setPrestartedVms(model.getPrestartedVms()); } if (model.isSetMaxUserVms()) { entity.setMaxAssignedVmsPerUser(model.getMaxUserVms()); } if (model.isSetDisplay() && model.getDisplay().isSetProxy()) { entity.setSpiceProxy("".equals(model.getDisplay().getProxy()) ? null : model.getDisplay().getProxy()); } if (model.isSetType()) { <START> VmPoolType type = VmPoolType.forName(model.getType()); <END> entity.setVmPoolType(type != null ? type : VmPoolType.AUTOMATIC); } return entity; }</code><technical_language>1) consistent enums handled in API layer, please create VmPoolType enum in API, write mapping methods for here, them. example other enum in API. examples in VmMapper, jump right end of file NumaTuneMode 2) values for this enum displayed for GET .../api/capabilities. BackendCapabilitiesResource for examples</technical_language>

Target:
public static org.ovirt.engine.core.common.businessentities.VmPool map(VmPool model, org.ovirt.engine.core.common.businessentities.VmPool template) { org.ovirt.engine.core.common.businessentities.VmPool entity = template != null ? template : new org.ovirt.engine.core.common.businessentities.VmPool(); if (model.isSetId()) { entity.setVmPoolId(GuidUtils.asGuid(model.getId())); } if (model.isSetName()) { entity.setName(model.getName()); } if (model.isSetDescription()) { entity.setVmPoolDescription(model.getDescription()); } if (model.isSetComment()) { entity.setComment(model.getComment()); } if (model.isSetSize()) { entity.setAssignedVmsCount(model.getSize()); } if (model.isSetCluster()) { if (model.getCluster().isSetId()) { entity.setVdsGroupId(GuidUtils.asGuid(model.getCluster().getId())); } else if (model.getCluster().isSetName()) { entity.setVdsGroupName(model.getCluster().getName()); } } if (model.isSetPrestartedVms()) { entity.setPrestartedVms(model.getPrestartedVms()); } if (model.isSetMaxUserVms()) { entity.setMaxAssignedVmsPerUser(model.getMaxUserVms()); } if (model.isSetDisplay() && model.getDisplay().isSetProxy()) { entity.setSpiceProxy("".equals(model.getDisplay().getProxy()) ? null : model.getDisplay().getProxy()); } if (model.isSetType()) { VmPoolType type = VmPoolType.fromValue(model.getType()); entity.setVmPoolType(type != null ? map(type, null) : org.ovirt.engine.core.common.businessentities.VmPoolType.AUTOMATIC); } return entity; }