syntax = "proto3";

package load.projects.tasklets.shooting;

import "tasklet/api/tasklet.proto";
import "tasklet/services/ci/proto/ci.proto";
import "tasklet/services/yav/proto/yav.proto";
import "ci/tasklet/common/proto/sandbox.proto";
import "ci/tasklet/common/proto/service.proto";

message LoadConfig {
    string config = 1;
    repeated string options = 2;
}

message SandboxConfig {
    string owner = 1;
    string token = 2;
    string description = 3;
}

message ShootingResult {
    int32 shooting_id = 1;
}

message Input {
    ci.TaskletContext context = 1;
    SandboxConfig sandbox = 2;
    LoadConfig load = 3;
}

message Output {
    ShootingResult result = 1;
}

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

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

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