-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathproto_test.proto
80 lines (74 loc) · 2.03 KB
/
proto_test.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
74
75
76
77
78
79
80
package whatsapp;
option java_package = "com.whatsapp.proto";
option optimize_for = LITE_RUNTIME;
message EnumValues {
enum Planet {
PLUTO = 1;
MERCURY = 2;
}
enum Color {
RED = 1;
GREEN = 2;
BLUE = 3;
}
optional Planet planet = 1;
repeated Color colors = 2;
}
message NestedClasses {
message Universe {
message SolarSystem {
message Earth {
optional string country = 1;
}
repeated Earth earth = 1;
}
optional SolarSystem solarSystem = 1;
}
optional Universe universe = 1;
}
message NonRepeatedValues {
optional bool bool_value = 1;
optional double double_value = 2;
optional string string_value = 3;
optional bytes bytes_value = 4;
optional float float_value = 5;
optional sfixed64 sfixed64_value = 6;
optional sint64 sint64_value = 7;
optional int64 int64_value = 8;
optional fixed64 fixed64_value = 9;
optional uint64 uint64_value = 10;
optional fixed32 fixed32_value = 11;
optional uint32 uint32_value = 12;
optional sfixed32 sfixed32_value = 13;
optional sint32 sint32_value = 14;
optional int32 int32_value = 15;
}
message RepeatedValues {
repeated bool bool_value = 1;
repeated double double_value = 2;
repeated string string_value = 3;
repeated bytes bytes_value = 4;
repeated float float_value = 5;
repeated sfixed64 sfixed64_value = 6;
repeated sint64 sint64_value = 7;
repeated int64 int64_value = 8;
repeated fixed64 fixed64_value = 9;
repeated uint64 uint64_value = 10;
repeated fixed32 fixed32_value = 11;
repeated uint32 uint32_value = 12;
repeated sfixed32 sfixed32_value = 13;
repeated sint32 sint32_value = 14;
repeated int32 int32_value = 15;
}
message OneOf {
message FirstPayload {
optional string x = 1;
}
message SecondPayload {
optional int64 y = 1;
}
oneof choice {
FirstPayload first = 1;
SecondPayload second = 2;
}
}