private Guid getQuotaId(ExternalVmImport vmImport) { if (vmImport.isSetQuota() && vmImport.getQuota().isSetId()) { return asGuid(vmImport.getQuota().getId()); } else { return null; } }
to.getDisks().getDisks().addAll(adaptOut(from.getDisks().getDisks())); if (from.isSetId()) { to.setId(from.getId());
diskImage.getStorageIds().add(Guid.createGuidFromStringDefaultEmpty(storageDomain.getId())); if (disk.isSetQuota() && disk.getQuota().isSetId()) { diskImage.setQuotaId(GuidUtils.asGuid(disk.getQuota().getId()));
@Mapping(from = Quota.class, to = org.ovirt.engine.core.common.businessentities.Quota.class) public static org.ovirt.engine.core.common.businessentities.Quota map(Quota model, org.ovirt.engine.core.common.businessentities.Quota template) { org.ovirt.engine.core.common.businessentities.Quota entity = (template==null) ? new org.ovirt.engine.core.common.businessentities.Quota() : template; if (model.isSetId()) { entity.setId(GuidUtils.asGuid(model.getId())); } if (model.isSetName()) { entity.setQuotaName(model.getName()); } if (model.isSetDescription()) { entity.setDescription(model.getDescription()); } if (model.isSetDataCenter()) { entity.setStoragePoolId(GuidUtils.asGuid(model.getDataCenter().getId())); } if (model.isSetClusterHardLimitPct()) { entity.setGraceClusterPercentage(model.getClusterHardLimitPct()); } if (model.isSetStorageHardLimitPct()) { entity.setGraceStoragePercentage(model.getStorageHardLimitPct()); } if (model.isSetClusterSoftLimitPct()) { entity.setThresholdClusterPercentage(model.getClusterSoftLimitPct()); } if (model.isSetStorageSoftLimitPct()) { entity.setThresholdStoragePercentage(model.getStorageSoftLimitPct()); } return entity; }
if (model.isSetQuota() && model.getQuota().isSetId()) { entity.setQuotaId(GuidUtils.asGuid(model.getQuota().getId()));