I want to define in proto3 an ordered list of unrelated classes (messages) like this:
- Frog
- Dirt
- Air
- Computer 1
- Computer 2
- Politics
Is it possible? I can also live with having a base class (base message) if that exists in proto3... Its not clear to mean if the feature set of proto3 allows this. Thanks!
The typical way of representing this would be
and use
repeated Wrapper
for the list/array. There is no one-steprepeated oneof
.Alternatively, you could just use
However this second layout cannot preserve the order between different kinds of element.