com.emc.storageos.model.block.export.VolumeUpdateParam Maven / Gradle / Ivy
/*
* Copyright (c) 2015 EMC Corporation
* All Rights Reserved
*/
package com.emc.storageos.model.block.export;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
/**
* Update parameter for block volume of snapshot
*/
public class VolumeUpdateParam {
private List add;
private List remove;
public VolumeUpdateParam() {
}
public VolumeUpdateParam(List add, List remove) {
this.add = add;
this.remove = remove;
}
/**
* Add lists of volume or volume snapshot changes.
*
* @valid none
*/
@XmlElementWrapper(name = "add", required = false)
@XmlElement(name = "volume")
public List getAdd() {
if (add == null) {
add = new ArrayList();
}
return add;
}
/**
* Remove lists of volume or volume snapshot changes.
*
* @valid none
*/
@XmlElementWrapper(required = false)
@XmlElement(name = "volume")
public List getRemove() {
if (remove == null) {
remove = new ArrayList();
}
return remove;
}
public void addVolume(URI volumeId) {
getAdd().add(new VolumeParam(volumeId));
}
public void removeVolume(URI volumeId) {
getRemove().add(volumeId);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy