field_enum_example.proto 549 B

123456789101112131415161718192021
  1. syntax="proto3";
  2. package qtprotobuf.examples;
  3. message SparseMessage {
  4. repeated uint32 fieldsUsed = 1;
  5. bool attendedParty = 2;
  6. uint32 numberOfKids = 3;
  7. string nickName = 4;
  8. }
  9. message ExplicitMessage {
  10. enum PARTY_STATUS {ATTENDED=0; DIDNT_ATTEND=1; DIDNT_ASK=2;};
  11. PARTY_STATUS attendedParty = 1;
  12. bool indicatedKids = 2;
  13. uint32 numberOfKids = 3;
  14. enum NO_NICK_STATUS {HAS_NO_NICKNAMES=0; WOULD_NOT_ADMIT_TO_HAVING_HAD_NICKNAMES=1;};
  15. NO_NICK_STATUS noNickStatus = 4;
  16. string nickName = 5;
  17. }