/** * Create an instance of {@link VnicProfile } * */ public VnicProfile createVnicProfile() { return new VnicProfile(); }
protected VnicProfile createIncompleteVnicProfile() { return new VnicProfile(); }
.findFirst() .ifPresent(id -> { VnicProfile v4Profile = new VnicProfile(); v4Profile.setId(id); v4Nic.setVnicProfile(v4Profile);
static VnicProfile getModel(int index) { VnicProfile model = new VnicProfile(); model.setId(GUIDS[index].toString()); model.setName(NAMES[index]); model.setDescription(DESCRIPTIONS[index]); return model; }
static VnicProfile getModel(int index) { VnicProfile model = new VnicProfile(); model.setId(GUIDS[index].toString()); model.setName(NAMES[index]); model.setDescription(DESCRIPTIONS[index]); return model; }
@Override public VnicProfile adapt(V3VnicProfile from) { VnicProfile to = new VnicProfile(); if (from.isSetLinks()) { to.getLinks().addAll(adaptIn(from.getLinks()));
@Mapping(from = org.ovirt.engine.core.common.businessentities.network.VnicProfile.class, to = VnicProfile.class) public static VnicProfile map(org.ovirt.engine.core.common.businessentities.network.VnicProfile entity, VnicProfile template) { VnicProfile model = template != null ? template : new VnicProfile(); if (entity.getId() != null) { model.setId(entity.getId().toString());
@Mapping(from = VmNetworkInterface.class, to = Nic.class) public static Nic map(VmNetworkInterface entity, Nic template) { Nic model = template != null ? template : new Nic(); if (entity.getVmId() != null) { model.setVm(new Vm()); model.getVm().setId(entity.getVmId().toString()); } if (entity.getId() != null) { model.setId(entity.getId().toString()); } if (entity.getName() != null) { model.setName(entity.getName()); } if (entity.getMacAddress() != null) { model.setMac(new Mac()); model.getMac().setAddress(entity.getMacAddress()); } model.setLinked(entity.isLinked()); model.setInterface(map(entity.getType())); model.setPlugged(entity.isPlugged()); if (entity.getVnicProfileId() != null) { model.setVnicProfile(new VnicProfile()); model.getVnicProfile().setId(entity.getVnicProfileId().toString()); } return model; }