Search in sources :

Example 1 with V3Payload

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;
}
Also used : V3Payload(org.ovirt.engine.api.v3.types.V3Payload) Payload(org.ovirt.engine.api.model.Payload) Files(org.ovirt.engine.api.model.Files)

Example 2 with V3Payload

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;
}
Also used : V3Files(org.ovirt.engine.api.v3.types.V3Files) V3Payload(org.ovirt.engine.api.v3.types.V3Payload)

Aggregations

V3Payload (org.ovirt.engine.api.v3.types.V3Payload)2 Files (org.ovirt.engine.api.model.Files)1 Payload (org.ovirt.engine.api.model.Payload)1 V3Files (org.ovirt.engine.api.v3.types.V3Files)1