Search in sources :

Example 1 with V3Permits

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

the class V3PermitsInAdapter method adapt.

@Override
public Permits adapt(V3Permits from) {
    Permits to = new Permits();
    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.getPermits().addAll(adaptIn(from.getPermits()));
    return to;
}
Also used : Permits(org.ovirt.engine.api.model.Permits) V3Permits(org.ovirt.engine.api.v3.types.V3Permits)

Example 2 with V3Permits

use of org.ovirt.engine.api.v3.types.V3Permits 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)

Example 3 with V3Permits

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

the class V3PermitsOutAdapter method adapt.

@Override
public V3Permits adapt(Permits from) {
    V3Permits to = new V3Permits();
    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.getPermits().addAll(adaptOut(from.getPermits()));
    return to;
}
Also used : V3Permits(org.ovirt.engine.api.v3.types.V3Permits)

Aggregations

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