Search in sources :

Example 1 with V3User

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

the class V3UserInAdapter method adapt.

@Override
public User adapt(V3User from) {
    User to = new User();
    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.isSetDepartment()) {
        to.setDepartment(from.getDepartment());
    }
    if (from.isSetDescription()) {
        to.setDescription(from.getDescription());
    }
    if (from.isSetDomain()) {
        to.setDomain(adaptIn(from.getDomain()));
    }
    if (from.isSetDomainEntryId()) {
        to.setDomainEntryId(from.getDomainEntryId());
    }
    if (from.isSetEmail()) {
        to.setEmail(from.getEmail());
    }
    if (from.isSetGroups()) {
        to.setGroups(new Groups());
        to.getGroups().getGroups().addAll(adaptIn(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 Roles());
        to.getRoles().getRoles().addAll(adaptIn(from.getRoles().getRoles()));
    }
    if (from.isSetUserName()) {
        to.setUserName(from.getUserName());
    }
    return to;
}
Also used : V3User(org.ovirt.engine.api.v3.types.V3User) User(org.ovirt.engine.api.model.User) Groups(org.ovirt.engine.api.model.Groups) Roles(org.ovirt.engine.api.model.Roles)

Example 2 with V3User

use of org.ovirt.engine.api.v3.types.V3User 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;
}
Also used : V3Groups(org.ovirt.engine.api.v3.types.V3Groups) V3Roles(org.ovirt.engine.api.v3.types.V3Roles) V3User(org.ovirt.engine.api.v3.types.V3User)

Aggregations

V3User (org.ovirt.engine.api.v3.types.V3User)2 Groups (org.ovirt.engine.api.model.Groups)1 Roles (org.ovirt.engine.api.model.Roles)1 User (org.ovirt.engine.api.model.User)1 V3Groups (org.ovirt.engine.api.v3.types.V3Groups)1 V3Roles (org.ovirt.engine.api.v3.types.V3Roles)1