package org.bench4q.share.models.master;

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

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

import org.bench4q.share.models.agent.RunScenarioModel;
import org.bench4q.share.models.agent.ScriptFilterOptionsModel;

@XmlRootElement(name = "runningScripModel")
public class RunningScriptModel {
	private int scriptId;
	private int requireLoad;
	private TestScriptConfig config;
	private ScriptFilterOptionsModel scriptFilterOptionsModel;
	private RunScenarioModel scenarioModel;
	private String scriptName;
	private boolean finished;
	private List<RunningAgentModel> runningAgentModels = new ArrayList<RunningAgentModel>();
	private UUID testPlanID;

	@XmlElement
	public int getScriptId() {
		return scriptId;
	}

	public void setScriptId(int scriptId) {
		this.scriptId = scriptId;
	}

	@XmlElement
	public int getRequireLoad() {
		return requireLoad;
	}

	public void setRequireLoad(int requireLoad) {
		this.requireLoad = requireLoad;
	}

	@XmlElement
	public TestScriptConfig getConfig() {
		return config;
	}

	public void setConfig(TestScriptConfig config) {
		this.config = config;
	}

	@XmlElement
	public RunScenarioModel getScenarioModel() {
		return scenarioModel;
	}

	public void setScenarioModel(RunScenarioModel scenarioModel) {
		this.scenarioModel = scenarioModel;
	}

	@XmlElement
	public String getScriptName() {
		return scriptName;
	}

	public void setScriptName(String scriptName) {
		this.scriptName = scriptName;
	}

	@XmlElement
	public boolean isFinished() {
		return finished;
	}

	public void setFinished(boolean finished) {
		this.finished = finished;
	}

	@XmlElementWrapper(name = "runningAgentList")
	@XmlElement
	public List<RunningAgentModel> getRunningAgentModels() {
		return runningAgentModels;
	}

	public void setRunningAgentModels(List<RunningAgentModel> runningAgentModels) {
		this.runningAgentModels = runningAgentModels;
	}

	public UUID getTestPlanID() {
		return testPlanID;
	}

	public void setTestPlanID(UUID testPlanID) {
		this.testPlanID = testPlanID;
	}

	@XmlElement
	public ScriptFilterOptionsModel getScriptFilterOptionsModel() {
		return scriptFilterOptionsModel;
	}

	public void setScriptFilterOptionsModel(ScriptFilterOptionsModel scriptFilterOptionsModel) {
		this.scriptFilterOptionsModel = scriptFilterOptionsModel;
	}
}
