package com.eactive.testmaster.client.dto.internal;

import com.eactive.testmaster.client.dto.ApiRequestDTO;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class ScenarioNode  {

    private String id;
    private String name;
    private Map<String, String> data;

    @JsonProperty("class")
    private String className;

    private String html;
    private Map<String, ScenarioConnections> inputs;
    private Map<String, ScenarioConnections> outputs;

    private List<ScenarioNode> connections;

    private ApiRequestDTO apiRequest;

    public ScenarioNode() {

    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Map<String, String> getData() {
        return data;
    }

    public void setData(Map<String, String> data) {
        this.data = data;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getHtml() {
        return html;
    }

    public void setHtml(String html) {
        this.html = html;
    }

    public Map<String, ScenarioConnections> getInputs() {
        return inputs;
    }

    public void setInputs(Map<String, ScenarioConnections> inputs) {
        this.inputs = inputs;
    }

    public Map<String, ScenarioConnections> getOutputs() {
        return outputs;
    }

    public void setOutputs(Map<String, ScenarioConnections> outputs) {
        this.outputs = outputs;
    }

    public List<ScenarioNode> getConnections() {
        return connections;
    }

    public void setConnections(List<ScenarioNode> connections) {
        this.connections = connections;
    }

    public void addNode(ScenarioNode node) {
        if (this.connections == null)
            this.connections = new ArrayList<>();

        this.connections.add(node);
    }

    public ApiRequestDTO getApiRequest() {
        return apiRequest;
    }

    public void setApiRequest(ApiRequestDTO apiRequest) {
        this.apiRequest = apiRequest;
    }
}
