File: test.proto

package info (click to toggle)
upb 0.0.0~git200730-2
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,696 kB
  • sloc: ansic: 16,828; cpp: 5,098; python: 360; pascal: 160; ruby: 21; sh: 19; makefile: 6
file content (47 lines) | stat: -rw-r--r-- 1,133 bytes parent folder | download | duplicates (6)
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
47
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;

  oneof o {
    int32 oneof_int32 = 26;
    int64 oneof_int64 = 27;
  }
}

message SubMessage {
  int32 foo = 1;
}

enum MyEnum {
  A = 0;
  B = 1;
  C = 2;
}