Search in sources :

Example 1 with V3VnicProfile

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

the class V3VnicProfileInAdapter method adapt.

@Override
public VnicProfile adapt(V3VnicProfile from) {
    VnicProfile to = new VnicProfile();
    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.isSetCustomProperties()) {
        to.setCustomProperties(new CustomProperties());
        to.getCustomProperties().getCustomProperties().addAll(adaptIn(from.getCustomProperties().getCustomProperty()));
    }
    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.isSetNetwork()) {
        to.setNetwork(adaptIn(from.getNetwork()));
    }
    if (from.isSetPassThrough()) {
        to.setPassThrough(adaptIn(from.getPassThrough()));
    }
    if (from.isSetPortMirroring()) {
        to.setPortMirroring(from.isPortMirroring());
    }
    if (from.isSetQos()) {
        to.setQos(adaptIn(from.getQos()));
    }
    return to;
}
Also used : VnicProfile(org.ovirt.engine.api.model.VnicProfile) V3VnicProfile(org.ovirt.engine.api.v3.types.V3VnicProfile) CustomProperties(org.ovirt.engine.api.model.CustomProperties)

Example 2 with V3VnicProfile

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

the class V3VnicProfileOutAdapter method adapt.

@Override
public V3VnicProfile adapt(VnicProfile from) {
    V3VnicProfile to = new V3VnicProfile();
    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.isSetCustomProperties()) {
        to.setCustomProperties(new V3CustomProperties());
        to.getCustomProperties().getCustomProperty().addAll(adaptOut(from.getCustomProperties().getCustomProperties()));
    }
    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.isSetNetwork()) {
        to.setNetwork(adaptOut(from.getNetwork()));
    }
    if (from.isSetPassThrough()) {
        to.setPassThrough(adaptOut(from.getPassThrough()));
    }
    if (from.isSetPortMirroring()) {
        to.setPortMirroring(from.isPortMirroring());
    }
    if (from.isSetQos()) {
        to.setQos(adaptOut(from.getQos()));
    }
    return to;
}
Also used : V3CustomProperties(org.ovirt.engine.api.v3.types.V3CustomProperties) V3VnicProfile(org.ovirt.engine.api.v3.types.V3VnicProfile)

Aggregations

V3VnicProfile (org.ovirt.engine.api.v3.types.V3VnicProfile)2 CustomProperties (org.ovirt.engine.api.model.CustomProperties)1 VnicProfile (org.ovirt.engine.api.model.VnicProfile)1 V3CustomProperties (org.ovirt.engine.api.v3.types.V3CustomProperties)1