forked from sftcd/tek_transparency
-
Notifications
You must be signed in to change notification settings - Fork 0
/
applicationConfiguration.proto
129 lines (108 loc) · 3.54 KB
/
applicationConfiguration.proto
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
syntax = "proto3";
package de.rki.coronawarnapp.server.protocols;
message ApplicationConfiguration {
int32 minRiskScore = 1;
RiskScoreClassification riskScoreClasses = 2;
RiskScoreParameters exposureConfig = 3;
AttenuationDuration attenuationDuration = 4;
ApplicationVersionConfiguration appVersion = 5;
}
message RiskScoreParameters {
// App-specific mapping
TransmissionRiskParameter transmission = 1;
double transmissionWeight = 2;
DurationRiskParameter duration = 3;
double durationWeight = 4;
DaysSinceLastExposureRiskParameter daysSinceLastExposure = 5;
double daysWeight = 6;
AttenuationRiskParameter attenuation = 7;
double attenuationWeight = 8;
message TransmissionRiskParameter {
RiskLevel appDefined_1 = 1;
RiskLevel appDefined_2 = 2;
RiskLevel appDefined_3 = 3;
RiskLevel appDefined_4 = 4;
RiskLevel appDefined_5 = 5;
RiskLevel appDefined_6 = 6;
RiskLevel appDefined_7 = 7;
RiskLevel appDefined_8 = 8;
}
message DurationRiskParameter {
RiskLevel eq_0_min = 1; // D = 0 min, lowest risk
RiskLevel gt_0_le_5_min = 2; // 0 < D <= 5 min
RiskLevel gt_5_le_10_min = 3; // 5 < D <= 10 min
RiskLevel gt_10_le_15_min = 4; // 10 < D <= 15 min
RiskLevel gt_15_le_20_min = 5; // 15 < D <= 20 min
RiskLevel gt_20_le_25_min = 6; // 20 < D <= 25 min
RiskLevel gt_25_le_30_min = 7; // 25 < D <= 30 min
RiskLevel gt_30_min = 8; // > 30 min, highest risk
}
message DaysSinceLastExposureRiskParameter {
RiskLevel ge_14_days = 1; // D >= 14 days, lowest risk
RiskLevel ge_12_lt_14_days = 2; // 12 <= D < 14 days
RiskLevel ge_10_lt_12_days = 3; // 10 <= D < 12 days
RiskLevel ge_8_lt_10_days = 4; // 8 <= D < 10 days
RiskLevel ge_6_lt_8_days = 5; // 6 <= D < 8 days
RiskLevel ge_4_lt_6_days = 6; // 4 <= D < 6 days
RiskLevel ge_2_lt_4_days = 7; // 2 <= D < 4 days
RiskLevel ge_0_lt_2_days = 8; // 0 <= D < 2 days, highest risk
}
message AttenuationRiskParameter {
RiskLevel gt_73_dbm = 1; // A > 73 dBm, lowest risk
RiskLevel gt_63_le_73_dbm = 2; // 63 < A <= 73 dBm
RiskLevel gt_51_le_63_dbm = 3; // 51 < A <= 63 dBm
RiskLevel gt_33_le_51_dbm = 4; // 33 < A <= 51 dBm
RiskLevel gt_27_le_33_dbm = 5; // 27 < A <= 33 dBm
RiskLevel gt_15_le_27_dbm = 6; // 15 < A <= 27 dBm
RiskLevel gt_10_le_15_dbm = 7; // 10 < A <= 15 dBm
RiskLevel lt_10_dbm = 8; // A <= 10 dBm, highest risk
}
}
enum RiskLevel {
INVALID = 0;
LOWEST = 1;
LOW = 2;
LOW_MEDIUM = 3;
MEDIUM = 4;
MEDIUM_HIGH = 5;
HIGH = 6;
VERY_HIGH = 7;
HIGHEST = 8;
}
message RiskScoreClassification {
repeated RiskScoreClass risk_classes = 1;
}
message RiskScoreClass {
string label = 1;
int32 min = 2;
int32 max = 3;
string url = 4;
}
message AttenuationDuration {
Thresholds thresholds = 1;
Weights weights = 2;
int32 defaultBucketOffset = 3;
int32 riskScoreNormalizationDivisor = 4;
}
message Thresholds {
int32 lower = 1;
int32 upper = 2;
}
message Weights {
double low = 1;
double mid = 2;
double high = 3;
}
message ApplicationVersionConfiguration {
ApplicationVersionInfo ios = 1;
ApplicationVersionInfo android = 2;
}
message ApplicationVersionInfo {
SemanticVersion latest = 1;
SemanticVersion min = 2;
}
message SemanticVersion {
uint32 major = 1;
uint32 minor = 2;
uint32 patch = 3;
}