Search in sources :

Example 1 with V3Floppy

use of org.ovirt.engine.api.v3.types.V3Floppy in project ovirt-engine by oVirt.

the class V3FloppyInAdapter method adapt.

@Override
public Floppy adapt(V3Floppy from) {
    Floppy to = new Floppy();
    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.isSetFile()) {
        to.setFile(adaptIn(from.getFile()));
    }
    if (from.isSetId()) {
        to.setId(from.getId());
    }
    if (from.isSetHref()) {
        to.setHref(from.getHref());
    }
    if (from.isSetInstanceType()) {
        to.setInstanceType(adaptIn(from.getInstanceType()));
    }
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetTemplate()) {
        to.setTemplate(adaptIn(from.getTemplate()));
    }
    if (from.isSetVm()) {
        to.setVm(adaptIn(from.getVm()));
    }
    if (from.isSetVms()) {
        to.setVms(new Vms());
        to.getVms().getVms().addAll(adaptIn(from.getVms().getVMs()));
    }
    return to;
}
Also used : V3Floppy(org.ovirt.engine.api.v3.types.V3Floppy) Floppy(org.ovirt.engine.api.model.Floppy) Vms(org.ovirt.engine.api.model.Vms)

Example 2 with V3Floppy

use of org.ovirt.engine.api.v3.types.V3Floppy in project ovirt-engine by oVirt.

the class V3FloppyOutAdapter method adapt.

@Override
public V3Floppy adapt(Floppy from) {
    V3Floppy to = new V3Floppy();
    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.isSetFile()) {
        to.setFile(adaptOut(from.getFile()));
    }
    if (from.isSetId()) {
        to.setId(from.getId());
    }
    if (from.isSetHref()) {
        to.setHref(from.getHref());
    }
    if (from.isSetInstanceType()) {
        to.setInstanceType(adaptOut(from.getInstanceType()));
    }
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetTemplate()) {
        to.setTemplate(adaptOut(from.getTemplate()));
    }
    if (from.isSetVm()) {
        to.setVm(adaptOut(from.getVm()));
    }
    if (from.isSetVms()) {
        to.setVms(new V3VMs());
        to.getVms().getVMs().addAll(adaptOut(from.getVms().getVms()));
    }
    return to;
}
Also used : V3Floppy(org.ovirt.engine.api.v3.types.V3Floppy) V3VMs(org.ovirt.engine.api.v3.types.V3VMs)

Aggregations

V3Floppy (org.ovirt.engine.api.v3.types.V3Floppy)2 Floppy (org.ovirt.engine.api.model.Floppy)1 Vms (org.ovirt.engine.api.model.Vms)1 V3VMs (org.ovirt.engine.api.v3.types.V3VMs)1