• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1syntax = "proto3";
2
3package upb.test.json;
4
5message TestMessage {
6  int32 optional_int32  = 1;
7  int64 optional_int64  = 2;
8  int32 optional_uint32  = 3;
9  int64 optional_uint64  = 4;
10  string optional_string  = 5;
11  bytes optional_bytes  = 6;
12  bool optional_bool  = 7;
13  SubMessage optional_msg  = 8;
14  MyEnum optional_enum = 9;
15
16  repeated int32 repeated_int32 = 11;
17  repeated int64 repeated_int64 = 12;
18  repeated uint32 repeated_uint32 = 13;
19  repeated uint64 repeated_uint64 = 14;
20  repeated string repeated_string = 15;
21  repeated bytes repeated_bytes = 16;
22  repeated bool repeated_bool = 17;
23  repeated SubMessage repeated_msg = 18;
24  repeated MyEnum repeated_enum = 19;
25
26  map<string, string>     map_string_string = 20;
27  map<int32,  string>     map_int32_string = 21;
28  map<bool,   string>     map_bool_string = 22;
29  map<string, int32>      map_string_int32 = 23;
30  map<string, bool>       map_string_bool = 24;
31  map<string, SubMessage> map_string_msg = 25;
32
33  oneof o {
34    int32 oneof_int32 = 26;
35    int64 oneof_int64 = 27;
36  }
37}
38
39message SubMessage {
40  int32 foo = 1;
41}
42
43enum MyEnum {
44  A = 0;
45  B = 1;
46  C = 2;
47}
48