summaryrefslogtreecommitdiff
path: root/tests/json/test.proto
blob: e6590011dad9e815053d70d1514b7e2a8e91aa76 (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
syntax = "proto3";

package upb.test.json;

message TestMessage {
  int32 optional_int32  = 1;
  int64 optional_int64  = 2;
  int32 optional_uint32  = 3;
  int64 optional_uint64  = 4;
  string optional_string  = 5;
  bytes optional_bytes  = 6;
  bool optional_bool  = 7;
  SubMessage optional_msg  = 8;
  MyEnum optional_enum = 9;

  repeated int32 repeated_int32 = 11;
  repeated int64 repeated_int64 = 12;
  repeated uint32 repeated_uint32 = 13;
  repeated uint64 repeated_uint64 = 14;
  repeated string repeated_string = 15;
  repeated bytes repeated_bytes = 16;
  repeated bool repeated_bool = 17;
  repeated SubMessage repeated_msg = 18;
  repeated MyEnum repeated_enum = 19;

  map<string, string>     map_string_string = 20;
  map<int32,  string>     map_int32_string = 21;
  map<bool,   string>     map_bool_string = 22;
  map<string, int32>      map_string_int32 = 23;
  map<string, bool>       map_string_bool = 24;
  map<string, SubMessage> map_string_msg = 25;
}

message SubMessage {
  int32 foo = 1;
}

enum MyEnum {
  A = 0;
  B = 1;
  C = 2;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback