package ch.unisg.tapastasks.tasks.application.port.in;

import ch.unisg.tapastasks.common.SelfValidating;
import ch.unisg.tapastasks.tasks.domain.Task;
import lombok.Getter;
import lombok.Value;

import javax.validation.constraints.NotNull;
import java.util.Optional;

@Value
public class AddNewTaskToTaskListCommand extends SelfValidating<AddNewTaskToTaskListCommand> {
    @NotNull Task.TaskName taskName;

    @NotNull Task.TaskType taskType;

    @Getter
    Optional<Task.OriginalTaskUri> originalTaskUri;

    @Getter
    Optional<Task.InputData> inputData;

    public AddNewTaskToTaskListCommand(Task.TaskName taskName, Task.TaskType taskType,
                                       Optional<Task.OriginalTaskUri> originalTaskUri, Optional<Task.InputData> inputData) {
        this.taskName = taskName;
        this.taskType = taskType;
        this.originalTaskUri = originalTaskUri;
        this.inputData = inputData;

        this.validateSelf();
    }
}
