syntax = "proto3";

option go_package = "v1";
option java_package = "io.stackrox.proto.api.v1";

import "google/api/annotations.proto";
import "google/protobuf/timestamp.proto";
import "api/v1/empty.proto";
import "storage/benchmark_trigger.proto";

package v1;

message GetBenchmarkTriggersRequest {
    repeated string ids                 = 1;
    repeated string cluster_ids         = 2;
    google.protobuf.Timestamp from_time = 3;
    google.protobuf.Timestamp to_time   = 4;

}

message GetBenchmarkTriggersResponse {
    repeated storage.BenchmarkTrigger triggers = 1;
}

service BenchmarkTriggerService {

    rpc GetTriggers (GetBenchmarkTriggersRequest) returns (GetBenchmarkTriggersResponse) {
        option (google.api.http) = {
            get: "/v1/benchmarks/triggers"
        };
    }

    rpc Trigger (storage.BenchmarkTrigger) returns (Empty) {
        option (google.api.http) = {
            post: "/v1/benchmarks/triggers/{id}"
            body: "*"
        };
    }

}
