Search in sources :

Example 1 with V3ExternalProvider

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

the class V3ExternalProviderInAdapter method adapt.

@Override
public ExternalProvider adapt(V3ExternalProvider from) {
    ExternalProvider to = new ExternalProvider();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptIn(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptIn(from.getActions()));
    }
    if (from.isSetAuthenticationUrl()) {
        to.setAuthenticationUrl(from.getAuthenticationUrl());
    }
    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.isSetPassword()) {
        to.setPassword(from.getPassword());
    }
    if (from.isSetProperties()) {
        to.setProperties(new Properties());
        to.getProperties().getProperties().addAll(adaptIn(from.getProperties().getProperties()));
    }
    if (from.isSetRequiresAuthentication()) {
        to.setRequiresAuthentication(from.isRequiresAuthentication());
    }
    if (from.isSetUrl()) {
        to.setUrl(from.getUrl());
    }
    if (from.isSetUsername()) {
        to.setUsername(from.getUsername());
    }
    return to;
}
Also used : ExternalProvider(org.ovirt.engine.api.model.ExternalProvider) V3ExternalProvider(org.ovirt.engine.api.v3.types.V3ExternalProvider) Properties(org.ovirt.engine.api.model.Properties)

Example 2 with V3ExternalProvider

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

the class V3ExternalProviderOutAdapter method adapt.

@Override
public V3ExternalProvider adapt(ExternalProvider from) {
    V3ExternalProvider to = new V3ExternalProvider();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptOut(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptOut(from.getActions()));
    }
    if (from.isSetAuthenticationUrl()) {
        to.setAuthenticationUrl(from.getAuthenticationUrl());
    }
    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.isSetPassword()) {
        to.setPassword(from.getPassword());
    }
    if (from.isSetProperties()) {
        to.setProperties(new V3Properties());
        to.getProperties().getProperties().addAll(adaptOut(from.getProperties().getProperties()));
    }
    if (from.isSetRequiresAuthentication()) {
        to.setRequiresAuthentication(from.isRequiresAuthentication());
    }
    if (from.isSetUrl()) {
        to.setUrl(from.getUrl());
    }
    if (from.isSetUsername()) {
        to.setUsername(from.getUsername());
    }
    return to;
}
Also used : V3Properties(org.ovirt.engine.api.v3.types.V3Properties) V3ExternalProvider(org.ovirt.engine.api.v3.types.V3ExternalProvider)

Aggregations

V3ExternalProvider (org.ovirt.engine.api.v3.types.V3ExternalProvider)2 ExternalProvider (org.ovirt.engine.api.model.ExternalProvider)1 Properties (org.ovirt.engine.api.model.Properties)1 V3Properties (org.ovirt.engine.api.v3.types.V3Properties)1