1syntax = "proto2";
2
3import 'nanopb.proto';
4
5message SubMessage
6{
7    repeated int32 array = 1 [(nanopb).max_count = 8];
8}
9
10/* Oneof in a message with other fields */
11message OneOfMessage
12{
13    required int32 prefix = 1;
14    oneof values
15    {
16        int32 first = 5;
17        string second = 6 [(nanopb).max_size = 8];
18        SubMessage third = 7;
19    }
20    required int32 suffix = 99;
21}
22
23/* Oneof in a message by itself */
24message PlainOneOfMessage
25{
26    oneof values
27    {
28        int32 first = 5;
29        string second = 6 [(nanopb).max_size = 8];
30        SubMessage third = 7;
31    }
32}