Search in sources :

Example 1 with V3Quota

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

the class V3QuotaInAdapter method adapt.

@Override
public Quota adapt(V3Quota from) {
    Quota to = new Quota();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptIn(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptIn(from.getActions()));
    }
    if (from.isSetClusterHardLimitPct()) {
        to.setClusterHardLimitPct(from.getClusterHardLimitPct());
    }
    if (from.isSetClusterSoftLimitPct()) {
        to.setClusterSoftLimitPct(from.getClusterSoftLimitPct());
    }
    if (from.isSetComment()) {
        to.setComment(from.getComment());
    }
    if (from.isSetDataCenter()) {
        to.setDataCenter(adaptIn(from.getDataCenter()));
    }
    if (from.isSetDescription()) {
        to.setDescription(from.getDescription());
    }
    if (from.isSetDisks()) {
        to.setDisks(new Disks());
        to.getDisks().getDisks().addAll(adaptIn(from.getDisks().getDisks()));
    }
    if (from.isSetId()) {
        to.setId(from.getId());
    }
    if (from.isSetHref()) {
        to.setHref(from.getHref());
    }
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetStorageHardLimitPct()) {
        to.setStorageHardLimitPct(from.getStorageHardLimitPct());
    }
    if (from.isSetStorageSoftLimitPct()) {
        to.setStorageSoftLimitPct(from.getStorageSoftLimitPct());
    }
    if (from.isSetUsers()) {
        to.setUsers(new Users());
        to.getUsers().getUsers().addAll(adaptIn(from.getUsers().getUsers()));
    }
    if (from.isSetVms()) {
        to.setVms(new Vms());
        to.getVms().getVms().addAll(adaptIn(from.getVms().getVMs()));
    }
    return to;
}
Also used : V3Quota(org.ovirt.engine.api.v3.types.V3Quota) Quota(org.ovirt.engine.api.model.Quota) Disks(org.ovirt.engine.api.model.Disks) Users(org.ovirt.engine.api.model.Users) Vms(org.ovirt.engine.api.model.Vms)

Example 2 with V3Quota

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

the class V3QuotaOutAdapter method adapt.

@Override
public V3Quota adapt(Quota from) {
    V3Quota to = new V3Quota();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptOut(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptOut(from.getActions()));
    }
    if (from.isSetClusterHardLimitPct()) {
        to.setClusterHardLimitPct(from.getClusterHardLimitPct());
    }
    if (from.isSetClusterSoftLimitPct()) {
        to.setClusterSoftLimitPct(from.getClusterSoftLimitPct());
    }
    if (from.isSetComment()) {
        to.setComment(from.getComment());
    }
    if (from.isSetDataCenter()) {
        to.setDataCenter(adaptOut(from.getDataCenter()));
    }
    if (from.isSetDescription()) {
        to.setDescription(from.getDescription());
    }
    if (from.isSetDisks()) {
        to.setDisks(new V3Disks());
        to.getDisks().getDisks().addAll(adaptOut(from.getDisks().getDisks()));
    }
    if (from.isSetId()) {
        to.setId(from.getId());
    }
    if (from.isSetHref()) {
        to.setHref(from.getHref());
    }
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetStorageHardLimitPct()) {
        to.setStorageHardLimitPct(from.getStorageHardLimitPct());
    }
    if (from.isSetStorageSoftLimitPct()) {
        to.setStorageSoftLimitPct(from.getStorageSoftLimitPct());
    }
    if (from.isSetUsers()) {
        to.setUsers(new V3Users());
        to.getUsers().getUsers().addAll(adaptOut(from.getUsers().getUsers()));
    }
    if (from.isSetVms()) {
        to.setVms(new V3VMs());
        to.getVms().getVMs().addAll(adaptOut(from.getVms().getVms()));
    }
    return to;
}
Also used : V3Quota(org.ovirt.engine.api.v3.types.V3Quota) V3Disks(org.ovirt.engine.api.v3.types.V3Disks) V3Users(org.ovirt.engine.api.v3.types.V3Users) V3VMs(org.ovirt.engine.api.v3.types.V3VMs)

Aggregations

V3Quota (org.ovirt.engine.api.v3.types.V3Quota)2 Disks (org.ovirt.engine.api.model.Disks)1 Quota (org.ovirt.engine.api.model.Quota)1 Users (org.ovirt.engine.api.model.Users)1 Vms (org.ovirt.engine.api.model.Vms)1 V3Disks (org.ovirt.engine.api.v3.types.V3Disks)1 V3Users (org.ovirt.engine.api.v3.types.V3Users)1 V3VMs (org.ovirt.engine.api.v3.types.V3VMs)1