generated_code_proto2.proto 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. syntax = "proto2";
  2. package a.b.proto2;
  3. message TestMessage {
  4. optional int32 optional_int32 = 1;
  5. optional int64 optional_int64 = 2;
  6. optional uint32 optional_uint32 = 3;
  7. optional uint64 optional_uint64 = 4;
  8. optional bool optional_bool = 5;
  9. optional double optional_double = 6;
  10. optional float optional_float = 7;
  11. optional string optional_string = 8;
  12. optional bytes optional_bytes = 9;
  13. optional TestEnum optional_enum = 10;
  14. optional TestMessage optional_msg = 11;
  15. repeated int32 repeated_int32 = 21;
  16. repeated int64 repeated_int64 = 22;
  17. repeated uint32 repeated_uint32 = 23;
  18. repeated uint64 repeated_uint64 = 24;
  19. repeated bool repeated_bool = 25;
  20. repeated double repeated_double = 26;
  21. repeated float repeated_float = 27;
  22. repeated string repeated_string = 28;
  23. repeated bytes repeated_bytes = 29;
  24. repeated TestEnum repeated_enum = 30;
  25. repeated TestMessage repeated_msg = 31;
  26. required int32 required_int32 = 41;
  27. required int64 required_int64 = 42;
  28. required uint32 required_uint32 = 43;
  29. required uint64 required_uint64 = 44;
  30. required bool required_bool = 45;
  31. required double required_double = 46;
  32. required float required_float = 47;
  33. required string required_string = 48;
  34. required bytes required_bytes = 49;
  35. required TestEnum required_enum = 50;
  36. required TestMessage required_msg = 51;
  37. oneof my_oneof {
  38. int32 oneof_int32 = 61;
  39. int64 oneof_int64 = 62;
  40. uint32 oneof_uint32 = 63;
  41. uint64 oneof_uint64 = 64;
  42. bool oneof_bool = 65;
  43. double oneof_double = 66;
  44. float oneof_float = 67;
  45. string oneof_string = 68;
  46. bytes oneof_bytes = 69;
  47. TestEnum oneof_enum = 70;
  48. TestMessage oneof_msg = 71;
  49. }
  50. message NestedMessage {
  51. optional int32 foo = 1;
  52. }
  53. optional NestedMessage nested_message = 80;
  54. // Reserved for non-existing field test.
  55. // int32 non_exist = 89;
  56. }
  57. enum TestEnum {
  58. Default = 0;
  59. A = 1;
  60. B = 2;
  61. C = 3;
  62. }
  63. message TestUnknown {
  64. optional TestUnknown optional_unknown = 11;
  65. repeated TestUnknown repeated_unknown = 31;
  66. oneof my_oneof {
  67. TestUnknown oneof_unknown = 51;
  68. }
  69. optional int32 unknown_field = 89;
  70. }