Search in sources :

Example 1 with V3GlusterServerHooks

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

the class V3GlusterServerHooksInAdapter method adapt.

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

Example 2 with V3GlusterServerHooks

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

the class V3GlusterServerHooksOutAdapter method adapt.

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

Example 3 with V3GlusterServerHooks

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

the class V3GlusterHookOutAdapter method adapt.

@Override
public V3GlusterHook adapt(GlusterHook from) {
    V3GlusterHook to = new V3GlusterHook();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptOut(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptOut(from.getActions()));
    }
    if (from.isSetChecksum()) {
        to.setChecksum(from.getChecksum());
    }
    if (from.isSetCluster()) {
        to.setCluster(adaptOut(from.getCluster()));
    }
    if (from.isSetComment()) {
        to.setComment(from.getComment());
    }
    if (from.isSetConflictStatus()) {
        to.setConflictStatus(from.getConflictStatus());
    }
    if (from.isSetConflicts()) {
        to.setConflicts(from.getConflicts());
    }
    if (from.isSetContent()) {
        to.setContent(from.getContent());
    }
    if (from.isSetContentType()) {
        to.setContentType(from.getContentType().value());
    }
    if (from.isSetDescription()) {
        to.setDescription(from.getDescription());
    }
    if (from.isSetGlusterCommand()) {
        to.setGlusterCommand(from.getGlusterCommand());
    }
    if (from.isSetId()) {
        to.setId(from.getId());
    }
    if (from.isSetHref()) {
        to.setHref(from.getHref());
    }
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetServerHooks()) {
        to.setServerHooks(new V3GlusterServerHooks());
        to.getServerHooks().getGlusterServerHooks().addAll(adaptOut(from.getServerHooks().getGlusterServerHooks()));
    }
    if (from.isSetStage()) {
        to.setStage(from.getStage().value());
    }
    if (from.isSetStatus()) {
        V3Status status = new V3Status();
        status.setState(from.getStatus().value());
        to.setStatus(status);
    }
    return to;
}
Also used : V3GlusterHook(org.ovirt.engine.api.v3.types.V3GlusterHook) V3Status(org.ovirt.engine.api.v3.types.V3Status) V3GlusterServerHooks(org.ovirt.engine.api.v3.types.V3GlusterServerHooks)

Aggregations

V3GlusterServerHooks (org.ovirt.engine.api.v3.types.V3GlusterServerHooks)3 GlusterServerHooks (org.ovirt.engine.api.model.GlusterServerHooks)1 V3GlusterHook (org.ovirt.engine.api.v3.types.V3GlusterHook)1 V3Status (org.ovirt.engine.api.v3.types.V3Status)1