package org.bench4q.share.models.agent.scriptrecord;

import java.util.LinkedList;
import java.util.List;

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

@XmlRootElement
public class ScheduleModel {
	private List<PointModel> points;

	@XmlElementWrapper(name = "points")
	@XmlElement(name = "point")
	public List<PointModel> getPoints() {
		return points;
	}

	public void setPoints(List<PointModel> points) {
		this.points = points;
	}

	public ScheduleModel() {
		this.points = new LinkedList<PointModel>();
	}

	@XmlRootElement
	public static class PointModel {
		private long time;
		private int load;

		@XmlElement
		public long getTime() {
			return time;
		}

		public void setTime(long time) {
			this.time = time;
		}

		@XmlElement
		public int getLoad() {
			return load;
		}

		public void setLoad(int load) {
			this.load = load;
		}

		public PointModel(){}
		public PointModel(long time, int load){
			this.time = time;
			this.load = load;
		}
	}
}
