common_ut.proto 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. import "google/protobuf/descriptor.proto";
  2. import "library/cpp/protobuf/util/proto/merge.proto";
  3. package NProtobufUtilUt;
  4. extend google.protobuf.FieldOptions {
  5. optional bool XXX = 53772;
  6. }
  7. message TWalkTest {
  8. optional uint32 OptInt = 1 [(XXX)=true];
  9. repeated uint32 RepInt = 2;
  10. optional string OptStr = 3;
  11. repeated string RepStr = 4 [(XXX)=true];
  12. optional TWalkTest OptSub = 5 [(XXX)=true];
  13. repeated TWalkTest RepSub = 6;
  14. }
  15. message TWalkTestCyclic {
  16. optional TNested OptNested = 1;
  17. repeated uint64 OptInt64 = 2;
  18. optional TWalkTestCyclic OptSub = 3;
  19. optional TEnum OptEnum = 4;
  20. message TNested {
  21. optional uint32 OptInt32 = 1;
  22. optional TWalkTestCyclic OptSubNested = 2;
  23. repeated string RepStr = 3;
  24. optional TNested OptNested = 4;
  25. }
  26. enum TEnum {
  27. A = 0;
  28. B = 1;
  29. C = 2;
  30. }
  31. }
  32. message TMergeTestNoMerge {
  33. option (DontMerge) = true;
  34. optional uint32 A = 1;
  35. repeated uint32 B = 2;
  36. }
  37. message TMergeTestMerge {
  38. optional uint32 A = 1;
  39. repeated uint32 B = 2;
  40. repeated uint32 C = 3 [(DontMergeField)=true];
  41. }
  42. message TMergeTest {
  43. repeated uint32 MergeInt = 1;
  44. repeated uint32 NoMergeInt = 2 [(DontMergeField)=true];
  45. optional TMergeTestMerge MergeSub = 3;
  46. repeated TMergeTestMerge NoMergeRepSub = 4 [(DontMergeField)=true];
  47. optional TMergeTestNoMerge NoMergeOptSub = 5;
  48. }
  49. message TTextTest {
  50. optional uint32 Foo = 1;
  51. }
  52. message TTextEnumTest {
  53. enum EnumTest {
  54. EET_SLOT_1 = 1;
  55. EET_SLOT_2 = 2;
  56. }
  57. optional EnumTest Slot = 1;
  58. }