use of com.emc.storageos.model.varray.ObjectSettings in project coprhd-controller by CoprHD.
the class VirtualArrayMapper method map.
public static VirtualArrayRestRep map(VirtualArray from) {
if (from == null) {
return null;
}
VirtualArrayRestRep to = new VirtualArrayRestRep();
mapDataObjectFields(from, to);
if (from.getAutoSanZoning() != null) {
BlockSettings blockSettings = new BlockSettings();
if (from.getAutoSanZoning() != null) {
blockSettings.setAutoSanZoning(from.getAutoSanZoning());
}
to.setBlockSettings(blockSettings);
}
ObjectSettings objectSettings = null;
if (from.getProtectionType() != null || from.getDeviceRegistered() != null) {
objectSettings = new ObjectSettings();
if (from.getDeviceRegistered() != null) {
objectSettings.setDeviceRegistered(from.getDeviceRegistered());
}
if (from.getProtectionType() != null) {
objectSettings.setProtectionType(from.getProtectionType());
}
}
if (objectSettings != null) {
to.setObjectSettings(objectSettings);
}
return to;
}
Aggregations