aboutsummaryrefslogtreecommitdiffstats
path: root/tests/cyclic_messages/cyclic.proto
blob: 8cab0b142e3e71514ca7516a45a894135da42ecb (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
// Test structures with cyclic references.
// These can only be handled in pointer/callback mode,
// see associated .options files.

syntax = "proto2";

message TreeNode
{
    optional int32 leaf = 1;
    optional TreeNode left = 2;
    optional TreeNode right = 3;
}

message Dictionary
{
    repeated KeyValuePair dictItem = 1;
}

message KeyValuePair
{
    required string key = 1;
    optional string stringValue = 2;
    optional int32 intValue = 3;
    optional Dictionary dictValue = 4;
    optional TreeNode treeValue = 5;
}