oneof.proto 450 B

1234567891011121314151617181920212223
  1. syntax = "proto2";
  2. import 'nanopb.proto';
  3. message SubMessage
  4. {
  5. repeated int32 array = 1 [(nanopb).max_count = 8];
  6. }
  7. /* Oneof in a message with other fields */
  8. message AnonymousOneOfMessage
  9. {
  10. option (nanopb_msgopt).anonymous_oneof = true;
  11. required int32 prefix = 1;
  12. oneof values
  13. {
  14. int32 first = 5;
  15. string second = 6 [(nanopb).max_size = 8];
  16. SubMessage third = 7;
  17. }
  18. required int32 suffix = 99;
  19. }