OLD | NEW |
1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
3 // https://developers.google.com/protocol-buffers/ | 3 // https://developers.google.com/protocol-buffers/ |
4 // | 4 // |
5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
7 // met: | 7 // met: |
8 // | 8 // |
9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 optional string default_cord = 85 [ctype=CORD,default="123"]; | 156 optional string default_cord = 85 [ctype=CORD,default="123"]; |
157 | 157 |
158 // For oneof test | 158 // For oneof test |
159 oneof oneof_field { | 159 oneof oneof_field { |
160 uint32 oneof_uint32 = 111; | 160 uint32 oneof_uint32 = 111; |
161 NestedMessage oneof_nested_message = 112; | 161 NestedMessage oneof_nested_message = 112; |
162 string oneof_string = 113; | 162 string oneof_string = 113; |
163 bytes oneof_bytes = 114; | 163 bytes oneof_bytes = 114; |
164 NestedMessage oneof_lazy_nested_message = 115 [lazy = true]; | 164 NestedMessage oneof_lazy_nested_message = 115 [lazy = true]; |
165 } | 165 } |
166 | |
167 // Tests toString for non-repeated fields with a list suffix | |
168 optional int32 deceptively_named_list = 116; | |
169 } | 166 } |
170 | 167 |
171 message ForeignMessageLite { | 168 message ForeignMessageLite { |
172 optional int32 c = 1; | 169 optional int32 c = 1; |
173 } | 170 } |
174 | 171 |
175 enum ForeignEnumLite { | 172 enum ForeignEnumLite { |
176 FOREIGN_LITE_FOO = 4; | 173 FOREIGN_LITE_FOO = 4; |
177 FOREIGN_LITE_BAR = 5; | 174 FOREIGN_LITE_BAR = 5; |
178 FOREIGN_LITE_BAZ = 6; | 175 FOREIGN_LITE_BAZ = 6; |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 | 398 |
402 message V1MessageLite { | 399 message V1MessageLite { |
403 required int32 int_field = 1; | 400 required int32 int_field = 1; |
404 optional V1EnumLite enum_field = 2 [ default = V1_FIRST ]; | 401 optional V1EnumLite enum_field = 2 [ default = V1_FIRST ]; |
405 } | 402 } |
406 | 403 |
407 message V2MessageLite { | 404 message V2MessageLite { |
408 required int32 int_field = 1; | 405 required int32 int_field = 1; |
409 optional V2EnumLite enum_field = 2 [ default = V2_FIRST ]; | 406 optional V2EnumLite enum_field = 2 [ default = V2_FIRST ]; |
410 } | 407 } |
411 | |
412 message TestHugeFieldNumbersLite { | |
413 optional int32 optional_int32 = 536870000; | |
414 optional int32 fixed_32 = 536870001; | |
415 repeated int32 repeated_int32 = 536870002 [packed = false]; | |
416 repeated int32 packed_int32 = 536870003 [packed = true]; | |
417 | |
418 optional ForeignEnumLite optional_enum = 536870004; | |
419 optional string optional_string = 536870005; | |
420 optional bytes optional_bytes = 536870006; | |
421 optional ForeignMessageLite optional_message = 536870007; | |
422 | |
423 optional group OptionalGroup = 536870008 { | |
424 optional int32 group_a = 536870009; | |
425 } | |
426 | |
427 map<string, string> string_string_map = 536870010; | |
428 | |
429 oneof oneof_field { | |
430 uint32 oneof_uint32 = 536870011; | |
431 TestAllTypesLite oneof_test_all_types = 536870012; | |
432 string oneof_string = 536870013; | |
433 bytes oneof_bytes = 536870014; | |
434 } | |
435 | |
436 extensions 536860000 to 536869999; | |
437 } | |
438 | |
439 extend TestHugeFieldNumbersLite { | |
440 optional TestAllTypesLite test_all_types_lite = 536860000; | |
441 } | |
OLD | NEW |