| // Copyright 2024 The Go Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style | |
| // license that can be found in the LICENSE file. | |
| edition = "2023"; | |
| package lazy_extension_test; | |
| import "internal/testprotos/messageset/messagesetpb/message_set.proto"; | |
| option go_package = "google.golang.org/protobuf/internal/testprotos/lazy"; | |
| // This message contains a message set. | |
| message Holder { | |
| goproto.proto.messageset.MessageSet data = 1; | |
| } | |
| // This message may be inserted into a message set. | |
| message Rabbit { | |
| extend goproto.proto.messageset.MessageSet { | |
| Rabbit message_set_extension = 345570595; | |
| } | |
| string name = 1 [features.utf8_validation = NONE]; | |
| } | |
| enum FlyingFoxSpecies { | |
| FLYING_FOX_UNDEFINED = 0; | |
| GREY_HEADED = 1; | |
| BLACK = 2; | |
| SPECTACLED = 3; | |
| LARGE_EARED = 4; | |
| DUSKY = 5; | |
| TORRESIAN = 6; | |
| BARE_BACKED = 7; | |
| } | |
| enum PipistrelleSpecies { | |
| PIPISTRELLE_UNDEFINED = 0; | |
| FOREST = 1; | |
| INDIAN = 2; | |
| EGYPTIAN = 3; | |
| RUSTY = 4; | |
| LEAST = 5; | |
| } | |
| message FlyingFox { | |
| FlyingFoxSpecies species = 1; | |
| } | |
| message Tree { | |
| bool eucalyptus = 1; | |
| extensions 10000 to max; | |
| } | |
| extend Tree { | |
| FlyingFox bat = 345570595; | |
| } | |
| extend Tree { | |
| FlyingFox bat_pup = 345570596; | |
| } | |
| message Pipistrelle { | |
| PipistrelleSpecies species = 1; | |
| } | |
| message Pipistrelles { | |
| PipistrelleSpecies species = 1; | |
| } | |
| extend Tree { | |
| repeated FlyingFox bat_posse = 345570597; | |
| bytes binary_bat = 345570598; | |
| uint32 integer_bat = 345570599; | |
| Pipistrelle pipistrelle = 345570600 [features.message_encoding = DELIMITED]; | |
| repeated Pipistrelles pipistrelles = 345570601 | |
| [features.message_encoding = DELIMITED]; | |
| } | |
| // And the ugly version that is not encouraged | |
| message BatNest { | |
| extend Tree { | |
| FlyingFox bat = 345570602; | |
| } | |
| } |