use of org.ovirt.engine.api.v3.types.V3ReportedDevice in project ovirt-engine by oVirt.
the class V3ReportedDeviceInAdapter method adapt.
@Override
public ReportedDevice adapt(V3ReportedDevice from) {
ReportedDevice to = new ReportedDevice();
if (from.isSetLinks()) {
to.getLinks().addAll(adaptIn(from.getLinks()));
}
if (from.isSetActions()) {
to.setActions(adaptIn(from.getActions()));
}
if (from.isSetComment()) {
to.setComment(from.getComment());
}
if (from.isSetDescription()) {
to.setDescription(from.getDescription());
}
if (from.isSetId()) {
to.setId(from.getId());
}
if (from.isSetHref()) {
to.setHref(from.getHref());
}
if (from.isSetIps()) {
to.setIps(new Ips());
to.getIps().getIps().addAll(adaptIn(from.getIps().getIPs()));
}
if (from.isSetMac()) {
to.setMac(adaptIn(from.getMac()));
}
if (from.isSetName()) {
to.setName(from.getName());
}
if (from.isSetType()) {
to.setType(ReportedDeviceType.fromValue(from.getType()));
}
if (from.isSetVm()) {
to.setVm(adaptIn(from.getVm()));
}
return to;
}
use of org.ovirt.engine.api.v3.types.V3ReportedDevice in project ovirt-engine by oVirt.
the class V3ReportedDeviceOutAdapter method adapt.
@Override
public V3ReportedDevice adapt(ReportedDevice from) {
V3ReportedDevice to = new V3ReportedDevice();
if (from.isSetLinks()) {
to.getLinks().addAll(adaptOut(from.getLinks()));
}
if (from.isSetActions()) {
to.setActions(adaptOut(from.getActions()));
}
if (from.isSetComment()) {
to.setComment(from.getComment());
}
if (from.isSetDescription()) {
to.setDescription(from.getDescription());
}
if (from.isSetId()) {
to.setId(from.getId());
}
if (from.isSetHref()) {
to.setHref(from.getHref());
}
if (from.isSetIps()) {
to.setIps(new V3IPs());
to.getIps().getIPs().addAll(adaptOut(from.getIps().getIps()));
}
if (from.isSetMac()) {
to.setMac(adaptOut(from.getMac()));
}
if (from.isSetName()) {
to.setName(from.getName());
}
if (from.isSetType()) {
to.setType(from.getType().value());
}
if (from.isSetVm()) {
to.setVm(adaptOut(from.getVm()));
}
return to;
}
Aggregations