public static Builder fromStoragePool(final StoragePool in) { Builder builder = StoragePool.builder(in.context, in.getStorageDevice()) .totalSizeInMb(in.getTotalSizeInMb()); return builder; }
public StoragePool build() { StoragePoolDto dto = new StoragePoolDto(); dto.setName(name); dto.setTotalSizeInMb(totalSizeInMb); StoragePool storagePool = new StoragePool(context, dto); storagePool.storageDevice = storageDevice; return storagePool; }