use of org.ovirt.engine.api.v3.types.V3Roles in project ovirt-engine by oVirt.
the class V3UserOutAdapter method adapt.
@Override
public V3User adapt(User from) {
V3User to = new V3User();
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.isSetDepartment()) {
to.setDepartment(from.getDepartment());
}
if (from.isSetDescription()) {
to.setDescription(from.getDescription());
}
if (from.isSetDomain()) {
to.setDomain(adaptOut(from.getDomain()));
}
if (from.isSetDomainEntryId()) {
to.setDomainEntryId(from.getDomainEntryId());
}
if (from.isSetEmail()) {
to.setEmail(from.getEmail());
}
if (from.isSetGroups()) {
to.setGroups(new V3Groups());
to.getGroups().getGroups().addAll(adaptOut(from.getGroups().getGroups()));
}
if (from.isSetId()) {
to.setId(from.getId());
}
if (from.isSetHref()) {
to.setHref(from.getHref());
}
if (from.isSetLastName()) {
to.setLastName(from.getLastName());
}
if (from.isSetLoggedIn()) {
to.setLoggedIn(from.isLoggedIn());
}
if (from.isSetName()) {
to.setName(from.getName());
}
if (from.isSetNamespace()) {
to.setNamespace(from.getNamespace());
}
if (from.isSetPassword()) {
to.setPassword(from.getPassword());
}
if (from.isSetPrincipal()) {
to.setPrincipal(from.getPrincipal());
}
if (from.isSetRoles()) {
to.setRoles(new V3Roles());
to.getRoles().getRoles().addAll(adaptOut(from.getRoles().getRoles()));
}
if (from.isSetUserName()) {
to.setUserName(from.getUserName());
}
return to;
}
use of org.ovirt.engine.api.v3.types.V3Roles in project ovirt-engine by oVirt.
the class V3RolesInAdapter method adapt.
@Override
public Roles adapt(V3Roles from) {
Roles to = new Roles();
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.getRoles().addAll(adaptIn(from.getRoles()));
return to;
}
use of org.ovirt.engine.api.v3.types.V3Roles in project ovirt-engine by oVirt.
the class V3RolesOutAdapter method adapt.
@Override
public V3Roles adapt(Roles from) {
V3Roles to = new V3Roles();
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.getRoles().addAll(adaptOut(from.getRoles()));
return to;
}