-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathassemblyline.proto
46 lines (40 loc) · 937 Bytes
/
assemblyline.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
syntax = "proto3";
package assemblyline;
/* obtain tin.validation_* custom options */
import "tin.proto";
enum WidgetCondition {
WIDGET_CONDITION_ADEQUATE = 0;
WIDGET_CONDITION_DEFECTIVE = 1;
}
enum WidgetColor {
WIDGET_COLOR_UNPAINTED = 0;
WIDGET_COLOR_RED = 1;
WIDGET_COLOR_GREEN = 2;
}
message BlankWidget {
WidgetCondition condition = 1 [
(tin.field_validation) = "required"
];
}
message CutWidget {
WidgetCondition condition = 1 [
(tin.field_validation) = "required"
];
int32 numTeeth = 2 [
(tin.field_validation) = "required |> numberRange(32, 63)"
];
}
message PaintedWidget {
WidgetCondition condition = 1[
(tin.field_validation) = "required"
];
int32 numTeeth = 2[
(tin.field_validation) = "required |> numberRange(32, 63)"
];
WidgetColor paintJob = 3[
(tin.field_validation) = "required"
];
}
message BoxOfWidgets {
repeated PaintedWidget paintedWidgets = 1;
}