use of org.ovirt.engine.api.v3.types.V3SchedulingPolicyUnit in project ovirt-engine by oVirt.
the class V3SchedulingPolicyUnitInAdapter method adapt.
@Override
public SchedulingPolicyUnit adapt(V3SchedulingPolicyUnit from) {
SchedulingPolicyUnit to = new SchedulingPolicyUnit();
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.isSetEnabled()) {
to.setEnabled(from.isEnabled());
}
if (from.isSetId()) {
to.setId(from.getId());
}
if (from.isSetHref()) {
to.setHref(from.getHref());
}
if (from.isSetInternal()) {
to.setInternal(from.isInternal());
}
if (from.isSetName()) {
to.setName(from.getName());
}
if (from.isSetPropertiesMetaData()) {
to.setProperties(new Properties());
to.getProperties().getProperties().addAll(adaptIn(from.getPropertiesMetaData().getProperties()));
}
if (from.isSetType()) {
to.setType(PolicyUnitType.fromValue(from.getType()));
}
return to;
}
use of org.ovirt.engine.api.v3.types.V3SchedulingPolicyUnit in project ovirt-engine by oVirt.
the class V3SchedulingPolicyUnitOutAdapter method adapt.
@Override
public V3SchedulingPolicyUnit adapt(SchedulingPolicyUnit from) {
V3SchedulingPolicyUnit to = new V3SchedulingPolicyUnit();
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.isSetEnabled()) {
to.setEnabled(from.isEnabled());
}
if (from.isSetId()) {
to.setId(from.getId());
}
if (from.isSetHref()) {
to.setHref(from.getHref());
}
if (from.isSetInternal()) {
to.setInternal(from.isInternal());
}
if (from.isSetName()) {
to.setName(from.getName());
}
if (from.isSetProperties()) {
to.setPropertiesMetaData(new V3Properties());
to.getPropertiesMetaData().getProperties().addAll(adaptOut(from.getProperties().getProperties()));
}
if (from.isSetType()) {
to.setType(from.getType().value());
}
return to;
}
Aggregations