Search in sources :

Example 1 with V3OpenStackVolumeType

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

the class V3OpenStackVolumeTypeInAdapter method adapt.

@Override
public OpenStackVolumeType adapt(V3OpenStackVolumeType from) {
    OpenStackVolumeType to = new OpenStackVolumeType();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptIn(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptIn(from.getActions()));
    }
    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.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetOpenstackVolumeProvider()) {
        to.setOpenstackVolumeProvider(adaptIn(from.getOpenstackVolumeProvider()));
    }
    if (from.isSetProperties()) {
        to.setProperties(new Properties());
        to.getProperties().getProperties().addAll(adaptIn(from.getProperties().getProperties()));
    }
    return to;
}
Also used : OpenStackVolumeType(org.ovirt.engine.api.model.OpenStackVolumeType) V3OpenStackVolumeType(org.ovirt.engine.api.v3.types.V3OpenStackVolumeType) Properties(org.ovirt.engine.api.model.Properties)

Example 2 with V3OpenStackVolumeType

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

the class V3OpenStackVolumeTypeOutAdapter method adapt.

@Override
public V3OpenStackVolumeType adapt(OpenStackVolumeType from) {
    V3OpenStackVolumeType to = new V3OpenStackVolumeType();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptOut(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptOut(from.getActions()));
    }
    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.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetOpenstackVolumeProvider()) {
        to.setOpenstackVolumeProvider(adaptOut(from.getOpenstackVolumeProvider()));
    }
    if (from.isSetProperties()) {
        to.setProperties(new V3Properties());
        to.getProperties().getProperties().addAll(adaptOut(from.getProperties().getProperties()));
    }
    return to;
}
Also used : V3OpenStackVolumeType(org.ovirt.engine.api.v3.types.V3OpenStackVolumeType) V3Properties(org.ovirt.engine.api.v3.types.V3Properties)

Aggregations

V3OpenStackVolumeType (org.ovirt.engine.api.v3.types.V3OpenStackVolumeType)2 OpenStackVolumeType (org.ovirt.engine.api.model.OpenStackVolumeType)1 Properties (org.ovirt.engine.api.model.Properties)1 V3Properties (org.ovirt.engine.api.v3.types.V3Properties)1