Search in sources :

Example 1 with V3Balances

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

the class V3BalancesOutAdapter method adapt.

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

Example 2 with V3Balances

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

the class V3BalancesInAdapter method adapt.

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

Aggregations

V3Balances (org.ovirt.engine.api.v3.types.V3Balances)2 Balances (org.ovirt.engine.api.model.Balances)1