use of org.ovirt.engine.api.v3.types.V3Role in project ovirt-engine by oVirt.
the class V3RoleInAdapter method adapt.
@Override
public Role adapt(V3Role from) {
Role to = new Role();
if (from.isSetLinks()) {
to.getLinks().addAll(adaptIn(from.getLinks()));
}
if (from.isSetActions()) {
to.setActions(adaptIn(from.getActions()));
}
if (from.isSetAdministrative()) {
to.setAdministrative(from.isAdministrative());
}
if (from.isSetComment()) {
to.setComment(from.getComment());
}
if (from.isSetDescription()) {
to.setDescription(from.getDescription());
}
if (from.isSetId()) {
to.setId(from.getId());
}
if (from.isSetHref()) {
to.setHref(from.getHref());
}
if (from.isSetMutable()) {
to.setMutable(from.isMutable());
}
if (from.isSetName()) {
to.setName(from.getName());
}
if (from.isSetPermits()) {
to.setPermits(new Permits());
to.getPermits().getPermits().addAll(adaptIn(from.getPermits().getPermits()));
}
if (from.isSetUser()) {
to.setUser(adaptIn(from.getUser()));
}
return to;
}
use of org.ovirt.engine.api.v3.types.V3Role in project ovirt-engine by oVirt.
the class V3RoleOutAdapter method adapt.
@Override
public V3Role adapt(Role from) {
V3Role to = new V3Role();
if (from.isSetLinks()) {
to.getLinks().addAll(adaptOut(from.getLinks()));
}
if (from.isSetActions()) {
to.setActions(adaptOut(from.getActions()));
}
if (from.isSetAdministrative()) {
to.setAdministrative(from.isAdministrative());
}
if (from.isSetComment()) {
to.setComment(from.getComment());
}
if (from.isSetDescription()) {
to.setDescription(from.getDescription());
}
if (from.isSetId()) {
to.setId(from.getId());
}
if (from.isSetHref()) {
to.setHref(from.getHref());
}
if (from.isSetMutable()) {
to.setMutable(from.isMutable());
}
if (from.isSetName()) {
to.setName(from.getName());
}
if (from.isSetPermits()) {
to.setPermits(new V3Permits());
to.getPermits().getPermits().addAll(adaptOut(from.getPermits().getPermits()));
}
if (from.isSetUser()) {
to.setUser(adaptOut(from.getUser()));
}
return to;
}