package com.eactive.httpmockserver.api.dto;

import com.eactive.httpmockserver.common.validator.UniqueRoute;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;

public class MockRouteUpdateDTO {

    private Long id;

    @NotEmpty
    private String method;

    @NotEmpty
    private String pathPattern;

    @NotEmpty
    private String name;

    private String description;

    @Size(min = 1, message = "Response must have at least one item")
    private List<MockResponseDTO> responses = new ArrayList<>();

    public Long getId() {
        return id;
    }

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

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getPathPattern() {
        return pathPattern;
    }

    public void setPathPattern(String pathPattern) {
        this.pathPattern = pathPattern;
    }

    public String getName() {
        return name;
    }

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

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public List<MockResponseDTO> getResponses() {
        return responses;
    }

    public void setResponses(List<MockResponseDTO> responses) {
        this.responses = responses;
    }
}
