Search in sources :

Example 1 with V3Files

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

the class V3CloudInitOutAdapter method adapt.

@Override
public V3CloudInit adapt(CloudInit from) {
    V3CloudInit to = new V3CloudInit();
    if (from.isSetAuthorizedKeys()) {
        to.setAuthorizedKeys(new V3AuthorizedKeys());
        to.getAuthorizedKeys().getAuthorizedKeys().addAll(adaptOut(from.getAuthorizedKeys().getAuthorizedKeys()));
    }
    if (from.isSetFiles()) {
        to.setFiles(new V3Files());
        to.getFiles().getFiles().addAll(adaptOut(from.getFiles().getFiles()));
    }
    if (from.isSetHost()) {
        to.setHost(adaptOut(from.getHost()));
    }
    if (from.isSetNetworkConfiguration()) {
        to.setNetworkConfiguration(adaptOut(from.getNetworkConfiguration()));
    }
    if (from.isSetRegenerateSshKeys()) {
        to.setRegenerateSshKeys(from.isRegenerateSshKeys());
    }
    if (from.isSetTimezone()) {
        to.setTimezone(from.getTimezone());
    }
    if (from.isSetUsers()) {
        to.setUsers(new V3Users());
        to.getUsers().getUsers().addAll(adaptOut(from.getUsers().getUsers()));
    }
    return to;
}
Also used : V3Files(org.ovirt.engine.api.v3.types.V3Files) V3CloudInit(org.ovirt.engine.api.v3.types.V3CloudInit) V3Users(org.ovirt.engine.api.v3.types.V3Users) V3AuthorizedKeys(org.ovirt.engine.api.v3.types.V3AuthorizedKeys)

Example 2 with V3Files

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

the class V3FilesInAdapter method adapt.

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

Example 3 with V3Files

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

the class V3FilesOutAdapter method adapt.

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

Example 4 with V3Files

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

the class V3PayloadOutAdapter method adapt.

@Override
public V3Payload adapt(Payload from) {
    V3Payload to = new V3Payload();
    if (from.isSetFiles()) {
        to.setFiles(new V3Files());
        to.getFiles().getFiles().addAll(adaptOut(from.getFiles().getFiles()));
    }
    if (from.isSetType()) {
        to.setType(from.getType().value());
    }
    if (from.isSetVolumeId()) {
        to.setVolumeId(from.getVolumeId());
    }
    return to;
}
Also used : V3Files(org.ovirt.engine.api.v3.types.V3Files) V3Payload(org.ovirt.engine.api.v3.types.V3Payload)

Aggregations

V3Files (org.ovirt.engine.api.v3.types.V3Files)4 Files (org.ovirt.engine.api.model.Files)1 V3AuthorizedKeys (org.ovirt.engine.api.v3.types.V3AuthorizedKeys)1 V3CloudInit (org.ovirt.engine.api.v3.types.V3CloudInit)1 V3Payload (org.ovirt.engine.api.v3.types.V3Payload)1 V3Users (org.ovirt.engine.api.v3.types.V3Users)1