use of org.ovirt.engine.api.v3.types.V3Payload in project ovirt-engine by oVirt.
the class V3PayloadInAdapter method adapt.
@Override
public Payload adapt(V3Payload from) {
Payload to = new Payload();
if (from.isSetFiles()) {
to.setFiles(new Files());
to.getFiles().getFiles().addAll(adaptIn(from.getFiles().getFiles()));
}
to.setType(VmDeviceType.fromValue(from.getType()));
if (from.isSetVolumeId()) {
to.setVolumeId(from.getVolumeId());
}
return to;
}
use of org.ovirt.engine.api.v3.types.V3Payload in project ovirt-engine by oVirt.
the class V3PayloadOutAdapter method adapt.
@Override
public V3Payload adapt(Payload from) {
V3Payload to = new V3Payload();
if (from.isSetFiles()) {
to.setFiles(new V3Files());
to.getFiles().getFiles().addAll(adaptOut(from.getFiles().getFiles()));
}
if (from.isSetType()) {
to.setType(from.getType().value());
}
if (from.isSetVolumeId()) {
to.setVolumeId(from.getVolumeId());
}
return to;
}