syntax = "proto3";

package load.projects.tasklets.assessment;

import "tasklet/api/tasklet.proto";
import "tasklet/services/ci/proto/ci.proto";
import "tasklet/services/yav/proto/yav.proto";
import "ci/tasklet/common/proto/service.proto";
import "load/projects/tasklets/shooting/proto/shooting.proto";

message Context {
    option (tasklet.context) = true;
    option (tasklet.py_adapter) = "tasklet.domain.adapter:Context";
    ci.CiService ci = 1 [(tasklet.inject) = true];
    yav_service.YavService yav = 2 [(tasklet.inject) = true];
}

message AssessmentConditions {
    repeated int32 reference = 1;
    int32 threshold = 2;
    repeated string tests = 3;
    string ticket = 4;
    string st_token = 5;
}

message AssessmentResult {
    string result = 1;
    string link = 2;
}

message Input {
    ci.TaskletContext context = 1;
    AssessmentConditions conditions = 2;
    shooting.ShootingResult shooting = 3;
}

message Output {
    AssessmentResult assessment = 1;
}

message Assessment {
    option (tasklet.tasklet_interface) = true;

    Context ctx = 1;
    Input input = 2 [(tasklet.input) = true];
    Output output = 3 [(tasklet.output) = true];
}
