use of org.ovirt.engine.api.v3.types.V3GlusterVolume in project ovirt-engine by oVirt.
the class V3GlusterVolumeInAdapter method adapt.
@Override
public GlusterVolume adapt(V3GlusterVolume from) {
GlusterVolume to = new GlusterVolume();
if (from.isSetLinks()) {
to.getLinks().addAll(adaptIn(from.getLinks()));
}
if (from.isSetActions()) {
to.setActions(adaptIn(from.getActions()));
}
if (from.isSetBricks()) {
to.setBricks(new GlusterBricks());
to.getBricks().getGlusterBricks().addAll(adaptIn(from.getBricks().getGlusterBricks()));
}
if (from.isSetCluster()) {
to.setCluster(adaptIn(from.getCluster()));
}
if (from.isSetComment()) {
to.setComment(from.getComment());
}
if (from.isSetDescription()) {
to.setDescription(from.getDescription());
}
if (from.isSetDisperseCount()) {
to.setDisperseCount(from.getDisperseCount());
}
if (from.isSetId()) {
to.setId(from.getId());
}
if (from.isSetHref()) {
to.setHref(from.getHref());
}
if (from.isSetName()) {
to.setName(from.getName());
}
if (from.isSetOptions()) {
to.setOptions(new Options());
to.getOptions().getOptions().addAll(adaptIn(from.getOptions().getOptions()));
}
if (from.isSetRedundancyCount()) {
to.setRedundancyCount(from.getRedundancyCount());
}
if (from.isSetReplicaCount()) {
to.setReplicaCount(from.getReplicaCount());
}
if (from.isSetStatus() && from.getStatus().isSetState()) {
to.setStatus(GlusterVolumeStatus.fromValue(from.getStatus().getState()));
}
if (from.isSetStripeCount()) {
to.setStripeCount(from.getStripeCount());
}
if (from.isSetTransportTypes()) {
to.setTransportTypes(new GlusterVolume.TransportTypesList());
to.getTransportTypes().getTransportTypes().addAll(adaptTransportTypes(from));
}
if (from.isSetVolumeType()) {
to.setVolumeType(GlusterVolumeType.fromValue(from.getVolumeType()));
}
return to;
}
use of org.ovirt.engine.api.v3.types.V3GlusterVolume in project ovirt-engine by oVirt.
the class V3GlusterVolumeOutAdapter method adapt.
@Override
public V3GlusterVolume adapt(GlusterVolume from) {
V3GlusterVolume to = new V3GlusterVolume();
if (from.isSetLinks()) {
to.getLinks().addAll(adaptOut(from.getLinks()));
}
if (from.isSetActions()) {
to.setActions(adaptOut(from.getActions()));
}
if (from.isSetBricks()) {
to.setBricks(new V3GlusterBricks());
to.getBricks().getGlusterBricks().addAll(adaptOut(from.getBricks().getGlusterBricks()));
}
if (from.isSetCluster()) {
to.setCluster(adaptOut(from.getCluster()));
}
if (from.isSetComment()) {
to.setComment(from.getComment());
}
if (from.isSetDescription()) {
to.setDescription(from.getDescription());
}
if (from.isSetDisperseCount()) {
to.setDisperseCount(from.getDisperseCount());
}
if (from.isSetId()) {
to.setId(from.getId());
}
if (from.isSetHref()) {
to.setHref(from.getHref());
}
if (from.isSetName()) {
to.setName(from.getName());
}
if (from.isSetOptions()) {
to.setOptions(new V3Options());
to.getOptions().getOptions().addAll(adaptOut(from.getOptions().getOptions()));
}
if (from.isSetRedundancyCount()) {
to.setRedundancyCount(from.getRedundancyCount());
}
if (from.isSetReplicaCount()) {
to.setReplicaCount(from.getReplicaCount());
}
if (from.isSetStatus()) {
V3Status status = new V3Status();
status.setState(from.getStatus().value());
to.setStatus(status);
}
if (from.isSetStripeCount()) {
to.setStripeCount(from.getStripeCount());
}
if (from.isSetTransportTypes()) {
to.setTransportTypes(new V3TransportTypes());
to.getTransportTypes().getTransportTypes().addAll(adaptTransportTypes(from));
}
if (from.isSetVolumeType()) {
to.setVolumeType(from.getVolumeType().value());
}
return to;
}
Aggregations