package org.bench4q.share.models.master;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;

import org.bench4q.share.models.master.statistics.SampleModel;
import org.bench4q.share.models.monitor.PhysicalDiskModel;

/**
 * When asked for logicalDisk, this model will be response
 * 
 * @author coderfengyun
 * 
 */
@XmlRootElement(name = "MonitorPhysicDisk")
public class MonitorPhysicalDiskResponseModel implements MonitorResultBase {
	private List<PhysicalDiskModel> physicalDiskModels;

	public MonitorPhysicalDiskResponseModel() {
		this.setPhysicalDiskModels(new ArrayList<PhysicalDiskModel>());
	}

	@XmlElementWrapper
	@XmlElement(name = "physicDisk")
	public List<PhysicalDiskModel> getPhysicalDiskModels() {
		return physicalDiskModels;
	}

	public void setPhysicalDiskModels(List<PhysicalDiskModel> physicalDiskModels) {
		this.physicalDiskModels = physicalDiskModels;
	}

	public void add(SampleModel model) {
		if (model instanceof PhysicalDiskModel) {
			this.getPhysicalDiskModels().add((PhysicalDiskModel) model);
		}
	}

}
