Search in sources :

Example 1 with V3DataCenters

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

the class V3StorageDomainOutAdapter method adapt.

@Override
public V3StorageDomain adapt(StorageDomain from) {
    V3StorageDomain to = new V3StorageDomain();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptOut(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptOut(from.getActions()));
    }
    if (from.isSetAvailable()) {
        to.setAvailable(from.getAvailable());
    }
    if (from.isSetComment()) {
        to.setComment(from.getComment());
    }
    if (from.isSetCommitted()) {
        to.setCommitted(from.getCommitted());
    }
    if (from.isSetCriticalSpaceActionBlocker()) {
        to.setCriticalSpaceActionBlocker(from.getCriticalSpaceActionBlocker());
    }
    if (from.isSetDataCenter()) {
        to.setDataCenter(adaptOut(from.getDataCenter()));
    }
    if (from.isSetDataCenters()) {
        to.setDataCenters(new V3DataCenters());
        to.getDataCenters().getDataCenters().addAll(adaptOut(from.getDataCenters().getDataCenters()));
    }
    if (from.isSetDescription()) {
        to.setDescription(from.getDescription());
    }
    if (from.isSetExternalStatus()) {
        V3Status status = new V3Status();
        status.setState(from.getExternalStatus().value());
        to.setExternalStatus(status);
    }
    if (from.isSetHost()) {
        to.setHost(adaptOut(from.getHost()));
    }
    if (from.isSetId()) {
        to.setId(from.getId());
    }
    if (from.isSetHref()) {
        to.setHref(from.getHref());
    }
    if (from.isSetImport()) {
        to.setImport(from.isImport());
    }
    if (from.isSetMaster()) {
        to.setMaster(from.isMaster());
    }
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetStatus()) {
        V3Status status = new V3Status();
        status.setState(from.getStatus().value());
        to.setStatus(status);
    }
    if (from.isSetStorage()) {
        to.setStorage(adaptOut(from.getStorage()));
    }
    if (from.isSetStorageFormat()) {
        to.setStorageFormat(from.getStorageFormat().value());
    }
    if (from.isSetType()) {
        to.setType(from.getType().value());
    }
    if (from.isSetUsed()) {
        to.setUsed(from.getUsed());
    }
    if (from.isSetWarningLowSpaceIndicator()) {
        to.setWarningLowSpaceIndicator(from.getWarningLowSpaceIndicator());
    }
    if (from.isSetWipeAfterDelete()) {
        to.setWipeAfterDelete(from.isWipeAfterDelete());
    }
    return to;
}
Also used : V3StorageDomain(org.ovirt.engine.api.v3.types.V3StorageDomain) V3DataCenters(org.ovirt.engine.api.v3.types.V3DataCenters) V3Status(org.ovirt.engine.api.v3.types.V3Status)

Example 2 with V3DataCenters

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

the class V3DataCentersInAdapter method adapt.

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

Example 3 with V3DataCenters

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

the class V3DataCentersOutAdapter method adapt.

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

Aggregations

V3DataCenters (org.ovirt.engine.api.v3.types.V3DataCenters)3 DataCenters (org.ovirt.engine.api.model.DataCenters)1 V3Status (org.ovirt.engine.api.v3.types.V3Status)1 V3StorageDomain (org.ovirt.engine.api.v3.types.V3StorageDomain)1