-
Notifications
You must be signed in to change notification settings - Fork 16
/
test.proto
63 lines (57 loc) · 1.68 KB
/
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
syntax = "proto2";
import "google/protobuf/empty.proto";
import "google/protobuf/any.proto";
enum GoodEnum {
GOOD_VALUE_ONE = 0;
GOOD_VALUE_TWO = 1;
}
enum bad_enum {
bad_value_one = 0;
BadValueTwo = 1;
}
message GoodMessage {
required bool good_field_one = 1;
optional int32 good_field_two = 2;
message GoodNestedMessage {
required bool good_field_one = 1;
optional int32 good_field_two = 2;
}
optional GoodNestedMessage good_field_three = 3;
enum GoodNestedEnum {
GOOD_VALUE_ONE = 0;
GOOD_VALUE_TWO = 1;
}
optional GoodNestedEnum good_field_four = 4 [default = GOOD_VALUE_ONE];
}
message badMessage {
required bool badFieldOne = 1;
optional int32 BAD_FIELD_TWO = 2;
message GoodNestedMessage {
required bool good_field_one = 1;
optional int32 good_field_two = 2;
}
optional GoodNestedMessage BADFIELDTHREE = 3;
message BAD_NESTED_MESSAGE {
required bool BadFieldOne = 1;
optional int32 good_field_two = 2;
}
optional BAD_NESTED_MESSAGE good_field_four = 4;
enum GoodNestedEnum {
GOOD_VALUE_ONE = 0;
GOOD_VALUE_TWO = 1;
}
optional GoodNestedEnum good_field_five = 5 [default = GOOD_VALUE_ONE];
enum bad_nested_enum {
bad_value_one = 0;
BadValueTwo = 1;
}
optional bad_nested_enum good_field_six = 6 [default = bad_value_one];
}
service GoodService {
rpc GoodMethodOne (GoodMessage) returns (GoodMessage);
rpc GoodMethodTwo (GoodMessage) returns (GoodMessage);
}
service bad_service {
rpc bad_method_one (GoodMessage) returns (GoodMessage);
rpc badMethodTwo (GoodMessage) returns (GoodMessage);
}