use of org.ovirt.engine.api.v3.types.V3Users in project ovirt-engine by oVirt.
the class V3UsersInAdapter method adapt.
@Override
public Users adapt(V3Users from) {
Users to = new Users();
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.getUsers().addAll(adaptIn(from.getUsers()));
return to;
}
use of org.ovirt.engine.api.v3.types.V3Users in project ovirt-engine by oVirt.
the class V3UsersOutAdapter method adapt.
@Override
public V3Users adapt(Users from) {
V3Users to = new V3Users();
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.getUsers().addAll(adaptOut(from.getUsers()));
return to;
}
use of org.ovirt.engine.api.v3.types.V3Users 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;
}
use of org.ovirt.engine.api.v3.types.V3Users in project ovirt-engine by oVirt.
the class V3ApiSummaryOutAdapter method adapt.
@Override
public V3ApiSummary adapt(ApiSummary from) {
V3ApiSummary to = new V3ApiSummary();
if (from.isSetHosts()) {
ApiSummaryItem fromHosts = from.getHosts();
V3Hosts toHosts = new V3Hosts();
if (fromHosts.isSetTotal()) {
toHosts.setTotal(fromHosts.getTotal().longValue());
}
if (fromHosts.isSetActive()) {
toHosts.setActive(fromHosts.getActive().longValue());
}
to.setHosts(toHosts);
}
if (from.isSetStorageDomains()) {
ApiSummaryItem fromSds = from.getStorageDomains();
V3StorageDomains toSds = new V3StorageDomains();
if (fromSds.isSetTotal()) {
toSds.setTotal(fromSds.getTotal().longValue());
}
if (fromSds.isSetActive()) {
toSds.setActive(fromSds.getActive().longValue());
}
to.setStorageDomains(toSds);
}
if (from.isSetUsers()) {
ApiSummaryItem fromUsers = from.getUsers();
V3Users toUsers = new V3Users();
if (fromUsers.isSetTotal()) {
toUsers.setTotal(fromUsers.getTotal().longValue());
}
if (fromUsers.isSetActive()) {
toUsers.setActive(fromUsers.getActive().longValue());
}
to.setUsers(toUsers);
}
if (from.isSetVms()) {
ApiSummaryItem fromVms = from.getVms();
V3VMs toVms = new V3VMs();
if (fromVms.isSetTotal()) {
toVms.setTotal(fromVms.getTotal().longValue());
}
if (fromVms.isSetActive()) {
toVms.setActive(fromVms.getActive().longValue());
}
to.setVMs(toVms);
}
return to;
}
use of org.ovirt.engine.api.v3.types.V3Users 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;
}
Aggregations