Search in sources :

Example 1 with V3InstanceTypes

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

the class V3InstanceTypesInAdapter method adapt.

@Override
public InstanceTypes adapt(V3InstanceTypes from) {
    InstanceTypes to = new InstanceTypes();
    if (from.isSetActions()) {
        to.setActions(adaptIn(from.getActions()));
    }
    if (from.isSetActive()) {
        to.setActive(from.getActive());
    }
    if (from.isSetSize()) {
        to.setSize(from.getSize());
    }
    if (from.isSetTotal()) {
        to.setTotal(from.getTotal());
    }
    to.getInstanceTypes().addAll(adaptIn(from.getInstanceTypes()));
    return to;
}
Also used : V3InstanceTypes(org.ovirt.engine.api.v3.types.V3InstanceTypes) InstanceTypes(org.ovirt.engine.api.model.InstanceTypes)

Example 2 with V3InstanceTypes

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

the class V3InstanceTypesOutAdapter method adapt.

@Override
public V3InstanceTypes adapt(InstanceTypes from) {
    V3InstanceTypes to = new V3InstanceTypes();
    if (from.isSetActions()) {
        to.setActions(adaptOut(from.getActions()));
    }
    if (from.isSetActive()) {
        to.setActive(from.getActive());
    }
    if (from.isSetSize()) {
        to.setSize(from.getSize());
    }
    if (from.isSetTotal()) {
        to.setTotal(from.getTotal());
    }
    to.getInstanceTypes().addAll(adaptOut(from.getInstanceTypes()));
    return to;
}
Also used : V3InstanceTypes(org.ovirt.engine.api.v3.types.V3InstanceTypes)

Aggregations

V3InstanceTypes (org.ovirt.engine.api.v3.types.V3InstanceTypes)2 InstanceTypes (org.ovirt.engine.api.model.InstanceTypes)1