-
Notifications
You must be signed in to change notification settings - Fork 367
/
test_ident_pb.proto
73 lines (54 loc) · 1.17 KB
/
test_ident_pb.proto
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
syntax = "proto2";
import "google/protobuf/descriptor.proto";
package test_ident;
// rust types defined in prelude
message Vec { }
message String { }
message Option { }
message None { }
message Some { }
message Message { }
// rust keywords
message struct { }
message Self {
optional string s = 1;
}
message Outer {
message fn {}
}
// oneof named type
message TestType {
oneof type {
string s = 1;
}
repeated string struct = 2;
repeated uint32 ref = 3;
}
// enum value which is a keyword
enum MyLittleEnum {
UNKNOWN = 0;
fn = 2;
self = 3;
}
message MessageRefencesEnum {
optional MyLittleEnum e1 = 1;
required MyLittleEnum e2 = 2;
repeated MyLittleEnum e3 = 3;
oneof one_enum {
MyLittleEnum e4 = 4;
}
}
enum EnumWithDefaultValueReserved {
in = 0;
}
message MessageReferencesEnumWithDefaultValueReserved {
optional EnumWithDefaultValueReserved e1 = 1;
required EnumWithDefaultValueReserved e2 = 2;
repeated EnumWithDefaultValueReserved e3 = 3;
oneof one_enum {
EnumWithDefaultValueReserved e4 = 4;
}
}
extend google.protobuf.EnumValueOptions {
optional string type = 51234;
}