use of org.ovirt.engine.api.v3.types.V3Weights in project ovirt-engine by oVirt.
the class V3WeightsOutAdapter method adapt.
@Override
public V3Weights adapt(Weights from) {
V3Weights to = new V3Weights();
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.getWeights().addAll(adaptOut(from.getWeights()));
return to;
}
use of org.ovirt.engine.api.v3.types.V3Weights in project ovirt-engine by oVirt.
the class V3WeightsInAdapter method adapt.
@Override
public Weights adapt(V3Weights from) {
Weights to = new Weights();
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.getWeights().addAll(adaptIn(from.getWeights()));
return to;
}