Search in sources :

Example 1 with ObjectSettings

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;
}
Also used : BlockSettings(com.emc.storageos.model.varray.BlockSettings) VirtualArrayRestRep(com.emc.storageos.model.varray.VirtualArrayRestRep) ObjectSettings(com.emc.storageos.model.varray.ObjectSettings)

Aggregations

BlockSettings (com.emc.storageos.model.varray.BlockSettings)1 ObjectSettings (com.emc.storageos.model.varray.ObjectSettings)1 VirtualArrayRestRep (com.emc.storageos.model.varray.VirtualArrayRestRep)1