blob: bae463040250cdd343cf569e8c6a2337dca1b700 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
syntax = "proto3";
package configuration.typology;
message Workflow {
double alert_threshold = 1;
optional double interdiction_threshold = 2;
}
message TypologyRuleWeight {
string ref = 1;
double wght = 2;
}
message TypologyRule {
string id = 1;
string version = 2;
repeated TypologyRuleWeight wghts = 3;
}
message TypologyConfiguration {
string id = 1;
string description = 2;
string version = 3;
Workflow workflow = 4;
repeated TypologyRule rules = 5;
Expression expression = 6;
}
enum Operator {
ADD = 0;
MULTIPLY = 1;
SUBTRACT = 2;
DIVIDE = 3;
}
message Term {
string id = 1;
string version = 2;
}
message Expression {
Operator operator = 1;
repeated Term terms = 2;
}
message TypologyConfigurationRequest {
string id = 1;
string version = 2;
}
message DeleteTypologyConfigurationRequest {
string id = 1;
string version = 2;
}
message GetTypologyConfigResponse {
optional TypologyConfiguration configuration = 1;
}
message UpdateTypologyConfigRequest {
TypologyConfiguration configuration = 1;
}
service QueryTypologies {
rpc GetTypologyConfiguration (TypologyConfigurationRequest) returns (GetTypologyConfigResponse);
}
service MutateTypologies {
rpc CreateTypologyConfiguration (TypologyConfiguration) returns (TypologyConfiguration);
rpc UpdateTypologyConfiguration (UpdateTypologyConfigRequest) returns (TypologyConfiguration);
rpc DeleteTypologyConfiguration (DeleteTypologyConfigurationRequest) returns (TypologyConfiguration);
}
|