oneof.proto 464 B

1234567891011121314151617181920212223242526272829
  1. syntax = "proto2";
  2. message MessageOne
  3. {
  4. required uint32 one = 1;
  5. required uint32 two = 2;
  6. required uint32 three = 3;
  7. required int32 four = 4;
  8. }
  9. enum EnumTwo
  10. {
  11. SOME_ENUM_1 = 1;
  12. SOME_ENUM_2 = 5;
  13. SOME_ENUM_3 = 6;
  14. SOME_ENUM_4 = 9;
  15. SOME_ENUM_5 = 10;
  16. SOME_ENUM_6 = 12;
  17. SOME_ENUM_7 = 39;
  18. SOME_ENUM_8 = 401;
  19. }
  20. message OneofMessage
  21. {
  22. oneof payload {
  23. MessageOne message = 1;
  24. EnumTwo enum = 2;
  25. }
  26. }