oneof.proto 743 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. syntax = "proto3";
  2. message DecodesOK
  3. {
  4. uint32 a = 1;
  5. uint32 b = 2;
  6. }
  7. message NoDecode
  8. {
  9. string name = 1;
  10. }
  11. message TestMessage
  12. {
  13. enum MessageType
  14. {
  15. A = 0;
  16. B = 1;
  17. C = 2;
  18. }
  19. MessageType messageType = 1;
  20. uint32 x = 2;
  21. uint32 y = 3;
  22. uint32 ip1 = 4;
  23. oneof payload
  24. {
  25. DecodesOK pla5 = 5;
  26. DecodesOK pla6 = 6;
  27. DecodesOK pla7 = 7;
  28. DecodesOK pla8 = 8;
  29. DecodesOK pla9 = 9;
  30. DecodesOK pla10 = 10;
  31. NoDecode plb11 = 12;
  32. }
  33. uint32 ip2 = 11;
  34. }