Search in sources :

Example 1 with V3Role

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;
}
Also used : Role(org.ovirt.engine.api.model.Role) V3Role(org.ovirt.engine.api.v3.types.V3Role) Permits(org.ovirt.engine.api.model.Permits)

Example 2 with V3Role

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;
}
Also used : V3Role(org.ovirt.engine.api.v3.types.V3Role) V3Permits(org.ovirt.engine.api.v3.types.V3Permits)

Aggregations

V3Role (org.ovirt.engine.api.v3.types.V3Role)2 Permits (org.ovirt.engine.api.model.Permits)1 Role (org.ovirt.engine.api.model.Role)1 V3Permits (org.ovirt.engine.api.v3.types.V3Permits)1