• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1edition = "2023";
2
3package a.b.editions;
4
5option features.repeated_field_encoding = EXPANDED;
6option features.utf8_validation = NONE;
7
8message TestMessage {
9  int32 optional_int32 = 1;
10  int64 optional_int64 = 2;
11  uint32 optional_uint32 = 3;
12  uint64 optional_uint64 = 4;
13  bool optional_bool = 5;
14  double optional_double = 6;
15  float optional_float = 7;
16  string optional_string = 8;
17  bytes optional_bytes = 9;
18  TestEnum optional_enum = 10;
19  TestMessage optional_msg = 11;
20  repeated int32 repeated_int32 = 21;
21  repeated int64 repeated_int64 = 22;
22  repeated uint32 repeated_uint32 = 23;
23  repeated uint64 repeated_uint64 = 24;
24  repeated bool repeated_bool = 25;
25  repeated double repeated_double = 26;
26  repeated float repeated_float = 27;
27  repeated string repeated_string = 28;
28  repeated bytes repeated_bytes = 29;
29  repeated TestEnum repeated_enum = 30;
30  repeated TestMessage repeated_msg = 31;
31  int32 required_int32 = 41 [features.field_presence = LEGACY_REQUIRED];
32
33  int64 required_int64 = 42 [features.field_presence = LEGACY_REQUIRED];
34
35  uint32 required_uint32 = 43 [features.field_presence = LEGACY_REQUIRED];
36
37  uint64 required_uint64 = 44 [features.field_presence = LEGACY_REQUIRED];
38
39  bool required_bool = 45 [features.field_presence = LEGACY_REQUIRED];
40
41  double required_double = 46 [features.field_presence = LEGACY_REQUIRED];
42
43  float required_float = 47 [features.field_presence = LEGACY_REQUIRED];
44
45  string required_string = 48 [features.field_presence = LEGACY_REQUIRED];
46
47  bytes required_bytes = 49 [features.field_presence = LEGACY_REQUIRED];
48
49  TestEnum required_enum = 50 [features.field_presence = LEGACY_REQUIRED];
50
51  TestMessage required_msg = 51 [features.field_presence = LEGACY_REQUIRED];
52
53  oneof my_oneof {
54    int32 oneof_int32 = 61;
55    int64 oneof_int64 = 62;
56    uint32 oneof_uint32 = 63;
57    uint64 oneof_uint64 = 64;
58    bool oneof_bool = 65;
59    double oneof_double = 66;
60    float oneof_float = 67;
61    string oneof_string = 68;
62    bytes oneof_bytes = 69;
63    TestEnum oneof_enum = 70;
64    TestMessage oneof_msg = 71;
65  }
66
67  message NestedMessage {
68    int32 foo = 1;
69  }
70
71  NestedMessage nested_message = 80;
72
73  // Reserved for non-existing field test.
74  // int32 non_exist = 89;
75}
76
77enum TestEnum {
78  option features.enum_type = CLOSED;
79
80  Default = 0;
81  A = 1;
82  B = 2;
83  C = 3;
84  v0 = 4;
85}
86
87message TestUnknown {
88  TestUnknown optional_unknown = 11;
89  repeated TestUnknown repeated_unknown = 31;
90
91  oneof my_oneof {
92    TestUnknown oneof_unknown = 51;
93  }
94
95  int32 unknown_field = 89;
96}
97