@Mapping(from = MigrateOnErrorOptions.class, to = ErrorHandling.class) private static ErrorHandling map(MigrateOnErrorOptions migrateOnError, ErrorHandling template) { MigrateOnError value = map(migrateOnError, (MigrateOnError)null); if (value==null) { return null; } else { template = template==null ? new ErrorHandling() : template; template.setOnError(value); return template; } } }
@Override public ErrorHandling adapt(V3ErrorHandling from) { ErrorHandling to = new ErrorHandling(); if (from.isSetOnError()) { to.setOnError(MigrateOnError.fromValue(from.getOnError())); } return to; } }
@Override protected org.ovirt.engine.api.model.Cluster postPopulate(org.ovirt.engine.api.model.Cluster model) { ErrorHandling errorHandling = new ErrorHandling(); errorHandling.setOnError(MigrateOnError.DO_NOT_MIGRATE); model.setErrorHandling(errorHandling); model.getSerialNumber().setPolicy(SerialNumberPolicy.CUSTOM); model.getRequiredRngSources().getRequiredRngSources().clear(); model.getRequiredRngSources().getRequiredRngSources().add(RngSource.RANDOM); return model; }