Search in sources :

Example 1 with V3SchedulingPolicies

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

the class V3SchedulingPoliciesInAdapter method adapt.

@Override
public SchedulingPolicies adapt(V3SchedulingPolicies from) {
    SchedulingPolicies to = new SchedulingPolicies();
    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.getSchedulingPolicies().addAll(adaptIn(from.getSchedulingPolicy()));
    return to;
}
Also used : SchedulingPolicies(org.ovirt.engine.api.model.SchedulingPolicies) V3SchedulingPolicies(org.ovirt.engine.api.v3.types.V3SchedulingPolicies)

Example 2 with V3SchedulingPolicies

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

the class V3SchedulingPoliciesOutAdapter method adapt.

@Override
public V3SchedulingPolicies adapt(SchedulingPolicies from) {
    V3SchedulingPolicies to = new V3SchedulingPolicies();
    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.getSchedulingPolicy().addAll(adaptOut(from.getSchedulingPolicies()));
    return to;
}
Also used : V3SchedulingPolicies(org.ovirt.engine.api.v3.types.V3SchedulingPolicies)

Aggregations

V3SchedulingPolicies (org.ovirt.engine.api.v3.types.V3SchedulingPolicies)2 SchedulingPolicies (org.ovirt.engine.api.model.SchedulingPolicies)1